+ All Categories
Home > Documents > Verification of a Compressible CFD Code using the Method...

Verification of a Compressible CFD Code using the Method...

Date post: 19-Jul-2018
Category:
Upload: lynguyet
View: 215 times
Download: 0 times
Share this document with a friend
14
1 Abstract The computational fluid dynamics code Premo is cur- rently being developed to solve compressible flow prob- lems with a finite-volume approach using unstructured meshes. This code employs both the Green-Gauss and the Least Squares gradient approximations in order to achieve a spatial accuracy that is formally second order for both convection and diffusion. In this paper, the Method of Manufactured Solutions is employed to gen- erate exact solutions to the governing equations along with additional source terms. The exact solutions are then used to accurately evaluate the discretization error in the numerical solutions. The Manufactured Solutions approach is applied to the 2D inviscid Euler equations (both subsonic and supersonic), the 3D Euler equations (supersonic), and the 2D Navier-Stokes equations (both subsonic and supersonic). Through global discretization error analyses, the spatial order of accuracy is observed to be second order for all but one of the ten cases exam- ined. With regards to the other nine cases, a high degree of confidence is achieved that the Premo code is free from coding mistakes in the spatial discretization for uniform meshes. Nomenclature e energy, m 2 /s 2 f source term f s sine or cosine function h measure of grid spacing k thermal conductivity, W/(m·K) L domain length, m p spatial order of accuracy, or pressure, N/m 2 Pr Prandtl number (Pr = 1.0) q heat flux vector, N/(m·s) R specific gas constant (R = 287. Nm/(kg·K)) r grid refinement factor position vector,m t time, s T temperature,K u, v, w Cartesian velocity components, m/s x, y, z Cartesian spatial coordinates, m γ ratio of specific heats (γ = 1.4) µ absolute viscosity, N·s/m 2 ρ density, kg/m 3 τ shear stress tensor, N/m 2 φ general solution variable Subscripts exact exact value k mesh level (k = 1, 2, 3, etc., fine to coarse) m mass equation n flowfield node index x, y, z x-, y-, or z-momentum equation e energy equation Introduction Modeling and Simulation (M&S) has enormous po- tential to impact the design, analysis, and optimization of engineering systems. Here M&S is viewed as the nu- merical solution to any set of partial differential equa- r Verification of a Compressible CFD Code using the Method of Manufactured Solutions Christopher J. Roy, Thomas M. Smith, and Curtis C. Ober § Sandia National Laboratories* P. O. Box 5800 Albuquerque, NM 87185 Senior Member of Technical Staff, MS 0825, E-mail: [email protected], Senior Member AIAA Senior Member of Technical Staff, MS 0316, E-mail: tm- [email protected], Member AIAA § Principal Member of Technical Staff, MS 0316, E-mail: [email protected], Member AIAA * Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy under Contract DE-AC04- 94AL85000. This paper is declared a work of the U. S. Government and is not subject to copyright protection in the United States. AIAA Paper 2002-3110
Transcript

Verification of a Compressible CFD Code using the Methodof Manufactured Solutions

Christopher J. Roy,† Thomas M. Smith,‡ and Curtis C. Ober§

Sandia National Laboratories*

P. O. Box 5800

Albuquerque, NM 87185

AIAA Paper 2002-3110

AbstractThe computational fluid dynamics code Premo is cur-

rently being developed to solve compressible flow prob-lems with a finite-volume approach using unstructuredmeshes. This code employs both the Green-Gauss andthe Least Squares gradient approximations in order toachieve a spatial accuracy that is formally second orderfor both convection and diffusion. In this paper, theMethod of Manufactured Solutions is employed to gen-erate exact solutions to the governing equations alongwith additional source terms. The exact solutions arethen used to accurately evaluate the discretization errorin the numerical solutions. The Manufactured Solutionsapproach is applied to the 2D inviscid Euler equations(both subsonic and supersonic), the 3D Euler equations(supersonic), and the 2D Navier-Stokes equations (bothsubsonic and supersonic). Through global discretizationerror analyses, the spatial order of accuracy is observedto be second order for all but one of the ten cases exam-ined. With regards to the other nine cases, a high degreeof confidence is achieved that the Premo code is freefrom coding mistakes in the spatial discretization foruniform meshes.

1

† Senior Member of Technical Staff, MS 0825, E-mail:

[email protected], Senior Member AIAA‡ Senior Member of Technical Staff, MS 0316, E-mail: tm-

[email protected], Member AIAA§ Principal Member of Technical Staff, MS 0316, E-mail:

[email protected], Member AIAA* Sandia is a multiprogram laboratory operated by Sandia

Corporation, a Lockheed Martin Company, for the UnitedStates Department of Energy under Contract DE-AC04-94AL85000.

This paper is declared a work of the U. S. Government and isnot subject to copyright protection in the United States.

Nomenclaturee energy, m2/s2

f source termfs sine or cosine functionh measure of grid spacingk thermal conductivity, W/(m·K)L domain length, mp spatial order of accuracy, or pressure, N/m2

Pr Prandtl number (Pr = 1.0)q heat flux vector, N/(m·s)R specific gas constant (R = 287. Nm/(kg·K))r grid refinement factor

position vector, mt time, sT temperature, Ku, v, w Cartesian velocity components, m/sx, y, z Cartesian spatial coordinates, mγ ratio of specific heats (γ = 1.4)µ absolute viscosity, N·s/m2

ρ density, kg/m3

τ shear stress tensor, N/m2

φ general solution variable

Subscriptsexact exact valuek mesh level (k = 1, 2, 3, etc., fine to coarse)m mass equationn flowfield node indexx, y, z x-, y-, or z-momentum equatione energy equation

IntroductionModeling and Simulation (M&S) has enormous po-

tential to impact the design, analysis, and optimizationof engineering systems. Here M&S is viewed as the nu-merical solution to any set of partial differential equa-

r

AIAA 99-xxxx

tions which govern continuum mechanics or energytransport (e.g., structural dynamics, heat conduction,electrostatics, fluid dynamics, etc.). In order for M&S tofully achieve its potential, the engineering communitymust gain increased confidence that it can provide accu-rate predictions. Although the specific examples pre-sented herein are for Computational Fluid Dynamics(CFD), the general concepts apply to any M&S code.

