Complex Variables Applied To Two-Dimensional Potential Flows
Complex Variables Applied To Two-Dimensional Potential Flows
Complex Variables Applied To Two-Dimensional Potential Flows
Ω = φ ( x, y ) − i ψ ( x , y ) ,
or
Ω = φ ( r ,θ ) − i ψ ( r ,θ ) ,
where φ( r, θ ) or φ( r, θ ) represents the velocity potential and ψ( r, θ ) or ψ( r, θ ) represents the stream function of the flow.
By using the definitions of the velocity components as derivatives of the velocity potential and stream functions, we can prove that the function
dΩ
w= ,
dz
known as the complex velocity, contains the flow velocity components. In fact, we can write:
dΩ
w= = −u + iv = ( −vr + ivθ ) e −iθ ,
dz
( i θ) ( i θ)
or u=-Re(w), v=Im(w), vr=-Re(w e ), vθ=Im(w e ).
The process of analysis consists in identifying a complex potential function Ω = F( z ), from which we get a velocity potential and a stream function by using
φ = −ℜ( w ), ψ = ℑ( w ). Next, we proceed to calculate the complex velocity w = dΩ/dz and identify the velocity components through u=ℜ( w ), v= ℑ( w ), vr=
q
2
−ℜ( w e
( i θ)
), vθ= ℑ( w e
( i θ)
) . Finally, pressure distributions are calculated from Bernoulli's equation as P = ρ K − g h − .
2
> psi:=evalc(Im(subs(z=x+I*y,F(z))));
my
ψ := U y −
x +y
2 2
m ( x2 − y2 )
u := −U + 2
(x − y ) + 4 x y
2 2 2 2
> v:=evalc(Im(subs(z=x+I*y,w)));
mxy
v := 2 2
(x − y ) + 4 x y
2 2 2 2
> equipot:=contourplot(subs({U=1.5,m=1},phi),x=-2..2,y=-2..2,contours=20,color=blue,scaling=constrained):
> stream:=contourplot(subs({U=1.5,m=1},psi),x=-2..2,y=-2..2,contours=20,color=red,scaling=constrained):
> display({equipot,stream});
We recognize the flow net for the flow around a cylinder without circulation. To determine the radius of the circle we look at the streamline ψ = 0 by
using:
> simplify(psi=0);
y (U x + U y − m )
2 2
=0
x +y
2 2
m m
This is equivalent to the equation x2 + y2 = , i.e., the equation of a circle of radius a = .
U U
The pressure distribution in the flow can be obtained by using Bernoulli's equation:
> P:=rho*(K-g*h-(u^2+v^2)/2);
2
1 m ( x2 − y2 ) 2 m2 x2 y2
P := ρ K − g h − U − 2
− 4
2
(x + y ) (x + y )
2 2 2 2
A stagnation point is found at infinity where we can make P = P0, u = 0, v = 0, thus P0 = ρ ( K − g h ), and we can re-write P as:
> P:=P0-rho*(u^2+v^2)/2;
2
2 2 2
m ( x − y ) 4 m x y
2 2
1
P := P0 − ρ U − 2
+
4
2
(x + y ) (x + y )
2 2 2 2
To determine the pressure distribution on the cylinder it is more convenient to work with polar coordinates, thus:
> Pp:=simplify(subs({x=r*cos(theta),y=r*sin(theta)},P));
1 4 cos ( θ )2 ρ U r2 m − ρ U 2 r4 − ρ m2 + 2 P0 r4 − 2 ρ U r2 m
Pp := 2
2
r4 ( cos ( θ )2 + sin ( θ )2 )
Here we replace the trigonometry identity cos ( θ ) + sin ( θ ) = 1 to get:
2 2
> Pp:=subs(cos(theta)^2+sin(theta)^2=1,Pp);
1 4 cos ( θ )2 ρ U r2 m − ρ U 2 r4 − ρ m2 + 2 P0 r4 − 2 ρ U r2 m
Pp :=
2 r4
m
The pressure distribution on the cylinder is obtained by replacing r = a = into Pp:
U
> Pc:=simplify(subs(r=sqrt(m/U),Pp));
Pc := 2 cos ( θ )2 ρ U2 − 2 ρ U2 + P0
Rectilinear flows
These are flows whose complex potential has the form F(z) = Ω = A zn, where A and n are constant. A can be a real or complex number, while n is integer.
The following are the general expressions for the velocity potential and stream functions:
> restart:assume(n,integer);F:=z->A*z^n;
F := z → A z
n
> phi:=simplify(evalc(Re(subs(z=r*exp(I*theta),F(z)))));
( 1 / 2 n~ )
φ := A ( r2 ) cos ( n~ arctan( r sin ( θ ), r cos ( θ ) ) )
> psi:=simplify(evalc(Im(subs(z=r*exp(I*theta),F(z)))));
( 1 / 2 n~ )
ψ := A ( r2 ) sin ( n~ arctan( r sin ( θ ), r cos ( θ ) ) )
n
2
Here we recognize the fact that ( r ) 2
= rn, and arctan( r sin ( θ ), r cos ( θ ) ) = θ, thus, we re-write our functions as:
> phi:=-A*r^n*cos(theta);psi:=A*r^n*sin(theta);
φ := −A rn~ cos ( θ )
ψ := A r sin ( θ )
n~
*Case 2: A is real, n = 2
Consider the case in which A is a real number and n = 2.
> restart:assume(A,real):F:=z->A*z^2;
F := z → A z
2
> phi:=evalc(subs(z=r*exp(I*theta),Re(F(z))));
φ := A~ r ( cos ( θ ) − sin ( θ ) )
2 2 2
> psi:=evalc(subs(z=r*exp(I*theta),-Im(F(z))));
ψ := −2 A~ r cos ( θ ) sin ( θ )
2
The velocity potential and stream functions can also be written, for this case, as φ = −r2 cos ( 2 θ ), and ψ = r2 sin ( 2 θ ).
A portrait of the flow can be shown by using the following statements. Assume that A = 2:
> with(plots):
Warning, the name changecoords has been redefined
> p1:=contourplot(subs(A=2,phi),r=0..2,theta=-Pi..Pi,color=blue,scaling=constrained):
> p2:=contourplot(subs(A=2,psi),r=0..2,theta=-Pi..Pi,color=red,scaling=constrained):
> display({changecoords(p1,polar),changecoords(p2,polar)});
This portrait can be found also by using Cartesian coordinates as follows:
> restart:assume(A,real):F:=z->A*z^2;
F := z → A z2
> phi:=evalc(subs(z=x+I*y,Re(F(z))));
φ := A~ ( x2 − y2 )
> psi:=evalc(subs(z=x+I*y,-Im(F(z))));
ψ := −2 A~ x y
Assume that A = 2:
> with(plots):
Warning, the name changecoords has been redefined
> p1:=contourplot(subs(A=2,phi),x=-2..2,y=-2..2,color=blue,contours=15,scaling=constrained):
> p2:=contourplot(subs(A=2,psi),x=-2..2,y=-2..2,color=red,contours=15,scaling=constrained):
> display({p1,p2});
The red lines represent streamlines suggesting a flow concentrated in a quadrant of the plane. In more detail, this will be:
> p1:=contourplot(subs(A=2,phi),x=0..2,y=0..2,color=blue,contours=15,scaling=constrained):
> p2:=contourplot(subs(A=2,psi),x=0..2,y=0..2,color=red,contours=15,scaling=constrained):
> display({p1,p2});
To find the direction of the flow we can plot the velocity vectors:
> w:=diff(F(z),z);u:=evalc(subs(z=x+I*y,-Re(w)));v:=evalc(subs(z=x+I*y,Im(w)));
w := 2 A~ z
u := −2 A~ x
v := 2 A~ y
> fieldplot(subs(A=2,[u,v]),x=0..2,y=0..2,arrows=thick,scaling=constrained,grid=[10,10]);
The field plot of velocity vectors indicate that the flow starts towards the right-hand side of the x-plane and bends upward towards the upper part of the y
axis. This represents a flow constrained by a corner, and we will refer to it as a corner flow. Other corner flows can be obtained by using a real value of A
and different values of n in the complex potential Ω = A z .
n
π
α
* Case 3: corner flow, Ω = A z
π
, where α is a real number. It can be proven that the proposed complex potential represents
In this case we use A as a real number, and replace n with
α
π 2
flow around a corner with an angle . For example, consider the case α = .
α 3
> restart:assume(A,real):F:=z->A*z^(2/3);
( 2 / 3)
F := z → A z
> phi:=simplify(evalc(subs(z=r*exp(I*theta),Re(F(z)))));
( 1 / 3) 2
φ := A~ ( r2 ) cos arctan( r sin ( θ ), r cos ( θ ) )
3
> psi:=simplify(evalc(subs(z=r*exp(I*theta),-Im(F(z)))));
( 1 / 3) 2
ψ := −A~ ( r2 ) sin arctan( r sin ( θ ), r cos ( θ ) )
3
We can simplify these expressions to read:
> phi:=A*r^(2/3)*cos((2/3)*theta);
( 2 / 3) 2
φ := A~ r cos θ
3
> psi:=-A*r^(2/3)*sin((2/3)*theta);
( 2 / 3) 2
ψ := −A~ r sin θ
3
Assume that A = 2:
> with(plots):
Warning, the name changecoords has been redefined
> p1:=contourplot(subs(A=2,phi),r=0..2,theta=0..2*Pi,color=blue,scaling=constrained):
> p2:=contourplot(subs(A=2,psi),r=0..2,theta=0..2*Pi,color=red,scaling=constrained):
> display({changecoords(p1,polar),changecoords(p2,polar)});
3π
The red lines represent streamlines suggesting a flow around a corner of angle . In more detail, this will be:
2
3
π
2
> p1:=contourplot(subs(A=2,phi),r=0..2,theta=0..3*Pi/2,color=blue,scaling=constrained):
> p2:=contourplot(subs(A=2,psi),r=0..2,theta=0..3*Pi/2,color=red,scaling=constrained):
> display({changecoords(p1,polar),changecoords(p2,polar)});
To find the direction of the flow we can plot the velocity vectors:
> w:=diff(F(z),z);u:=evalc(subs(z=r*exp(I*theta),-Re(w)));v:=evalc(subs(z=r*exp(I*theta),Im(w)));
2 A~
w :=
3 z( 1 / 3 )
1
A~ cos arctan( r sin ( θ ), r cos ( θ ) )
2 3
u := − ( 1 / 6)
3
( r 2 cos ( θ ) 2 + r2 sin ( θ )2 )
1
A~ sin arctan( r sin ( θ ), r cos ( θ ) )
2 3
v := − ( 1 / 6)
3
( r cos ( θ ) + r sin ( θ ) )
2 2 2 2
π
π− β
* Case 4. Wedge flow, Ω = A z
π
This is the flow about a wedge with an angle α = π − β. For example, consider the case β = .
3
> restart:assume(A,real):F:=z->A*z^(Pi/(Pi-Pi/3));
( 3 / 2)
F := z → A z
> phi:=simplify(evalc(subs(z=r*exp(I*theta),Re(F(z)))));
1
φ := − A~ 2 r ( csgn ( r ) + cos ( θ ) ) r ( −2 cos ( θ ) + csgn ( r ) )
2
> psi:=simplify(evalc(subs(z=r*exp(I*theta),-Im(F(z)))));
1
ψ := A~ csgn ( r ( −sin ( θ ) + I cos ( θ ) ) ) 2 r ( csgn ( r ) − cos ( θ ) ) r ( csgn ( r ) + 2 cos ( θ ) )
2
Assume that A = 2:
> with(plots):
Warning, the name changecoords has been redefined
> p1:=contourplot(subs(A=2,phi),r=0..2,theta=0..2*Pi,color=blue,scaling=constrained):
> p2:=contourplot(subs(A=2,psi),r=0..2,theta=0..2*Pi,color=red,scaling=constrained):
> display({changecoords(p1,polar),changecoords(p2,polar)});
π
The red lines represent streamlines suggesting a flow around a wedge of angle . In more detail, this will be:
3
3
π
2
> p1:=contourplot(subs(A=2,phi),r=0..2,theta=0..Pi-Pi/3,color=blue,scaling=constrained):
> p2:=contourplot(subs(A=2,psi),r=0..2,theta=0..Pi-Pi/3,color=red,scaling=constrained):
> p3:=implicitplot(theta=2*Pi/3,r=0..2,theta=0..Pi-Pi/3,color=black,scaling=constrained):#Draws the left side of wedge
> display({changecoords(p1,polar),changecoords(p2,polar),changecoords(p3,polar)});
* Case 5. A is complex. Uniform flow.
( −i α ) ( −i α )
Consider the case in which A = K e , thus Ω = K e z.
> restart:assume(K,real);assume(alpha,real);
> F:=z->K*exp(-I*alpha)*z;
( −I α )
F := z → K e z
> phi:=evalc(subs(z=r*exp(I*theta),Re(F(z))));
φ := K~ ( r cos ( θ ) cos ( α∼ ) + r sin ( θ ) sin ( α∼ ) )
> psi:=evalc(subs(z=r*exp(I*theta),-Im(F(z))));
ψ := −K~ ( r sin ( θ ) cos ( α∼ ) − r cos ( θ ) sin ( α∼ ) )
π
Assume that K = 2, and α =
6
1
α∼ = π
6
> with(plots):
Warning, the name changecoords has been redefined
> p1:=contourplot(subs({K=2,alpha=Pi/6},phi),r=0..2,theta=0..2*Pi,color=blue,scaling=constrained):
> p2:=contourplot(subs({K=2,alpha=Pi/6},psi),r=0..2,theta=0..2*Pi,color=red,scaling=constrained):
> display({changecoords(p1,polar),changecoords(p2,polar)});
( −i α )
Which indicates that Ω = K e z, represents a uniform flow at an angle α with respect to the positive x-axis. So, if α = 0, we recover the complex
potential for a uniform flow in the x-direction: Ω = K z, where the velocity is U = -K.
> restart:assume(U,real);
> F:=z->-U*z;
F := z → −U z
> phi:=evalc(subs(z=r*exp(I*theta),Re(F(z))));
φ := −U~ r cos ( θ )
> psi:=evalc(subs(z=r*exp(I*theta),-Im(F(z))));
ψ := U~ r sin ( θ )
> with(plots):
Warning, the name changecoords has been redefined
> p1:=contourplot(subs(U=1,phi),r=0..2,theta=0..2*Pi,color=blue,scaling=constrained):
> p2:=contourplot(subs(U=1,psi),r=0..2,theta=0..2*Pi,color=red,scaling=constrained):
> display({changecoords(p1,polar),changecoords(p2,polar)});
Radial and swirling flows
These flows are associated with complex potentials of the form z = A ln z.
* Case 1 - A is real
Let's analyze the case in which A is a real constant. The complex potential is:
> restart:assume(A,real);F:=z->A*log(z);
F := z → A log( z )
The corresponding velocity potential is obtained as:
> phi:=simplify(evalc(subs(z=r*exp(I*theta),Re(F(z)))));
φ := A~ ln ( csgn ( r ) r )
Since the function csgn(r) is either equal to 1.0 or to -1.0, we can write:
> phi:=A*log(r);
φ := A~ ln ( r )
The stream function is given by:
> psi:=evalc(subs(z=r*exp(I*theta),-Im(F(z))));
ψ := −A~ arctan( r sin ( θ ), r cos ( θ ) )
which simplifies to
> psi:=-A*theta;
ψ := −A~ θ
A picture of this flow is shown next for A = 1:
> with(plots):
> p1:=contourplot(subs(A=1,phi),r=0..2,theta=0..2*Pi,color=blue,scaling=constrained):
> p2:=contourplot(subs(A=1,psi),r=0..2,theta=0..2*Pi,color=red,scaling=constrained):
> display({changecoords(p1,polar),changecoords(p2,polar)});
We recognize this flow net as that of a source or sink located at the origin. The singularity flow is a source if A = −µs< 0 or a sink if A = −µs > 0. The
complex potential is, thus, Ω = −µs ln ( z ). If the source is located at a point z = z0, then the complex potential is written as Ω = −µs ln ( z − z0 ).
*Case 2 - A is imaginary
Consider the case in which the coefficient A is imaginary, say A = iB. The complex potential is:
> restart:assume(B,real);F:=z->I*B*log(z);
F := z → I B log( z )
The corresponding velocity potential is obtained as:
> phi:=simplify(evalc(subs(z=r*exp(I*theta),Re(F(z)))));
φ := −B~ arctan( r sin ( θ ), r cos ( θ ) )
which simplifies to
> phi:=-B*theta;
φ := −B~ θ
The stream function is given by:
> psi:=evalc(subs(z=r*exp(I*theta),-Im(F(z))));
> p1:=contourplot(subs(B=1,phi),r=0..2,theta=0..2*Pi,color=blue,scaling=constrained):
> p2:=contourplot(subs(B=1,psi),r=0..2,theta=0..2*Pi,color=red,scaling=constrained):
> display({changecoords(p1,polar),changecoords(p2,polar)});
We recognize this flow net as that of a vortex, of strength B, located at the origin. The vortex is counterclockwise if B = µv >0 or a sink if B = µv <0.
A
Doublet flow - Ω =
z
Consider the case in which A is a real constant and the velocity potential is given by:
> restart:assume(A,real);F:=z->A/z;
A
F := z →
z
The corresponding velocity potential is obtained as:
> phi:=simplify(evalc(subs(z=r*exp(I*theta),Re(F(z)))));
A~ cos ( θ )
φ :=
r
The stream function is given by:
> psi:=evalc(subs(z=r*exp(I*theta),-Im(F(z))));
A~ sin ( θ )
ψ :=
r ( cos ( θ )2 + sin ( θ )2 )
which simplifies to:
> psi:=A*sin(theta)/r;
A~ sin ( θ )
ψ :=
r
A cos ( θ )
A picture of this flow is shown by recognizing that lines of constant φ are given by the polar curve r = , while those lines of constant ψ (i.e., the
φ
A sin ( θ ) φ
streamlines) are given by r = . The following commands produce the flow net. Here we use K = .
φ A
> with(plots):
> K:=[-5,-4,-3,-2,-1,1,2,3,4,5];
K := [ -5, -4, -3, -2, -1, 1, 2, 3, 4, 5 ]
> p1:=plot({seq(cos(theta)/K[j],j=1..nops(K))},theta = 0..2*Pi,coords=polar,scaling=constrained,color=blue):
> p2:=plot({seq(sin(theta)/K[j],j=1..nops(K))},theta = 0..2*Pi,coords=polar,scaling=constrained,color=red):
> display({p1,p2});
We recognize the flow net for a doublet of strength A = µd. The double strength µd is positive if the doublet -- aligned with the x axis -- is such that flow
leaves the doublet on the positive side of x and it returns to the doublet on the negative side of x. This is indicated in the following sketch with the
If the outflow occurs on the negative side of x and the inflow in the positive side of x, the strength of the doubled µd is negative.
From the figure we can observe that both the equipotential lines and the streamlines are circles. This result can be obtained from the expressions for the
equipotential lines and stream functions, namely:
> EqPhi:=r=mu[d]*cos(theta)/_phi;EqPsi:=r=mu[d]*sin(theta)/_psi;
µd cos ( θ )
EqPhi := r =
_φ
µd sin ( θ )
EqPsi := r =
_ψ
Here we use _φ and _ψ, rather than φ and ψ, to emphasize constant values of these functions. Let's now manipulate these equations:
> EqPhi:=r*EqPhi;EqPsi:=r*EqPsi;
r µd cos ( θ )
EqPhi := r =
2
_φ
r µd sin ( θ )
EqPsi := r =
2
_ψ
and make the following replacements:
> EqPhi:=subs({r^2=x^2+y^2,cos(theta)=x/r},EqPhi);EqPsi:=subs({r^2=x^2+y^2,sin(theta)=y/r},EqPsi);
µd x
EqPhi := x + y =
2 2
_φ
µd y
EqPsi := x + y =
2 2
_ψ
These equations are re-written as:
> EqPhi:=lhs(EqPhi)-rhs(EqPhi)=0;EqPsi:=lhs(EqPsi)-rhs(EqPsi)=0;
µd x
EqPhi := x + y − =0
2 2
_φ
µd y
EqPsi := x + y − =0
2 2
_ψ
In these expressions we used functions lhs (left-hand side) and rhs (right-hand side) to manipulate the equations.
Next, we will use function completesquare from the student package to re-write our equations as those of a circle:
> with(student):
> EqPhi:=completesquare(x^2-mu[d]*x/_phi,x)+y^2 = 0;
2 2
1 µd 1 µd
EqPhi := x − − +y =0
2
2 _φ 4 _φ2
> EqPsi:=x^2+completesquare(y^2-mu[d]*y/_psi,y)= 0;
2 2
1 µd 1 µd
EqPsi := y − − + x2 = 0
2 _ψ 4 _ψ2
These equations can be re-written as:
> EqPhi := (x-1/2*mu[d]/_phi)^2+y^2 = 1/4*mu[d]^2/(_phi^2);
2 2
1 µd 1 µd
EqPhi := x − +y =
2
2 _φ 4 _φ2
> EqPsi := (y-1/2*mu[d]/_psi)^2+x^2 = -1/4*mu[d]^2/(_psi^2);
2 2
1 µd 1 µd
EqPsi := y − +x =−
2
2 _ψ 4 _ψ2
µd µd
We recognize equation EqPhi as that of a circle of radius a = , centered at C(
, 0), i.e., circles centered on the x-axis. Also, we recognize equation
2φ 2φ
µd µd
EqPsi as that of a circle of radius a = , centered at C(0, ), i.e, circles centered on the y-axis.
2ψ 2ψ
π
α
* Corner flow of angle α, Ω = A z , A is real.
π
π− β
* Wedge flow of angle β, Ω = A z , A is real.
( −i α )
* Uniform flow of velocity U at angle α, Ω = −U e z.
* Source (0 < µs) or sink (µs < 0) at the origin, Ω = −µs ln ( z ).
* Vortex of strenght µv , at the origin µv , Ω = i µv ln ( z ), with 0 < µv for counterclockwise vortex, and µv < 0 for clockwise vortex.
* Vortex of strenght µv , at z = z0, Ω = i µv ln ( z − z0 ), with 0 < µv for counterclockwise vortex, and µv < 0 for clockwise vortex.
µd
* Doublet of strength µd at the origin oriented along the x-axis, Ω = , with 0 < µd when source is on the positive side of the x axis (- +).
z
µd
* Doublet of strength µd at z = z0 the origin oriented along the x-axis, Ω = , with 0 < µd when source is on the positive side of the x axis (- +).
z − z0
The combination of a uniform flow in the positive x direction, i.e., Ω U = −U z, with singularity flows can produce the flow around a number of simple solid
bodies. Some of these flows are presented next.
Rankine half-body
This flow results from combining a uniform flow (Ω U = −U z) with a source located at the origin (Ω S = −µs log( z )). The resulting complex potential is:
> restart:F:=z->-U*z-mu[s]*log(z);
F := z → −U z − µs log( z )
with velocity potential and stream functions given by:
> phi:=evalc(subs(z=r*exp(I*theta),Re(F(z))));
1
φ := −U r cos ( θ ) − µs ln ( r2 cos ( θ )2 + r2 sin ( θ )2 )
2
> psi:=evalc(subs(z=r*exp(I*theta),-Im(F(z))));
ψ := U r sin ( θ ) + µs arctan( r sin ( θ ), r cos ( θ ) )
simplified to:
> phi:=-U*r*cos(theta)-mu[s]*ln(r);
φ := −U r cos ( θ ) − µs ln ( r )
> psi:=U*r*sin(theta)+mu[s]*theta;
ψ := U r sin ( θ ) + µs θ
The velocity components in polar coordinates can be obtained from:
> w:=diff(F(z),z);
µs
w := −U −
z
These components are:
> v_r:=evalc(subs(z=r*exp(I*theta),-Re(w)));
µs cos ( θ )
v_r := U +
r ( cos ( θ ) + sin ( θ ) )
2 2
> v_theta:=evalc(subs(z=r*exp(I*theta),Im(w)));
µs sin ( θ )
v_theta :=
r ( cos ( θ )2 + sin ( θ )2 )
which simplify to:
> v_r:=U+mu[s]*cos(theta)/r;
µs cos ( θ )
v_r := U +
r
> v_theta:=mu[s]*sin(theta)/r;
µs sin ( θ )
v_theta :=
r
A stagnation point is found along the line θ = π. Along this line
> subs(theta=Pi,v_theta);evalf(%);
µs sin ( π )
r
0.
The stagnation point corresponds to v_r = 0, i.e.,
> Eq_v_r:=subs(theta=Pi,v_r);
µs cos ( π)
Eq_v_r := U +
r
Solving for r=a
> a:=solve(Eq_v_r,r);
µs
a :=
U
µs
Thus, the stagnation point occurs at ( r, θ ) = , π . The streamline passing through this point evaluates to:
U
> psi0 := subs({r = mu[s]/U, theta = Pi},psi);psi0:=simplify(psi0);
ψ0 := µs sin ( π ) + µs π
ψ0 := µs π
The equation of this streamline is then given by:
> Eq_psi0:=psi0=psi;
Eq_psi0 := µs π = U r sin ( θ ) + µs θ
The function describing this streamline, in polar coordinates, is given by:
> solve(Eq_psi0,r);
µs ( −π + θ )
−
U sin ( θ )
A plot of this function is achieved by using the following statement. We use values of U=1 and µs = 1.
> with(plots):
> p1:=plot(subs({mu[s]=1,U=1},-mu[s]*(-Pi+theta)/(U*sin(theta))),theta=0.1*Pi..0.99*Pi,coords=polar,color=black,thickness=2):
> p2:=plot(subs({mu[s]=1,U=1},-mu[s]*(-Pi+theta)/(U*sin(theta))),theta=1.01*Pi..1.9*Pi,coords=polar,color=black,thickness=2):
> display({p1,p2});
> p1:=contourplot(subs({U=1,mu[s]=1,a=1},phi),x=-4..4,y=-4..4,color=blue,contours=10):
> p2:=contourplot(subs({U=1,mu[s]=1,a=1},psi),x=-4..4,y=-4..4,color=red,contours=10):
> display({p1,p2});
To determine the equation for the body streamline, we use the equation of the streamlines:
> psi=K;
U y + µs arctan( y, x + a ) − µs arctan( y, x − a ) = K
y y
Suppose that we call θ1 = arctan , and θ2 = arctan
, then, the equation of the streamlines is:
µs µs
x+ x−
U U
> EqPsi:=y*U+mu[s]*(theta[1]-theta[2])=K;
EqPsi := y U + µs ( θ1 − θ2 ) = K
From which we can write:
> EqPsi:=theta[1]-theta[2]=(K-y*U)/mu[s];
K−yU
EqPsi := θ1 − θ2 =
µs
Taking the tangent of this expression,
> EqPsi:=tan(theta[1]-theta[2])=tan((K-y*U)/mu[s]);
K−yU
EqPsi := tan( θ1 − θ2 ) = tan
µs
with the expansion
> expand(tan(theta[1]-theta[2]));
−tan( θ2 ) + tan( θ1 )
1 + tan( θ2 ) tan( θ1 )
y y
And since tan( θ1 ) = , and tan( θ2 ) = ,
µs µs
x+ x−
U U
> EqPsi:=simplify(subs({tan(theta[1]) = y/(x+mu[s]/U),tan(theta[2]) = y/(x-mu[s]/U)},(-tan(theta[2])+tan(theta[1]))/(1+tan(theta[2])*tan(theta[1]))))=
tan((K-y*U)/mu[s]);
y U µs K−yU
EqPsi := −2 = tan
µs
2
U x − µs + y U
2 2 2 2
ψ := U y − a U ln ( x2 + ( y + a )2 ) + a U ln ( x2 + ( y − a )2 )
The streamlines can be obtained by using:
> contourplot(subs({a=1,U=1},psi),x=-3..3,y=-3..3,contours=20,scaling=constrained,color = red);
The velocity components are calculated from:
> w:=diff(Omega,z);
2 I a U -2 I a U
w := −U + +
z+Ia z−Ia
These components are:
> u:=evalc(subs(z=x+I*y,-Re(w)));
2 a U (y + a) 2 a U (y − a)
u := U − +
x + (y + a) x + (y − a)
2 2 2 2
> v:=evalc(subs(z=x+I*y,Im(w)));
a Ux 2a Ux
v := 2 −
x + (y + a)
2
x + ( y − a )2
2 2
We expect the stagnation point to occur somewhere along the x axis, i.e., at y=0:
> u0:=subs(y=0,u);v0:=subs(y=0,v);
4 a2 U
u0 := U −
x2 + a 2
v0 := 0
The stagnation points occur where u0 = 0, i.e.,
> solve(u0=0,x);
3 a, − 3 a