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

1 Ansicht (letzte 30 Tage)
Gloria
Gloria am 12 Aug. 2022
Bearbeitet: Gloria am 12 Aug. 2022
How can I find what is e when sm1=8.1813e-13?

Akzeptierte Antwort

Star Strider
Star Strider am 12 Aug. 2022
Bearbeitet: Star Strider am 12 Aug. 2022
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.
.

Weitere Antworten (2)

KSSV
KSSV am 12 Aug. 2022
Read about interp1

Torsten
Torsten am 12 Aug. 2022
Bearbeitet: Torsten am 12 Aug. 2022
sm1 = v1.*N.*L1.*R./(4.*W1.*(L1./C).^2)
gives
W1 = v1.*N.*L1.*R./(4.*sm1.*(L1./C).^2)
  4 Kommentare
Gloria
Gloria am 12 Aug. 2022
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 am 12 Aug. 2022
Bearbeitet: Torsten am 12 Aug. 2022
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

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Predictive Maintenance Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by