Message Boards Message Boards

What is wrong in my code for shooting method to solve 4 ODEs?

GROUPS:

The set of ODEs that I need to solve

$g=f''\frac{g^{2}+\lambda\gamma^{2}}{g^{2}+\gamma^{2}}$

$g'=\frac{1}{3}f'^{2}-\frac{2}{3}ff''+Mnf'$

$(1+Rd)\theta''+\frac{2}{3}Prf\theta'+N_{b}\theta'\phi'+N_{t}\theta'^{2}=0$

$\phi''+\frac{2}{3}Lef\phi'+\frac{N_{t}}{N_{b}}\theta''=0$

And the boundary conditions are:

$f=0,\; f'=1,\; \theta=1,\; \phi=1\; at\; \eta=0,$

$f'\rightarrow0,\; \theta\rightarrow0,\; \phi\rightarrow0\; as\; \eta\rightarrow\infty$

I need to employ shooting method i.e guess the missing initial condition till the boundary conditions are satisfied.

And obtain the solutions and graphs of $f'(\eta), g(\eta), \theta(\eta), \phi(\eta)$

I have used NDSolve to carry out the numerical analysis, the following is the code:

ODEs[\[CapitalOmega]1_, \[CapitalOmega]2_, \[CapitalOmega]3_, \
\[Lambda]_, \[Gamma]_, Mn_, Rd_, Lew_, Nb_, Nt_, Pr_] :=
 {f''[\[Eta]] == 
   g[\[Eta]]*(g[\[Eta]]^2 + \[Gamma]^2)/(g[\[Eta]]^2 + \[Lambda]*\
\[Gamma]^2),
  g'[\[Eta]] == (1/3)*(f'[\[Eta]])^2 - (2/3)*f[\[Eta]]*f''[\[Eta]] + 
    Mn*f'[\[Eta]],
  \[Theta]''[\[Eta]] == -(1/1 + Rd)*(2/3)*Pr*
     f[\[Eta]]*\[CapitalTheta]'[\[Eta]] - (Nb/1 + 
       Rd)*\[CapitalTheta]'[\[Eta]]*\[Phi]'[\[Eta]] - (Nt/1 + 
       Rd)*(\[CapitalTheta]'[\[Eta]])^2,
  \[Phi]''[\[Eta]] == -(2/3)*Lew*
     f[\[Eta]]*\[Phi]'[\[Eta]] - (Nt/Nb)*\[CapitalTheta]''[\[Eta]],
  f[0] == 0, f'[0] == 1, \[Theta][0] == 1, \[Phi][0] == 1, 
  g[0] == \[CapitalOmega]1, \[CapitalTheta]'[
    0] == \[CapitalOmega]2, \[Phi]'[0] = \[CapitalOmega]3}
Soln[\[CapitalOmega]1_, \[CapitalOmega]2_, \[CapitalOmega]3_, \
\[Lambda]_, \[Gamma]_, Mn_, Rd_, Lew_, Nb_, Nt_, Pr_] := 
 NDSolve[ODEs[\[CapitalOmega]1, \[CapitalOmega]2, \[CapitalOmega]3, \
\[Lambda], \[Gamma], Mn, Rd, Lew, Nb, Nt, Pr], {f, 
   g, \[CapitalTheta], \[Phi]}, {\[Eta], 0, 10}]
EndCondition[\[CapitalOmega]1_?NumericQ, \[CapitalOmega]2_?
   NumericQ, \[CapitalOmega]3_?NumericQ, \[Lambda]_?
   NumericQ, \[Gamma]_?NumericQ, Mn_?NumericQ, Rd_?NumericQ, 
  Lew_?NumericQ, Nb_?NumericQ, Nt_?NumericQ, Pr_?NumericQ] :=
 {(First[f[\[Eta]] /. 
      Soln[\[CapitalOmega]1, \[CapitalOmega]2, \[CapitalOmega]3, \
\[Lambda], \[Gamma], Mn, Rd, Lew, Nb, Nt, Pr]] /. \[Eta] -> 
     10), (First[
     f'[\[Eta]] /. 
      Soln[\[CapitalOmega]1, \[CapitalOmega]2, \[CapitalOmega]3, \
\[Lambda], \[Gamma], Mn, Rd, Lew, Nb, Nt, Pr]] /. \[Eta] -> 10),
  (First[g[\[Eta]] /. 
      Soln[\[CapitalOmega]1, \[CapitalOmega]2, \[CapitalOmega]3, \
\[Lambda], \[Gamma], Mn, Rd, Lew, Nb, Nt, Pr]] /. \[Eta] -> 10),
  (First[\[CapitalTheta][\[Eta]] /. 
      Soln[\[CapitalOmega]1, \[CapitalOmega]2, \[CapitalOmega]3, \
\[Lambda], \[Gamma], Mn, Rd, Lew, Nb, Nt, Pr]] /. \[Eta] -> 10),
  (First[\[Phi][\[Eta]] /. 
      Soln[\[CapitalOmega]1, \[CapitalOmega]2, \[CapitalOmega]3, \
\[Lambda], \[Gamma], Mn, Rd, Lew, Nb, Nt, Pr]] /. \[Eta] -> 10)}
EndCondition[0, 0, 0, 0.5, 1, 1, 1, 1, 1, 1, 5]

But it is unable to give a result so that I can proceed further and use 'FindRoot' to modify the initial guess

I have attached a pdf, from where I have taken the code, it gives an example similar to mine.

Attachments:
POSTED BY: Pragyan Sarma
Answer
1 month ago

Group Abstract Group Abstract