Unable to meet the tolerance without using more than 1666 mesh points.

조회 수: 3 (최근 30일)
I have a coupled non-linear differential equations
(d^2 f)/(dy^2 )+m2*g2*dB/dy-2*i*R2*g1*f - g3*G1*y - R4*g1 = 0
(d^2 B)/(dy^2 )+t4/(1-i*H1)*df/dy=0
(d^2 T)/(dy^2 )-1/2*g4*G1*PR*(f+ ̅f)+ER*PR*[g5*(df/dy*d ̅f/dy)+g6*m2*(dB/dy*dB̅/dy)]=0, where ̅f is conjugate of f and B̅ is conjugate of B
Boundary conditions are
f=0 at y=0
f=C1 at y=1
And
dB/dy-(t4/(P1* (1-i*H1 ) ))* B=0 at y=0
dB/dy+(t4/(P2 (1-i*H1 ) ))* B=0 at y=1
and
T=0 at y=0
T=1 at y=1
I already got the solutions and graph for the first two equations with the help received from Torsen, but now i have extended the problem for three equations, when i run the program, i get an error "Unable to meet the tolerance without using more than 1666 mesh points", I tried using NMax but could not get the solution
Matlab programs
close all
clc
p=0.1;
P1=2;
P2=2;
b1=0.00021;
b2=0.000058;
S1=0.005;
S2=580000;
G1=2;
m2=20;
R1=997.1;
R2=3;
C1=0;
R3=4420;
H1=0.25;
K1=3;
R4=1;
PR=7.0;
ER= 2.0;
cf=4179;
cs=0.56;
K2=0.613;
K3=7.2;
t1=(1./((1-p).^2.5));
t2=(1-p)+(p.*(R3./R1));
t3=(1-p)+p.*((R3.*b2)./(R1.*b1));
S=(S2./S1);
t4=1-((3*(1-S).*p)./((2+S)+(1-S).*p));
t5=(1-p)+(p.*R3.*cs)./(R1.*cf);
t6=(1+2.*(K2./K3)+2.*p.*(1-K2./K3))./(1+2.*(K2./K3)-p.*(1-K2./K3));
g1=t2./t1;
g2=1/t1;
g3=t3./t1;
g4=t5./t6;
g5=t1./t6;
g6=1./(t4.*t6);
m1=(t4./(P1.*(1-1i.*H1)));
m2=(t4./(P2.*(1-1i.*H1)));
dydx=@(x,y)[y(4);
y(5);
y(6);
-m2.*g2.*y(4)+2.*1i.*R2.*g1.*y(1)+g3.*G1.*x+R4.*g1;
(-t4./(1-1i.*H1)).*y(3);
1/2.*g4.*G1.*PR.*(y(1)+conj(y(1)))-ER.*PR.*(g5.*(y(4).*conj(y(4))+g6.*m2.*(y(5).*conj(y(5)))))];
BC = @(ya,yb)[ya(1)-0;yb(1)-C1;ya(3)-0;yb(3)-1.0;ya(5)-m1.*ya(2);yb(5)+m2.*yb(2)];
yinit = [0.01;0.01;0.01;0.01;0.01;0.01];
solinit = bvpinit(linspace(0,1,50),yinit);
% options = bvpset('AbsTol',1e-6,'RelTol',1e-4,'stats','on','Nmax',1000);
options = bvpset('AbsTol',1e-6);
% options = bvpset('RelTol',1e-4);
%options = bvpset('stats','on');
%options = bvpset('Nmax',1000);
U1 = bvp4c(dydx,BC,solinit,options);
hold on
plot(U1.x,real(U1.y(3,:)),'b','linewidth',1.5)
plot(U1.x,imag(U1.y(3,:)),'r','linewidth',1.5)
  댓글 수: 5
Syed Mohiuddin
Syed Mohiuddin 2023년 1월 10일
I use R2016b, for the previous question also i did not get the option to accept the answer, please provide the option for the previous question too. Thank you
Torsten
Torsten 2023년 1월 11일
It's all right - you are welcome.

댓글을 달려면 로그인하십시오.

채택된 답변

Torsten
Torsten 2023년 1월 10일
이동: Torsten 2023년 1월 10일
Seems to work (see above).

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

제품


릴리스

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by