Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. Eqn1 = f'''[x] + f[x] f''[x] + ((2 n)/(n + 1))(1 - f'[x] f'[x])- M f'[x]==0
  2. Eqn2 = T''[x] + Prf[x] T'[x]-Pr ((2 p)/(n + 1)) f'[x] T[x] + (2 /(n + 1))[A
  3. f'[x] + B T[x]] == 0
  4.  
  5. BC1 = f[0] == 0;
  6. BC2 = f'[0] == λ + β f''[0];
  7. BC3 = f'[inf1] == 1;
  8. BC4 = T[0] == 1 + σ T'[0];
  9. BC5 = T[inf1] == 0;
  10.  
  11. param1 = {n -> 0, M -> 0, Pr -> 1, p -> 5.29387, A -> -0.05,
  12. B -> -0.05, λ -> 0.5, β -> 0.5, σ -> 0.5};
  13. inf1 = 1.5;
  14.  
  15. Sol1 = NDSolve[{Eqn1, Eqn2, BC1, BC2, BC3, BC4, BC5} /. param1, {f,
  16. T}, {x, 0, inf1},
  17.  
  18. Method -> {"Shooting","StartingInitialConditions" -> {f[0]==0,f'[0] == 0,
  19. f''[0] == 0, T[0] == 0, T'[0] == 0}}];
  20.  
  21. param2 = {n -> 1, M -> 0, Pr -> 1, p -> 5.29387, A -> -0.05,
  22. B -> -0.05, λ -> 0.5, β -> 0.5, σ -> 0.5};
  23.  
  24. Sol2 = NDSolve[{Eqn1, Eqn2, BC1, BC2, BC3, BC4, BC5} /. param2, {f,
  25. T}, {x, 0, inf1}, Method -> {"Shooting","StartingInitialConditions" -> {f[0] == 0, f'[0] == 0,
  26. f''[0] == 0, T[0] == 0, T'[0] == 0}}]
  27.  
  28. param3 = {n -> 1.5, M -> 0, Pr -> 1, p -> 5.29387, A -> -0.05,
  29. B -> -0.05, λ -> 0.5, β -> 0.5, σ -> 0.5};
  30.  
  31. Sol3 = NDSolve[{Eqn1, Eqn2, BC1, BC2, BC3, BC4, BC5} /. param3, {f,
  32. T}, {x, 0, inf1},
  33.  
  34. Method ->{"Shooting","StartingInitialConditions" -> {f[0] == 0,f'[0] == 0,
  35. f''[0] == 1, T[0] == 0, T'[0] == 0}}]
  36.  
  37. Plot[{f'[x] /. Sol1, f'[x] /. Sol2, f'[x] /. Sol3, f'[x]}, {x, 0,
  38. inf1}, PlotRange -> All, AxesLabel -> {η, f' (η)},
  39.  
  40. PlotStyle -> {Black, Red, Green, Blue, Yellow}, Frame -> True,
  41. FrameStyle -> Directive[Black, Bold, 12], PlotRange -> All,
  42. Axes -> False, FrameLabel -> {η, f'}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement