Hi, can anyone help me solve this one?
contents:
ρ=1.025
L=130.2608788
B=20.48
δ= 0.695904983
D BAL=9220.372163
T=8.348645215
solving for T BAL.
it should equal something around 4.5 from what my proffesor told me :)

 Akzeptierte Antwort

John D'Errico
John D'Errico am 20 Dez. 2023

0 Stimmen

So why not try it? First, use valid variable names, not greek letters for the variables.
rho = 1.025;
L = 130.2608788;
B = 20.48;
delta = 0.695904983;
D_BAL = 9220.372163;
T = 8.348645215;
You can use symbolic tools. Or you can use function handles and fzero.
syms T_BAL
Remember that MATLAB uses log to represent the latural log. NOT ln.
Tbalsol = solve(D_BAL == rho*L*B*T_BAL*(delta + 0.1*log(T_BAL/T)))
The w in there will be the Wright-Omega function, which often arises in problems like this. You can resolve the call to the omega function by use of double, or vpa.
The result will be not quite 4.5, but close. You can convince yourself this is a solution by plotting it.
fplot(-D_BAL + rho*L*B*T_BAL*(delta + 0.1*log(T_BAL/T)),[0,10])
hold on
grid on
plot(Tbalsol,0,'rx')
Or you could have used fzero.

Weitere Antworten (1)

VBBV
VBBV am 20 Dez. 2023
Bearbeitet: VBBV am 20 Dez. 2023

0 Stimmen

Check whether the density input is correct or not to get a value of 4.5 forTBAL
syms T_BAL
Rho =1.225; % density ?? % standard air density
L=130.2608788;
B=20.48;
Delta = 0.695904983;
D_BAL=9220.372163;
T=8.348645215;
eqn = D_BAL == Rho*L*B*T_BAL*(Delta+0.1*log(T_BAL/T));
sol = solve(eqn,T_BAL)
sol = 
vpa(sol)
ans = 
4.4563283034804016008856605103122

1 Kommentar

See my corrected answer above, it is around 4.45 which is ~ 4.5 as what your professor told it. Another thing is if all the parameters have follow same unit system, the density of water is 1000 kg/m^3 and if i use your value to solve the equation it shows TBAL is around 0.027.
syms T_BAL
Rho =1025; % density ?? % standard air density
L=130.2608788;
B=20.48;
Delta = 0.695904983;
D_BAL=9220.372163;
T=8.348645215;
eqn = D_BAL == Rho*L*B*T_BAL*(Delta+0.1*log(T_BAL/T));
sol = solve(eqn,T_BAL)
sol = 
vpa(sol)
ans = 
0.027288560818801951791691624775026

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Programming finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2023a

Gefragt:

am 20 Dez. 2023

Kommentiert:

am 20 Dez. 2023

Community Treasure Hunt

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

Start Hunting!

Translated by