bvp4c unsolvable
Ältere Kommentare anzeigen
Hi everyone, I am trying to solve a system of coupled ODEs using bpv4c. The results I have obtained was not what I was expecting as the values are too weird. Also, an error (singular jacobian) will occur when I changed the initial guess.
Here's a script to obtain my results,
xmesh = linspace(0,2,10);
guess=[0 0.9 700 1000];
solinit=bvpinit(xmesh,guess);
sol=bvp4c(@odeEqn,@bc,solinit);
figure(1);
plot(sol.x,sol.y,'-')
Here's the function file for @odeEqn
Everything is well defined except Xgf,Xsf,Tgf and Tsf
function F = odeEqn(z,S)
Xgf=S(1);
Xsf=S(2);
Tgf=S(3);
Tsf=S(4);
dXgfdz=(A/Fgof)*(ps/4)*kf*(Cgf^n);
dXsfdz=(A/Fsof)*(-ps)*kf*(Cgf^n);
dTgfdz=(A*Sm*h*(Tsf-Tgf))/(Fgof*(CpM+Xgf*(2*CpW+CpC+CpM)));
dTsfdz=(A*((Sm*h*(Tsf-Tgf))+((Fgof/A)*dXgfdz*HOR1)))/(Fgof*(CpFE2+Xsf*(2*CpFE-CpFE2))+Fsup*Cpsup);
F=[dXgfdz; dXsfdz; dTgfdz; dTsfdz];
end
Here's the function file for the boundary conditions
function res = bc (Sa,Sb)
res = [Sa(1)
Sa(3)-723
Sb(1)-1
Sb(4)-1173];
end
Thank you in advance!
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Chemistry 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!