Bvp4c Error; cannot solve collocation equations- singular Jacobian
显示 更早的评论
The eqns to be solved: f'''+ff''+1-f'^2-A(f'-1+(n/2)f'')+M(1-f')=0 (1/Pr)Y''+fY'-2f'Y-A(2Y+(n/2)Y')+Ec(M(1-f')^2+f''^2)=0 w/BC's: f(0)=0,f'(0)=lambda,Y(0)=1,f'(inf)=>1,Y(inf)=>0 it is known that there are two solutions where one can be found at infinity=10 and will add infinity=40 when I can fix error. Later will also be running for different values of lambda. I have checked and rechecked equation, I have also played with the initial guesses. I would appreciate any guidance.
global Pr A M Ec lambda
Pr=1; A=0.1; M=0.05; Ec=1; lambda=-1.33;
%
rlow=0;
rhigh=10;
N=50;
options=bvpset('stats','on','RelTol',1e-9);
solinit=bvpinit(linspace(rlow,rhigh,N),[0, -1, 0, 1 ,0]);
%
sol=bvp4c(@projode,@mybcs,solinit,options);
function dy=projode(n,y)
global Pr A M Ec
dy=[y(2); y(3); A*y(2)+A*n*y(3)/2+M*y(2)+y(2)^2-y(1)*y(3)-1-A-M; y(4);...
Pr*(2*y(2)*y(4)+A*2*y(4)+A*n*y(5)/2-y(1)*y(5)-Ec*M*(1-y(2))^2-Ec*y(3)^2)];
function dy=projode(n,y)
global Pr A M Ec
dy=[y(2); y(3); A*y(2)+A*n*y(3)/2+M*y(2)+y(2)^2-y(1)*y(3)-1-A-M; y(4);...
Pr*(2*y(2)*y(4)+A*2*y(4)+A*n*y(5)/2-y(1)*y(5)-Ec*M*(1-y(2))^2-Ec*y(3)^2)];
function res=mybcs(ya,yb)
global lambda
res=[ya(1) ya(2)-lambda ya(4)-1 yb(2)-1 yb(4)];
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!