The sources of error in M&S can be categorized intotwo distinct areas,1,2 physical modeling errors (valida-tion-related) and mathematical errors (verification-relat-ed). The physical modeling errors arise due toshortcomings in the chosen model or when a model isapplied outside of its intended range. An example of thelatter is a turbulence model which provides surface heat-ing results for an attached boundary layer flow within10% accuracy. When this model is applied outside therange where it was calibrated, say for shock-inducedseparation, then the model may only give 50% accuracyon heating rates.

Mathematical, or verification-related errors, can arisefrom a number of sources including insufficient meshresolution, improper time step, incomplete iterative con-vergence, round-off, and coding mistakes (i.e., codingbugs). In addition, the presence of coding errors, or mis-takes, is an often overlooked source of error in M&S.Code developers often rely on expert judgement to de-termine when a code is producing the correct results. AsM&S codes become more complex with numerousmodeling options and multiphysics coupling, the reli-ance on expert judgement can be problematic. This pa-per will discuss a rigorous method for finding andeliminating coding mistakes known as the Method ofManufactured Solutions.1,3,4

Verification is defined as insuring that a model im-plementation matches the developer’s conception.2 Ver-ification can be broken down into two distinctcategories: code verification and solution verification.Code verification is a process performed to provide ahigh degree of certainty that a code is free from codingmistakes (i.e., coding bugs); however, a formal proofthat a piece of software is “bug-free” is probably notforthcoming. If done rigorously, the code verificationprocess needs to be done only once for each indepen-dent portion of the code.

There are four different ways to verify a code: theMethod of Exact Solutions, the Method of Manufac-tured Solutions, comparison to benchmark numericalsolutions, and code-to-code comparisons. The latter twoare really confidence-building exercises, and should nottake the place of rigorous code verification. In the Meth-od of Exact Solutions, numerical solutions are comparedto exact solutions, often with simplifications to theequations and/or the boundary conditions. In the Meth-

od of Manufactured Solutions, an analytical solution ischosen a priori and the governing equations are modi-fied by the addition of analytical source terms.

Solution verification, on the other hand, could in-volve grid and time step refinement studies,5,6 assess-ment of iterative convergence error,7 errors due tosingularities, errors due to discontinuities,6 and errorsdue to far-field boundary location. Solution verificationis a process that should be performed each and everytime a predictive simulation is conducted.

The M&S code to be verified in the current work isthe CFD code Premo. This code is being developed aspart of the Department of Energy’s Accelerated Strate-gic Computing Initiative (ASCI) to meet the needs ofthe Stockpile Stewardship Program. The Premo code isone of a number of mechanics and energy transportcodes that serves as a module to the SIERRA multi-me-chanics framework.8 The SIERRA framework providesservices for I/O, domain decomposition, massively par-allel processing, mesh adaptivity, load balancing, codecoupling, and a host of linear and nonlinear solvers. Inthe current paper, a wide range of options available inthe Premo code are verified.

Numerical Formulation

Euler Equations

The 3D Euler equations in conservation form are

(1)

(2)

(3)

where the first term is the unsteady term, and the nextthree terms are the nonlinear convection terms in the x,y, and z, directions, respectively. For a calorically per-fect gas, the Euler equations are closed with two auxilia-ry relations for energy

ρ( )∂t∂

-----------ρu( )∂x∂

--------------ρv( )∂y∂

--------------ρw( )∂z∂

---------------+ + + fm=

ρu( )∂t∂

--------------ρu2

p+( )∂x∂

--------------------------ρuv( )∂y∂

-----------------ρuw( )∂z∂

------------------+ + + fx=

ρv( )∂t∂--------------

ρvu( )∂x∂-----------------

ρv2p+( )∂

y∂--------------------------ρvw( )∂z∂------------------+ + + fy=

ρw( )∂t∂

---------------ρwu( )∂x∂

------------------ρwv( )∂y∂

------------------ρw2

p+( )∂z∂

---------------------------+ + + fz=

ρet( )∂t∂

---------------ρuet pu+( )∂

x∂-------------------------------

ρvet pv+( )∂y∂

-------------------------------+ +

ρwet pw+( )∂z∂

---------------------------------+ fe=

2

AIAA 99-xxxx

. (4)

(5)

and with the ideal gas equation of state

(6)

For the solutions presented herein, the ratio of specificheats is γ = 1.4 and the specific gas constant isR = 287.0 Nm/(kg·K).

Navier-Stokes Equations

For viscous flows, the mass conservation equationgiven in Eq. (1) is still valid; however, the inviscid mo-mentum equations are replaced by the Navier-Stokesequations, which may be written in 2D form as

(7)

Including the viscous effects, the 2D energy conserva-tion equation is now:

(8)

For the 2D Navier-Stokes equations, the shear stresstensor is

(9)

and the heat flux vector is given by:

(10)

For the Navier-Stokes simulations presented herein, theabsolute viscosity µ is chosen to be a constant, and thethermal conductivity k is determined from the viscosityby choosing the Prandtl number (here Pr = 1):

(11)

Discretization

The spatial discretization employed in the Premocode is a node-centered finite-volume formulation. Thisdiscretization is implemented on unstructured meshesusing an edge-based scheme which allows arbitrary ele-ment topologies, where an element is determined byconnecting nearest-neighbor nodes. The surfaces of thecontrol volume are found by connecting nodal edgemidpoints and element centroids. The convective fluxesare evaluated with Roe’s approximate Riemann solv-er.10 Second-order spatial accuracy is achieved viaMUSCL extrapolation11 for the primitive variables tothe control volume surface. This extrapolation takes theform

(12)

where L and R refer to the nodes to the left and right ofthe control surface, the - and + refer to the left and rightRiemann states, respectively, and is distance vector

.

For the first-order scheme, the gradient term shown inbrackets in Eq. (12) is omitted. For the second-orderscheme, this gradient is evaluated by either the Green-Gauss (G-G) or Least Squares (LSQ) gradient opera-tor.12 The gradient is also used in the evaluation of theviscous fluxes at the control-volume surface, resultingin a second-order discretization for the viscous terms.On uniform meshes, this scheme results in an upwind-biased Fromm's scheme for convection and central dif-ference for diffusion. For the steady-state simulationsdiscussed in this paper, the governing equations are inte-grated in time using a low-storage, four-stage Runge-

e1

γ 1–-----------RT=

et eu

2v2

w2

+ +2

------------------------------+=

p ρRT=

ρu( )∂t∂

--------------ρu2

