Example Problem: Compressible Boundary Layer


Example Problem: Compressible Boundary Layer

For an example of a two-point boundary problem we will look at the equations that characterize a steady gas flow over a flat plate. Every gas is subject to viscous effects, the ability of one molecule of the gas to transfer momentum or energy to another molecule . The magnitude of the momentum or energy transfer is a function of the gradients of velocity or temperature in the flow. There is also a mass transfer mechanism called diffusion, but we won't concern ourselves with that here.

Consider a uniform flow of air over a flat plate. The flow velocity can have a component normal to the plate that we will call v and a component parallel to the plate that we will call u . The freestream conditions, the conditions far away from the plate, are that the flow has a constant u velocity and no v velocity. At the surface of the plate, except under very low-density conditions, both velocity components will be zero.

This sets up a velocity gradient and viscous effects come into play. The plate surface slows down the air molecules close to it. Molecules traveling at the freestream velocity try to speed up any slower molecules they encounter. The result is a velocity profile called the momentum boundary layer shown in Figure 20.4. Boundary layers have a finite thickness . At some distance above the flat plate the velocity will return to freestream conditions. The transition line between freestream and boundary layer conditions is known as the boundary layer edge.

Figure 20.4. Boundary layer velocity profile

graphics/20fig04.gif

There can be a thermal boundary layer as well. When the molecules slow down close to the flat plate, they lose kinetic energy. If the flat plate is insulated , adiabatic conditions exist and the lost kinetic energy is recovered in the form of increased temperature at the wall. If the flat plate is conducting, the kinetic energy will be transferred into the flat plate material. In either case, a temperature profile known as a thermal boundary layer is created.

The equations used to describe boundary layer flow start with the Navier-Stokes equations that represent the conservation of mass, momentum, and energy within a gas mixture. If the flow is steady and laminar, and if the boundary layer thickness is assumed to be small compared with the length scale of the flat plate, the original Navier-Stokes equations can be simplified into the following partial differential equations ”

Equation 20.24

graphics/20equ24.gif


The r term in Eq. (20.24) is the density of the gas and p is the pressure. The µ and k terms are the coefficient of viscosity and thermal conductivity. The h term is the enthalpy and T is the temperature.

You could solve the system of equations given by Eq. (20.24) if you like, but you would most likely need to use a finite-difference or finite-element technique. This can be a difficult and computationally intensive process. Fortunately, the compressible boundary layer equations can be converted to a system of two ODEs with a single independent variable. For a flat plate, the independent variable is defined by Eq. (20.25).

Equation 20.25

graphics/20equ25.gif


The e subscript in Eq. (20.25) denotes conditions at the boundary layer edge, equal to the freestream conditions for a flat plate. Two other variables , Eq. (20.26) and Eq. (20.28) are introduced. The first is a nondimensional stream function.

Equation 20.26

graphics/20equ26.gif


It turns out that the derivative of f with respect to h is equal to the ratio of the local streamwise velocity to the boundary layer edge velocity.

Equation 20.27

graphics/20equ27.gif


The second variable used in the transformation is the enthalpy ratio.

Equation 20.28

graphics/20equ28.gif


Without going through all the details of the derivation, using Eq. (20.25), (20.26), and (20.28), the conservation of mass, momentum, and energy expressions shown in Eq. (20.24) can be transformed into two ordinary differential equations.

Equation 20.29

graphics/20equ29.gif


The Pr parameter in Eq. (20.29) is the Prandtl number, and C is given by the expression in Eq. (20.30).

Equation 20.30

graphics/20equ30.gif


The boundary conditions for flat plate boundary layer flow with an adiabatic surface are listed in Eq. (20.31). The physical condition corresponding to each boundary condition is shown in parentheses.

At h = 0 (flat plate surface)

Equation 20.31

graphics/20equ31.gif


At h = h e (boundary layer edge)

Equation 20.32

graphics/20equ32.gif


To solve the compressible flat-plate boundary layer equations, the two ODEs shown in Eq. (20.29) are expressed as a system of five first-order differential equations.

Equation 20.33

graphics/20equ33.gif


You can see from Eq. (20.33) that the first-order form of the compressible boundary layer equations has five dependent variables. From Eq. (20.31), the h = 0 boundary specifies three boundary conditions. This problem is therefore a two-point boundary problem with two free variables, one that we will solve using the shooting technique. Once we have computed the profiles of df / d h and g , we can determine the velocity and enthalpy profiles from Eq. (20.27) and Eq. (20.28).

The CompressODE Class

The first step in the solution process is to write a class that represents the compressible boundary layer ODEs. We will name the class CompressODE . In addition to the members it inherits from the ODE class, the CompressODE class declares a number of other fields specific to the compressible boundary layer equations. These include the boundary layer edge enthalpy, velocity, and temperature, the Mach number of the freestream flow, the Prandtl number, and the C ratio defined in Eq. (20.30).

The CompressODE class defines one constructor. The constructor first calls the ODE class constructor passing it the numbers 5 (number of first-order ODEs) and 2 (number of free variables). The constructor then initializes the fields declared in the CompressODE class. Strictly speaking, the Prandtl number is a function of temperature. At low to moderate temperatures it is more or less a constant value. We use the constant value 0.75 in the CompressODE constructor. This was the same value used by Van Driest, 2 whose results we will compare against.

The CompressODE class then overrides the three sub methods declared in the ODE class. The getFunction() method is overridden to return the right-hand sides of Eq. (20.33). The setInitialConditions() method enforces the boundary conditions shown in Eq. (20.31). Before we override the getError() method we must decide how we will implement it. There are two free variables at the h = 0 boundary. There are four specified boundary conditions at the far-field boundary. Since the V[] and E[] arrays must be the same size, we must choose two of the far-field boundary conditions with which to compute the errors. The getError() method is written to compute the error vector based on the df / d h = 1 and g = 1 boundary conditions.

