Using a solution from ODE1 to find a solution for ODE2
Afficher commentaires plus anciens
What I would like to do is use the solution from an ODE array (ODE1) and use it to another ODE array (ODE2). ODE2 is only dependent on ODE1 and not the vice versa. I'm not sure how to set this up.
The variables I'm looking to use are: x-axis = t (for both), y-axis = c (for 1), y-axis = f (for 2)
Here's what I currently have for c:
function dc = dcdt(t,c)
Vm = 4.9e+12;
Vh = 3.542e+12;
Ve = 0.48e+12;
Vo = 1.64e+12;
cfm = 2.97e+10;
ofm = cfm;
cfh = 1.583e+10 + 5.88e+10;
ofh = ofm + cfh;
cfe = 8.04e+10;
ofe = ofh + cfe;
cfo = 4.06e+10;
ofo = ofe + cfo;
cm = -c(1)*cfm/Vm;
ch = c(1)*ofm/Vh - c(2)*ofh/Vh;
ce = c(2)*ofh/Ve - c(3)*ofe/Ve;
co = c(3)*ofe/Vo - c(4)*ofo/Vo;
dc = [cm; ch; ce; co];
end
Here's the differential for f:
fm = f(1)*(1 - f(1)/60000) - f(1)*(1 - f(1)/60000)^(14600/f(1)) - 0.04*f(1)*exp(-1/c(1));
fh = f(2)*(1 - f(2)/60000) - f(2)*(1 - f(2)/60000)^(14600/f(2)) - 0.04*f(2)*exp(-1/c(2));
fe = f(3)*(1 - f(3)/60000) - f(3)*(1 - f(3)/60000)^(14600/f(3)) - 0.04*f(3)*exp(-1/c(3));
fo = f(1)*(1 - f(4)/60000) - f(4)*(1 - f(4)/60000)^(14600/f(4)) - 0.04*f(4)*exp(-1/c(4));
df = [fm; fh; fe; fo];
Would I have to use the PDE solver for f?
1 commentaire
Torsten
le 31 Mar 2015
And why don't you solve the 8 ODEs together ?
Best wishes
Torsten.
Réponses (0)
Catégories
En savoir plus sur PDE Solvers dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!