Help with the equation
조회 수: 10 (최근 30일)
이전 댓글 표시
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 :)
댓글 수: 0
채택된 답변
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.
댓글 수: 0
추가 답변 (1개)
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)
vpa(sol)
댓글 수: 1
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)
vpa(sol)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

