If vpasolve cannot find a solution

2 visualizaciones (últimos 30 días)
esra ilhan
esra ilhan el 5 de Dic. de 2020
Comentada: Walter Roberson el 6 de Dic. de 2020
Dears,
I am trying to solve equations with vpasolve, the first solver gives the solution, while the second one fails to give a solution, is there any suggestion for the given system?
% ONE REACROR WITH A VOLUME OF 500 dm^3
V_CSTR1 = 500;
syms X T
sol1 = vpasolve([T0 + X*(-DH)/(DeltaCp)== T,0==FA0*X/(CA0^2*(1-X)^2*(k0*exp(E_R *(1/T0 -1/T)))) - V_CSTR1], [X,T],[0.9,500]);
S1 = [sol1.X sol1.T];
% TWO REACTORS WITH A VOLUME OF 250 dm^3
V_CSTR2 = 250; %dm^3
syms X1 T1 X2 T2
sol2 = vpasolve([T0 + X1*(-DH)/(DeltaCp)== T1,0==FA0*X1/(CA0^2*(1-X1)^2*(k0*exp(E_R*(1/T0 -1/T1)))) - V_CSTR2, T1 + (X2-X1)*(-DH)/(DeltaCp)== T2,0==FA0*(X2-X1)/(CA0^2*(1-X2)^2*(k0*exp(E_R *(1/T0 -1/T2)))) - V_CSTR2], [X1,T1,X2,T2],[0.7,500,0.9,550]);
S2 = [sol2.X1 sol2.T1 sol2.X2 sol2.T2];
Thank you for the answer

Respuestas (1)

Walter Roberson
Walter Roberson el 5 de Dic. de 2020
sol2 = vpasolve([T0 + X1*(-DH)/(DeltaCp)== T1,0==FA0*X1/(CA0^2*(1-X1)^2*(k0*exp(E_R*(1/T0 -1/T1)))) - V_CSTR2, T1 + (X2-X1)*(-DH)/(DeltaCp)== T2,0==FA0*(X2-X1)/(CA0^2*(1-X2)^2*(k0*exp(E_R *(1/T0 -1/T2)))) - V_CSTR2], [X1,T1,X2,T2], [0 1; -inf inf; -inf inf; -inf inf]);
[0.88240997524634695443929681283911, 476.48199504926939088785936256782, 1.0355693874983732380716901511454, 507.11387749967464761433803022908]
which is not terribly bad compared to your initial conditions.
  2 comentarios
esra ilhan
esra ilhan el 6 de Dic. de 2020
Thank you for the answer, the code now indeed works and calculates for the second solver however, X1 and X2 values shoul not exceed the value of 1 and now I have 1.035 (correct answer for that is 0,967 says the book), do you have any further comments for that?
Walter Roberson
Walter Roberson el 6 de Dic. de 2020
sol2 = vpasolve([T0 + X1*(-DH)/(DeltaCp)== T1,0==FA0*X1/(CA0^2*(1-X1)^2*(k0*exp(E_R*(1/T0 -1/T1)))) - V_CSTR2, T1 + (X2-X1)*(-DH)/(DeltaCp)== T2,0==FA0*(X2-X1)/(CA0^2*(1-X2)^2*(k0*exp(E_R *(1/T0 -1/T2)))) - V_CSTR2], [X1,T1,X2,T2], [0 1; -inf inf; 0 1; -inf inf]);
0.96937039317956112668398133819721 for X2.

Iniciar sesión para comentar.

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by