p+ τxx–( )∂x∂

----------------------------------------+

ρuv τxy–( )∂y∂

-------------------------------+ fx=

ρv( )∂t∂--------------

ρvu τxy–( )∂x∂-------------------------------+

ρv2p τyy–+( )∂y∂---------------------------------------+ fy=

ρet( )∂t∂---------------

ρuet pu uτxx– vτxy– qx+ +( )∂x∂----------------------------------------------------------------------------+

ρvet pv uτxy– vτyy– qy+ +( )∂y∂

----------------------------------------------------------------------------+ fe=

τxx23---µ 2

u∂x∂-----

v∂y∂-----

w∂z∂------––

=

τyy23---µ 2

v∂y∂

-----u∂x∂

-----w∂z∂

------–– =

τxy µ u∂y∂

-----v∂x∂

-----+ =

qx kT∂x∂

------–=

qy kT∂y∂

------–=

kγR

γ 1–-----------

µPr------=

φ- φL12--- φL∇[ ] ∆ r•+=

φ+ φR12---– φR∇[ ] ∆ r•=

∆r

∆r xR xL–( ) i yR yL–( ) j zR zL–( ) k+ +=

3

AIAA 99-xxxx

Kutta method.13 See Ref. 9 for more details on the tem-poral and spatial discretization of the Premo code.

Boundary Conditions

The Euler simulations employ different boundaryconditions depending on whether the flow is supersonicor subsonic. For subsonic flow, exact Dirichlet valuesfor all primitive variables are set at both inflow and out-flow boundaries based on the specified ManufacturedSolution. For the node-centered finite-volume discreti-zation, the Dirichlet boundary condition is enforced bysimply setting the nodal boundary value. For supersonicflow cases, all variables are again set with exact Di-richlet values at the inflow boundaries, while for theoutflow boundary nodes the weak form of the boundarycondition is used where the nodal values are updatedfrom the flux balance consistent with the Roe discretiza-tion. These nodal values are used for the entire control-volume surface along the outflow boundary.

For the Navier-Stokes simulations, the viscosity is setto a large value in order to ensure that the diffusiveterms are on the same order as the convective terms. Bysetting the viscosity to a large value, the extrapolationboundary condition for supersonic outflow, which isbased on 1D inviscid theory, is no longer valid. There-fore, for the Navier-Stokes simulations, the exact Di-richlet values for all primitive variables are specified onboth inflow and outflow boundaries.

For the 2D cases presented, the discretization em-ploys three nodes in the z-direction. A slip-wall bound-ary condition is used on the zmin and zmax faces, whereinthe face-normal velocity is set to zero at the boundarynode, and the nodal pressure at the boundary is foundfrom the flux balance (i.e., the weak form). While thisboundary condition for pressure is formally first order, itbecomes second order for cases where the interiorscheme gives the normal gradient ( ) to be zero atthe slip wall (with n normal to the boundary). For thecurrent computations, this boundary condition is simplyan artifice to compute 2D flows with a 3D code, and nogradients are formed in the z-direction.

Code VerificationCode verification is a way to build confidence that

there are no coding mistakes or bugs in a simulationcode. While no rigorous proof of code verification cur-rently exists (and none may be forthcoming), the proce-dures discussed in this section can provide a high degreeof confidence that a code is mistake-free. There is an on-going debate as to whether code verification is some-thing that must be done only once for a given set of codeoptions,1 or whether code verification is a process bywhich code verification evidence is gathered to provide

increased confidence that the code is bug free. The au-thors ascribe to the view that, if done properly, code ver-ification need be performed only once for a given set ofcode options.

Method of Exact Solutions

In the Method of Exact Solutions, specialized casesare identified where exact solutions exist to a given setof governing equations. For the Euler and Navier-Stokessets of equations, there are only a limited number of ex-act solutions. Furthermore, these exact solutions maynot exercise all of the terms in the governing equations.For example, in the flow between two infinite parallelplates, one moving relative to the other (Couette flow),the velocity profile is linear, hence the diffusion term, asecond derivative of velocity, is identically zero andtherefore would not be exercised.

Method of Manufactured Solutions

A more general approach to code verification is theMethod of Manufactured Solutions.1,3,4 In this case, themathematical form of the solution is chosen a priori.The differential operator for the governing equations isapplied to this chosen analytical solution to generate an-alytical source terms. These source terms are imple-mented within the code, and the modified governingequations (including the source terms) are then dis-cretized and solved numerically and compared to the ex-act solution.

There are a variety of acceptance criteria for codeverification.3 In order of increasing rigor these criteriaare:

• expert judgement• error quantification• consistency• order of accuracy

The order of accuracy test is the most rigorous test andis therefore the recommended acceptance criteria. Thistest involves evaluating the numerical solution on a se-ries of grids, and with various time steps for unsteadyproblems. The spatial and temporal discretization errorare monitored to determine if the observed order of ac-curacy matches the formal order of accuracy (which canbe determined by a truncation-error analysis of the dis-cretized equations). The error will generally decrease as

, where r is the grid refinement factor (e.g.,r = ∆xcoarse/∆xfine) and p is the order of accuracy. Forexample, if the numerical scheme is second order(p = 2) and the grid is doubled (r = 2), then the discreti-zation error should decrease by a factor of four as themesh is refined.

Although the form of the Manufactured Solution issomewhat arbitrary, it should be chosen to be smooth,

∂p ∂n⁄

1 rp⁄

4

AIAA 99-xxxx

infinitely differentiable, and realizable (i.e., solutionsshould be avoided which have negative densities, pres-sures, temperatures, etc.). Solutions should also be cho-sen that are sufficiently general so as to exercise allterms in the governing equations. Adherence to theseguidelines will help ensure that the formal order of ac-curacy is attainable on reasonably coarse meshes. Sym-bolic manipulation tools such as Mathematica™ orMaple™ can be used to apply the differential operator tothe solution and generate source terms. These tools canthen be used to generate the FORTRAN or C coding forthe source term automatically. See Refs. 1, 3, and 4 formore information on the Method of Manufactured Solu-tions.

While the Method of Manufactured Solutions can beused to rigorously test the spatial and temporal discreti-zation of a code, as well as the associated boundary con-ditions, this method will not test the efficiency orrobustness of a given numerical solution method. In ad-dition, the method cannot be used to test the stability ofa given algorithm. Furthermore, options not exercisedby the given Manufactured Solution are not verified.

The six steps required for implementing the Methodof Manufactured solutions are:

Step 1) Choose the form of the governing equationsStep 2) Choose the form of the Manufactured SolutionStep 3) Apply the governing equations to the Manu-

factured Solution to generate analytical sourceterms

Step 4) Discretize the equations and solve on multiplemesh levels using analytical boundary conditionsand source terms from the Manufactured Solution

Step 5) Evaluate the global discretization error in thenumerical solutions

Step 6) Determine whether or not the observed orderof accuracy matches the formal order of accuracy

If the comparison in Step 6 is favorable, then the codingoptions exercised are verified. If the comparison is unfa-vorable, then one generally examines the local discreti-zation error, uses this information to debug the code,then returns to Step 4. The Manufactured Solution itselfcan be used to help debug the code by selectively turn-ing off certain solution terms (e.g., viscous terms, a giv-en spatial variation, etc.).

Order of Accuracy

The most rigorous test for code verification is the or-der of accuracy test. This test assesses whether or notthe numerical method reproduce the formal order of ac-curacy in space and/or time. As previously discussed,the discretization error should drop as 1/r p, where in thecurrent case the grid refinement factor is r = 2 and the

nominal order of accuracy is p = 2; thus the error shoulddrop by a factor of four on each successively refinedmesh level. In order to examine the global discretizationerror behavior, both the L2 and the L∞ norms of the er-ror are used

(13)

where k refers to the discrete mesh level and n variesover all mesh nodes N in space (including both interiorand boundary nodes) with the exception of the Dirichletboundary nodes (for which the discretization error isidentically zero). Since the L∞ norm represents the max-imum discretization error over the entire domain, ob-taining the formal order of accuracy in this norm isgenerally more difficult than the other error norms.When these global error norms do not reproduce the for-mal order of accuracy, it is often helpful to examine thebehavior of the local discretization error.

Results: Euler EquationsThis section reports 2D and 3D Manufactured Solu-

tion results for the inviscid Euler equations. For the 2Dsimulations, two separate cases are examined: onewhere the flow is supersonic over the entire domain, andone where the flow is subsonic over the entire domain.These two cases are necessary to test the Roe10 upwindspatial discretization, which uses different reconstruc-tion methods depending on whether the flow is subsonicor supersonic. For the supersonic cases, the xmax, ymax,(and zmax for 3D) boundaries employed the supersonicoutflow boundary condition.

2D Supersonic Case

The Method of Manufactured Solutions is first ap-plied to the Euler equations given by Eqs. (1)-(3) alongwith the auxiliary relations given in Eqs. (4)-(6), whichgovern the conservation of mass, momentum, and ener-gy for an inviscid (frictionless) fluid. With the govern-ing equations specified, the next step is to choose theform of solution. The general form of the primitive solu-tion variables is chosen as a function of sines and co-sines

L2 normk

φk n, φexact n,–2

n 1=

N

∑N

----------------------------------------------------

1 2⁄

=

L∞ normk

max φk n, φexact n,–=

5

AIAA 99-xxxx

(14)

where φ= ρ, u, v, w, or p for density, u-velocity, v-ve-locity, w-velocity, or pressure, respectively, and the fs(⋅)functions in Eq. (14) denote either the sine or cosinefunction. Note that in this case, φx, φy, and φz are con-stants (the subscripts do not denote differentiation). SeeAppendix A for the specific form of these primitivevariables for all results presented herein (both Euler andNavier-Stokes). The chosen solutions are thus smoothlyvarying functions in space, while the temporal accuracyis not addressed in the current work. The constants usedin the Manufactured Solutions for the 2D supersonicEuler case are given in Table A.1 of Appendix B. Thesesolutions are presented graphically in Fig. 1. The solu-tions are smooth to allow the formal order of accuracyto be achieved on relatively coarse meshes.

The governing equations (Eqs. (2)-(6)) were then ap-plied to the chosen solutions using the Mathematica™symbolic manipulation software to generate FORTRANcode for the resulting source terms. The analyticalsource term for the 2D Euler mass conservation equa-tion is given in Appendix 3. The source terms for eachof the governing equations for this case are showngraphically in Fig. 2.

The governing equations (Eqs. (2)-(6)) were dis-cretized and solved numerically, including the analyticalsource terms. For a given control volume, the sourceterms were simply evaluated using the nodal values (i.e.,

the values at the control-volume centroid). The numeri-cal solutions were then compared to the ManufacturedSolution to determine the discretization error in the so-lutions. The Premo code was used to solve the Eulerequations using two different discretizations for deter-mining the gradient: the Green-Gauss (G-G) and theLeast-Squares (LSQ) approaches. The formal order ofaccuracy of both of these gradient schemes is second or-der in space, and the solutions were marched to asteady-state solution using the four-stage Runge-Kuttatemporal integration. All solutions presented hereinwere integrated in time until the steady state residualswere converged to machine zero. Since the Premo codewas run in double precision mode, the steady-state re-siduals were reduced by approximately 14 orders ofmagnitude from their initial levels. Figure 3 shows thesteady-state residual history for one of the grid levelsusing the G-G gradient. Note that the steady-state resid-ual is defined by plugging the current discrete solutioninto the discrete form of the steady-state equations (in-cluding the source terms).

Since the Manufactured Solution exists for all x, y,(and z for 3D), we are free to choose any sub-domain onwhich to solve the governing equations. For the 2D (3D)cases presented herein, the numerical solutions are ob-tained on the domain

φ x y z, ,( ) φ0 φx fsaφxπx

L-------------- +=

φ+ y fsaφyπy

L-------------- φz fs

aφzπzL

-------------- +

x/L

y/L

0 0.5 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

847.661836.056824.45812.844801.239789.633778.028766.422754.817743.211731.606

u (m/s)

x/L

y/L

0 0.5 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

830.417820.833811.25801.667792.083782.5772.917763.333753.75744.167734.583

v (m/s)

x/L

y/L

0 0.5 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1.129171.108331.08751.066671.045831.0251.004170.9833330.96250.9416670.920833

ρ (kg/m3)

x/L

y/L

0 0.5 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1625001550001475001400001325001250001175001100001025009500087500

p (N/m2)

Fig. 1 2D Euler supersonic Manufactured Solution:density (top left), pressure (top right), u-velocity

(bottom left), and v-velocity (bottom right).

x/L

y/L

0 0.5 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

622.133526.866431.599336.333241.066145.79950.5325

-44.7342-140.001-235.268-330.534

Source TermMass Eqn.

x/L

y/L

0 0.5 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

9.40015E+07.97359E+06.54702E+05.12045E+03.69389E+02.26732E+08.40757E+0

-5.85809E+0-2.01238E+0-3.43894E+0-4.86551E+0

Source TermEnergy Eqn.

x/L

y/L

0 0.5 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

69759660089550419340749131078921408711738520683.4

-76018.5-172720-269422

Source Termx-Mtm. Eqn.

x/L

y/L

0 0.5 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

60755851201641647332093122538812984634303

-61239.5-156782-252325-347867

Source Termy-Mtm. Eqn.

Fig. 2 Generated source terms for the 2D Eulersupersonic case: mass (top left), energy (top right), x-momentum (bottom left), y-momentum (bottom right).

0 x 1≤ ≤0 y 1≤ ≤0 z 1≤ ≤( )

6

AIAA 99-xxxx

and the mesh sizes for 2D (3D) are given in Table 1,where

Note that since only uniform meshes were examined,the code can not be said to be verified for arbitrarymeshes.

The error norms for this case are presented below inFig. 4 for the conserved quantity density using both theG-G and LSQ gradients. The abscissa shows the mea-sure of the grid spacing h on a log scale, with h = 1 be-ing the finest mesh. Also shown on the plot are curvesfor the first- and second-order slopes for reference. Boththe L2 and L∞ norms of the error drop by a factor of fourwith each mesh refinement, thus matching the second-order slope and verifying that the code is producing sec-ond-order accurate results.

The order of accuracy can be calculated given two

discrete mesh levels (k and k + 1) and the exact solutionby

(15)

where “L” refers to one of the global error norms fromEq. (13), k + 1 refers to the coarser mesh level, and r isthe grid refinement factor. Results using Eq. (15) areshown graphically in Fig. 5 which again show that thesolutions are second-order accurate as the mesh is re-fined. Once the order of accuracy is verified (assumingit is greater than zero), it is clear that the code is consis-tent in the sense that the numerical solution approachesthe continuum solution (which was chosen in the begin-ning) as ∆x and ∆y approach zero. Although not shown,similar behavior was found for the other conserved vari-ables (ρu, ρv, and ρet).

The Manufactured solutions can also be used to com-pute local discretization error in the numerical solutions.The discretization error in the finest grid solution usingthe G-G gradient is given in Fig. 6. The largest errors(±0.005%) occur at the bottom left corner between thetwo inflow planes. Although it is not clear why the erroris relatively large error occurs at this corner, the resultsgiven in Fig. 5 demonstrate that this is an ordered error(i.e., on that is reduces with the proper order of accuracyas the mesh is refined). Since the flow is everywhere su-personic in both the x- and y-directions for this case, themean flow direction is oriented at a 45 deg angle to thegrid. The error at this corner appears to propagate alongcharacteristic Mach lines through the domain.

Table 1 Meshes for 2D (3D) Manufactured Solutions

MeshMeshNodes

GridSpacing, h

Mesh 1 129×129×3 1

Mesh 2 65×65×3(65) 2

Mesh 3 33×33×3(33) 4

Mesh 4 17×17×3(17) 8

Mesh 5 9×9×3(9) 16

Iteration

L2

No

rmR

esid

ual

0 100 200 300 400 50010-25

10-20

10-15

10-10

10-5

100

Mass Eqn.x-Mtm. Eqn.y-Mtm. Eqn.Energy Eqn.

2D Supersonic Euler MMSGreen-Gauss: 17x17x3 Nodes

Fig. 3 L2 norms of the steady-state residuals for the 2DEuler supersonic case with G-G gradient formulation.

hk∆xk∆x1---------

∆yk∆y1---------

∆zk∆z1-------- = = =

h

No

rm

5 10 15 2010-5

10-4

10-3

10-2

10-1

L2 Norm (G-G)L∞ Norm (G-G)L2 Norm (LSQ)L∞ Norm (LSQ)1st Order Slope2nd Order Slope

2D Euler SupersonicNorms: ρ

1

Fig. 4 Behavior of the density error norms as the meshis refined for the 2D supersonic Euler case.

pkLk 1+

Lk------------- r( )ln⁄ln=

7

AIAA 99-xxxx

2D Subsonic Case

A 2D subsonic Euler Manufactured Solution wasgenerated, and the constants used for this case are pre-sented in Table A.2 of Appendix B. The mean velocitiesin each of the two coordinate directions were chosen tobe approximately one-tenth of the speed of sound. Withthe exception of the velocity magnitudes, the Manufac-tured Solution in this case is quite similar to the solutionused for the 2D supersonic Euler case.

Figure 7 shows the behavior of the y-momentum (ρv)discretization error norms for both the G-G and LSQgradient methods. Again, the error norms match the sec-ond-order slope on nearly all grid levels. The order of

accuracy as calculated from Eq. (15) is shown in Fig. 8,confirming that the code is producing second-order re-sults. The conserved quantity momentum is used in thiscase rather than the velocity, since the governing equa-tions are solved in terms of the conserved variables. Theerror norms for the other conserved variables gave simi-lar behavior.

3D Supersonic Case

Due to the limited efficiency of the explicit Runge-Kutta temporal integration for obtaining steady-state so-lutions, a subsonic Euler solution in 3D was not feasi-

h

Ord

ero

fAcc

ura

cy,p

5 10 15 201

1.5

2

2.5

3

L2 Norm (G-G)L∞ Norm (G-G)L2 Norm (LSQ)L∞ Norm (LSQ)

2D Euler SupersonicNorms: ρ

1

Fig. 5 Order of accuracy of the density error norms asthe mesh is refined for the 2D supersonic Euler case.

x/L

y/L

0 0.5 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0.0050.0040.0030.0020.0010

-0.001-0.002-0.003-0.004-0.005-0.006

%Error: ρ

Fig. 6 Numerical error in the fine grid Green-Gausssolution for density for the 2D supersonic Euler case.

hN

orm

5 10 15 20

10-2

10-1

100

101

102

L2 Norm (G-G)L∞ Norm (G-G)L2 Norm (LSQ)L∞ Norm (LSQ)1st Order Slope2nd Order Slope

2D Euler SubsonicNorms: ρv

1

