Steamlines and Equipotentials for Different Types of Flows
Author's Data: Housam BINOUS
Department of Chemical Engineering
National Institute of Applied Sciences and Technology
Tunis, TUNISIA
Email: binoushousam@yahoo.com

Acknowledgement :
Expressions of stream and potential functions are taken from Bird et al. (Transport Phenomena, 1st Edition, Wiley 1960) and Wilkes (Fluid Mechanics for Chemical Engineers, Prentice Hall, 1999). 

Notation:
Φ: potential function
Ψ: stream function

Flow into a rectangular Channel

Streamlines

plt1 = 
      ParametricPlot[
        Evaluate[
          Table[{Φ + 
                Exp[Φ] Cos[Ψ], Ψ + 
                Exp[Φ] Sin[Ψ]}, {Ψ, -Pi, Pi, Pi/4}]], {Φ, -5, 5}, 
        PlotStyle -> RGBColor[0, 0, 1]]

Equipotentials

plt2 = 
      ParametricPlot[
        Evaluate[
          Table[{Φ + 
                Exp[Φ] Cos[Ψ], Ψ + 
                Exp[Φ] Sin[Ψ]}, {Φ, -3, 3, 1/4}]], {Ψ, -Pi, Pi}, 
        PlotStyle -> RGBColor[1, 0, 0]]

Equipotentials and Streamlines in the same plot

Show[plt1, plt2, 
      PlotRange -> {{-7, 7}, {-10, 10}}]

Velocity at the origin {(Subscript[v, x]) -> -0.6381037104838877`, (Subscript[v, y]) -> 0.`}

sol = 
      Chop[FindRoot[{Φ + 
                Exp[Φ] Cos[Ψ] ==  
              0, Ψ + 
                Exp[Φ] Sin[Ψ] == 
              0}, {Φ, 0.1}, {Ψ, 0.5}]]

Φ = sol[[1, 2]]

Ψ = sol[[2, 2]]

(Subscript[v, ∞]) = 1

sys = {((Subscript[v, x]) (Subscript[v, ∞])/((Subscript[v, x])^2 + 
                          (Subscript[v, y])^2) == -(1 + 
                        Exp[Φ] Cos[Ψ])) /. 
              (Subscript[v, ∞]) ->  1 /. Ψ ->  
              sol[[2, 2]] /. Φ ->  
            sol[[1, 
                2]], ((Subscript[v, y]) (Subscript[v, ∞])/((Subscript[v, x])^2 + 
                          (Subscript[v, y])^2) ==  -Exp[Φ] Sin[Ψ]) /. (Subscript[v, ∞]) ->  1 /. Ψ ->  
              sol[[2, 2]] /. Φ ->  
            sol[[1, 2]]}

FindRoot[sys, {(Subscript[v, x]), -1}, {(Subscript[v, y]), 0}]

Ideal Flow Around a Cylinder

Streamlines

plt3 = 
      ContourPlot[Y (1 - (1/(X^2 + Y^2))), {X, -3, 3}, {Y, 1, 3}, 
        ContourStyle -> {{RGBColor[1, 0, 0]}, {RGBColor[0.7, 0, 
                0]}}]

plt4 = 
      ContourPlot[Y (1 - (1/(X^2 + Y^2))), {X, -3, 3}, {Y, 1, 3}, 
        ContourStyle -> {{RGBColor[1, 0, 0]}, {RGBColor[0.7, 0, 0]}}, 
        ContourShading -> False]

Equipotentials

plt5 = 
      ContourPlot[X (1 + (1/(X^2 + Y^2))), {X, -3, 3}, {Y, 1, 3}, 
        ContourStyle -> {{RGBColor[0, 1, 0]}, {RGBColor[0, 0.7, 
                0]}}]

plt6 = 
      ContourPlot[X (1 + (1/(X^2 + Y^2))), {X, -3, 3}, {Y, 1, 3}, 
        ContourStyle -> {{RGBColor[0, 1, 0]}, {RGBColor[0, 0.7, 0]}}, 
        ContourShading -> False]

Equipotentials and Streamlines in the same plot

Show[plt4, plt6]

Flow around a blunt-nosed object

In order to use the Mathematica function PolarPlot, we need to load the package Graphics.m. Path may have to be changed according to user's system and Mathematica version.

\(<< "C:\Program Files\Wolfram Research\Mathematica\4.0\AddOns\StandardPackages\Graphics\Graphics.m"\)

Blunt-nosed object

plt7 = 
        PolarPlot[1/(2 Sin[t/2]), {t, 0, 2 Pi}, 
          PlotRange -> {{-1, 1}, {-1, 1}}, 
          PlotStyle -> RGBColor[0, 0, 1]];

Streamlines

plt8 = 
        PolarPlot[
          Evaluate[
            Table[Sqrt[(1/4 Cos[t] + Ψ)/(1/
                        2 Sin[t]^2)], {Ψ, 0.3, 2, 
                0.25}]], {t, -2 Pi, 2 Pi}, 
          PlotRange -> {{-2, 2}, {-2.5, 2.5}}, 
          PlotStyle -> {{RGBColor[1, 0, 0]}, {RGBColor[0.7, 0, 
                  0]}}];

Show[plt8, plt7]

Equipotentials

Φ =. ; Ψ =. ;

Solve[Φ ==   r Cos[t] - 1/(4 r), 
      r]

tbl1 = 
        Table[(1/2) (Φ - (Sqrt[(Φ^2) + Cos[t]])) Sec[t], {Φ, -2, 2, 0.25}];

tbl2 = 
        Table[(1/2) (Φ + (Sqrt[(Φ^2) + Cos[t]])) Sec[t], {Φ, -2, 2, 0.25}];

plt9 = 
        PolarPlot[Evaluate[Flatten[{tbl1, tbl2}]], {t,  -Pi/2, Pi/2}, 
          PlotRange -> {{-2, 2}, {-2.5, 2.5}}, 
          PlotStyle -> {{RGBColor[0, 1, 0]}, {RGBColor[0, 0.7, 
                  0]}}];

Equipotentials and Streamlines in the same plot

Show[plt7, plt8, plt9, 
      PlotRange -> {{-2, 2}, {-2.1, 2.1}}]

Partial diversion of a stream through a slot

Streamlines

ContourPlot[
      2 x - 10/Pi ArcTan[y/x], {x, 0.0001, 10}, {y, -10, 20}, 
      Contours -> {-5, -4, -3, -2, -1, 0, 1, 2, 3, 
          4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}, 
      ColorFunction -> ((Hue[ArcTan[1.  - #]] &))]

ContourPlot[2 x - 10/Pi ArcTan[y/x], {x, 0.0001, 5}, {y, -1, 1}, 
      Contours -> {-5, -4, -3, -2, -1, 0, 1, 2, 3, 
          4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}, 
      ColorFunction -> ((Hue[ArcTan[1.  - #]] &))]