How to determine an y value at a specific x value?

1 次查看(过去 30 天)
How can I find what is e when sm1=8.1813e-13?

采纳的回答

Star Strider
Star Strider 2022-8-12
编辑:Star Strider 2022-8-12
Since ‘sm1’ is a function of ‘W1’ this is not as straightforward as it might at first appear.
v1=0.034; %viskozite yağ için 0.034 Pas 50C
v2=0.000594; %viskozite tuzlu su için 0.000481 Pas 50C
N=525/60; %hız (rad(s)
DS=0.022; %stern tube çap
R=0.011; %stern tube yarı çap
D=0.02; %şaftın çapı
L1=R; L2=R*2; L3=R*3; %uzunluk (m)
C=1*10^-3; %
%sm=sommerfield number
e=0.1:0.1:0.9;
%%%%%%%%%%%%%%%%
%%%% short journal bearing %%%%
%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%% yağ için %%%%%%%%%%%%%%%%
W1 = v1.*N.*R.*L1.*(L1./C).^2.*(e./4).*((16.*e.^2+pi.^2.*(1-e.^2)).^0.5./(1-e.^2).^2);
sm1 = v1.*N.*L1.*R./(4.*W1.*(L1./C).^2);
sm1q = 8.1813e-13;
W1_fcn = @(e) v1.*N.*R.*L1.*(L1./C).^2.*(e./4).*((16.*e.^2+pi.^2.*(1-e.^2)).^0.5./(1-e.^2).^2);
sm1_fcn = @(e) v1.*N.*L1.*R./(4.*W1_fcn(e).*(L1./C).^2); % Create Function
[e_v,fval] = fsolve(@(x)norm(sm1_fcn(x)-sm1q), rand) % Using 'fsolve'
Equation solved at initial point. fsolve completed because the vector of function values at the initial point is near zero as measured by the value of the function tolerance, and the problem appears regular as measured by the gradient.
e_v = 0.9969
fval = 6.4533e-10
% [e_v,fval] = fsolve(@(x)sm1_fcn(x)-sm1q, rand) % Using 'fsolve'
e_q = interp1(sm1, e, sm1q, 'linear','extrap') % Using 'interp1'
e_q = 0.9314
figure
plot(sm1, e)
xlabel('sm1')
ylabel('e')
Check1 = sm1_fcn(e_v) % 'fsolve'
Check1 = 6.4614e-10
Check2 = sm1_fcn(e_q) % 'interp1'
Check2 = 3.3070e-07
There are two different values depending on whether the function is solved numerically or extrapolated, neither of which provides the desired result.
EDIT — (12 Jul 2022 at 13:28)
Changed code to be functions of ‘e’ as stated in this Comment.
.

更多回答(2 个)

KSSV
KSSV 2022-8-12
Read about interp1

Torsten
Torsten 2022-8-12
编辑:Torsten 2022-8-12
sm1 = v1.*N.*L1.*R./(4.*W1.*(L1./C).^2)
gives
W1 = v1.*N.*L1.*R./(4.*sm1.*(L1./C).^2)
  4 个评论
Gloria
Gloria 2022-8-12
I asked the question wrong.
I have graph for (sm1,e) and W1 and sm1 depend on e;
I want to know what is e value for sm1=8.1813e-13
Torsten
Torsten 2022-8-12
编辑:Torsten 2022-8-12
v1=0.034; %viskozite yağ için 0.034 Pas 50C
v2=0.000594; %viskozite tuzlu su için 0.000481 Pas 50C
N=525/60; %hız (rad(s)
DS=0.022; %stern tube çap
R=0.011; %stern tube yarı çap
D=0.02; %şaftın çapı
L1=R; L2=R*2; L3=R*3; %uzunluk (m)
C=1*10^-3; %
sm1 = 8.1813e-13;
W1 = @(e) v1.*N.*R.*L1.*(L1./C).^2.*(e./4).*((16.*e.^2+pi.^2.*(1-e.^2)).^0.5./(1-e.^2).^2);
fun = @(e) sm1 - v1.*N.*L1.*R./(4.*W1(e).*(L1./C).^2);
options = optimset('Display','none','TolX',1e-16,'TolFun',1e-16);
format long
e0 = 0.9;
e1 = fsolve(fun,e0,options)
e1 =
0.993503468416158
fun(e1)
ans =
-2.889044323179053e-09
e0 = 1.1;
e2 = fsolve(fun,e0,options)
e2 =
1.006043289756047
fun(e2)
ans =
-2.487888648942313e-09

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Predictive Maintenance Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by