4
$\begingroup$

So this question is essentially the same question as here where Alex Trounev gave a fantastic answer.

Alex starts by saying that "There is no simple method to display streamlines using the Zhukovsky function." but this is not too accurate.

For reference, I have started using Elementary Fluid Mechanics by D.J. Acheson. The Joukovsky (Zhukovsky) transformation is given by $Z=z+\frac{c^2}{z}$. If we look at irrotational flow past a circular cylinder, and include a superimposed line vortex flow, we can get the complex potential to be $$w(z)=U\left(z+\frac{a^2}{z}\right)-\frac{\mathrm{i}\Gamma}{2\pi}\log(z)$$ where $U$ is a uniform speed, $a$ is the radius of the cylinder and $\Gamma$ is the strength of the superimposed line vortex. The streamlines here can be visualised as follows

a = 0.75; U = 1; Gamma1 = 5; w[z_] := U (z + a^2/z) - (I Gamma1)/(2 \[Pi]) Log[z]; streamFunction[x_, y_] := If[Sqrt[x^2 + y^2] >= a, Im[w[x + I y]], Indeterminate]; plt4 = ContourPlot[Evaluate[streamFunction[x, y]], {x, -2, 2}, {y, -2, 2}, Contours -> Range[-2, 2, 0.1],ContourStyle -> Directive[Black, Thick], FrameLabel -> {"Re[z]", "Im[z]"}, PlotRange -> All, AspectRatio -> 1, Epilog -> {Red, Circle[{0, 0}, a]} , ContourShading -> False] 

Streamlines Past Cylinder

We can also visualise the pressure using Bernoulli

