Showing posts with label streamfunction. Show all posts
Showing posts with label streamfunction. Show all posts

Tuesday, September 27, 2011

MrsDrPoe: Potential Flow, Part III

Once again Thesis Tuesday is upon us!  Today we'll be concluding our investigation into Potential Flow by examining combinations of the flows we've looked at so far in both Cartesian and cylindrical coordinates.  This is possible because potential flows obey the superposition principle.

Doublet

A doublet is the combination of a source and a sink of equal strenghts (+/- m) located 2a apart, as we can see in the figure below:


To find the potential function and streamfunction for the doublet (in relation to point P), we simply add the two potential functions and the two stream functions respectively:


PHI = PHIsource + PHIsink = 0.5*(m/pi)*ln(r1) - 0.5*(m/pi)*ln(r2)

PHI = 0.5*(m/pi)*ln(r1/r2)

PSI = PSIsource + PSIsink = 0.5*(m/pi)*theta1 - 0.5*(m/pi)*theta2

PSI = 0.5*(m/pi)*(theta1 - theta2)


If we allow the distance between the source and sink shrink (a goes to 0, theta1 goes to theta 2, r1 goes to r2), we arrive at:


PHI = ((m*a)/(pi*r))*cos(theta)

PSI = -((m*a)/(pi*r))*sin(theta)

Flow Over a Cylinder


To examine flow over a cylinder, we will combine a doublet and uniform flow.  Before we can combine these flows, however, we must first translate uniform flow into cylindrical coordinates (remember- you can never mix coordinate systems) using:

x = r*cos(theta), y = r*sin(theta)


Next we simply combine the potential function and streamfunction from each flow to find these functions for the combination:

PHI = PHIdoublet + PHIuniform = ((m*a)/(pi*r))*cos(theta) - U*r*cos(theta)

PSI = PSIdoublet + PSIuniform = -((m*a)/(pi*r))*sin(theta) + U*r*sin(theta)


If we let (m*a)/pi = U*R*R where R is the radius of a cylinder we're interested in:


PHI = -U*cos(theta)*(r - (R*R)/r)

PSI = U*sin(theta)*(r - (R*R)/r)


Note the streamline where PSI = 0, r = R is taken as the surface of a cylinder of radius R.  We can do this because streamlines run parallel to the flow, meaning no flow crosses the streamline, just like no fluid can cross a solid (non-permeable) boundary; therefore, any streamline in an invisicd flow field can be considered a solid boundary.  All streamlines for PSI > 0 give the inviscid flowfield over the cylinder.  

Streamlines exist inside the cylinder (from the doublet) as seen below, but we neglect these.  We can also determine the stagnation point for the flow by finding the velocity from the potential function and streamfunction and noting where it equals zero.  By combining other potential flows in a similar manner, we can examine inviscid flow around other objects.





And that's potential flow.  Tune in next week when we'll look into the third major governing equation of fluid mechanics - the energy equation.

Tuesday, September 20, 2011

MrsDrPoe: Potential Flow, Part II

Good morning, and welcome to another Thesis Tuesday on the blog!  Today we'll be continuing our discussion of potential flow, looking at some problems better examined in cylindrical coordinates.


Although cylindrical coordinates are useful, transforming equations from Cartesian to cylindrical coordinates often results in some 'hairy' expressions.  For our purposes today, we'll need the definitions for the velocity potential function and the streamfunction in this new coordinate system:


Velocity Potential: vr = d/dr(PHI), vtheta = d/dtheta(PHI/r), vz = d/dz(PHI)


Streamfunction: vr = d/dtheta(PSI/r), vtheta = -d/dr(PSI)


Next, we'll apply these relations to a few potential flow scenarios.


Source and Sink


A source/sink is a flow radially outward/inward from/to a point at some volumetric flowrate, m.  We'll define the velocity components for this type of flow as:


vr = m/(2*pi*r) and vtheta = 0


For a source type of flow, m > 0; for a sink, m < 0.  We should also note that at r = 0, the velocity becomes infinite, which is physically impossible.  "Wait," you may be asking yourself, "If this flow is physically impossible, why do we care?"  The answer to this question is that you'll have to wait till next week to find out.  (Don't you just love cliff-hangers?)  Let's figure out the velocity potential and stream functions that govern a source (realizing that if we simply make m negative, we'll also have the functions that govern a sink):

Velocity Potential:


d/dr(PHI) = m/(2*pi*r)

int(1)dPHI = int(m/(2*pi*r))dr

PHI = 0.5*(m/pi)*ln(r) + c
(We can see that if we take the derivative of this function with respect to theta, we get zero; therefore, this expression also matches the second constraint below.)

d/dtheta(PHI/r) = 0


Streamfunction:


d/dtheta(PSI/r) = m/(2*pi*r)

int(1)dPSI = int(m/(2*pi))dtheta

PSI = 0.5*(m/pi)*theta + c
(We can see that if we take the derivative of this function with respect to r, we get zero; therefore, this expression also matches the second constraint below.)

-d/dr(PSI) = 0


Vortex


