6
$\begingroup$

I am trying to plot an equation that will give me a Joukowski airfoil and am having trouble getting any results. The equation that I am using is as follows:

y=Sqrt[(1/4)+(1/64 h^2)-x^2]-(1/8 h)PlusMinus[(3/8) t (1-2 x) Sqrt[1-(2 x)^2]] 

where h = 0.08 and t = 0.13, {x, -.5, .5}.

I tried both Plot and ContourPlot and did not get any results. I think I am missing some steps, but I don't know what they are. I need some help on this.

$\endgroup$
  • 1
    $\begingroup$ Where did you get these equations? The plot in Marco's answer looks nothing like the airfoil I'm familiar with. Also, there is a complex formulation of the airfoil, which can be plotted with ParametricPlot[]; why not use that instead? $\endgroup$ – J. M. will be back soon Jun 28 '16 at 3:43
4
$\begingroup$

This is just illustrative.

f[z_] := ReIm[z + 1/z]
Manipulate[
 ParametricPlot[{f[Complex @@ v + r Exp[I t]], 
   ReIm[Complex @@ v + r Exp[I t]]}, {t, 0, 2 Pi}, 
  PlotRange -> {{-5, 5}, {-5, 5}}, Epilog -> {Text[v, {-3, 3}]}, 
  AspectRatio -> Automatic, Frame -> True, 
  PlotLabel -> (Complex @@ v + r Exp[I t])],
 {{v, {0, 0}}, {-4, -4}, {4, 4}, Locator}, {r, 1, 3}]e to get all in one:

enter image description here

I have voted for MarcoB's answer.

$\endgroup$
  • $\begingroup$ how can you export you Manipulate as gif? $\endgroup$ – PureLine Oct 30 '17 at 3:14
  • $\begingroup$ @PureLine this is not an export but a capture using LICEcap $\endgroup$ – ubpdqn Oct 30 '17 at 3:17
  • $\begingroup$ thanks for sharing. I have long wondering how it can be achieved. $\endgroup$ – PureLine Oct 30 '17 at 7:11
12
$\begingroup$

PlusMinus formats nicely, but it does not have a built-in meaning. You may work around that:

h = 0.08; t = 0.13;

Plot[
 Evaluate[
  Sqrt[(1/4) + (1/64 h^2) - x^2] - (1/8 h) + {-1, 1} ((3/8) t (1 - 2 x) Sqrt[1 - (2 x)^2])
 ], {x, -.5, .5}
]

Mathematica graphics


If need be, you could also define your own meaning for PlusMinus:

Clear[PlusMinus]
PlusMinus[a__] := {-1, 1} (a)

3 + PlusMinus[a]
(* Out: {3 - a, 3 + a} *)

As @JM mentioned, however, I suspect that your parametrization may not be the most advantageous; here is a complex parametrization of the Joukowsky transformation (see Wikipedia as well).

The Joukowsky transform is the following transformation of complex numbers:

$$z=\zeta+\frac{1}{\zeta}$$

We can obtain a complex parametrization of the results of the transform $z$ as follows:

Block[{$Assumptions = {chi > 0, eta > 0}, x, y},
  zeta = chi + I eta;
  {x, y} = Together@Simplify@ReIm@ComplexExpand[zeta + 1/zeta]
]

(* {(chi*(1 + chi^2 + eta^2))/(chi^2 + eta^2), 
    (eta*(-1 + chi^2 + eta^2))/(chi^2 + eta^2)} 
*)

Mathematica graphics

The interesting property of the Joukowski transform is the fact that the transform of a circle passing through $\zeta=1$ and containing in its interior the point $\zeta=-1$ describes the profile of an airfoil. Even more interesting for practical purposes is the fact that the streamlines of the original circular profile (typically easy to calculate) transform to the streamlines of the airfoil profile (otherwise hard to calculate) (see e.g. here).

Here is a quick manipulator to visualize those conditions and find some reasonable starting values for such circles:

Manipulate[
 Graphics[{
    PointSize[0.02], Point[{{1, 0}, {-1, 0}}],
    Circle[center, radius],
    Inset["Center=" <> ToString@N@center, {-1, 0.5}],
    Inset["Radius=" <> ToString@InputForm@radius, {0.6, 0.8}]
  }, Axes -> True
 ],
 {{center, {-1/2, 2/10}}, Locator},
 {{radius, 1}, 0, 2, 1/10}
]

Mathematica graphics

A good set of values is, for instance, a circle centered at $(-1/8,3\ \sqrt{31}/40)$ with radius $1.2$. We can use a simple parametrization of a circle ({r Cos[t] + xc, r Sin[t] + yc}) toghether with the transformation results obtained above, and use ParametricPlot to generate a plot of the Joukowski-transformed circle:

ParametricPlot[
  {chi (chi^2 + eta^2 + 1)/(chi^2 + eta^2),
   eta (chi^2 + eta^2 - 1)/(chi^2 + eta^2)
  } /. {chi -> r Cos[t] - 1/8, eta -> r Sin[t] + 3 Sqrt@31/41} /. r -> 12/10,
  {t, 0, 2 Pi},
  PlotRange -> All, PlotRangePadding -> {Scaled[0.05], Scaled[0.25]},
  Frame -> True, Axes -> None,
  AspectRatio -> 0.4
]

Mathematica graphics

$\endgroup$
  • $\begingroup$ Thanks for following through. :) I had expected you'd leave it at ParametricPlot[ReIm[(* function *)], ...], but you went above and beyond! $\endgroup$ – J. M. will be back soon Jun 28 '16 at 23:40
  • $\begingroup$ @J.M. Glad you liked it, and thanks for pointing out the existence of the parametrization! I enjoyed the diversion very much. $\endgroup$ – MarcoB Jun 29 '16 at 2:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.