Help with the equation

7 ビュー (過去 30 日間)
saff204
saff204 2023 年 12 月 20 日
コメント済み: VBBV 2023 年 12 月 20 日
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 :)

採用された回答

John D'Errico
John D'Errico 2023 年 12 月 20 日
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.

その他の回答 (1 件)

VBBV
VBBV 2023 年 12 月 20 日
編集済み: VBBV 2023 年 12 月 20 日
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 件のコメント
VBBV
VBBV 2023 年 12 月 20 日
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

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGet Started with Symbolic Math Toolbox についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by