It seems odd that we could consider a vortex to be irrotational; however, we must remember that rotation refers to the orientation of a fluid element and not the path followed by the element.  An irrotational vortex is called a free vortex, while a rotational vortex is called a forced vortex.  (Recall that the velocity potential function is only valid for irrotational flows.)  A combined vortex is one with a forced vortex at its core and a free vortex outside its core.


The property of circulation is often associated with vortex motion.  Circulation, GAMMA, is defined as the line integral of the tangential component of the velocity taken around a closed curve in the flow field.  The velocity potential and streamfunctions for free vortices are often written in terms of the circulation of the flow*.


For a free vortex, we will define the following velocity components:


vr = 0 and vtheta = K/r


where K is the magnitude of the velocity.


Velocity Potential:


d/dtheta(PHI/r) = K/r

int(1)dPHI = int(K)dtheta
PHI = K*theta + c
(Again the derivative of this function with respect to r matches the second matching condition.)

d/dr(PHI) = 0


Streamfunction:


d/dr(PSI) = K/r

int(1)dPSI = -int(K/r)dr

PSI = -K*ln(r) + c
(The derivative of this function with respect to theta matches the second matching condition.)

d/dtheta(PSI/r) = 0



Cool, huh? Remember that if we plot constant values of PHI and PSI, we will obtain a flow net that helps us visualize the flow.  Next week, we'll do some fun things with the results from today and last week. 

*PHI = (0.5*GAMMA*theta)/pi and PSI = -(0.5*GAMMA*ln(r))/pi

Tuesday, September 13, 2011

MrsDrPoe: Potential Flow, Part I

It's Thesis Tuesday on the blog, and today we'll be going down a bit of a rabbit trail involving Potential Flow.  

If we make the assumption that a flow field is irrotational, rotation (and vorticity) in the field is equal to zero and d/dx(v) = d/dy(u), d/dy(w) = d/dz(v), and d/dz(u) = d/dx(w).  Irrotational flow occurrs in regions far from surfaces (inviscid flow); the Bernoulli Equation holds true between any two points in the flow field, not just in two points along a streamline.

We will define some scalar function PHI as the velocity potential function: V = Grad(PHI) or u = d/dx(PHI), v = d/dy(PHI), w = d/dz(PHI).  Applying these definitions for velocity to our relations for irrotational velocity fields (i.e. d/dx(d/dy(PHI)) = d/dx(d/dy(PHI))), we can see that this function does describe irrotational flow.  If we apply the velocity potential function to the continuity equation, we end up with: 

d/dx(d/dx(PHI)) + d/dy(d/dy(PHI)) + d/dz(d/dz(PHI)) = 0


This expression is known as the Laplace Equation.  Inviscid, incompressible, irrotational flow governed by the Laplace Equation is often called potential flow.  Lines of constant PHI are called equipotential lines.


The streamfunction, PSI, is another special two-dimensional function defined as: u = d/dy(PSI), v = d/dx(PSI).  The value of PSI is constant along streamlines.  Applying this to the continuity equation gives:


d/dx(d/dx(PSI)) + d/dy(d/dy(PSI)) = 0


which is the 2D Laplace Equation.  It should be apparent that the streamfunction and the velocity potential function are related.  Streamlines and equipotential lines are actually perpendicular to each other; they form a flow net that can be used to help visualize the flowfield.


Let's look at a two basic potential flows:


Uniform Flow


For uniform flow with constant velocity (U) in the x-direction:


To determine the potential function for this flow, we must examine our relationships between PHI, u, and v.  Integration will be necessary, and it is crucial that the results from integration both parts of the definition must match.

d/dx(PHI) = U

int(1)dPHI = int(U)dx

PHI = Ux + c 
 (If we take the derivative of this function with respect to y, we obtain zero; thus this function holds true for this flow.)

d/dy(PHI) = 0 

To determine the streamfunction we examine the relationships between PSI, u, and v.  Again integration and obtaining matching results are necessary.


d/dy(PSI) = U

int(1)dPSI = int(U)dy

PSI = Uy+c 
(Again this function matches the additional constraint below.)

d/dx(PSI) = 0


For uniform flow with constant velocity alpha degrees from the horizon:


Potential function:


d/dx(PHI) = U*cos(alpha)

int(1)dPHI = int(U*cos(alpha))dx

PHI = U*cos(alpha)*x + c 

d/dy(PHI) = U*sin(alpha)

int(1)dPHI = int(U*sin(alpha))dy

PHI = U*sin(alpha)*y + c

PHI = U*cos(alpha)*x + U*sin(alpha)*y 
(This function matches both constraints placed on the flow.)


Stream function:


d/dx(PSI) = U*sin(alpha)

int(1)dPSI = int(U*sin(alpha))dx

PSI = U*sin(alpha)*x + c 

d/dy(PSI) = U*cos(alpha)

int(1)dPSI = int(U*cos(alpha))dy

PSI = U*cos(alpha)*y + c

PSI = U*sin(alpha)*x + U*cos(alpha)*y
(This function also matches both constraints placed on the flow.)




Now that we've determined the velocity potential function and the streamfunction for these flows, we can use this knowledge to examine any potential flow.  Next week, we'll look at a couple of flow examples in cylindrical coordinates, but until then, happy studying!