Fig. 7 Behavior of the y-momentum (ρv) error norms asthe mesh is refined for the 2D subsonic Euler case.

h

Ord

ero

fAcc

ura

cy,p

5 10 15 201

1.5

2

2.5

3

L2 Norm (G-G)L∞ Norm (G-G)L2 Norm (LSQ)L∞ Norm (LSQ)

2D Euler SubsonicNorms: ρv

1

Fig. 8 Order of accuracy of the y-momentum (ρv)error norms as the mesh is refined for the 2D subsonic

Euler case.

8

AIAA 99-xxxx

ble. However, a supersonic 3D Euler ManufacturedSolution was generated using the constants given in Ta-ble A.3 of Appendix C. The chosen Manufactured Solu-tion for the w-velocity is shown graphically in Fig. 9,which shows the smooth variation of the w-velocity atthe outflow boundaries.

The behavior of the global discretization error normsfor the w-momentum (ρw) are given in Fig. 10. Due tothe larger computational cost involved with the 3D cal-culations, the finest mesh that could be run was Mesh 2with 65×65×65 nodes (274,625 nodes total). While thereis some first-order behavior evident on the coarsermeshes, second-order accuracy is achieved as the meshis refined. The order of accuracy is shown graphically(using Eq. (15)) in Fig. 11, confirming that the finergrids approach second-order accuracy. Although notshown, the other conserved variables also converged tosecond order.

Results: Navier-Stokes EquationsResults are presented in this section for the Navier-

Stokes equations (Eqs. (1),(7), and (8)), along with theauxiliary relationships given in Eqs. (4)-(6) and (9)-(11). Due to the increased computational costs associat-ed with solving viscous, compressible flow with the ex-plicit solver, only 2D results are presented.

2D Supersonic Case

The constants used in the Manufactured Solution forthe 2D supersonic Navier-Stokes case are given in TableA.4 of Appendix B. In order to ensure that the viscousterms were of the same order of magnitude as the con-

vective terms, the absolute viscosity was chosen asµ = 20 N·s/m2. By balancing these two terms, the possi-bility of a “false positive” on the order of accuracy testis minimized. If instead, only high Reynolds number so-lutions were examined (where the diffusive terms weremuch smaller than the convective terms), then extreme-ly fine meshes would be needed in order to detect dis-cretization mistakes in the viscous terms. The ratio ofthe viscous contribution to the governing equations(terms involving τ or q) to the convective contribution(terms appearing in the Euler equations) was calculated.This ratio is shown graphically in Fig. 12 for the y-mo-

0

0.5

1

y

0

0.5

1

x

0

0.5

1

z

X

Y

Z

855.061847.391839.721832.051824.38816.71809.04801.37793.699786.029778.359770.689763.018755.348747.678

w (m/s)

Fig. 9 3D supersonic Euler Manufactured Solutionfor w-velocity.

h

No

rm

5 10 15 2010-2

10-1

100

101

102

L2 Norm (G-G)L∞ Norm (G-G)L2 Norm (LSQ)L∞ Norm (LSQ)1st Order Slope2nd Order Slope

3D Euler SupersonicNorms: ρw

1

Fig. 10 Behavior of the z-momentum (ρw) errornorms as the mesh is refined for the 3D supersonic

Euler case.

h

Ord

ero

fAcc

ura

cy,p

5 10 15 201

1.5

2

2.5

3

L2 Norm (G-G)L∞ Norm (G-G)L2 Norm (LSQ)L∞ Norm (LSQ)

3D Euler SupersonicNorms: ρw

1

Fig. 11 Order of accuracy of the z-momentum (ρw)error norms as the mesh is refined for the 3D

supersonic Euler case.

9

AIAA 99-xxxx

mentum equation, and varies from values near 0.1 tolarge values in regions were the convective terms go tozero.

The behavior of the global error norms for the x-mo-mentum equation are given in Fig. 13. The slopes matchthe second-order slope in nearly all cases. The order ofaccuracy from Eq. (15) is shown graphically in Fig. 14.All of the curves approach second order as the mesh isrefined. The other conserved variables displayed similarbehavior (not shown).

2D Subsonic Case

The final Manufactured Solution was generated forthe 2D Navier-Stokes equations assuming the flow wassubsonic over the entire domain. The constants used inthis Manufactured Solution are given in Table A.5 ofAppendix B. These solutions are shown graphically inFig. 15. In order to again ensure that the convective anddiffusive terms in the governing equations are fully ex-ercised, the ratio of diffusive to convective terms for theenergy equation was computed and is shown in Fig. 16.

x/L

y/L

0 0.5 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0.50.450.40.350.30.250.20.150.10.050

Source Termy-Mtm Eqn.

Fig. 12 2D supersonic Navier-Stokes ManufacturedSolution: ratio of diffusion to convection terms in the

y-momentum equation.

h

No

rm

5 10 15 20

10-2

10-1

100

101

102

L2 Norm (G-G)L∞ Norm (G-G)L2 Norm (LSQ)L∞ Norm (LSQ)1st Order Slope2nd Order Slope

2D Navier-Stokes (Supersonic)Norms: ρu

1

Fig. 13 Behavior of the x-momentum (ρu) error normsas the mesh is refined for the 2D supersonic Navier-

Stokes case.

h

Ord

erof

Acc

ura

cy,p

5 10 15 201

1.5

2

2.5

3

L2 Norm (G-G)L∞ Norm (G-G)L2 Norm (LSQ)L∞ Norm (LSQ)

2D Navier-Stokes (Supersonic)Norms: ρu

1

Fig. 14 Order of accuracy of the x-momentum (ρu)error norms as the mesh is refined for the 2D

supersonic Navier-Stokes case.

x/L

y/L

0 0.5 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1.216661.183331.151.116671.083331.051.016670.9833330.950.9166660.883333

ρ (kg/m3)

x/L

y/L

0 0.5 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

14215413430912646411861911077410292995083.687238.579393.371548.263703

p (N/m2)

x/L

y/L

0 0.5 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

83.33280.665577.99975.332472.665969.999367.332864.666361.999759.333256.6667

u (m/s)

x/L

y/L

0 0.5 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

110.332106.665102.99999.332395.665891.999288.332784.666280.999677.333173.6665

v (m/s)

Fig. 15 2D subsonic Navier-Stokes ManufacturedSolution: density (top left), pressure (top right), u-

velocity (bottom left), and v-velocity (bottom right).

10

