System of equations dsolve

조회 수: 3 (최근 30일)
Roman Plano
Roman Plano 2020년 3월 9일
답변: Walter Roberson 2020년 3월 10일
Hey, I've tried playing with dsolve for a while and can't figure out how to get these equations to solve. I'm getting a "Warning: Unable to find explicit solution." so I'm not sure if its the syntaxing or if my equations are wrong in the first place. It needs to output equations for the flows (Fa,Fb,Fc) so I can plot them after. Thank you for any help and input!
k = 10; % 1/min
Kc = 0.01; % mol^2/dm^6
kA = 1; % 1/min
kB = 40; % 1/min
FA0 = 100; % mol/min
v0 = 100; % dm^3/min
Ca0 = 1; % mol/dm^3
syms Fa(V) Fb(V) Fc(V)
FT = Fa+Fb+Fc;
rA = -k*((Fa*Ca0/FT)-((Ca0/FT)^3)*(Fb*Fc^2/(Kc)));
RA = kA*Ca0*Fa/FT;
RB = kB*Ca0*Fb/FT;
ode1 = diff(Fa,V) == rA-RA;
ode2 = diff(Fb,V) == -rA-RB;
ode3 = diff(Fc,V) == -2*rA;
odes = [ode1, ode2, ode3];
[Fa(V),Fb(V),Fc(V)] = dsolve(odes)

답변 (1개)

Walter Roberson
Walter Roberson 2020년 3월 10일
The only thing wrong about your syntax is that you assume a particular order of output from dsolve() without having specified the order of variables to solve for. You should be saving the output of dsolve() into a single variable and then looking at the fields.
However, that is not going to change the fact that MATLAB cannot find the solution. MATLAB's dsolve() routine is not as advanced as some other competitors, but it is a difficult (or perhaps impossible) set of equations to solve anyhow. Maple was unable to find a solution in over 6 hours, for example.

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by