Boundary condition in non-linear ODE

조회 수: 1 (최근 30일)
zakaria azdad
zakaria azdad 2019년 7월 4일
댓글: zakaria azdad 2019년 7월 9일
Dear all,
I wanted to solve this two set of non-linear ODE using matlab :
are constant
The boundary conditions are the following :
and at
and at ( ν is an arbitrary constant < 1)
this the code that I constracted so far
function bvp4c_mathworks
rspan = [0.01 1];
init = zeros(1,4);
solinit = bvpinit(rspan,init);
sol = bvp4c(@ode4,@bc4,solinit);
eta = sol.x;
theta = sol.y(1,:);
Sr = sol.y(2,:);
plot(eta,theta)
hold on
plot(eta,Sr,'r')
hold off
legend('Nr(r)','\beta(r)')
end
function du = ode4(eta,u)
theta = u(1);
Sr = u(2); % beta
dtheta = u(3); % d(theta)/dr
dSr = u(4); % d(Sr)/dr
lambda =15.94;
P=12; %P=F*a/D; F is the applied force ; a radius of the membrane ; D = E*h^3/12(1-nu^2)
alpha = 3; %alpha =C*a^2/D ; C in-plane stifnnes
du(1) = dtheta;
du(2) = dSr;
du(3) = (P/(2*pi*eta)-(1/eta)*dtheta+(1/eta^2+lambda^2+Sr));
du(4) = (alpha*theta^2/(2*eta^2)+3/eta*dSr);
du(4) = du(4)/eta;
end
function res = bc4(u0, ur)
res = [ur(1)-0
ur(2)-0
ur(3)-0
u0(2)-0];
end
  댓글 수: 2
Torsten
Torsten 2019년 7월 4일
du(3) and du(4) and your boundary conditions do not correspond to your mathematical equations.
zakaria azdad
zakaria azdad 2019년 7월 4일
I put theta= u(3) than du(3) = d²theta, probably I am wrong, could you give a suggestion to fix the bugg? and how could you modify the boundary conditions.
thanks

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

채택된 답변

Torsten
Torsten 2019년 7월 4일
편집: Torsten 2019년 7월 4일
function du = ode4(eta,u)
theta = u(1);
Sr = u(2); % beta
dtheta = u(3); % d(theta)/dr
dSr = u(4); % d(Sr)/dr
lambda = 15.94;
P=12; %P=F*a/D; F is the applied force ; a radius of the membrane ; D = E*h^3/12(1-nu^2)
alpha = 3; %alpha =C*a^2/D ; C in-plane stifnnes
du = zeros(4,1);
du(1) = dtheta;
du(2) = dSr;
du(3) = P/(2*pi*eta)- 1/eta*dtheta + theta*(1/eta^2+lambda^2+Sr);
du(4) = -alpha*theta^2/(2*eta^2) - 3/eta*dSr;
end
function res = bc4(ul,ur)
nu = 0.1;
res = zeros(4,1);
res(1) = ul(1);
res(2) = ur(1);
res(3) = ul(4);
res(4) = ur(4)+(1-nu)*ur(2);
end
  댓글 수: 9
Torsten
Torsten 2019년 7월 9일
Yes, use the solution of a converging run as initial guess for a subsequent run.
But you will have to do this on your own now because it's time to start learning MATLAB.
zakaria azdad
zakaria azdad 2019년 7월 9일
Any hint where to start?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by