pressureFunction[x_, y_] := If[Sqrt[x^2 + y^2] >= a, 1/2 U^2 - 1/2 Abs[w'[x + I y]]^2, Indeterminate]; plt3 = ContourPlot[ Evaluate[pressureFunction[x, y]], {x, -2, 2}, {y, -2, 2}, Contours -> Range[-2, 2, 0.1],ContourStyle -> Directive[Red, Thick], FrameLabel -> {"Re[z]", "Im[z]"}, PlotRange -> All, AspectRatio -> 1, Epilog -> {Red, Circle[{0, 0}, a]} , ColorFunction -> Function[f, Opacity[.5, ColorData["TemperatureMap"][f]]]] 

Pressure Around Cylinder

I added opacity so that I could visualise the pressure and streamlines

 Show[plt3,plt4] 

Pressure and Streamlines

Now! Hear comes the hard part where I need some assistance. For flow past a symmetric aerofoil, Acheson has a "z-plane" for the cylinder case above and a "$Z$-plane" for the aerofoil where $Z = -\lambda + (a+\lambda)e^{\mathrm{i}\gamma} + \frac{a^2}{-\lambda + (a+\lambda)e^{\mathrm{i}\gamma}}$. The complex potential function $W(Z)$ requires taking the complex potential flow in the z-plane $$w(z)=U\left[(z+\lambda)e^{-\mathrm{i}\alpha}+\frac{(a+\lambda)^2}{z+\lambda}e^{\mathrm{i}\alpha}\right]-\frac{\mathrm{i}\Gamma}{2 \pi}\log(z+\lambda)$$ and then substituting $z=\frac{1}{2}Z+\sqrt{\frac{1}{4}Z^2-a^2}$. For the aerofoil, $\Gamma = -4 \pi U (a+\lambda)\sin(\alpha)$.

I tried a few things but nothing is giving quite what I expect. The image that is closest was made avoiding the $z(Z)$ substitution and plotting the output simply in the $Z-plane$ which I think I did semi-correctly using InverseFunction

a = 1; U = 1; \[Lambda] = 0.2; \[Alpha] = 0.2; \[CapitalGamma] = -4 Pi U (a + \[Lambda]) Sin[\[Alpha]]; joukovskyTransform[\[Zeta]_] := \[Zeta] + a^2/\[Zeta]; zTransform[Z_] = 0.5 Z + Sqrt[0.25 Z^2 - a^2] ; w[z_] := U ((z + \[Lambda]) Exp[-I \[Alpha]] + (a + \[Lambda])^2/(z + \ \[Lambda]) Exp[I \[Alpha]]) - (I \[CapitalGamma])/(2 Pi) Log[ z + \[Lambda]]; W[Z_] := w[zTransform[Z]] streamFunction[\[Zeta]_] := Im[W[\[Zeta]]]; streamFunction2[\[Zeta]_] := Im[w[\[Zeta]]]; \[Zeta]Streamlines = ContourPlot[ Evaluate[streamFunction[x + I y]], {x, -3, 3}, {y, -3, 3}, Contours -> Range[-4, 4, 0.1], ContourStyle -> Blue, FrameLabel -> {"Re[\[Zeta]]", "Im[\[Zeta]]"}, PlotRange -> All, AspectRatio -> 1] \[Zeta]Streamlines2 = ContourPlot[ Evaluate[streamFunction2[x + I y]], {x, -3, 3}, {y, -3, 3}, Contours -> Range[-4, 4, 0.1], ContourStyle -> Blue, FrameLabel -> {"Re[\[Zeta]]", "Im[\[Zeta]]"}, PlotRange -> All, AspectRatio -> 1] zStreamlines = ContourPlot[ Evaluate[ streamFunction[ InverseFunction[joukovskyTransform][x + I y]]], {x, -3, 3}, {y, -3, 3}, Contours -> Range[-4, 4, 0.1], ContourStyle -> Blue, FrameLabel -> {"Re[z]", "Im[z]"}, PlotRange -> All, AspectRatio -> 1] zStreamlines2 = ContourPlot[ Evaluate[ streamFunction2[ InverseFunction[joukovskyTransform][x + I y]]], {x, -3, 3}, {y, -3, 3}, Contours -> Range[-4, 4, 0.1], ContourStyle -> Blue, FrameLabel -> {"Re[z]", "Im[z]"}, PlotRange -> All, AspectRatio -> 1] 

Streamlines with z sub Streamlines without z sub Streamlines with z sub in Z plane Streamlines without z sub in Z plane

It's clear, that not including the z substitution and rather trying to plot in the $Z$-plane produces something that appears to be an aerofoil. In the $z$-plane it's a cylinder in appearance which means I was heading in a correct-ish direction. The major issues here are

  1. No matter how I approach this problem, I cannot seem to avoid branch cuts.
  2. The aerofoil never appears to line up correctly (probably due to the branch cuts)
  3. The method using the substitution for $z$ doesn't produce anything like an aerofoil and I have to rely on just using the $Z$-plane.

Note: I completely left out the $Z$ substitution because that produced a blank output. Perhaps I was implementing it incorrectly.

Ideally, I'd like to aim for results that resemble Alex's answer while still staying true to using the Joukovsky Transform.

Edit: I just realised that I left incorrect axis labels in my code from earlier versions where I was working completely in the complex plane in order to visualise the transformations and conformal mappings. Please ignore.

$\endgroup$
9
  • $\begingroup$ Exclusions -> None? $\endgroup$ Commented Jan 17 at 13:46
  • $\begingroup$ @cvgmt I did try that, it doesn't fix the branch cuts completely, in fact it actually didn't appear to make a difference at all. It also doesn't fix the slight shift of the aerofoil that I assume is due to the branch cuts. Originally I tried to take an approach similar to Alex where I have to include the sign of the functions but it (I) failed miserably $\endgroup$ Commented Jan 17 at 13:50
  • $\begingroup$ @Kendall: Regarding the first plot of streamFunction[z]: Am I to understand you are trying to avoid the default branch-cuts of the associated square root function of zTransform? If so, perhaps an analytically-continuous version of $\sqrt{1/4 z^2-a^2}$ can be used in your functions. I can look into it if this is something you'd be interested in. $\endgroup$ Commented Jan 17 at 16:01
  • $\begingroup$ @josh yes I am trying to avoid the branch cuts in general on either the z-plane or Z-plane. Your suggestion has made me think that perhaps there is a convenient transformation (such as z = 2acosh(w) ) that can enable me to avoid the root completely. I haven't made functions analytically continuous before, but it doesn't appear to be too difficult. Thank you for the suggestion. $\endgroup$ Commented Jan 18 at 8:32
  • $\begingroup$ @Kendall: I noticed your plot is in the range $|z|<3$. However, the function $\sqrt{1/4 z^2-1}$ fully-ramifies at its singular points $\pm 2$ so we cannot construct a single-valued analytic sheet which includes either of these points. However we can for $|z|<2$ which would then produce analytically continuous contours in this range. If this is something you wish to pursue. I can show you how if you wish. $\endgroup$ Commented Jan 18 at 15:34

1 Answer 1

1
$\begingroup$

Note: Code for the following is at the end

This is how to construct analytically-continuous sheets and contours of Im[W(z)] in the domain $|z|<2$. You can extend the domain outside this range and the $2D$ contour map will still be continuous in $|z|<2$ but will exhibit discontinuities outside this region. It's possible to construct $3D$ contour maps however with the contours following the underlying Re or Im surfaces of W(z).

Your defininition:

a = 1; U = 1; \[Lambda] = 2/10; \[Alpha] = 2/10; \[CapitalGamma] = -4 Pi U (a + \[Lambda]) Sin[\[Alpha]]; joukovskyTransform[\[Zeta]_] := \[Zeta] + a^2/\[Zeta]; zTransform[Z_] = 1/2 Z + Sqrt[1/4 Z^2 - a^2]; w[z_] := U ((z + \[Lambda]) Exp[-I \[Alpha]] + (a + \[Lambda])^2/(z + \ \[Lambda]) Exp[I \[Alpha]]) - (I \[CapitalGamma])/(2 Pi) Log[ z + \[Lambda]]; W[Z_] := w[zTransform[Z]] streamFunction[\[Zeta]_] := Im[W[\[Zeta]]]; 

creates the function:

$$ \small w(z)=e^{-\frac{i}{5}} \left(\sqrt{\frac{z^2}{4}-1}+\frac{z}{2}+\frac{1}{5}\right)+\frac{36 e^{i/5}}{25 \left(\sqrt{\frac{z^2}{4}-1}+\frac{z}{2}+\frac{1}{5}\right)}+\frac{12}{5} i \sin \left(\frac{1}{5}\right) \log \left(\sqrt{\frac{z^2}{4}-1}+\frac{z}{2}+\frac{1}{5}\right) $$ with singular points $\pm 2$ and $-26/5$. Plotting the real surface of $s(z)=\sqrt{\frac{z^2}{4}-1}$ with Plot3D (or other function) incurs Mathematica's default branch cuts which is wholly inadequate as this plot shows:

enter image description here

Which is a reflection of the surfaces jumping from one branch sheet of $s(z)$ to another across the cuts. However we can stitch the surfaces together in an analytically-continuous way using:

sheet1F[z_] := Module[{x, y}, x = Re@z; y = Im@z; If[(x >= 0 && y >= 0) || (x <= 0 && y <= 0), Sqrt[-1 + z^2/4] , -Sqrt[-1 + z^2/4] ] ]; sheet2F[z_] := Module[{x, y}, x = Re@z; y = Im@z; If[(x >= 0 && y >= 0) || (x <= 0 && y <= 0), -Sqrt[-1 + z^2/4] , Sqrt[-1 + z^2/4] ] ]; 

And now sheet1F[z] and sheet2F[z] are analytically-continuous versions of $s(z)$ in $-2<|z|<2$:

enter image description here

We can now generate analytically-continuous contour plots of sheet1F(z) and sheet2F(z) inside $|z|<2$:

enter image description here

And now the contours are analytically-continuous. You can confirm this by clicking on one in the upper plane then following it to the lower plane and noticing the value of the contour is constant.

Now substitute sheet1F[z] and sheet2F[z] into $w(z)$: $$ \small \text{newW1}(\text{z$\_$})\text{:=}e^{-\frac{i}{5}} \left(\text{sheet1F}(z)+\frac{z}{2}+\frac{1}{5}\right)+\frac{36 e^{i/5}}{25 \left(\text{sheet1F}(z)+\frac{z}{2}+\frac{1}{5}\right)}+\frac{12}{5} i \sin \left(\frac{1}{5}\right) \log \left(\text{sheet1F}(z)+\frac{z}{2}+\frac{1}{5}\right) $$

$$ \small \text{newW2}(\text{z$\_$})\text{:=}e^{-\frac{i}{5}} \left(\text{sheet2F}(z)+\frac{z}{2}+\frac{1}{5}\right)+\frac{36 e^{i/5}}{25 \left(\text{sheet2F}(z)+\frac{z}{2}+\frac{1}{5}\right)}+\frac{12}{5} i \sin \left(\frac{1}{5}\right) \log \left(\text{sheet2F}(z)+\frac{z}{2}+\frac{1}{5}\right) $$

The contour plots of newW1 and newW2 are now analytically-continuous in the domain $|z|<2$:

enter image description here

Code for these follow:

(* set up function and plot root function with Plot3D *) a = 1; U = 1; \[Lambda] = 2/10; \[Alpha] = 2/10; \[CapitalGamma] = -4 Pi U (a + \[Lambda]) Sin[\[Alpha]]; joukovskyTransform[\[Zeta]_] := \[Zeta] + a^2/\[Zeta]; zTransform[Z_] = 1/2 Z + Sqrt[1/4 Z^2 - a^2]; w[z_] := U ((z + \[Lambda]) Exp[-I \[Alpha]] + (a + \[Lambda])^2/(z + \ \[Lambda]) Exp[I \[Alpha]]) - (I \[CapitalGamma])/(2 Pi) Log[ z + \[Lambda]]; W[Z_] := w[zTransform[Z]] W[z] streamFunction[\[Zeta]_] := Im[W[\[Zeta]]]; p3D2 = Plot3D[ Im@Sqrt[-1 + z^2/4] /. z -> x + I y, {x, -1, 1}, {y, -1, 1}, BoxRatios -> {1, 1, 1}, PlotLabel -> Style["Sqrt with default branch cuts"], PlotStyle -> {Opacity[0.5], Darker@Yellow}] (* define continuous version of root function *) sheet1F[z_] := Module[{x, y}, x = Re@z; y = Im@z; If[(x >= 0 && y >= 0) || (x <= 0 && y <= 0), Sqrt[-1 + z^2/4] , -Sqrt[-1 + z^2/4] ] ]; sheet2F[z_] := Module[{x, y}, x = Re@z; y = Im@z; If[(x >= 0 && y >= 0) || (x <= 0 && y <= 0), -Sqrt[-1 + z^2/4] , Sqrt[-1 + z^2/4] ] ]; (* draw continuous versions of sheet1F *) sheet1Plot = Plot3D[Im@sheet1F[x + I y], {x, -2, 2}, {y, -2, 2}, Exclusions -> None]; sheet2Plot = Plot3D[Im@sheet2F[x + I y], {x, -2, 2}, {y, -2, 2}, Exclusions -> None]; Show[{sheet1Plot, sheet2Plot}, PlotRange -> All, BoxRatios -> {1, 1, 1}] (* draw contour plots of sheet1F and sheet2F *) dim = 2; rootContourPlot1 = ContourPlot[Im@sheet1F[x + I y], {x, -dim, dim}, {y, -dim, dim}, Contours -> Range[-2, 2, 1/20], ContourStyle -> Blue, FrameLabel -> {"Re[\[Zeta]]", "Im[\[Zeta]]"}, PlotRange -> All, AspectRatio -> 1, Exclusions -> None, PlotPoints -> 50] rootContourPlot2 = ContourPlot[Im@sheet2F[x + I y], {x, -dim, dim}, {y, -dim, dim}, Contours -> Range[-2, 2, 1/20], ContourStyle -> Blue, FrameLabel -> {"Re[\[Zeta]]", "Im[\[Zeta]]"}, PlotRange -> All, AspectRatio -> 1, Exclusions -> None, PlotPoints -> 50] (* use continuous versions of roots in def of W(z) *) newW1[z_] := (36 E^(I/5))/(25 (1/5 + z/2 + sheet1F[z])) + E^(-(I/5)) (1/5 + z/2 + sheet1F[z]) + 12/5 I Log[1/5 + z/2 + sheet1F[z]] Sin[1/5] newW2[z_] := (36 E^(I/5))/(25 (1/5 + z/2 + sheet2F[z])) + E^(-(I/5)) (1/5 + z/2 + sheet2F[z]) + 12/5 I Log[1/5 + z/2 + sheet2F[z]] Sin[1/5] (* draw contour plots of newW1 and newW2 *) dim = 2; w1ContourPlot = ContourPlot[Im@newW1[x + I y], {x, -dim, dim}, {y, -dim, dim}, Contours -> Range[-2, 2, 1/20], ContourStyle -> Blue, FrameLabel -> {"Re[\[Zeta]]", "Im[\[Zeta]]"}, PlotRange -> All, AspectRatio -> 1, Exclusions -> None, PlotPoints -> 50] w2ContourPlot = ContourPlot[Im@newW2[x + I y], {x, -dim, dim}, {y, -dim, dim}, Contours -> Range[-2, 2, 1/20], ContourStyle -> Blue, FrameLabel -> {"Re[\[Zeta]]", "Im[\[Zeta]]"}, PlotRange -> All, AspectRatio -> 1, Exclusions -> None, PlotPoints -> 50] 
$\endgroup$
1
  • $\begingroup$ Thank you, this is very useful. I'll see if I can work towards what I am expecting using the analytically continuous versions. $\endgroup$ Commented Jan 23 at 9:07

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.