Solve function to find temperature

27 次查看(过去 30 天)
Devin Rohan
Devin Rohan 2011-1-25
Here is my energy balance equation...
[h*As*(Ta-Ts)]+[As*e*sigma*Ts^4]=0
Where h=1.4((Ta-Ts)/D)^1.4, the first term models convection and the second term models radiation. All the variables are defined symbolically.
When I use the solve function to find Ts, I get this result...
Ts=solve((hc*A9*(Ta-Ts))-(A9*e9*sigma*Ts^4),Ts)
Ts = RootOf(X93^4*e9*sigma + X93*hc - Ta*hc, X93)
What is RootOf and X93?

回答(1 个)

Walter Roberson
Walter Roberson 2011-1-25
RootOf(X93^4*e9*sigma + X93*hc - Ta*hc, X93)
means that the answer you are seeking are the values that can be substituted for the variable X93 that will make the expression evaluate to 0.
As this is a quadratic, analytic solutions for it exist. You can force solve to return the analytic solutions by using one of the solve() options to specify the maximum degree to resolve analytically. Be warned that if you do this, the expressions will be long and messy.
  2 个评论
Devin Rohan
Devin Rohan 2011-1-25
I'm not sure I follow what's going on. If I'm trying to solve for Ts and I also get another variable I don't know "X93," doesn't that give me 1 equation and 2 unknowns? How am I suppose to solve this?
Walter Roberson
Walter Roberson 2011-1-25
RootOf() means the _values_ of the dummy variables that satisfy the expression being 0. In the case of a simple quadratic, cubic, or quartic polynomial, there are analytical solutions to give the exact values. There are some other expressions that have useful analytic solutions as well. For anything beyond quadratic, though, solving for the symbolic values and dropping them in to the expression would usually result in such a mess as to obscure the expression. For example the exact solutions for the above quartic run to pages.
In situations in which you have values for all of the coefficients, you can force Matlab to try to evaluate RootOf expressions to numeric values using vpa(). It will then do a root search (using complex transforms usually) to find numeric approximations of the values. Sometimes, though, the expression inside a RootOf() is too messy to find numeric values for (especially if it is discontinuous.)
If you still don't understand, then here are the exact solutions for Ts in the most readable form I could generate:
(1/12)*(-6*12^(1/3)*(-(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(2/3)+4*hc*Ta*12^(1/3)*e9*sigma)/(e9*sigma*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3)))^(1/2)+(1/12)*6^(1/2)*((-12^(1/3)*(-6*12^(1/3)*(-(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(2/3)+4*hc*Ta*12^(1/3)*e9*sigma)/(e9*sigma*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3)))^(1/2)*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(2/3)+4*12^(2/3)*(-6*12^(1/3)*(-(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(2/3)+4*hc*Ta*12^(1/3)*e9*sigma)/(e9*sigma*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3)))^(1/2)*hc*Ta*e9*sigma-72*hc*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3))/(e9*sigma*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3)*(-6*12^(1/3)*(-(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(2/3)+4*hc*Ta*12^(1/3)*e9*sigma)/(e9*sigma*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3)))^(1/2)))^(1/2)
(1/12)*(-6*12^(1/3)*(-(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(2/3)+4*hc*Ta*12^(1/3)*e9*sigma)/(e9*sigma*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3)))^(1/2)-(1/12)*6^(1/2)*((-12^(1/3)*(-6*12^(1/3)*(-(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(2/3)+4*hc*Ta*12^(1/3)*e9*sigma)/(e9*sigma*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3)))^(1/2)*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(2/3)+4*12^(2/3)*(-6*12^(1/3)*(-(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(2/3)+4*hc*Ta*12^(1/3)*e9*sigma)/(e9*sigma*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3)))^(1/2)*hc*Ta*e9*sigma-72*hc*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3))/(e9*sigma*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3)*(-6*12^(1/3)*(-(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(2/3)+4*hc*Ta*12^(1/3)*e9*sigma)/(e9*sigma*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3)))^(1/2)))^(1/2)
-(1/12)*(-6*12^(1/3)*(-(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(2/3)+4*hc*Ta*12^(1/3)*e9*sigma)/(e9*sigma*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3)))^(1/2)+(1/12)*6^(1/2)*((-12^(1/3)*(-6*12^(1/3)*(-(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(2/3)+4*hc*Ta*12^(1/3)*e9*sigma)/(e9*sigma*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3)))^(1/2)*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(2/3)+4*12^(2/3)*(-6*12^(1/3)*(-(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(2/3)+4*hc*Ta*12^(1/3)*e9*sigma)/(e9*sigma*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3)))^(1/2)*hc*Ta*e9*sigma+72*hc*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3))/(e9*sigma*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3)*(-6*12^(1/3)*(-(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(2/3)+4*hc*Ta*12^(1/3)*e9*sigma)/(e9*sigma*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3)))^(1/2)))^(1/2)
-(1/12)*(-6*12^(1/3)*(-(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(2/3)+4*hc*Ta*12^(1/3)*e9*sigma)/(e9*sigma*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3)))^(1/2)-(1/12)*6^(1/2)*((-12^(1/3)*(-6*12^(1/3)*(-(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(2/3)+4*hc*Ta*12^(1/3)*e9*sigma)/(e9*sigma*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3)))^(1/2)*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(2/3)+4*12^(2/3)*(-6*12^(1/3)*(-(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(2/3)+4*hc*Ta*12^(1/3)*e9*sigma)/(e9*sigma*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3)))^(1/2)*hc*Ta*e9*sigma+72*hc*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3))/(e9*sigma*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3)*(-6*12^(1/3)*(-(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(2/3)+4*hc*Ta*12^(1/3)*e9*sigma)/(e9*sigma*(hc*(9*hc+3^(1/2)*(hc*(256*Ta^3*e9*sigma+27*hc))^(1/2))*e9*sigma)^(1/3)))^(1/2)))^(1/2)

请先登录,再进行评论。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by