我试图在I * w域中解决类似PNP的问题(时间推导替换为I w乘法)。边界条件是零通量。错误是奇异的雅可比。谢谢你的帮助(对不起英语)
function[q]=ries2
clear;clc;
e=1;w=10;
opt = bvpset('RelTol',1e1);
xinit=linspace(-1,1,201);
solinit = bvpinit(xinit,@yinitfcn);
sol = bvp4c(@f,@bc,solinit);
q=sol.y;
function dydx = f(x,y)
dydx = zeros(6,1);
dydx(1)=dydx(4);
dydx(2)=dydx(5);
dydx(3)=dydx(6);
temp=dydx(2)*dydx(3)+y(2)*dydx(6);
temp1=dydx(1)*dydx(3)+y(1)*dydx(6);
dydx(4) = 1/e*(sqrt(-1)*w*y(1))+1*temp;
dydx(5) =1/e*(sqrt(-1)*w*y(2))+1*temp1;
dydx(6)=-1/(e^2)*y(2);
end
function res = bc(YL,YR)
res = [ YL(4)+YL(2)*YL(6)
YL(5)+YL(1)*YL(6)
YL(3)-1/(w*w+1)
YR(3)
YR(4)+YR(2)*YR(6)
YR(5)+YR(1)*YR(6)
];
end
function y = yinitfcn(x)
y =1* [0;0;1/w*w;0;-0;0];
end
end