AIAA 99-xxxx

Global error norms for the conserved variable energy(ρet) are given in Fig. 17. For the Least Squares gradi-ent, these norms match the second-order slope as themesh is refined; however, the norms for the Green-Gauss gradient do not match the second-order slope, es-pecially on the coarser meshes. These results for spatialconvergence are confirmed by examining the order ofaccuracy, shown in Fig. 18. The results with the Green-Gauss gradient require further investigation. Althoughnot shown, a similar behavior was found for the otherconserved variables.

The local discretization error in the energy is present-ed in Fig. 19. The magnitude of this error is largest atthe top-left (+0.06%) and bottom-right (-0.02%) cornersof the domain. This error near the boundaries is likelycaused by the over-specification of the boundary condi-tions with the exact Dirichlet values. Recall that, in a 1Dinviscid sense, a subsonic inflow requires the specifica-tion of two properties and the extrapolation of one quan-tity from within the domain, while a subsonic outflowboundary requires the specification of one quantity andthe extrapolation of two quantities from within the do-main.

x/L

y/L

0 0.5 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

21.81.61.41.210.80.60.40.20

Energy Ratio:Diff./Conv.

Fig. 16 2D subsonic Navier-Stokes ManufacturedSolution: ratio of diffusion to convection terms for the

energy equation.

h

No

rm

5 10 15 20

101

102

103

104

L2 Norm (G-G)L∞ Norm (G-G)L2 Norm (LSQ)L∞ Norm (LSQ)1st Order Slope2nd Order Slope

2D Navier-Stokes (Subsonic)Norms: ρet

1

Fig. 17 Behavior of the energy (ρet) error norms as themesh is refined for the 2D subsonic Navier-Stokes

case.

h

Ord

ero

fAcc

ura

cy,p

5 10 15 201

1.5

2

2.5

3

L2 Norm (G-G)L∞ Norm (G-G)L2 Norm (LSQ)L∞ Norm (LSQ)

2D Navier-Stokes (Subsonic)Norms: ρet

1

Fig. 18 Order of accuracy of the energy (ρet) errornorms as the mesh is refined for the 2D subsonic

Navier-Stokes case.

x/L

y/L

0 0.5 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0.060.0520.0440.0360.0280.020.0120.004

-0.004-0.012-0.02

%Error: ρet

Fig. 19 Numerical error in the fine grid Least Squaressolution for energy (ρet) for the 2D subsonic Navier-

Stokes case.

11

AIAA 99-xxxx

ConclusionsThe Method of Manufactured Solutions has been ap-

plied to the new, unstructured compressible fluid dy-namics code Premo. A number of cases were examinedincluding both the Euler (2D supersonic, 2D subsonic,and 3D supersonic) and the Navier-Stokes (2D super-sonic and 2D subsonic) equations as well as the Green-Gauss and the Least Squares gradient approximations.By solving the Manufactured Solutions on a number ofdifferent grid levels, the spatial order of accuracy wasascertained by comparing the numerical solutions to theexact Manufactured Solutions. In nine cases out of theten examined, the Premo code demonstrated second-or-der spatial accuracy as the mesh was refined. This Bydemonstrating that the formal order of accuracy wasachieved, the Premo code was verified, thus providingconfidence that there are no mistakes in the spatial dis-cretization for uniform meshes. For all subsonic cases,and for the supersonic Navier-Stokes case, the specifica-tion of inflow and outflow boundary values for each ofthe primitive variables with exact Dirichlet values re-sulted in over-specified boundary conditions; however,the order of accuracy was not adversely affected, exceptpossibly for the subsonic Navier-Stokes case with theGreen-Gauss gradient.

The Method of Manufactured Solutions was found tobe an invaluable tool for finding coding mistakes. In onecase, a logic error allowed the gradient term in theMUSCL extrapolation to be zeroed out when the fluxlimiter (not used in the current work) was set to zero.This error resulted in first-order behavior of the spatialdiscretization error which was easily found by the Man-ufactured Solutions. As another example, an “IF DEF”for a variable was used to turn on an option for a con-stant angular velocity. This was accidentally set to zero(rather than being left undefined), which triggered theconstant angular velocity terms. This coding mistakewas found since non-ordered errors were generated atthe slip wall boundaries in 2D.

A number of coding options were verified by theMethod of Manufactured Solutions. The options veri-fied include: inviscid (Euler) and viscous (Navier-Stokes), the Roe upwind scheme (both subsonic and su-personic), the Green-Gauss and Least Squares gradients,and boundary conditions for Dirichlet values, slip-walls,and supersonic outflow. Options not verified in the cur-rent study include: solver efficiency and stability (theseare not verifiable with the method), nonuniform meshes,temporal accuracy (the Runge-Kutta scheme is formallysecond-order accurate, however the chosen solutionswere not functions of time), variable transport propertiesµ and k, and the viscous cross-derivatives (e.g.,

= 0 for the chosen solutions).

References1. Roache, P. J., Verification and Validation in Com-

putational Science and Engineering, Hermosa Publish-ers, New Mexico, 1998.

2. Guide for the Verification and Validation of Com-putational Fluid Dynamics Simulations, AIAA G-077-1998, p. 3.

3. Salari, K., and Knupp, P., “Code Verification bythe Method of Manufactured Solutions,” SAND 2000-1444, Sandia National Laboratories, Albuquerque, NM,June 2000.

4. Knupp, P., and Salari, K., Verification of Comput-er Codes in Computational Science and Engineering,CRC Press, in press.

5. Roache, P. J., “Perspective: A Method for Uni-form Reporting of Grid Refinement Studies,” ASMEJournal of Fluids Engineering, Vol. 116, Sept. 1994, pp.405-413.

6. Roy, C. J., “Grid Convergence Error Analysis forMixed-Order Numerical Schemes,” AIAA Paper 2001-2606, June 2001.

7. Roy, C. J., and Blottner, F. G., “Assessment ofOne- and Two-Equation Turbulence Models for Hyper-sonic Transitional Flows,” Journal of Spacecraft andRockets, Vol. 38, No. 5, September-October 2001, pp.699-710.

8. Edwards, H. C., and Stewart, J. R., “SIERRA: ASoftware Environment for Developing Complex Mult-iphysics Applications,” Proceedings of the First MITConference on Computational Fluid and Solid Mechan-ics, Elsevier Scientific, K. J. Bathe Ed., June 2001.

