How to eliminate variables in a system of equations that contains exponential equations

1 view (last 30 days)
I tried to eleminate variables from a system of equations. The four equations are bellow. My variables are m'', Pv,eq, Psat, Tlv, Pv, Pd, Pc. Others are just constants. I want to eliminate Pv,eq, Psat, Tlv, and write m'' as a equation of Pv, Pd, Pc. I try to use "eliminate" to do that, but got this error
List must consist of polynomial expressions.
V = feval_internal(symengine, 'groebner::eliminate', polylist, vars);
I think that may be because my equation (9) is not polynomial. Then how to eliminate the variables I want to eliminate?
  2 Comments
Zhihan Wu
Zhihan Wu on 31 Jul 2022
sigbar = 1
Mbar = 0.1142
Rbar = 55.91
rhol = 660.7
Tv = 343
kl = 0.1164
hfg = 337945
syms m Pveq Psat Tlv Pv Pd Pc
eqns = [m == 2*sigbar/(2-sigbar)*sqrt(Mbar/(2*pi*Rbar))*(Pveq/sqrt(Tlv)-Pv/sqrt(Tv)), Pveq == Psat*exp((Pveq-Psat-(Pd+Pc))/(rhol*Tlv*Rbar/Mbar)),Psat == Pv*exp(hfg*Mbar/Rbar*(1/Tv-1/Tlv)),m == kl/hfg*(Tlv)];
eliminate(eqns,[Pveq Psat Tlv])
Error using mupadengine/feval_internal
List must consist of polynomial expressions.
Error in sym/eliminate (line 30)
V = feval_internal(symengine, 'groebner::eliminate', polylist, vars);
Here is it

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 31 Jul 2022
Q = @(v) sym(v);
sigbar = Q(1);
Mbar = Q(0.1142);
Rbar = Q(55.91);
rhol = Q(660.7);
Tv = Q(343);
kl = Q(0.1164);
hfg = Q(337945);
syms m Pveq Psat Tlv Pv Pd Pc
Psat = Pv*exp(hfg*Mbar/Rbar*(1/Tv-1/Tlv))
Psat = 
eqn1 = Pveq == Psat*exp((Pveq-Psat-(Pd+Pc))/(rhol*Tlv*Rbar/Mbar));
solPveq = solve(eqn1, Pveq, 'returnconditions', true)
solPveq = struct with fields:
Pveq: -(184698685*Tlv*lambertw(k, -(571*Pv*exp(38593319/19177130)*exp(-38593319/(55910*Tlv))*exp(-(571*Pv*exp(38593319/19177130)*exp(-38593319/(55910*Tlv)))/(184698685*Tlv))*exp(-(571*Pc)/(184698685*Tlv))*exp(-(571*Pd)/(184698685*Tlv)))/(184… parameters: k conditions: in(k, 'integer') & Pv ~= 0 & Tlv ~= 0
Pveq = solPveq.Pveq
Pveq = 
eqn2 = m == kl/hfg*(Tlv);
solTlv = solve(eqn2, Tlv)
solTlv = 
eqn3 = subs(m == 2*sigbar/(2-sigbar)*sqrt(Mbar/(2*pi*Rbar))*(Pveq/sqrt(Tlv)-Pv/sqrt(Tv)), Tlv, solTlv)
eqn3 = 
solm = solve(eqn3, m)
Warning: Unable to find explicit solution. For options, see help.
solm = Empty sym: 0-by-1
That is, you can isolate down to a single equation for m, but m is involved on both sides, and MATLAB is not able to solve for m.
When I look at the equation, complete with the LambertW call that itself involves m, it does not surprise me that there might not be a closed form solution.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!