Solve Equation for w(t)

조회 수: 3 (최근 30일)
Mario Braumüller
Mario Braumüller 2021년 1월 30일
댓글: Walter Roberson 2021년 5월 7일
I need to solve the following equation to w(t). I just need the real part solution. w(t) = .....
All other variables are later given in a table so I can calculate different solutions.
I´m not able to solve this in a m.file?
It would be great if someone can help me. please
Thanks a lot
  댓글 수: 7
Rik
Rik 2021년 2월 28일
Deleted comments:
Hello, i tried it with the following code:
syms rho_w w(t) p_u d_0 D_0 l h_0 t kappa m_St m_w rho_L c_w A_Q v(t) h_d lambda zeta n
eqn = (rho_w / 2) * w(t)^2 + p_u == (rho_w / 2) * (d_0 / D_0)^4 * w(t)^2 + ((l - h_0) / (l - h_0 + (d_0 / D_0)^2 * w(t) * t))^kappa + (rho_w / (m_St + m_w - rho_w * (pi / 4) * d_0^2 * w(t) * t)) * (rho_w * (pi / 4) * d_0^2 * w(t)^2 - (rho_L / 2) * c_w * A_Q * v(t)^2) * (h_0 + h_d - (d_0 / D_0)^2 * w(t) * t) + (rho_w / 2) * (d_0 / D_0)^4 * w(t)^2 * (lambda * ((h_0 - (d_0 / D_0)^2 * w(t) * t) / D_0) + sum(zeta,i,1,n)) ;
solx = solve(eqn, w(t))
This equation is now to be solved for w (t), but under the condition that v (t) is known.
Rena Berman
Rena Berman 2021년 5월 6일
(Answers Dev) Restored edit

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2021년 1월 31일
syms rho_w w(t) p_u d_0 D_0 l h_0 t kappa m_St m_w rho_L c_w A_Q v(t) h_d lambda zeta n
syms sum_of_zeta
eqn = (rho_w / 2) * w(t)^2 + p_u == (rho_w / 2) * (d_0 / D_0)^4 * w(t)^2 + ((l - h_0) / (l - h_0 + (d_0 / D_0)^2 * w(t) * t))^kappa + (rho_w / (m_St + m_w - rho_w * (pi / 4) * d_0^2 * w(t) * t)) * (rho_w * (pi / 4) * d_0^2 * w(t)^2 - (rho_L / 2) * c_w * A_Q * v(t)^2) * (h_0 + h_d - (d_0 / D_0)^2 * w(t) * t) + (rho_w / 2) * (d_0 / D_0)^4 * w(t)^2 * (lambda * ((h_0 - (d_0 / D_0)^2 * w(t) * t) / D_0) + sum_of_zeta) ;
syms W V
eqnW = subs(eqn, w(t), W)
eqnW = 
solw = solve(eqnW, W)
Warning: Unable to find explicit solution. For options, see help.
solw = Empty sym: 0-by-1
char(eqnW)
ans = 'p_u + (W^2*rho_w)/2 == (-(h_0 - l)/(l - h_0 + (W*d_0^2*t)/D_0^2))^kappa + (rho_w*((W^2*d_0^2*rho_w*pi)/4 - (A_Q*c_w*rho_L*v(t)^2)/2)*(h_0 + h_d - (W*d_0^2*t)/D_0^2))/(m_St + m_w - (W*d_0^2*rho_w*t*pi)/4) + (W^2*d_0^4*rho_w)/(2*D_0^4) + (W^2*d_0^4*rho_w*(sum_of_zeta + (lambda*(h_0 - (W*d_0^2*t)/D_0^2))/D_0))/(2*D_0^4)'
  댓글 수: 5
James Tursa
James Tursa 2021년 5월 6일
"... always has an even number of real-valued roots ..."
should read
"... always has an even number of complex-valued roots ..."
Walter Roberson
Walter Roberson 2021년 5월 7일
James is correct, I mis-typed before.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by