9. Smith, T. M., Ober, C. C., and Lorber, A. A., “SI-ERRA/Premo - A New General Purpose CompressibleFlow Simulation Code,” AIAA Paper 2002-3292, June2002.

10. Roe, P. L., “Approximate Riemann Solvers, Pa-rameter Vectors and Difference Schemes,” Journal ofComputational Physics, Vol. 43, pp. 357-372.

11. van Leer, B., “Towards the Ultimate Conserva-tive Difference Scheme III. Upstream-Centered Finite-Difference Schemes for Ideal Compressible Flow,”Journal of Computational Physics, Vol. 23, pp. 263-275.

12. Haselbacher, A., and Blazek, J., “Accurate andEfficient Discretization of Navier-Stokes Equations onMixed Grids,” AIAA Journal, Vol. 38, No. 11, 2000, pp.2094-2102.

13. van der Houwen, P. J., “Explicit Runge-KuttaFormulas with Increased Stability Boundaries,” Nu-merische Mathematik, Vol. 20, 1972, pp. 149-164.

∂ x µ u y∂⁄∂( )∂⁄

12

AIAA 99-xxxx

Appendix A: Analytical Manufactured SolutionThe general form chosen for the Manufactured Solution, for both Euler and Navier-Stokes implementations, is giv-

en as follows:

(A.1)

Appendix B: Manufactured Solution ConstantsConstants employed include L = 1 m, γ = 1.4, and R = 287.0 Nm/(kg·K). For the supersonic Navier-Stokes calcula-

tions, additional constants include the absolute viscosity µ = 20. N·s/m2 and the Prandtl number Pr = 1.0, while forthe subsonic Navier-Stokes calculations, the viscosity was chosen as µ = 10. N·s/m2. Note, the φ constants all havethe same dimensions as the primitive variable (listed in the first column), and the a constants are dimensionless.

Table A.1 Constants for 2D Euler Supersonic Manufactured Solution

Equation, φ φ0 φx φy φz aφx aφy aφz

ρ (kg/m3) 1. 0.15 -0.1 0. 1. 0.5 0.

u (m/s) 800. 50. -30. 0. 1.5 0.6 0.

v (m/s) 800. -75. 40. 0. 0.5 2./3. 0.

w (m/s) 0. 0. 0. 0. 0. 0. 0.

p (N/m2) 1.×105 0.2×105 0.5×105 0. 2. 1. 0.

Table A.2 Constants for 2D Euler Subsonic Manufactured Solution

Equation, φ φ0 φx φy φz aφx aφy aφz

ρ (kg/m3) 1. 0.15 -0.1 0. 1. 0.5 0.

u (m/s) 70. 5. -7. 0. 1.5 0.6 0.

v (m/s) 90. -15. 8.5 0. 0.5 2./3. 0.

w (m/s) 0. 0. 0. 0. 0. 0. 0.

p (N/m2) 1.×105 0.2×105 0.5×105 0. 2. 1. 0.

ρ x y z, ,( ) ρ0 ρx

aρxπxL

--------------- ρy

aρyπyL

--------------- ρz

aρzπzL

-------------- sin+cos+sin+=

u x y z, ,( ) u0 uxauxπx

L-------------- uy

auyπyL

-------------- uz

auzπzL

-------------- cos+cos+sin+=

v x y z, ,( ) v0 vxavxπx

L-------------- vy

avyπyL

-------------- vz

avzπzL

------------- sin+sin+cos+=

w x y z, ,( ) w0 wx

awxπxL

--------------- wy

awyπyL

--------------- wz

awzπzL

--------------- cos+sin+sin+=

p x y z, ,( ) p0 pxapxπx

L-------------- py

apyπyL

-------------- pz

apzπzL

-------------- cos+sin+cos+=

13

AIAA 99-xxxx

Appendix C: Example Source TermA sample source term is given below for the 2D mass conservation equation (Eq. (1)). The source terms is the re-

sult of analytically differentiating the general Manufactured Solution given in Appendix A for ρ, u, and v.

(A.2)

Table A.3 Constants for 3D Euler Supersonic Manufactured Solution

Equation, φ φ0 φx φy φz aφx aφy aφz

ρ (kg/m3) 1. 0.15 -0.1 -0.12 1. 0.5 1.5

u (m/s) 800. 50. -30. -18. 1.5 0.6 0.5

v (m/s) 800. -75. 40. -30. 0.5 2./3. 1.25

w (m/s) 800. 15. -25. 35. 1./3. 1.5 1.

p (N/m2) 1.×105 0.2×105 0.5×105 -0.35×105 2. 1. 1./3.

Table A.4 Constants for 2D Navier-Stokes Supersonic Manufactured Solution

Equation, φ φ0 φx φy φz aφx aφy aφz

ρ (kg/m3) 1. 0.15 -0.1 0. 1. 0.5 0.

u (m/s) 800. 50. -30. 0. 1.5 0.6 0.

v (m/s) 800. -75. 40. 0. 0.5 1.5 0.

w (m/s) 0. 0. 0. 0. 0. 0. 0.

p (N/m2) 1.×105 0.2×105 0.5×105 0. 2./3. 1. 0.

Table A.5 Constants for 2D Navier-Stokes Subsonic Manufactured Solution

Equation, φ φ0 φx φy φz aφx aφy aφz

ρ (kg/m3) 1. 0.1 0.15 0. 0.75 1.0 0.

u (m/s) 70. 4. -12. 0. 5./3. 1.5 0.

v (m/s) 90. -20. 4. 0. 1.5 1.0 0.

w (m/s) 0. 0. 0. 0. 0. 0. 0.

p (N/m2) 1.×105 -0.3×105 0.2×105 0. 1.0 1.25 0.

Mass Equation Sourceauxπux

L-----------------

auxπxL

-------------- ρ0 ρx

aρxπxL

--------------- sin ρ+

y

aρyπyL

--------------- cos+cos=

avyπvyL

----------------avyπy

L-------------- ρ0 ρx

aρxπxL

--------------- sin ρ+

y

aρyπyL

--------------- cos+cos+

aρxπρxL

------------------aρxπx

L--------------- u0 ux

auxπxL

-------------- sin u+

y

auyπyL

-------------- cos+cos+

aρyπρyL

------------------–aρyπy

L--------------- v0 vx

avxπxL

-------------- cos v+

y

avyπyL

-------------- sin+sin

14


Recommended