If vpasolve cannot find a solution
조회 수: 2 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
Walter Roberson
2020년 12월 5일
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
Walter Roberson
2020년 12월 6일
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.
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!