+ All Categories
Home > Documents > eulereqns.pdf

eulereqns.pdf

Date post: 02-Jun-2018
Category:
Upload: jonthemes
View: 216 times
Download: 0 times
Share this document with a friend

of 22

Transcript
  • 8/10/2019 eulereqns.pdf

    1/22

    Department of Mechanical & Aerospace EngineeringCARLETON UNIVERSITY

    AERO 4304: Computational Fluid Dynamics

    Winter 2013Lecture 11: Solution of Euler Equations

    Lecture summary

    In this lecture, we will discuss

    Review of the Euler system of equations

    An analytical method for solving Euler equations (method of characteristics)

    Numerical methods for solving the Euler equations

    1 Review of the Euler equations

    Recall that for a sufficiently large Reynolds number, the important viscous effects are con-fined to thin regions near solid surfaces, and the conservation laws governing the inviscid,non-conducting regions in the flow can be solved independently from the boundary layer.The resulting equations are termed the Euler equations, and due to the omission of viscousand heat-transfer effects, they can be solved with lower computational expense than the full

    Navier-Stokes equations.We have already discussed the solution of non-linear PDEs by discussing the viscous

    and inviscid Burgers equation. How then does the Burgers equation compare to the Eulerequation? Lets briefly compare these two equations; naturally, only the inviscid Burgersequation will be compared because viscous effects are omitted from the Euler equation:

    The inviscid Burgers equation expresses the non-linear convection of a wave. It hashyperbolic behaviour for all velocities of the convected wave.

    The Euler equations express conservation of mass, momentum, and energy for a realsubstance. For unsteady flows, the equations are hyperbolic for all Mach numbers,

    but for steady flows, the equations are elliptic in subsonic flows and hyperbolic insupersonic flows.

    The inviscid Burgers equation relates how a single velocity component u propagates,hence it is a scalar equation. The solution variable is a scalaru, the flux is a scalarF =u2/2, and the Jacobian matrix is a scalar A= F/u= u.

  • 8/10/2019 eulereqns.pdf

    2/22

    AERO 4304 Lecture 11 2

    The Euler equations are a systemof equations that relate the variations of velocity,density, and total energy in multiple spatial dimensions. It is therefore a vectorequa-tion. The solution variable is a vector U, the flux is a vector F, and the Jacobianmatrix (or matrices, depending on whether the 1D, 2D, or 3D Euler equations are

    being considered) is (are) a m m matrix, where m is the number of components ofU.

    1.1 Vector form of Euler equations

    While the Euler equation is (strictly-speaking) composed of multiple equations for the conser-vation of mass, momentum, and energy, it is convenient to express them as a single equationin vector form. The compressible Euler equations in Cartesian coordinates without bodyforces or external heat transfer can be written in vector form as

    U

    t +

    F

    x+

    G

    y +

    H

    z = 0 (1)

    where the U, F, G, and H vectors are given by

    U=

    uvwEt

    F=

    uu2 +p

    uvuw

    (Et+p)u

    G=

    vuv

    v2 +pvw

    (Et+p)v

    H=

    wuwvw

    w2 +p(Et+p)w

    andEt = (e + V2/2) represents the total energy per unit mass and e represents the internal

    energy per unit mass. Notice that the vector U contains the conserved solution variables

    , u, v, w, and Et, and hence U is frequently referred to as the solution vector. Theother vectorsF,G, andH are components of the flux tensor, and hence they are frequentlyreferred to as the conserved-fluxes vectorsor just the flux vectors.

    1.2 Quasi one-dimensional form of the Euler equations

    There are applications in which a quasi-1-D form of the Euler equations will provide usefulresults. An example of one such application is an internal nozzle, modeled as a converging-diverging circular duct, shown in Fig. 1. The values of flow variables are considered to beaverages over the cross-sectional area. Conservation equations for the case where the cen-terline is straight and the area varies only in the x direction are:

    Conservation of mass:(A)

    t +

    (uA)

    x = 0 (2)

    Conservation of momentum:

    (uA)

    t +

    (u2A)

    x +A

    p

    x= 0 (3)

  • 8/10/2019 eulereqns.pdf

    3/22

  • 8/10/2019 eulereqns.pdf

    4/22

    AERO 4304 Lecture 11 4

    2 Method of characteristics for solving the Euler equa-

    tions

    Closed-form solutions of non-linear hyperbolic PDEs do not exist for general cases, and mustbe solved with a numerical method. The oldest and most analytical method is the methodof characteristics. In Lecture 3, we noted that certain directions or surfaces bound thepropagation of information within the solution domain, and signals are propagated alongthese surfaces influencing the solution at other points within the zone of influence. Themethod of characteristics is a technique that utilizes the known physical behaviour of thesolution at each point in the flow to solve for the unknown flow properties. The solutionbegins by calculating the differential equation of the characteristic lines in the solution.

    To illustrate how the characteristics are computed, lets consider the one-dimensionalunsteady Euler equations given by

    U

    t +

    F

    x (6)

    where

    U=

    u

    Et

    F=

    uu2 +p

    uEt+pu

    To help us remember that the elements ofU are the dependent variables, let us introducethe more compact notation

    u= m (7)

    Et= (8)

    With this, the vectors UandF become

    U=

    m

    (9)

    and

    F=

    mm2

    +p

    m(+p)

    (10)

    We can eliminate p in the flux column vector F in favour of, m, and as follows. Fromthe calorically perfect gas relations,cv =R/( 1) ande = cvT, the perfect gas equation ofstate can be written as

    p= RT = ( 1) R( 1)T = ( 1)cvT = ( 1)e (11)

  • 8/10/2019 eulereqns.pdf

    5/22

    AERO 4304 Lecture 11 5

    From the definitions of andEt, we have

    = Et = e+

    u2

    2 = e+

    u2

    2 (12)

    and solving for e we have

    e= u2

    2 = m

    2

    2 (13)

    and substituting this value into Eqn. 11 gives an expression for pressure

    p= ( 1)

    m2

    2

    (14)

    Substituting this expression for p into the column vector Fyields

    F=

    mm2

    + ( 1)

    m

    2

    2

    m

    + ( 1)

    m

    2

    2

    (15)

    The governing system of equations for unsteady, one-dimensional flow is now expressed byEqn. 6 with the column vectors Uand F defined by Eqn. 9 and Eqn. 15, respectively.

    Equation 6 can also be written as

    U

    t

    + AF

    x

    = 0 (16)

    where the Jacobian matrixA is defined as

    A=

    FiUj

    or, written out in long form

    A=

    F1U1

    F1U2

    F1U3

    F2U1

    F2U2

    F2U3

    F3U1

    F3U2

    F3U3

    (17)

    In the above equation, thei index indicates the component ofF that is being differentiated,and thej index indicates the independent variable ofU that the differentiation is take with

  • 8/10/2019 eulereqns.pdf

    6/22

    AERO 4304 Lecture 11 6

    respect to; the other independent variables are treated as constant. Each of these partialderivatives can be evaluated as follows, following some simplifications:

    F1U1

    = 0, F2U1

    = ( 3)u2

    2, F3

    U1= ( 1)u3 uEt (18)

    F1U2

    = 1,

    F2U2

    = (3 )u,

    F3U2

    = 3

    2( 1)u2 +Et (19)

    F1U3

    = 0,

    F2U3

    = ( 1),

    F3U3

    = u (20)

    The above terms give the nine elements in the Jacobian matrix, which can now be displayedas

    A=

    0 1 0

    (

    3)

    u2

    2

    (3

    )u (

    1)

    ( 1)u3 uEt 32

    ( 1)u2 +Et u

    (21)

    The characteristics of the original PDE for unsteady, one-dimensional inviscid flow (Eqn. 6)correspond to the eigenvalues of the Jacobian matrix A. These are found from

    |A I| = 0 (22)

    where I is the identify matrix and is by definition an eigenvalue of A. Hence, for theJacobian matrix defined by Eqn. 21, the eigenvalues are defined by

    1 0

    ( 3)u22

    (3 )u ( 1)( 1)u3 uEt 3

    2( 1)u2 +Et u

    = 0 (23)

    and when we expand the above determinant, we obtain

    [(3 )u ] (u ) ( 1)3

    2( 1)u2 +Et

    ( 3) u2

    2(u ) ( 1)

    ( 1)u3 uEt

    = 0

    (24)

    which is a cubic equation in terms of unknown eigenvalues ; hence there are three solutionsfor :

    1= u

    2= (u a)3= (u+a)

    (25)

  • 8/10/2019 eulereqns.pdf

    7/22

    AERO 4304 Lecture 11 7

    1

    (u+a)

    1

    (u - a)

    1

    u

    t

    x

    Figure 2: Characteristics lines for unsteady, one-dimensional flow

    whereaindicates the speed of sound. These are the characteristics of Eqn. 6. As discussed inLecture 3, because the characteristics are distinct and real, the system of governing equationsfor one-dimensional, unsteady, inviscid flow is hyperbolic. Moreover, the eigenvalues give theequation for the slopes of the characteristic lines inx t space, as sketched in Fig. 2. At agiven point in the x-t plane, there are three characteristic lines with slopes dt/dx= 1/1 =1/u, 1/2= 1/(ua), and 1/3= 1/(u + a). On a physical basis, these eigenvalues give thedirections in which information is propagated in the physical plane. The eigenvalue1 =utells us that information is carried by a fluid element moving at velocity u, and the curvewith local slope equal to 1/u in Fig. 2 is called a particle path. Also, 2 = u

    a and

    3 = u +a tells us that information is propagated to the left and right, respectively, alongthe x axis at the local speed of sound relative to the moving fluid element; in Fig. 2, thecurves with slopes 1/(u a) and 1/(u+a) are the left- and right-running Mach waves. Itis important to note the direction that information propagates within the domain is givenby the eigenvalues of the Jacobians of the flux-vector matrix. Because many modern CFDtechniques involve differencing schemes that are associated with the direction of informationpropagation in the flow, the eigenvalues become of primary importance in the developmentof such schemes.

    3 Numerical methods for solving the Euler equations

    In this section, we will discuss several types of schemes used for solving the Euler systemof equations. They can be categorized as in Table 1 into flux-based approaches and wave-based approaches. Flux approaches are the simplest method for computing inviscid flowswith shocks. In this approach, the Euler equations are cast in conservation-law form, and thefluxes are calculated using appropriate finite-difference techniques. Any shock waves or other

  • 8/10/2019 eulereqns.pdf

    8/22

    AERO 4304 Lecture 11 8

    Table 1: Numerical schemes for the solution of Euler equations. Adapted from Hirsch (1990).

    Flux approaches

    Combined discretization of space and time

    Lax-Friedrichs (1954)explicit, first orderTwo-step MacCormack (1969)explicit, second order

    Separate space discretization and time integration

    Beam & Warming (1976)implicit, second order

    Wave approaches

    Flux-vector splitting

    Steger & Warming (1981)Godunov-type methodsRiemann solvers

    Roe (1981)Harten et al. (1983)

    discontinuities are captured as part of the solution, which leads the flux approaches to also becalled shock-capturingapproaches. Alternately, in a wave-based approach, each shock waveis fitted as a discontinuity and the discontinuity is solved for as part of the solution. This

    so-called shock-fittingapproach is more elegant and produces shocks that are truly discon-tinuities, while the shock waves predicted by shock-capturing methods are usually smearedover several mesh intervals, which affects the accuracy of the solution. However, the simplic-ity of the shock-capturing approach may outweigh the slight compromise in results comparedto the more elaborate shock-fitting methods. Unfortunately, classical shock-capturing meth-ods have the disadvantage that very strong shocks will cause most methods to fail due tothe appearance of oscillations in the solution. For example, computations in hypersonic flowwith very strong shocks typically lead to appearance of negative pressures and subsequentdivergence of the solution.

    Lets consider the two-dimensional, unsteady Euler equations, given by

    Ut

    +Fx

    +G

    y = 0 (26)

    where

    U=

    uv

    Et

    F=

    uu2 +p

    uv(Et+p)u

    G=

    vuv

    v2 +p(Et+p)v

    as before. To illustrate the quality of the solutions obtained with the methods described inthe following sections, each will be compared against an analytical solution of Eqn. 26. This

    analytical solution is called aRiemann problem

    and is illustrated by Fig. 3. Consider a longtube with two regions of fluid initially separated by a rigid diaphragm. The initial conditionsof each fluid are as shown in Fig. 3. If the diaphragm is instantly ruptured, the pressureimbalance causes a one-dimensional unsteady flow containing a steadily-moving shock, asteadily-moving expansion wave, and a steadily-moving contact discontinuity separating theshock and the expansion wave, illustrated in Fig. 3. This setup is called a shock tube, and ithas an analytical solution for the distribution of pressure, density, velocity, Mach number,

  • 8/10/2019 eulereqns.pdf

    9/22

    AERO 4304 Lecture 11 9

    Diaphragm

    t= 0

    = 1 kg/m3

    u = 0 m/s

    p = 100,000 N/m2

    = 0.125 kg/m

    u = 0 m/s

    p = 10,000 N/m

    3

    2

    Shock

    t> 0

    waveContact!pansion

    wave

    " 3 2 1

    Diaphragm r#pt#re$

    Figure 3: The shock tube problem for the Euler equation

    etc. across the four regions illustrated in Fig. 3; the derivation of the solution is beyond thescope of this course, but is given by Laney (1998).

    3.1 Flux approach: Combined space/time discretization

    3.1.1 Lax-Friedrichs scheme

    To discretize Eqn. 26, the Lax-Friedrichs scheme employs a forwards-difference in time and

    a centered-difference in space. This results in the scheme

    Un+1i,j =1

    4

    Uni+1,j+ U

    ni1,j+ U

    ni,j+1+ U

    ni,j1

    x2

    Fni+1,j Fni1,j

    y

    2

    Gni,j+1 Gni,j1

    (27)

    where

    x= t

    x, y =

    t

    y

    This method is explicit, first-order accurate, and can be shown to be stable for

    2x(u+a)2 +2y (v+a)

    2 12

    .

    It is consistent, with the truncation error O[t, (x)2]. It should also be noted that thesteady-state solution obtained by the Lax-Friedrichs method is sensitive to the timestep sizet. If a steady-state solution exists, then Un+1i,j Uni,j 0 asn . IfUn+1i,j =Uni,j , from

  • 8/10/2019 eulereqns.pdf

    10/22

    AERO 4304 Lecture 11 10

    Eqn. 27 it is clear that

    1

    4 Uni+1,j+ U

    ni1,j+ 4U

    ni,j+ U

    ni,j+1+ U

    ni,j1

    =x

    2 Fni+1,j Fni1,jy2 Gni,j+1 Gni,j1 ,

    (28)

    the solution of which is obviously a function ofx and y, and hence on t. This steady-state dependence on t is physically unrealistic; we expect the steady-state solution to beindependent of the number of steps in time it took us to reach it. This attribute is one ofthe weaknesses of the Lax-Friedrichs method.

    The behaviour of the Lax-Friedrichs method applied to the shock tube problem is il-lustrated in Fig. 4. The numerical solution exhibits excessive amounts of smearing anddissipation. The solution also exhibits large odd-even oscillations, which are oscillationswith the shortest possible wavelength 2x; these can be linked to odd-even decoupling, as

    in the leapfrog method.

    3.1.2 MacCormack method

    The MacCormack method for solving the Burgers equation was described in Section 10. Forthe Euler equation, a second corrector step is implemented to correct the flux vectors F andG. The resulting scheme is called thetwo-step MacCormack method. Because either forwardor backward differences can be used in the separate predictor and corrector steps, a total offour difference schemes can be defined in two dimensions through various combinations ofthe one-sided differences on the flux components F and G. For example, a scheme that usesforward-differences in the predictor step and backwards differences in the corrector step is:

    Predictor:Ui,j =U

    ni,j x

    Fni+1,j Fni,j

    y Gni,j+1 Gni,j (29)Step 1 corrector:

    Ui,j =Uni,j x

    F

    n

    i,j Fn

    i1,j

    y Gni,j Gni,j1 (30)Step 2 corrector:

    Un+1i,j =1

    2 Ui,j + Ui,j

    (31)

    whereFi,j =F

    Ui,j

    and Gi,j =G

    Ui,j

    The two-step MacCormack method is explicit and second-order accurate with a trunctionerror ofO[(t)2, (x)2]. The amplification factor is given by Hirsch (1990), but it is quite

  • 8/10/2019 eulereqns.pdf

    11/22

    AERO 4304 Lecture 11 11

    (a) Pressure

    (d) Mach number

    (c) Density

    (b) Velocity

    Lax-Friedrichs

    Figure 4: The solution of the shock-tube problem by Lax-Friedrichs method. Adapted fromLaney (1998).

  • 8/10/2019 eulereqns.pdf

    12/22

    AERO 4304 Lecture 11 12

    complicated and no analytically-derived stability condition is known. In practice, the fol-lowing stability condition is used when solving the Euler equations:

    t

    1

    (|u|+a)/x+ (|v|+a)/y. (32)

    The two-step MacCormack scheme in Eqns. 29-31 can be referred to as a forward-backwardscheme because it uses a forwards-difference approximation for the predictor step and abackwards-difference approximation for the first corrector step. A backwards-backwardsscheme would use backwards-differences in both steps, and similarly for a backwards-forwardsand forwards-forwards scheme. A comparative study of the four variants has led to theconclusion that the best results are obtained in steady flows when the corrector step isupwind relative to the flow direction. Some implementations dynamically switch betweenthe four variants as a function of the flow direction, but most use a fixed version. In thiscase, it is recommended to cycle between the four possibilities during a computation in order

    to avoid a bias resulting in the eventual accumulation of error.The results to the shock tube problem obtained by the MacCormack method are shown

    in Fig. 5. It is clear that the MacCormack method suffers from severe oscillations andovershoots, especially in the vicinity of discontinuities. This dispersive error has been seenbefore in other second-order methods. Much of the undesirable oscillatory behaviour can bereduced by adding artificial viscosity to the predictor and corrector steps. A rudimentaryway of adding artificial viscosity is to add the second-order, constant-coefficient dissipationterm

    [(Ui+1,j 2Ui,j + Ui1,j)n + (Ui,j+1 2Ui,j+ Ui,j1)n] (33)to the predictor and corrector steps (Eqns. 29 and 30). The is a dissipation constant,

    typically of order unity. Laney (1998) shows that the results obtained from MacCormackmethod are noticeably improved when artificial viscosity of the form of Eqn. 33 is added.

    3.2 Flux approach: Separate space discretization and time inte-gration

    The Lax-Friedrichs and two-step MacCormack schemes described above are based on a cen-tral, second-order discretization of the flux gradients and a combineddiscretization of theunsteady term. The resulting methods were explicit and were restricted by the stabilitybounds of the scheme to certain ranges of the CFL parameter, which limits the time stepsize that can be used. Because this may lead to unreasonably-large computation times forsome problems, it is desirable to develop implicit methods, which have unrestricted stabilitylimits. To accomplish this, Beam & Warming (1976) separated the discretization of thespatial flux derivatives from the time-integration. We have already discussed the Beam-Warming method for solving the inviscid Burgers equation (Lecture 10), and now we willdiscuss its application to the Euler system of equations.

  • 8/10/2019 eulereqns.pdf

    13/22

    AERO 4304 Lecture 11 13

    (a) Pressure

    (d) Mach number

    (c) Density

    (b) Velocity

    MacCormack

    Figure 5: The solution of the shock-tube problem by MacCormack method. Adapted fromLaney (1998).

  • 8/10/2019 eulereqns.pdf

    14/22

    AERO 4304 Lecture 11 14

    3.2.1 Beam-Warming method

    Considering the two-dimensional unsteady Euler equation given by Eqn. 26, if we employtrapezoidal differencing as in Lecture 10, we can express the value of the conservative vari-

    ables vector Uat the advanced time level by

    Un+1 =Un +t

    2

    U

    t

    n+

    U

    t

    n+1 (34)

    or, using Eqn. 26,

    Un+1 =Un t2

    F

    x +

    G

    y

    n+

    F

    x +

    G

    y

    n+1 (35)

    This expression provides a second-order integration algorithm for the unknown vector Un+1

    at the next time level. It is implicit because U and the derivatives of U appear at theadvanced level, thus coupling the unknowns at neighbouring grid points. To obtain a linearequation that can be solved for Un+1, we need to express Fn+1 andGn+1 as linear functionsofUn+1. To do so, lets perform a Taylor-series expansion for F:

    Fn+1 =Fn + tF

    t

    =Fn + tF

    U

    U

    t=Fn + A(Un+1 Un)

    (36)

    where A is the Jacobian matrixF/U. Similarly, for G:

    Gn+1 =Gn + B(Un+1 Un) (37)

    where B is the Jacobian matrix G/U. When the linearization given by Eqns. 36 and 37are substituted into Eqn. 35, a linear system for Un+1 is obtained:

    I +t

    2

    xAn +

    yBn

    Un+1 =

    I +

    t

    2

    xAn +

    yBn

    Un

    t F

    x +

    G

    y n (38)

    The spatial derivatives of the flux vectors (the last term in the above equation) can bediscretized using a centered-difference scheme.

    The linear system given by Eqn. 38 can be solved for the unknown Un+1, but doing sois usually avoided due to the large number of operations required to treat multidimensionalsystems. Instead, we seek to reduce the multidimensional problem into a sequence of one-dimensional problems that can be solved sequentially to give the final solution of Un+1.

  • 8/10/2019 eulereqns.pdf

    15/22

    AERO 4304 Lecture 11 15

    Equation 38 may be approximately factored into

    I +

    t

    2

    xAn

    I +

    t

    2

    yBn

    Un+1 =

    I +

    t

    2

    xAn

    I +

    t

    2

    yBn

    Un

    t

    Fx

    + Gy

    n (39)

    This expression differs from the original Eqn. 38 by a term that is ofO[(t)2], so the formalaccuracy of our algorithm is maintained as second order. Now, Eqn. 39 can be written asthe alternating direction sequence:

    I +

    t

    2

    xAn

    U =

    I +

    t

    2

    xAn

    I +

    t

    2

    yBn

    Un t

    F

    x +

    G

    y

    n

    I +t2

    y

    BnUn+1 =U(40)

    The solution of this system is not trivial. The x and y sweeps require the solution of a blocktridiagonal system of equations, assuming the spatial derivatives are approximated by centraldifferences; recall that a block tridiagonal matrix is a tridiagonal matrix where, instead ofa scalar in each element of the lower, main, and upper diagonals, there is a smaller matrix.Each block is m mif there are m elements in the unknown Uvector.

    3.3 Wave approach: Flux-vector splitting methods

    The flux-based approaches described above are based on central spatial discretization that

    does not distinguish between upstream and downstream influences. But we have alreadyshown that in hyperbolic equations, information travels along characteristics determined bythe Jacobian eigenvalues, and so, in general, the upstream and downstream regions shouldnot physically have the same influence on the flow. For example, in a supersonic flow,perturbations propagating from downstream should have no influence on the upstream flowfield because the information propagates slower than the speed of the oncoming fluid. Butin a flux-based approach, the upstream and downstream regions are treated the same andboth have the same influence on a given fluid element. Therefore, we seek a new wave-based approachthat incorporates the physical properties of the wave propagation into thespatial discretization. There are several methods of doing so. The first method well consider

    splits the flux terms and discretizes them separately according to the sign of the associatedpropagation speeds as given by the Jacobian eigenvalues, referred to as flux-vector splitting.To describe the more elaborate wave-based methods, we will restrict ourselves to un-

    steady, one-dimensional flow given by Eqn. 6, and repeated here for convenience

    U

    t +

    F

    x = 0.

  • 8/10/2019 eulereqns.pdf

    16/22

    AERO 4304 Lecture 11 16

    Flux-vector splitting is so-named because the flux vectors F is split into right- and left-running fluxes

    F= F+ + F

    Then the conservation law can be written asU

    t +

    F+

    x +

    F

    x = 0. (41)

    IfF+/x is discretized with a backwards difference in space andF/x is discretized witha forwards difference in space, the resulting method will be stable for both left- and right-running waves. Hence, the influence of the wave propagation direction will be incorporatedinto the discretization method. What remains is to determine the appropriate method bywhich to split the flux vector. Steger & Warming (1981) proposed that the flux vector besplit according to the sign of the eigenvalues of the Jacobian matrix A = F/U. Thederivation is beyond the scope of this course, but the result is that the flux vector is split

    according to the sign of the eigenvalues of the Jacobian matrix. Recall from Eqn. 25 thatthe eigenvalues are

    1 = u (42)

    2 = u+a

    3 = u a

    We see that the sign of the eigenvalues will change depending on the Mach number M=u/a(subsonic or supersonic) or whether the flow is moving left or right (resulting in +uoru).As can be expected then, the flux vector is split in four different ways depending on the

    Mach number:

    For M 1:F+ = 0

    F =F (43)

    For1< M 0:

    F+ =

    2(u+a)

    1

    u+au2

    2 +

    a2

    1+ au

    F =

    1

    u

    1u

    1

    2u2

    +

    2(u a)

    1u a

    u2

    2 +

    a2

    1 au

    (44)

  • 8/10/2019 eulereqns.pdf

    17/22

    AERO 4304 Lecture 11 17

    For 0< M 1:

    F

    +

    =

    1

    u

    1u

    12

    u2

    +

    2(u+a)

    1u+a

    u2

    2 + a

    2

    1+au

    F =

    2(u a)

    1u a

    u2

    2 +

    a2

    1 au

    (45)

    For M >1:F+ =F

    F = 0 (46)

    Then, for supersonic left-running flows, all of the waves are left-running, and the flux vectorsplitting in Eqn. 43 correctly attributes all of the flux to left-running waves and none toright-running waves. Similarly, for supersonic right-running flows, all of the waves are right-running, and the flux vector splitting in Eqn. 46 correctly attributes all of the flux toright-running waves and none to left-running waves. For subsonic flows, waves are both left-and right-running, and the flux vector splitting in Eqns. 44 and 45 correctly attributes someflux to left-running waves and some flux to right-running waves. If the F+ and F termsare discretized with first-order backwards and first-order forwards differences, respectively,the resulting scheme is first-order accurate. The results applied to the shock tube problemdescribed above are shown in Fig. 6. It is clear that the method suffers some dissipative

    effects due to the first-order differencing of the flux terms, but the discontinuties are capturedbetter than by the flux-based approaches.

    3.4 Wave approach: Godunov-type methods

    3.4.1 Roe method

    In the discussion on the solution of the inviscid Burgers equation in Lecture 10, we sawthat the presence of discontinuities in the solution variables (e.g. because of shocks) vio-lates the requirement for the Taylor series to converge. We also saw how Godunov (1959)circumvented this problem by applying a control-volume approach and then solving a Rie-

    mann problem to obtain the fluxes at the control-volume boundaries. As was mentioned inLecture 10, when the Godunov method is applied to Euler equations, the solution of theRiemann problem requires a labour-intensive iterative approach. Therefore, Roe (1981) pro-posed a simplification involving theapproximatesolution of a Riemann problem, leading tothe system of equations

    U

    t +A

    U

    x = 0 (47)

  • 8/10/2019 eulereqns.pdf

    18/22

    AERO 4304 Lecture 11 18

    (a) Pressure

    (d) Mach number

    (c) Density

    (b) Velocity

    Steger-Warming

    Figure 6: The solution of the shock tube problem by the Steger-Warming flux-splittingscheme. Adapted from Laney (1998).

  • 8/10/2019 eulereqns.pdf

    19/22

    AERO 4304 Lecture 11 19

    The Jacobian matrix A has been replaced by the so-called Roe-average matrixA that isevaluated using averaged values ofU at the control-volume boundaries. This is indicated bywriting

    A= A(Ui, Ui+1).

    To obtain a formula for the cell flux F, we require that for any two values Ui+1, Ui onthe right and left sides of the cell interface, the jump in the flux across the interface mustbe given by

    Fi+1 Fi = A(Ui+1 Ui) (48)This equation gives the total change in the flux across the cell interface in terms of the totalchange in the conservative variable. Since it is the cell-face flux that were interested in, letsdenote the flux through the interface as Fi+1/2. We get the total change in flux across the

    wave fronts in terms of the cell-face flux by simply adding and subtracting Fi+1/2:

    Fi+1

    F

    i+1

    /2+F

    i+1

    /2

    F

    i= A(U

    i+1

    U

    i) (49)

    This equation can be separated into the change in the flux as the negative-slope waves arecrossed (i.e. left-moving waves) and the change in the flux as the positive-slope waves arecross (i.e. right-moving waves), similar to the flux-vector splitting approach described above.These changes are identified as

    Fi+1/2 Fi = A(Ui+1 Ui) (50)Fi+1 Fi+1/2 = A+(Ui+1 Ui) (51)

    which we may rearrange to obtain two different equations for the cell-face flux:

    Fi+1/2 = Fi+ A(Ui+1 Ui) (52)

    Fi+1/2 = Fi+1 A+(Ui+1 Ui) (53)Averaging the above two equations yields the formula for the cell-face flux:

    Fi+1/2 =1

    2

    (Fi+1+ Fi) |A|(Ui+1 Ui)

    (54)

    Laney (1998) shows the full derivation ofA. The result is given below:

    A=

    0 1 0

    32

    u2RL (3 )uRL 1uRLhRL+ 12( 1)u3RL hRL ( 1)u2RL uRL

    (55)where uRL is termed the Roe-average velocity, defined as

    uRL=

    iui+

    i+1ui+1

    i+

    i+1(56)

  • 8/10/2019 eulereqns.pdf

    20/22

    AERO 4304 Lecture 11 20

    and hRL is termed the Roe-average specific total enthalpy, defined as

    hRL=

    ihT,i+

    i+1hT,i+1

    i+

    i+1(57)

    and the total enthalpy is given by

    hT,i =ET,i+pi

    i. (58)

    The cell-face flux for the i 1/2 face is obtained in a similar fashion, and the completeapproximate Roe method is given by

    Un+1i =Uni

    t

    x

    Fi+1/2 Fi1/2

    (59)

    3.4.2 Harten and Hyman method

    As was noted in Lecture 10, the Roe method struggles in capturing expansion waves, andinstead admits unphysical expansion shocks in the solution. In order to capture expan-sion waves properly, Harten and Hyman modified the Roe-average matrix A in the case ofexpansion waves to

    Ai=

    Ai for Ai for Ai<

    (60)

    where

    = max

    0,Ai+1

    Ai

    2

    The results of the shock tube problem with solved by the Hartmen-Hyman method areshown in Fig. 7. In comparison to the flux-based or flux-vector splitting schemes, thediscontinuities are handled well. In fact, it could be argued that the Harten-Hyman methodis the best performing among the first-order upwind methods.

    References

    Beam, R.M. & Warming, R.F. 1976 An implicit finitie-difference algorithm for hyperbolic

    systems in conservation law form. Journal of Computational Physics22, 87110.Godunov, S.K. 1959 A difference scheme for numerical solution of discontinuous solution

    of hydrodynamic equations. Matematicheskii Sbornik 47, 271306. Translated by the USJoint Public Research Service, JPRS 7225 Nov. 29, 1960.

    Harten, A., Lax, P. & van Leer, B. 1983 On upstream differencing and godunov-typeshcemes for hyperbolic conservation laws. SIAM Review 25, 3561.

  • 8/10/2019 eulereqns.pdf

    21/22

    AERO 4304 Lecture 11 21

    (a) Pressure

    (d) Mach number

    (c) Density

    (b) Velocity

    Hartmen-Hyman

    Figure 7: The solution of the shock tube problem by the Hartmen-Hyman scheme. Adaptedfrom Laney (1998).

  • 8/10/2019 eulereqns.pdf

    22/22

    AERO 4304 Lecture 11 22

    Hirsch, C. 1990 Numerical Computation of Internal and External Flows, , vol. 2. JohnWiley & Sons, Chichester, England.

    Laney, C.B. 1998 Computational Gasdynamics. Cambridge University Press.

    Lax, P. 1954 Weak solutions of the non linear hyperbolic equations and their numericalcomputation.Communications in Pure and Applied Mathematics 7, 159193.

    MacCormack, R.W.1969 The effect of viscosity in hypervelocity impact cratering. AIAAPaper 69-354 pp. Cincinnatti, OH.

    Roe, P.L.1981 Approximate riemann solvers, parameter vectors and difference schemes.Journal of Computational Physics45, 357372.

    Steger, J.L. & Warming, R. 1981 Flux vector splitting of the inviscid gas-dynamicequations with application to finite difference methods. Journal of Computational Physics

    40, 263293.