Warning: Unable to find explicit solution.
Ältere Kommentare anzeigen
I was trying to use dsolve for a system of ODE's (line 19 is the dsolve function)
- d(Ca)/d(t)=-(k*ca*cb)-(vo*ca)/(Vo+vo*t)
- d(Cb)/d(t)=-(k*ca*cb)+(vo(cbo-cb))/(Vo+vo*t)
- d(Cc)/d(t)=(k*ca*cb)-(vo*cc)/(Vo+vo*t)
- d(Cd)/d(t)=(k*ca*cb)-(vo*cd)/(Vo+vo*t)
k=2.2;
vo=0.05;
cbo=0.025;
Vo=5;
cao=0.05;
tspam=0:100:500;
syms cb(t) ca(t) cc(t) cd(t)
s=dsolve(diff(ca)==-(k*ca*cb)-(vo*ca)/(Vo+vo*t),diff(cb)==-(k*ca*cb)+(vo*(cbo-cb))/(Vo+vo*t),diff(cc)==(k*ca*cb)-(vo*cc)/(Vo+vo*t),diff(cd)==(k*ca*cb)-(vo*cd)/(Vo+vo*t),cc(0)==0,cd(0)==0,ca(0)==cao,cb(0)==cbo);
Warning: Unable to find explicit solution.
> In dsolve (line 201)
In Ejercicio4_29 (line 19)
Antworten (1)
madhan ravi
am 11 Apr. 2019
dsolve() is not able to solve the problem so use ode45() instead:
k=2.2;
vo=0.05;
cbo=0.025;
Vo=5;
cao=0.05;
% tspam=0:100:500; %%?
syms cb(t) ca(t) cc(t) cd(t)
eq1 = diff(ca)==-(k*ca*cb)-(vo*ca)/(Vo+vo*t);
eq2 = diff(cb)==-(k*ca*cb)+(vo*(cbo-cb))/(Vo+vo*t);
eq3 = diff(cc)==(k*ca*cb)-(vo*cc)/(Vo+vo*t);
eq4 = diff(cd)==(k*ca*cb)-(vo*cd)/(Vo+vo*t);
vars = [cb(t); ca(t); cc(t); cd(t)];
V = odeToVectorField([eq1,eq2,eq3,eq4])
M = matlabFunction(V,'vars', {'t','Y'})
interval = [0 1.5]; %time interval
y0 = [cao cbo 0 0]; %initial conditions
ySol = ode45(M,interval,y0);
tValues = linspace(interval(1),interval(2),1000);
yValues = deval(ySol,tValues,1); %number 1 denotes first solution likewise you can mention 2 , 3 & 4 for the next two solutions
plot(tValues,yValues)
3 Kommentare
Gabriela Tezanos Pinto
am 11 Apr. 2019
madhan ravi
am 11 Apr. 2019
Upload your equations in latex form and the initial conditions.
Gabriela Tezanos Pinto
am 11 Apr. 2019
Kategorien
Mehr zu Code Performance finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
