Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. Clear[max, Pr, T, f, η, p];
  2. max = 50;
  3. Pr = 0.72;
  4. pohl = NDSolve[{f'''[η] + 3 f[η] f''[η] -
  5. 2 (f'[η])^2 + T[η] == 0,
  6. T''[η] + 2 Pr f[η] T'[η] == 0, f[0] == f'[0] == 0,
  7. f'[max] == 0, T[0] == 1, T[max] == 0}, {f, T}, {η, max}]
  8.  
  9. p4 = Plot[{Evaluate[f'[η] /. pohl]}, {η, 0, max},
  10. PlotRange -> All,
  11. PlotLabel ->
  12. Style[Framed["Hydrodynamic development is depicted on this plot"],
  13. 10, Blue, Background -> Lighter[Yellow]], ImageSize -> Large,
  14. BaseStyle -> {FontWeight -> "Bold", FontSize -> 18},
  15. AxesLabel -> {"η", "f'[η]"}, PlotLegends -> "Expressions"]
  16.  
  17. Pr = 0.72;
  18. pohl72 =
  19. NDSolve[{f'''[η] + 3 f[η] f''[η] - 2 (f'[η])^2 +
  20. T[η] == 0, T''[η] + 2 Pr f[η] T'[η] == 0,
  21. f[0] == f'[0] == 0, f'[max] == 0, T[0] == 1, T[max] == 0},
  22. {f, T}, {η, max}];
  23.  
  24. Pr = 0.6;
  25. pohl = NDSolve[{f'''[η] + 3 f[η] f''[η] - 2 (f'[η])^2 + T[η] == 0,
  26. T''[η] + 2 Pr f[η] T'[η] == 0, f[0] == f'[0] == 0,
  27. f'[max] == 0, T[0] == 1, T[max] == 0},
  28. {f, T}, {η, max},
  29. Method -> {"Shooting",
  30. "StartingInitialConditions" ->
  31. Thread[{f[0], f'[0], f''[0], T[0], T'[0]} ==
  32. ({f[0], f'[0], f''[0], T[0], T'[0]} /. First@pohl72)]}]
  33.  
  34. Plot[{Evaluate[f'[η] /. pohl]}, {η, 0, max},
  35. PlotRange -> All,
  36. PlotLabel ->
  37. Style[Framed["Hydrodynamic development is depicted on this plot"],
  38. 10, Blue, Background -> Lighter[Yellow]], ImageSize -> Large,
  39. BaseStyle -> {FontWeight -> "Bold", FontSize -> 18},
  40. AxesLabel -> {"η", "f'[η]"}, PlotLegends -> "Expressions"]
  41.  
  42. max = 50;
  43. Pr = .72;
  44. a = 0.7172594734816521`
  45. b = -0.4344414944896132`
  46. pohl = NDSolve[{f'''[[Eta]] + 3 f[[Eta]] f''[[Eta]] -
  47. 2 (f'[[Eta]])^2 + T[[Eta]] == 0,
  48. T''[[Eta]] + 2 Pr f[[Eta]] T'[[Eta]] == 0, f[0] == f'[0] == 0,
  49. f''[0] == a, T[0] == 1, T'[0] == b}, {f, T}, {[Eta], max}]
  50.  
  51. b=.995b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement