MATH529L Lab06: Conformal Mappings

Theory

Conformal mapping

Consider transformation w=w(z)

Define a function to visualize a conformal mapping

ConformalMap[w_,x1_,x2_,y1_,y2_,dx_,dy_]:=Module[{xidplts,yidplts,yimplts,ximplts,W,H},
W=2(x2-x1); H=2(y2-y1);
xidplts= Show[Table[ParametricPlot[{x,y},{y,y1,y2},PlotStyle->{Dashed,Red,Thin},Axes->True,PlotRange->{{x1-W,x2+W},{y1-H,y2+H}}],{x,x1,x2,dx}]];
yidplts= Show[Table[ParametricPlot[{x,y},{x,x1,x2},PlotStyle->{Dashed,Blue,Thin},Axes->True,PlotRange->{{x1-W,x2+W},{y1-H,y2+H}}],{y,y1,y2,dy}]];
ximplts= Show[Table[ParametricPlot[{Re[w[x+I y]],Im[w[x+I y]]},{y,y1,y2},PlotStyle->Red,Axes->True,PlotRange->{{x1-W,x2+W},{y1-H,y2+H}}],{x,x1,x2,dx}]];
yimplts= Show[Table[ParametricPlot[{Re[w[x+I y]],Im[w[x+I y]]},{x,x1,x2},PlotStyle->Blue,Axes->True,PlotRange->{{x1-W,x2+W},{y1-H,y2+H}}],{y,y1,y2,dy}]];
Show[{xidplts,yidplts,ximplts,yimplts}]
]

Identity

w=z

id[z_]=z;
ConformalMap[id,-1,1,-1,1,.25,.25]

Quadratic

w(z)=(z^2),z=x + i y
w(x,y)= u(x,y)+ i v(x,y) = (x^2)-(y^2)+2i x y
u(x,y)=(x^2)-(y^2),v(x,y)=2 x y

w2[z_]=(z^2);
ConformalMap[w2,-1,1,-1,1,.2,.2]

ConformalMap[w2,-1,1,0,1,.2,.1]

Potential flow

The Laplace equation
(Subscript[u, xx])+(Subscript[u, yy])==0 
describes important physical phenomena including:
- incompressible, inviscid fluid flow
- electrostatics (solutions to the electric potential field)
- magnetostatics

Incompressible, inviscid flow is characterized by a velocity field  V=(u,v)

The velocity is a vector field that can be expressed as the gradient of a potential V = ∇ ϕ
(u=(Subscript[ϕ, x]),v=(Subscript[ϕ, y]))

Furthermore, the potential ϕ satisfies Laplace equation
(Subscript[ϕ, xx])+(Subscript[ϕ, yy])==0

f (z)= ϕ + i ψ, f analytic implies Cauchy-Riemann 
(Subscript[ϕ, xx])+(Subscript[ϕ, yy])=0, (Subscript[ψ, xx])+(Subscript[ψ, yy])=0
w=((d f)/(d z))=complex velocity=u - i v, V=real velocity=(u,v)

Basic idea of using conformal mappings to obtain velocity fields around objects:
1. Assume that the potential around some simple shape is known (e.g., a circle, a half-plane) F(ζ)
2. The shape of interest can be obtained through a conformal mapping z=z(ζ), ζ=ζ(z)
3. The potential around the shape of interest is
F(ζ)=F(ζ(z))=f(z) the potential in the z plane
4. The complex velocity is 
w=((d f)/(d z))=((d F)/(d ζ)) ((d ζ)/(d z))=(((d F)/(d ζ))/((d z)/(d ζ)))=(W/((d z)/(d ζ)))

Example

potentialζ[F_,ll_,ur_]:=ContourPlot[Re[F[ξ+I η]],{ξ,ll[[1]],ur[[1]]},{η,ll[[2]],ur[[2]]},Frame->True,FrameLabel->{"Re[ζ]","Im[ζ]"},GridLines->Automatic,PlotLabel->"Velocity Potential of complex potential " <> ToString[f],PlotLegends->Automatic];
streamζ[F_,ll_,ur_]:=ContourPlot[Im[F[ξ+I η]],{ξ,ll[[1]],ur[[1]]},{η,ll[[2]],ur[[2]]},Frame->True,FrameLabel->{"Re[ζ]","Im[ζ]"},GridLines->Automatic,PlotLabel->"Stream function of complex potential " <> ToString[f],PlotLegends->Automatic];
flowζ[U_,V_,ll_,ur_]:= VectorPlot[{U[ξ, η],V[ξ,η]},{ξ,ll[[1]],ur[[1]]},{η,ll[[2]],ur[[2]]},Frame->True,FrameLabel->{"Re[ζ]","Im[ζ]"},GridLines->Automatic,PlotLabel->"Complex velocity from potential " <> ToString[F],PlotLegends->Automatic];

F[ζ_]=ζ+(1/ζ)

Components to a complex potential
Uniform current F[ζ] = (Subscript[U, 0]) (e^(-i ϕ )) ζ, W[ζ]=F’[ζ]=(Subscript[U, 0]) (e^(-i ϕ ))=(u=(Subscript[U, 0]) cos ϕ,-v = (Subscript[U, 0]) sin ϕ) 

Source F[ζ]= log(ζ-(Subscript[ζ, 0])), W[ζ]=F'[ζ]=(1/(ζ-(Subscript[ζ, 0])))

Consider (Subscript[ζ, 0])=0, W[ζ]=(1/ζ)=(1/(ξ+i η))=((ξ-i η)/((ξ^2)+ (η^2)))

Vortex F[ζ]=i log(ζ-(Subscript[ζ, 0])), W[ζ]=(i/ζ)=(i/(ξ+i η))=((iξ+ η)/((ξ^2)+ (η^2)))

Two sources of opposite signs

F[ζ]= log(ζ-h)-log(ζ+h)

VectorPlot[{x/((x^2)+(y^2)),y/((x^2)+(y^2))},{x,-2 ,2 },{y,-2 ,2}]

VectorPlot[{y/((x^2)+(y^2)),-x/((x^2)+(y^2))},{x,-2 ,2 },{y,-2 ,2}]

VectorPlot[{y/((x^2)+(y^2)),-x/((x^2)+(y^2))}-{x/((x^2)+(y^2)),y/((x^2)+(y^2))},{x,-2 ,2 },{y,-2 ,2}]

h=0.01; Γ=10; md=100π; U0=100;
VectorPlot[md{(x-h)/((((x-h))^2)+(y^2)),y/((((x-h))^2)+(y^2))}-md{(x+h)/((((x+h))^2)+(y^2)),y/((((x+h))^2)+(y^2))}+Γ{y/((x^2)+(y^2)),-x/((x^2)+(y^2))}+U0{1,0},{x,-1 ,1 },{y,-1,1}]

W[ζ_]=D[F[ζ],ζ]

ComplexExpand[W[ζ] /. ζ->ξ+ I η]

U[ξ_,η_]=1+((η^2)/((((η^2)+(ξ^2)))^2))-((ξ^2)/((((η^2)+(ξ^2)))^2)); V[ξ_,η_]=((-2  η ξ)/((((η^2)+(ξ^2)))^2));

Flow in the ζ-plane around a circle

slPlt=streamζ[F,{-3,-3},{3,3}];
VPlt=flowζ[U,V,{-3,-3},{3,3}];
Show[{slPlt,VPlt}]

The Jukowski mapping transforms a circle into an airfoil

z[ζ_,m_,δ_]=ζ+(1/(ζ-m (E^(I δ))))

Solve[z[ζ,m,δ]==Z,ζ]

Complex velocity in ζ-plane

W[ζ_]=D[F[ζ],ζ]

w[ζ_]=((W[ζ])/(D[z[ζ,m,δ],ζ]))

If given ζ, do I know the corresponding point in the z-plane? Yes, through the z(ζ) mapping.
At that ζ do I know the complex velocity in the z-plane? Yes, through w(ζ)

This implies that we can build the velocity field in the z-plane, by choosing various values for ζ.

Conformal maps of elementary functions

Construct representations of the following maps:
1. (z^k), k=2,..,6
2. Exp[z]
3. Log[z]
4. w(z)=((a+b z)/(c+ d z)) (Manipulate a,b,c,d)
5. Joukowski map w(z)=z+1/z
6. Karman-Treftz: w(z) = n b (((((z+b))^n)+(((z-b))^n))/((((z+b))^n)-(((z-b))^n)))

Solution of the Laplace equation using conformal mappings

w(z)=u(x,y)+i v(x,y), w(z) analytic in D within complex plane
(Subscript[u, x])=(Subscript[v, y]), (Subscript[u, y])=-(Subscript[v, x])

(Subscript[u, xx])+(Subscript[u, yy])=(Subscript[v, yx])-(Subscript[v, xy])=0 (the real part of an analytic function is harmonic)
(Subscript[v, xx])+(Subscript[v, yy])=0 (the imaginary part of an analytic function is harmonic)

The Laplace equation
(Subscript[u, xx])+(Subscript[u, yy])==0 
describes important physical phenomena including:
- incompressible, inviscid fluid flow
- electrostatics (solutions to the electric potential field)
- magnetostatics

Flows from common analytical complex functions

Incompressible inviscid flow (curl V=0)can be described by a velocity field

V =(Vx,Vy)= grad ϕ = ((Subscript[ϕ, x]),(Subscript[ϕ, y]))

where ϕ is a harmonic function. 
Introduce complex potential f(z) analytic
f(z)=ϕ(x,y)+i ψ(x,y), hence ϕ,ψ are harmonic

w(z)=f'(z) complex velocity 

V = grad ϕ = (OverBar[w])=(OverBar[(df/dz)])

potential[f_,ll_,ur_]:=ContourPlot[Re[f[x+I y]],{x,ll[[1]],ur[[1]]},{y,ll[[2]],ur[[2]]},Frame->True,FrameLabel->{"Re[z]","Im[z]"},GridLines->Automatic,PlotLabel->"Velocity Potential of complex potential " <> ToString[f],PlotLegends->Automatic];
stream[f_,ll_,ur_]:=ContourPlot[Im[f[x+I y]],{x,ll[[1]],ur[[1]]},{y,ll[[2]],ur[[2]]},Frame->True,FrameLabel->{"Re[z]","Im[z]"},GridLines->Automatic,PlotLabel->"Stream function of complex potential " <> ToString[f],PlotLegends->Automatic];
flow[f_,ll_,ur_]:=VectorPlot[{Re[f[x+I y]],Im[f[x+I y]]},{x,ll[[1]],ur[[1]]},{y,ll[[2]],ur[[2]]},Frame->True,FrameLabel->{"Re[z]","Im[z]"},GridLines->Automatic,PlotLabel->"Flow of complex function " <> ToString[f],PlotLegends->Automatic];
flowVS[f_,ll_,ur_]:=VectorPlot[{Re[f[x+I y]],Im[f[x+I y]]},{x,ll[[1]],ur[[1]]},{y,ll[[2]],ur[[2]]},Frame->True,FrameLabel->{"Re[z]","Im[z]"},GridLines->Automatic,PlotLabel->"Flow of complex function " <> ToString[f],PlotLegends->Automatic,VectorScaling->Automatic];

f(z)= U z, uniform flow

f(z)=U z is an entire function, f'(z)=U

Clear[z]; U=(E^(I π/4));
f[z_]=U z; (* flow potential *)
potential[f,{-1,-1},{1,1}]

stream[f,{-1,-1},{1,1}]

w[z_]=Conjugate[D[f[z],z]];
flow[w,{-1,-1},{1,1}]

f(z)= ln(z), source

f(z)=-ln z is analytic in C\(-∞,0]

Clear[z]; 
f[z_]=-Log[z]; (* flow potential *)
potential[f,{-1,-1},{1,1}]

stream[f,{-1,-1},{1,1}]

w[z_]=Conjugate[D[f[z],z]];
flow[w,{-1,-1},{1,1}]

f(z)= 1/z, dipole

f(z)=(lim_(h->0))(ln(z-h)-ln(z+h))/h
f(z)=1/z is analytic in C\{0}

Clear[z]; 
f[z_]=1/ z; (* flow potential *)
potential[f,{-1,-1},{1,1}]

stream[f,{-1,-1},{1,1}]

w[z_]=Conjugate[D[f[z],z]];
flow[w,{-1,-1},{1,1}]

f(z)=z+ 1/z, uniform current + dipole

Clear[z]; 
f[z_]=z+1/ z; (* flow potential *)
potential[f,{-1,-1},{1,1}]

stream[f,{-2,-2},{2,2}]

w[z_]=Conjugate[D[f[z],z]];
flow[w,{-2,-2},{2,2}]

f(z)=z+ 1/z + i log z, uniform current + dipole + circulation

Clear[z]; 
f[z_]=z+1/ z; (* flow potential *)
potential[f,{-1,-1},{1,1}]

stream[f,{-2,-2},{2,2}]

w[z_]=Conjugate[D[f[z],z]];
flow[w,{-2,-2},{2,2}]

Flows around objects obtained through conformal maps

Joukowski mapping centered at origin

ConformalPolarMap[w_,r1_,r2_,θ1_,θ2_,dr_,dθ_]:=Module[{ridplts,θidplts,rimplts,θimplts},
ridplts= Show[Table[PolarPlot[r,{θ,0,2π},PlotStyle->{Red,Thin},Axes->True],{r,r1,r2,dr}]];
θidplts= Show[Table[ParametricPlot[{r Cos[θ],r Sin[θ]},{r,r1,r2},PlotStyle->{Blue,Thin},Axes->True],{θ,θ1,θ2,dθ}]];
rimplts= Show[Table[ParametricPlot[{Re[w[r (E^(I θ))]],Im[w[r (E^(I θ))]]},{r,r1,r2},PlotStyle->Blue,Axes->True],{θ,θ1,θ2,dθ}]];
θimplts= Show[Table[ParametricPlot[{Re[w[r (E^(I θ))]],Im[w[r (E^(I θ))]]},{θ,θ1,θ2},PlotStyle->Red,Axes->True],{r,r1,r1,dr}]];
Show[{ridplts,θidplts,rimplts,θimplts}]
]

w(z)=z+1/z

wJou[z_]=z+1/z;
ConformalPolarMap[wJou,0.1,2,0,2π,0.2,π/8.]

Joukowski mapping, off-centered

w(z)=z+1/z

δ=0.28 (E^(-I 14π/32.));
wJou[z_]=z+1/(z-δ);
ConformalPolarMap[wJou,1.,1.2,0,2π,0.2,π/8.]

Questions to investigate

Vary m,δ to generate various airfoil shapes

z[ζ_,m_,ϕ_]=ζ+(1/(ζ-m (E^(I ϕ))))

z1[ζ_]=z[ζ,0.25, -4.π/5];
ConformalPolarMap[z1,1.,1.2,0,2π,0.2,π/8.]

z2[ζ_]=z[ζ,0.29, -4.π/9];
ConformalPolarMap[z2,1.,1.2,0,2π,0.2,π/8.]

CPM[m_,ϕ_]:=Module[{w},w[ζ_]:=z[ζ,m,ϕ];
ConformalPolarMap[w,1.,1.2,0,2π,0.2,π/8.]
]

Manipulate[CPM[m,ϕ],{m,0.25,0.35,0.02},{ϕ,-π/4,-π/2,-π/16}]

Plot the velocity field around the airfoil

Hint : ListVectorPlot allow plotting of ((Subscript[v, x]),(Subscript[v, y])) at a specific position (x,y). Construct the appropriate list to represent through ListVectorPlot.

potentialζ[F_,ll_,ur_]:=ContourPlot[Re[F[ξ+I η]],{ξ,ll[[1]],ur[[1]]},{η,ll[[2]],ur[[2]]},Frame->True,FrameLabel->{"Re[ζ]","Im[ζ]"},GridLines->Automatic,PlotLabel->"Velocity Potential of complex potential " <> ToString[f],PlotLegends->Automatic];
streamζ[F_,ll_,ur_]:=ContourPlot[Im[F[ξ+I η]],{ξ,ll[[1]],ur[[1]]},{η,ll[[2]],ur[[2]]},Frame->True,FrameLabel->{"Re[ζ]","Im[ζ]"},GridLines->Automatic,PlotLabel->"Stream function of complex potential " <> ToString[f],PlotLegends->Automatic];
flowζ[U_,V_,ll_,ur_]:= VectorPlot[{U[ξ, η],V[ξ,η]},{ξ,ll[[1]],ur[[1]]},{η,ll[[2]],ur[[2]]},Frame->True,FrameLabel->{"Re[ζ]","Im[ζ]"},GridLines->Automatic,PlotLabel->"Complex velocity from potential " <> ToString[F],PlotLegends->Automatic];

F[ζ_]=ζ+(1/ζ)

z[ζ,m,ϕ]

sols=Solve[z[ζ,m,ϕ]==Z,ζ]

ζ[Z_]=ζ /. sols[[1,1]]

f[z_]=F[ζ[z]]

f[z_,m_,ϕ_]=F[ζ[z]]

ContourPlot[Im[f[x+I y,0.28,-1.5]],{x,-3,3},{y,-3,3}]

W[ζ_]=D[F[ζ],ζ]

w[z_,m_,ϕ_]=D[f[z],z]

ComplexExpand[W[ζ] /. ζ->ξ+ I η]

ComplexExpand[w[z] /. z->x + I y]

w[0.5 + I 0.6,0.28,-1.5]

VelFieldPlot[m_,ϕ_]:=ListVectorPlot[
Table[ {{x,y},{Re[w[x+I y,m,ϕ]],-Im[w[x+I y,m,ϕ]]}},{x,-1,3,0.2},{y,-3,3,0.2}]
]

VelFieldPlot[0.28,-1.5]

?ListVectorPlot

U[ξ_,η_]=1+((η^2)/((((η^2)+(ξ^2)))^2))-((ξ^2)/((((η^2)+(ξ^2)))^2)); V[ξ_,η_]=((-2  η ξ)/((((η^2)+(ξ^2)))^2));

Flow in the ζ-plane around a circle

slPlt=streamζ[F,{-3,-3},{3,3}];
VPlt=flowζ[U,V,{-3,-3},{3,3}];
Show[{slPlt,VPlt}]

Plot[Sin[t],{t,0,2π}]

ListPlot[Table[{t,Sin[t]},{t,0,2π,π/64}],Joined->True]

Plot[Sin[1/t],{t,0,0.001},PlotRange->All]

ListPlot[Table[Sin[1/t],{t,0.001,0.1,0.001}],Joined->True]