System of equations dsolve
2 views (last 30 days)
Show older comments
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)
0 Comments
Answers (1)
Walter Roberson
on 10 Mar 2020
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.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!