The CompressODE class source code is shown here.

 package TechJava.MathLib; import TechJava.Gas.*; public class CompressODE extends ODE {   double he, ue, Te, mach, Pr, C;   double ratio1, ratio2;   //  The CompressODE constructor calls the ODE   //  constructor passing it some compressible   //  boundary layer specific values. There are five   //  first order ODEs and two free variables.   public CompressODE(double Te, double mach) {     super(5,2);     this.Te = Te;     this.mach = mach;     he = 3.5*AbstractGas.R*Te/0.02885;     ue = mach*Math.sqrt(1.4*AbstractGas.R*Te/0.02885);     ratio1 = ue*ue/he;     ratio2 = 110.4/Te;     Pr = 0.75;   }   //  The getFunction() method returns the right-hand   //  sides of the five first-order compressible   //  boundary layer ODEs   //  y[0] = delta(C*f'') = delta(n)*(-f*f'')   //  y[1] = delta(f') = delta(n)*(f'')   //  y[2] = delta(f) = delta(n)*(f')   //  y[3] = delta(Cg') = delta(n)*(-Pr*f*g'    //                      Pr*C*(ue*ue/he)*f''*f'')   //  y[4] = delta(g) = delta(n)*(g')   public void getFunction(double x, double dy[],                           double ytmp[]) {     C = Math.sqrt(ytmp[4])*(1.0+ratio2)/        (ytmp[4]+ratio2);     dy[0] = -ytmp[2]*ytmp[0]/C;     dy[1] = ytmp[0]/C;     dy[2] = ytmp[1];     dy[3] = -Pr*(ytmp[2]*ytmp[3]/C +              ratio1*ytmp[0]*ytmp[0]/C);     dy[4] = ytmp[3]/C;   }   //  The getE() method returns the error, E[], in   //  the free variables at the end of the range   //  that was integrated.   public void getError(double E[], double endY[]) {     E[0] = endY[1] - 1.0;     E[1] = endY[4] - 1.0;   }   // This method initializes the dependent variables   // at the start of the integration range. The V[]   // contains the current guess of the free variable   // values   public void setInitialConditions(double V[]) {     setOneY(0, 0, V[0]);     setOneY(0, 1, 0.0);     setOneY(0, 2, 0.0);     setOneY(0, 3, 0.0);     setOneY(0, 4, V[1]);     setOneX(0, 0.0);   } } 

Solving the Compressible Boundary Layer Equations

Solving the compressible boundary layer equations for a given set of conditions is quite simple now. All we need to do is to create a CompressODE object and send the object to the ODEshooter() method. In this sample problem we are going to compute a Mach 8 boundary layer with a boundary layer edge temperature of 218.6 K. The dx parameter holds the initial increment value for the dependent variable ( h in this case). The V[] array contains the initial guesses for C 2 f / h 2 and g at h = 0.

The class that does all this is named ShootingCompress . Its source code is ”

 import TechJava.MathLib.*; public class ShootingCompress {   public static void main(String args[]) {     //  Create a CompressODE object     CompressODE ode = new CompressODE(218.6, 8.0);     //  Solve the ODE over the desired range with the     //  specified tolerance and initial step size.     //  The V[] array holds the initial conditions of     //  the free variables.     double dx = 0.1;     double range = 5.0;     double tolerance = 1.0e-6;     double V[] = {0.0826, 25.8};     //  Solve the ODE over the desired range    int numSteps =      ODESolver.ODEshooter(ode, V, range, dx, tolerance);     //  Print out the results     System.out.println("i  eta   Cf''  f'   f");     for(int i=0; i<numSteps; ++i) {       System.out.println(""+i+"  "+ode.getOneX(i)+"  "+ode.getOneY(i,0)+         "  "+ode.getOneY(i,1)+"  "+ode.getOneY(i,2));     }     System.out.println();     System.out.println("i  eta   Cg'   g");     for(int i=0; i<numSteps; ++i) {       System.out.println(""+i+"  "+ode.getOneX(i)+          "  "+ode.getOneY(i,3)+"  "+ode.getOneY(i,4));     }   } } 

As with the damped spring problem, it is more meaningful to show the compressible boundary layer results in plot form rather than as columns of data. Figure 20.5 shows the velocity profile computed by the shooting method as well as data from Van Driest 2 obtained by an analytical method known as Crocco's method. The two methods produce very similar velocity profile results. The independent variable, h , in Figure 20.5 has been converted into the nondimensional length graphics/20inl31.gif , where Re x is the Reynolds number per unit length.

Figure 20.5. Velocity profile, Mach 8 boundary layer

graphics/20fig05.gif

The nondimensional temperature profile results are shown in Figure 20.6. There are slight discrepancies between the shooting and Van Driest data but overall the two methods produce very similar results. You can see by Figure 20.6 the effects of using an adiabatic wall boundary condition. Since energy cannot be conducted into the flat plate surface, the loss of kinetic energy near the flat plate surface shows up as increased thermal energy. The temperature of the gas at the surface is 12 times that at the boundary layer edge.

Figure 20.6. Temperature profile, Mach 8 boundary layer

graphics/20fig06.gif



Technical Java. Applications for Science and Engineering
Technical Java: Applications for Science and Engineering
ISBN: 0131018159
EAN: 2147483647
Year: 2003
Pages: 281
Authors: Grant Palmer

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net