Help with the equation

조회 수: 10 (최근 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 CenterFile Exchange에서 Get 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