How to solve nonlinear coupled ode by Shooting method .

Respected sir ,
I am getting problem to solve non linear coupled BVP by shooting method . Can you help me to solve that problem?
My problem is
F'''=(1/(1+epsilon1*(1-G)))*(A*F'+.5*t*A*F''+(F')^2-F*F''+epsilon1*G'*F''-lambda*G-delta*H+M*F'-(-1+epsilon1*G-epsilon1)*bita*F');
G''=(1/(1+epsilon2*G+Nr))*(Pr*(2*A*G+.5*A*t*G'+F'*G-F*G'-M*Ec*(F')^2-Ec*(1-epsilon1*G'+epsilon1)*(F'')^2)-epsilon2*(G')^2);
H''= Sc*(2*A*H+.5*A*t*H'+F'*H-F*H'+Rex*Zai*H);
where A=0 ; epsilon1= 0 ; epsilon2=1; lambda= 1; delta=1; bita=0; Nr=.1; Pr=5; M=.5;
Ec=.1 ; Sc=1; Rex= .3 ; Zai= .1 ;
and F(0)=0 , F'(0)=1 F'(infity)=0 G(0)=1 G(infity)=0 H(0)= 1 H(infity)=0
and F''(0) , G'(0) & H'(0) we have to guess
so tell me how to solve by shooting method with using rk -4 method .

2 comentarios

darova
darova el 13 de Oct. de 2019
What have you tried? What ideas do you have? Did you see examples in MATLAB help?
I general do it with general shooting method but i'm getting problem how to do initial guess.
Here i'm attaching code which i have tried .

Iniciar sesión para comentar.

 Respuesta aceptada

Chandan Kumawat
Chandan Kumawat el 14 de Oct. de 2019
It is okey but my problem still remain same that how i do appropriate guess for according to your code
F2(0) & G1(0) & H1(0)

3 comentarios

darova
darova el 1 de Nov. de 2019
Why did you accept your answer instead of mine?
here I'm not getting any option for accept your answer .
Thanks for solve my problem .
darova
darova el 2 de Nov. de 2019
Whta is this?
1233.PNG

Iniciar sesión para comentar.

Más respuestas (1)

darova
darova el 14 de Oct. de 2019
Try bvp4c
Suggestion:
F0 = y(1);
%% ...
H1 = y(7);
% and use these variables to make your code more redable
dy(1) = F1;
%% ..
You can also use temporary variables to make your code simpler
dy(3) = 1/(1+e1*(1-G0))* ...
(A*F1 + 0.5*t*A*F2 + F1^2 - F0*F2 + e1*G1*F2 - lambda*G0 - delta*H0 + M*F1 - (-1+e1*G0-e1)*bita*F1);
%%
TEMP0 = 1/(1+e1*(1-G0));
TEMP1 = 0.5*t*A*F2;
TEMP2 = e1*G1*F2;
TEMP3 = (-1+e1*G0-e1)*bita*F1;
dy(3) = TEMP0 * (A*F1 + TEMP1 + F1^2 - F0*F2 + TEMP2 - lambda*G0 - delta*H0 + M*F1 - TEMP3);
See attached scripts

10 comentarios

It is okey but my problem still remain same that how i do appropriate guess for according to your code
F2(0) & G1(0) & H1(0)
darova
darova el 14 de Oct. de 2019
How do you think those points mean?
img1.png
Please can you attach total code which you made for this problem?
darova
darova el 15 de Oct. de 2019
Please see the picture
123.png
Thank you sir give attention on my problem and this code working but again i'm getting one is that it is give answer but also give some error notification in command window which i'm write below is ..........
Warning: Unable to meet the tolerance without using more than 1428 mesh
points.
The last mesh of 1000 points and the solution are available in the output
argument.
The maximum residual is 0.159818, while requested accuracy is 0.001.
> In bvp4c (line 323)
In Untitled5 (line 6)
darova
darova el 15 de Oct. de 2019
Impossible. What is Untitled6 ? Why don't you run the script i attached Untitled21?
Here i use untitled 5 is same with which you attached untitled 21 .This error come when change constant value of M Ec Pr ...... and one more thing solution and plot are coming which i need .
Does is there any code for solve this problem by using shooting method and Runge kutta method of 4th order .
darova
darova el 15 de Oct. de 2019
constant value of M Ec Pr
Are you sure those values are correct? Maybe for something values diving by zero occurs?
Thank you sir for give attention on my problem and now code is working well .
Can we solve it by ODE45 if yes then what values for F2(0) G1(0) & H1(0) should we take and how we will find that values .
I just changed main code
init = [0 1 -0.58 1 -1.52 1 -1.12];
% solinit = bvpinit([0 2],zeros(1,7));
% sol = bvp4c(@new,@bvpf,solinit);
[t,y] = ode45(@new,[0 2], init);
% plot(sol.x,sol.y)
plot(t,y)
legend('F','dF','d2F','G','dG','H','dH')
I took initial conditions from last calc. There is no rule for F2(0) G1(0) & H1(0) values, only guessing or something like bvp4c
img1.png

Iniciar sesión para comentar.

Etiquetas

Preguntada:

el 13 de Oct. de 2019

Comentada:

el 2 de Nov. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by