You are on page 1of 58

Edge Theoretical Formulation

Defence and Security, Systems and Technology FOI dnr 03-2870

March 2007 Issue 4.1.0

Edge Theoretical Formulation

FOI dnr 03-2870 ISSN-1650-1942

Defence and Security, Systems and Technology FOI dnr 03-2870

March 2007 Issue 4.1.0

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

Contents

1 Introduction 1.1 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7 8 9 9 9 12 14 14 15 15 16 16 16 17 17 18 20 21 23 25 25 29 30 30 32 33 34 34 35 5

2 Theoretical Formulation 2.1 2.2 2.3 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Geometrical Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . Governing Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.1 2.3.2 2.4 Governing Equations for System Rotation . . . . . . . . . . . . . . Modication for Moving and Deforming Grids . . . . . . . . . . .

Fluid Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.1 2.4.2 2.4.3 Calorically Perfect Gas . . . . . . . . . . . . . . . . . . . . . . . . Thermally Perfect Gas, Singel Gas . . . . . . . . . . . . . . . . . . Thermally Perfect Gas, Multiple Gases . . . . . . . . . . . . . . .

2.5

Turbulence Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 Spalart & Allmaras One-equation Model . . . . . . . . . . . . . . Eddy Viscosity Two-Equation Models . . . . . . . . . . . . . . . . Explicit Algebraic Reynolds Stress Models (EARSM) . . . . . . . Differential Reynolds Stress Models . . . . . . . . . . . . . . . . . DES and Hybrid RANS-LES Models . . . . . . . . . . . . . . . . Numerical Treatment . . . . . . . . . . . . . . . . . . . . . . . . .

2.6

Spatial Discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.6.1 2.6.2 Inviscid Fluxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . Viscous Fluxes . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.7

Steady State Time Integration and Multigrid . . . . . . . . . . . . . . . . . 2.7.1 2.7.2 2.7.3 Multigrid Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . Multistage RungeKutta . . . . . . . . . . . . . . . . . . . . . . . Implicit Residual Smoothing . . . . . . . . . . . . . . . . . . . . .

2.8

Local Low-Speed Preconditioning . . . . . . . . . . . . . . . . . . . . . . 2.8.1 Preconditioning Matrix . . . . . . . . . . . . . . . . . . . . . . . .

2.9

Time Accurate Calculations . . . . . . . . . . . . . . . . . . . . . . . . . .

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

2.9.1 2.9.2

Explicit Time Accurate . . . . . . . . . . . . . . . . . . . . . . . . Implicit Time Accurate . . . . . . . . . . . . . . . . . . . . . . . .

35 36 37 38 38 39 43 43 45 46 46 47 48 51 51

2.10 Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.10.1 Connectivity Boundary Conditions . . . . . . . . . . . . . . . . . . 2.10.2 Wall Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . 2.10.3 External Boundary Conditions . . . . . . . . . . . . . . . . . . . . 2.11 Aeroelastic Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.11.1 Aeroelastic Analysis using Natural Mode Shapes . . . . . . . . . . 2.11.2 Structural Deformation and Moving Grids . . . . . . . . . . . . . . 2.11.3 Prescribed Motion Solutions . . . . . . . . . . . . . . . . . . . . . 2.11.4 Generalized Forces . . . . . . . . . . . . . . . . . . . . . . . . . . 2.11.5 Coupled Solution of the Modal Equations of Motion . . . . . . . . 2.12 Vortex Generator Model . . . . . . . . . . . . . . . . . . . . . . . . . . . A Appendix A.1 3D Inviscid Jacobians and Eigenvectors . . . . . . . . . . . . . . . . . . .

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

Introduction

Edge is a parallelized CFD ow solver system for solving 2D/3D viscous/inviscid, compressible ow problems on unstructured grids with arbitrary elements. Edge can be used for both steady state and time accurate calculations including manoeuvres and aeroelastic simulations. There is also an inviscid adjoint ow solver that can be used for gradient based shape optimization and mesh adaption techniques. There is also functionality for mesh deformation, postprocessing, le format conversion and other utility tasks. The Edge system comprises ve major components:

Preprocessor constructs the dual mesh and edge based datasets. Edge ow solver performs the main ow computation. Helper programs a general toolbox for manipulating input and output data. Application programs programs for shape optimization mesh deformation and aeroelasticity. Xedge a graphical user interface (GUI) for Edge.

The ow solver employs an edge-based formulation which uses a node-centered nitevolume technique to solve the governing equations. The control volumes are non-overlapping and are formed by a dual grid, which is computed from the control surfaces for each edge of the primary input mesh. The relationship between the dual and primary input meshes is illustrated in Figure 1. In this example, a set of hexagonal control volumes are constructed from a simple triangular input mesh. In any Edge mesh, all the mesh elements are connected through matching faces. Edge meshes therefore may not contain hanging nodes. In the ow solver, the governing equations are integrated explicitly towards steady state with RungeKutta time integration. Convergence is accelerated using agglomeration multigrid and implicit residual smoothing. Time accurate computations can be performed using a semi implicit, dual time stepping scheme which exploits convergence acceleration technique via a steady state from inner iteration procedure. This document contains the theoretical formulation of Edge. Details on the governing equations as well as the discretization can be found here. For more practical information on how to install and run Edge, see the Edge User Guide. Implementation details for software developers are not included in this document, such information is included in the Edge Coding Guidelines and, of course, in the source code itself. 7

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

1.1

Notation
V Vl Vi U V W Volume of cell Volume of cell at mesh level l Volume of cell i Conservative variables Primitive variables Characteristic variables Space dimension Normal vector Normal vector to the surface between node 0 and node i Surface area between node 0 and node i Node i Coordinates for node i Number of neighboring nodes to node i Inviscid ux Viscous ux

ndim n = (nx , ny , nz ) n0i S0i i xi mi FI FV

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

Theoretical Formulation

2.1

Overview

Edge is a ow solver for unstructured grids of arbitrary elements. Edge solves the Reynolds Averaged NavierStokes compressible equations in either a steady frame of reference or in a frame with system rotation. Turbulence can be modeled with differential eddy viscosity models or explicit algebraic Reynolds stress models. The solver is based on an edge-based formulation and uses a node-centered nite-volume technique to solve the governing equations. The control volumes are non-overlapping and are formed by a dual grid obtained from the control surfaces for each edge. All elements are connected through matching faces. The governing equations are integrated explicitly towards steady state with RungeKutta time integration. The convergence is accelerated with agglomeration multigrid and implicit residual smoothing. For time accurate analysis, this convergence procedure is used as a driver of an implicit time stepping, dual time steps. Edge contains different spatial discretizations for the mean ow as well as the turbulence, different gas models, steady state and time accurate time integration, low speed preconditioning etc. Applications include shape optimization and aeroelasticity.

2.2

Geometrical Considerations

The nite-volume technique requires control volumes surrounding the unknowns in the nodes. The control volumes are non-overlapping and are formed by the dual grid obtained from the control surfaces at the edges. The dual grid is supplied by the preprocessor, Berglind (2000), as an input to the ow solver. The grid with its dual grid is depicted in the example in two dimensions in Figure 1. 1 n0 S0 2 0 3 V0

Figure 1. The input grid (solid) also denoted triangular grid and its dual grid (dashed) forming the control volumes.

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

The coordinates of the input grid are provided for each node and the connectivity is supplied in an edge based manner where an edge connects two nodes. In addition to the node numbers a control surface nS is supplied for each edge where n is the normalized normal vector and S the area. The control surfaces of all edges emerging from a node enclose the control volume of a node. The surface vector for each edge is oriented from the node with the rst index to the node with the second index. The sum of the surface vectors over a closed volume is equal to the null vector, ni Si = 0.
i

(1)

This check is performed in the preprocessor for all control volumes of the dual grid. If each edge surface is considered to lie in a plane, the volume of the cone formed by the edge surface and one of the nodes 0 and k is 1 n0k S0k (xk x0 ), 2ndim (2)

where ndim is the space dimension. Quantities with two sub indices denote edge quantities where the indices denote the two nodes connecting the edge. All edge volumes of a node sum up to the control volume, i.e. V0 = 1 2ndim
m0

n0k S0k (xk x0 ),


k=1

(3)

where m0 is the number of neighbor nodes to node 0 or, equivalently, the number of edges connected to node 0 . To close the control volumes at boundaries, control surfaces are supplied at the boundary. In Figure 2 the control surfaces to node 3 are given at all edges connected to 3 , whereas the edges to the boundary node 1 do not close the control volume. To close it, a control surface is given separately for the boundary node 1 .

5 1 2 1111111111111111111 0000000000000000000 0000000000000000000 1111111111111111111


Figure 2. Control volumes at an inner node and a boundary node.

At a corner point where two or more boundaries meet the boundary control surface is split into control surfaces for each boundary condition separately. In that case, the boundary node may occur in several boundary conditions. In addition to the control surface supplied for each boundary node, an inner point is also supplied at all boundaries. The inner nodes are used in some of the boundary conditions described in Section 2.10 on page 37 and the inner node is chosen as the end node of the contiguous edge closest to the boundary surface. In the example above, node 3 is the inner node to node 1 . In 3D a similar discretization is done. The centroid dual consists of triangular facets between the centroids of the cells, the faces and the edges. The control volume of a grid point 10

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

E4 F2

E6

F1 F3 1 F4 E1 2
Figure 3. Facets for the edges E1 , E2 , E4 and E6 of a tetrahedron.

E2

consists of faces intersecting the midpoint of each edge. The faces for all edges contiguous to an internal grid point form a closed surface. For a boundary grid point additional boundary faces have to be added to the control volume.

Each face associated with an edge consists of several triangular facets, see Figure 3. The facets are dened by the points: the center of the grid cell C, the center of a face F and the midpoint of the edge E. In Figure 3, the facets associated to the edge E1 are E1 C F3 and E1 C F4 . If the surface vectors for two adjacent triangles with one common edge are added, the resulting surface vector will be one half of the cross product of the diagonals. The surface vector associated with an edge is computed by adding the surface vectors of the corresponding facets.

At the boundaries, the surfaces that close the boundary control volumes have to be computed. In a loop over the boundary surface elements the surfaces for each node is accumulated, see Figure 4. The contribution to node i from the triangle 1 2 i in Figure 4 is the surface vectors for the triangles C E2 i and C i E3 . 11

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

5 6 4 i 7 3 1 i 2

E3 E2 C 1 2
Figure 4. Node surface for a boundary control volume.

2.3

Governing Equations

The ReynoldsAveraged NavierStokes (RANS) equations written in a Cartesian frame of reference rotating with an angular velocity , can be expressed as U + t FI + FV = Q, (4)

where FI and FV are respectively the inviscid and viscous ux matrices and Q is the vector of source terms. On integrated form the same equations become U d + t (FI n)S +
faces

(FV n)S =
faces

Qd.

(5)

The RANS equations are obtained by time averaging the NavierStokes system, with rstorder closure, based on Boussinesqs assumption: wi wj = t 2 2 wi wj + ( w)ij kij , xj xi 3 3 (6)

with wi the relative velocity component in the xi -direction. The ux matrices resolve into Cartesian components FI = fI1 eT + fI2 eT + fI3 eT , x y z FV = fV1 eT + fV2 eT + fV3 eT , x y z 12

(7)

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

where w1 U = w2 , w3 E wi p 1i + wi w1 p 2i + wi w2 , fIi = p 3i + wi w3 (E + p )wi = 0 i1 i2 i3 qi + wj ij + + t k ki

fVi

(8) and where the shorthand notation, i, is used to denote derivatives with respect to xi . The density and the pressure in (8) are time averaged values related to the instantaneous value through: q =q+q , (9) where q is the time averaged value and q the uctuating part and q = 0. (10)

The energy, temperature and velocity components are density weighted averages dened as q= q , (11)

where k is the turbulent kinetic energy and is dened as 1 k = wi wi . 2 (12)

Below, all superscripts that denote an averaging are removed for clarity. All variables are supposed to be averaged. In contrast to the laminar case, both the static pressure and the total energy contain contributions from the turbulence kinetic energy k and are dened as 2 p = p + k, 3 and 2 E = e + wi wi + k. 3 respectively. The stresses and the heat uxes are given by ij = ( + t ) 2 wi wj + ( w)ij , xj xi 3 (13)

(14)

(15)

T . (16) xi The viscosity may either be constant (input variable ICOVIC = 1) or may be derived from Sutherlands law (ICOVIC = 0). qi = ( + t ) The laminar thermal conductivity is found from the viscosity and a user specied Prandtl number Pr (variable PRREF of the input le) Cp . (17) Pr The turbulent viscosity follows from the turbulence model. Turbulence models are discussed in Section 2.4.2 on page 16. The turbulent conductivity is obtained from the turbulent viscosity through a turbulent Prandtl number = t = t Cp . Prt (18)

13

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

2.3.1

Governing Equations for System Rotation

By setting the input option IROT = 1 congurations with a constant system rotation can be calculated in a steady state manner. The system rotation is entered through the input option OMGRO which is the rotation vector giving the magnitude and direction of the rotation. The relation between the relative velocity and the absolute velocity then becomes w = u r. (19)

In order to achieve high accuracy also in the fareld of the computational domain the equations are not solved in the form displayed in (8). Rather equation (19) is substituted into equation (8). After some algebraic manipulations the uxes and source terms take on the following form 0 wi i1 p 1i + wi u1 u1 i2 u2 , fI = p 2i + wi u2 , fV = , U = i i i3 + w u p 3i u3 i 3 t )w (Er + p Er qi + wj ij + + ki i k (20) and the source term is dened as 0 (21) Q = u , 0 where Er = E u ( r) (22) which has a contribution from the centrifugal force which is regarded as a potential. Note that the viscous ux has not changed and that the source term has become simpler. The main advantage of this formulation is that when computing the uxes the contribution from the system rotation is always obtained at the cell face and never averaged from cell centers. Since the stored variables are the absolute velocities several of the numerical routines must be adapted such that they add the missing part of the relative ow.

2.3.2

Modication for Moving and Deforming Grids

A number of parameters in the input le control the use of moving grids in Edge. In the AEROELASTICS set of input parameters, IAEOPT controls how the grid motion is handled. Details about the the aeroelastic module can be found in Smith (2005). Normal Edge simulation in xed grids have IAEOPT = 100. However, with IAEOPT = 101, the present version of Edge enables excitation of a set of grid perturbation elds (how this is done will be discussed in greater detail below). With IAEOPT = 102, a coupled uid/structures analysis is performed. The moving grids concept modies ux terms in the equations. Instead of the inviscid ux vectors being wi 0 p 1i + wi w1 1i w1 p 2i + wi w2 = 2i p + w2 wi , fIi = p 3i + wi w3 3i w3 (E + p )wi wi E 14

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

in a xed coordinates system, they now become 0 1i w1 2i p + w2 wi dxi fIi = dt w3 3i Er wi

Not only the ux vectors but also surface normals and volume for the control cells have to be computed repeatedly, and thus part of the preprocessor analysis has been brought into the solver.

2.4

Fluid Modeling

Different gas models can be chosen (input variable ITYGAS), as explained below.

2.4.1

Calorically Perfect Gas

The perfect gas law is used as constitutive equation, p = rT, where r is the gas constant for the perfect gas under consideration dened as r= R , M (24) (23)

where R is the universal gas constant and M the molecular weight of the perfect gas. The ratio of specic heats at constant pressure cp and at constant volume cv is dened as = cp . cv (25)

When the gas temperature is low enough so that the vibrational and electronic modes are not excited the internal energy of the gas will be proportional to the temperature and thus the specic heats and are constants. The gas is called calorically perfect. This is the usual assumption of moderate speed aerodynamics. The relation between r and cp is given by r= 1 cp . (26)

The values of and cp are user input, respectively in the variables GAMMA and CP. The static pressure is obtained from the conservative variables through the following relation p = ( 1) E (w)2 . 2 (27)

15

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

2.4.2

Thermally Perfect Gas, Singel Gas

At higher temperatures, the variation of the internal energy with temperature is given by the excitation of the translational, rotational, vibrational and electronic modes of the gas molecules. Under conditions where no chemical reactions or ionization occur the internal energy of the gas is now a function of temperature only which makes the gas thermally perfect. The perfect gas law is still used as constitutive equation, but the specic heats are now functions of the temperature. These functions are user input, cf. input variables IGTAB and IGTTAB. The static pressure is now obtained as p = rT (e), with T obtained implicitly from the relation of the internal energy to temperature. (28)

2.4.3

Thermally Perfect Gas, Multiple Gases

The thermally perfect gas assumption may also be used for calculation of the mixing of several thermally perfect gases where an equation is solved for each gas and its fraction of the total density, its mass fraction specie j , 0 j 1. Any arbitrary number of species (NSPEC 1) may be specied. For each specie a transport equation is solved. These equations, formulated in the form of equation (5), look like: j d + t (j w n)S +
faces

( + t t )
faces

j S=0 n

(29)

where and t are the Schmidt and turbulent Schmidt numbers respectively. The total density will satisfy
nspec

j j = ,
j=1

(30)

where nspec is the number of species.

2.5

Turbulence Models

For calculations of turbulent ows, a variety of turbulence models are available, which are categorized into three different groups, namely, RANS (ReynoldsAveraged Navier Stokes), DES (Detached Eddy Simulation) and hybrid RANS-LES, as well as LES (Large Eddy Simulation). The modelling approach is specied by the parameter ITURB, that is, setting ITURB = 2 for RANS modelling, ITURB = 3 for DES and hybrid RANS-LES modelling, ITURB = 4 for LES modelling. The choice of different models under the selected modelling approach is made with the variable TURB MOD NAME. The available turbulence models are shortly discussed below. 16

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

2.5.1

Spalart & Allmaras One-equation Model

The Spalart & Allmaras (1994) model is chosen by setting TURB MOD NAME =SpalartAllmaras one-eq model. This model solves one transport equation for a quantity which is equivalent to the eddy viscosity. Since turbulence is characterised by two scales, e.g. velocity and length scales, and the model only solves for one propoerty additional information is needed. The Spalart & Allmaras model uses the wall distance, that would be active through the complete boundary layer, not only in the viscous sub layer. The detailed denition of the model is given in the reference, and is not repeted here. The model is integrated all the way to the wall which requires a good resolution normal to the wall (y + 1).

2.5.2

Eddy Viscosity Two-Equation Models

In these turbulence models two additional transport equations for the turbulent kinetic energy k and some auxiliary quantity (, or ) is solved. The models below are integrated all the way to the wall which requires a good resolution normal to the wall (y + 1). 2.5.2.1 The Wilcox Standard k Turbulence Model

The standard k turbulence model by Wilcox (1988) is used if TURB MOD NAME =std Wilcox k-omega. The additional equations can be put in the form of (4) with U= and k , fIi = kwi , wi fVi = ( + t )k,i , ( + t ),i (31)

Pk k , Pk 2 k where Pk is the production of turbulent kinetic energy given by Q= Pk = wi xj wi wj 2 2 + ( w)ij kij . xj xi 3 3

(32)

(33)

The eddy viscosity is given by k T = . Finally, the closure coefcients are as follow = 0.556, = 0.075, = 0.09, = 0.5, and = 0.5. (34)

(35)

One of the major problems with the Wilcox k model is that the model has an unphysical free stream dependency. 2.5.2.2 Low Reynolds Number (LRN) k Models

Low Reynolds number (LRN) models are developed to account for the viscous and walldamping effects. For linear two-equation models, this has usually been achieved by means of some empirical damping functions, which also help in many modelling variants to attain correct asymptotic properties when integrated to the wall surface. The LRN k 17

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

model by Wilcox (1994) has been derived on the basis of the Wilcox standard k model. This suggests that the LRN Wilcox model returns to the standard version, when all the damping functions are set to a constant value of unity. The model is chosen by setting TURB MOD NAME =Wilcox LRN k-omega. The LRN model by Peng et al. (1997) is a modied version of the k model. It is cast in a transformed form from k type model by some approximations and, consequently, has a cross diffusion term in the equation, which helps to suppress the freestream sensitivity. The cross diffusion term takes the following form C t k . k xk xk (36)

Unlike the following Kok TNT k model, this LRN model employs the cross diffusion term over the whole boundary layer. The model constants and damping functions are calibrated for internal ows characterized by recirculation with separation and reattachment. The model is chosen by setting TURB MOD NAME =PDH LRN k-omega.

2.5.2.3

The Kok TNT k Turbulence Model

The k model by Kok (2000) is derived for overcoming the unphysical free stream dependency. The equations are on the same form as the k model in (31) but with an added cross diffusion term. Also the model coefcients are modied. The cross diffusion term is written as k d max 0, . (37) xk xk The model is chosen by setting TURB MOD NAME =Kok TNT k-omega.

2.5.2.4

The Menter BSL and SST k Turbulence Models

The k model by Menter (1994) is also derived for overcoming the unphysical free stream dependency. Also here the equations are on the same form as the k model in (31) but with an added cross diffusion term as in (37). The model is a blending of the standard k model in the outer part of the boundary layer and the Wilcox k model in the near wall part of the boundary layer. The k model is transformed into k resulting in a cross diffusion term and modied coefcients which are blended according to a blending function. In the SST model an additional modication is made, compared to the BSL model. A limiter on the eddy viscosity is added so that uv a1 k, with a1 = 0.31. This is in accordance with the Bradshaw assumption, and will reduce the turbulence level around stagnation regions and in adverse pressure gradient boundary layers compared to a standard eddy-viscosity model and the prediciton of separated ows are improved. The models are chosen by setting TURB MOD NAME =Menter BSL k-omega or Menter SST k-omega. 18

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

2.5.3

Explicit Algebraic Reynolds Stress Models (EARSM)

The EARSM by Wallin & Johansson (2000) is a rational approximation of a full Reynolds stress transport model in the weak equilibrium limit where the Reynolds stress anisotropy may be considered constant in time and space. The Reynolds stress tensor is explicitly expressed in terms of the velocity gradient and the turbulence scales. 2.5.3.1 The Wallin & Johansson EARSM

The EARSM may be written in a common way where the anisotropy tensor a is written in terms of the strain- and rotation rate tensors S and as
10

a=
=1

T() ,

(38)

where the coefcients are functions of the ve invariants of S and . The Ts are T(1) = S, 1 T(2) = S2 IIS I, 3 1 (3) 2 T = II I, 3 T(4) = S S, T(5) = S2 S2 , 2 T(6) = S2 + 2 S IVI, 3 2 T(7) = S2 2 + 2 S2 VI, 3 T(8) = SS2 S2 S2 , T(9) = S2 2 S, T(10) = S2 2 2 S2 . The Reynolds stress tensor is then related to the anisotropy as 2 ui uj = k aij + ij , 3 (40) (39)

which can be rewritten as an effective eddy viscosity, t , and an extra contribution to the expression for the stress tensor (15), which reads kaextra . ij 2.5.3.2 The length-scale determining () models (41)

This constitutive relation for the Reynolds stress tensor can, in principle, be coupled to any two-equation model platform. In Edge the EARSM is available with the standard k model by Wilcox (1988) (TURB MOD NAME =W&J EARSM + std k-omega), the k model by Kok (2000) (TURB MOD NAME =W&J EARSM + Kok TNT k-omega) and 19

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

the k model by Menter (1994) (TURB MOD NAME =W&J EARSM + Menter BSL k-omega). These k models are basically derived for a standard eddy-viscosity relation but the requirements from an EARSM are different. A new k model derived with the Wallin & Johansson (2000) EARSM and, thus, completely consistent with it is the model by Hellsten (2005) (TURB MOD NAME =W&J EARSM + Hellsten k-omega). This model is extensively tested in different ows and is the recommended default model. 2.5.3.3 Curvature Correction

In strong rotation and curvature the EARSM approximation is not perfecty valid and a full Reynolds stress model is to prefere. However, an approximation of the missing terms is given by Wallin & Johansson (2002). The approximation is given in terms of gradients of the strain- and rotation rate tensors. The model has some stability problems, mostly because of the dependency on second spatial derivatives, and should be used with caution. However, in cases with strong swirl the model is expected to give improvements. The curvature correction is available together with the standard k model by Wilcox (1988) (TURB MOD NAME =W&J CC-EARSM + std k-omega), the k model by Menter (1994) (TURB MOD NAME =W&J CC-EARSM + Menter BSL k-omega), and the k model by Hellsten (2005) (TURB MOD NAME =W&J CC-EARSM + Hellsten k-omega).

2.5.4

Differential Reynolds Stress Models

The transport equation for the Reynolds stress tensor may be derived from the Navier Stokes equations Dui uj = Pij ij + ij + Dij . (42) Dt The terms represent production, dissipation, pressure-strain rate, and diffusion (molecular and turbulent), respectively. One should particularly note that the production term is explicit in the Reynolds stresses, Uj Ui Pij = ui uk uj uk (43) xk xk whereas the other terms need to be modelled. In differential Reynolds stress models (DRSM), or Reynolds stress transport (RST) models, all different terms in (42) are kept or modelled which results in a transport equation for every individual Reynolds stress component. In general three-dimensional mean-ows this implies six equations due to symmetry in the Reynolds stress tensor. The dissipation rate tensor ij is usually decomposed into an isotropic part and a deviation from that, ij = (eij + 2ij /3). First, the total dissipation rate is modelled through a transport equation, similar to the equation in the K models. Also other alternatives to , such as or exist. The dissipation rate anisotropy eij is typically explicitly modelled in terms of the Reynolds stress anisotropy or included into the modelling of the pressure strain rate. The standard Wilcox model, used together with the DRSM model reads D = P 2 + Dt K xl 20 + T
(e)

, xl

(44)

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

W&J SSG

0 C1 4.6 3.4

1 C1 1.24 1.8

C2 0.47 0.8

C2 0 1.30

C3 2 1.25

C4 0.56 0.40

C5 0 4.2

Table 1. The values of the C coefcients for different pressure-strain models.

from which the dissipation = K. The diffusion is modelled using a simple gradient diffusion model Dij = xl with the effective viscosity dened as T + T K
(e) (e)

ui uj , xl

(45)

= K/.

The modelling of the pressure strain rate is given in the following form that includes many of the linear or quasi-linear models in litterature, such as e.g. the SSG model Speziale et al. (1991). A general form for the pressure-strain rate and dissipation rate anisotropy eij lumped together reads ij C 1 1P 0 C1 + C1 aij + C2 2 akl alk Sij eij = 2 2 C4 2 C3 (aik kj ik akj ) + aik Skj + Sik akj akl Slk ij 2 3 2 1 C5 aik akj akl alk ij + 4 3

(46)

where = K/ is the turbulent timescale. The C coefcients for the models available in Edge are given in Table 1. The two differential Reynolds stress models are available together with the standard k model by Wilcox (1988) (TURB MOD NAME =W&J DRSM + std k-omega), (TURB MOD NAME =SSG DRSM + std k-omega) and the k model by Hellsten (2005) (TURB MOD NAME =W&J DRSM + Hellsten komega), (TURB MOD NAME =SSG DRSM + Hellsten k-omega).

2.5.5

DES and Hybrid RANS-LES Models

DES (Detached Eddy Simulation) and other hybrid methods, combining RANS (Reynolds Averaged NavierStokes) and LES (Large Eddy Simulation) in the turbulence model, are emerging turbulence modelling approaches. Note that DES is one type of hybrid RANSLES models. The development of such methods has been originally motivated due to aeronautical applications, where the turbulent ow is characterized by unsteadiness, massive separation and vortical motions. In order to avoid using huge near-wall grid resolution as required in well-resolved LES for high-Reynolds number ows, these models often use RANS mode in the wall boundary layer being coupled with LES mode in the off-wall region and in regions where the ow is detached from wall surfaces (e.g. afterbody ows). The DES and other hybrid RANS-LES models are often viewed as a promising compromise between RANS modelling (in terms of computational efciency) and LES (in terms of computational accuracy). 21

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

The use of LES mode in hybrid RANS-LES methods implies that instantaneous, large-scale ow structures are resolved in the LES region. When DES or other RANS-LES models are selected, the simulation should be carried out being time-dependent (by setting ITIMAQ > 0) and usually in a three-dimensional computational domain. 2.5.5.1 The Spalart-Allmaras DES Model

The DES modelling approach was rst proposed in 1997 by the pioneering work of Spalart et al. (1997). This approach employs the SpalartAllmaras (S-A) one-equation model in the wall boundary layer in combination with its SGS (SubGrid Scale) modelling variant in the LES region away from the wall. The same turbulence transport equation is thus invoked in both RANS and LES regions through a switch of turbulence length scales. The S-A model solves a transport equation for a working eddy viscosity, t . For details, the readers should refer to Spalart & Allmaras (1994) for the S-A RANS model and Spalart et al. (1997) for its DES version. Nevertheless, without repeating the details about the model constants and empirical functions, the equation for t is dened as t 1 = Cb1 S t + t with t S = + 2 2 f2 l (48) t t t ( + t ) + Cb2 xj xj xj xj Cw1 fw t l
2

(47)

where is the magnitude of vorticity, l is the local turbulent length scale, is the von Karman constant and is a model constant. The turbulence eddy viscosity is computed by t = f1 t . The Cs and f s with different subscripts are model constants and empirical model functions. When the turbulent length scale, l, is taken as being the local wall distance, d, namely, l = d, the model takes the form of the original S-A RANS model. The SGS model in the off-wall LES region is adjusted from the RANS model by switching the length scale l from the local wall distance to a SGS turbulence length scale in association to the local cell size. This is done by the formulation of l = min(d, Cdes ), where is the maximum size of each cell in the three directions for structured grid and Cdes is a model constant. With unstructured grid, we have estimated by taking the maximum edge of each cell. The model constant, Cdes , has been calibrated in LES for decaying, homogeneous, isotropic turbulence, which gives Cdes = 0.65 for best simulation of turbulence energy decay. Note that, when the t equation functions as a transport equation for SGS turbulence, under the assumption of local equilibrium the model is similar to the well-known SGS model by Smagorinsky (1963) (but with a linear alignment between t and ). The Spalart-Allmaras DES model is chosen by setting ITURB = 3 and TURB MOD NAME =Spalart-Allmaras DES model. 2.5.5.2 The Peng Hybrid RANS-LES Model

The hybrid RANS-LES model by Peng (2005) is based on an algebraic formulation for the turbulent eddy viscosity for both the RANS and LES modes. Simple algebraic (zeroequation) RANS models have been proved very robust in modelling attached boundary layers. The use of an algebraic RANS mode in hybrid RANS-LES modelling is thus an 22

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

effective choice to pave the near-wall attached boundary layer. On the LES side, a presumable argumentation is that the unresolved SGS turbulence resulting from a ltering process (with a sufciently small lter width) is more isotropic and thus its modelling may also be accomplished with a relatively simple and amenable approximation. The Peng hybrid RANS-LES model combines an algebraic mixing-length type RANS mode in the wall layer with the SGS model by Smagorinsky (1963). The RANS eddy viscosity is formulated by t = |S| l2 (49)

where the length scale = f d and f is damping function. In the off-wall LES region, l the SGS eddy viscosity with the Smagorinsky model reads sgs = (Cs )2 |S| (50)

with Cs = 0.12 and is the lter width. The matching between the RANS and LES modes is accomplished by modifying the RANS turbulent length scale over the RANS-LES 2 interface into l = fs so that t = l |S| in the RANS region, where fs is a matching l function. The eddy viscosity, h , in the hybrid RANS-LES model is computed by h = t if < l sgs if l (51)

Apart from its use for external aerodynamic ows, the use of the model for internal ows with moderate separation has also been demonstrated by Peng (2006). This hybrid model does not solve for any additional trubulence transport equation. It is thus more computationally efcient than the S-A DES model with a reduction of CPU time by about 20%. This hybrid model functions by setting ITURB = 3 and TURB MOD NAME =Peng hybrid HYB0 model.

2.5.6
2.5.6.1

Numerical Treatment
Restriction of the Time Step

Depending on the input variable IUPWKZ either a central scheme (IUPWKZ = 0) or an upwind scheme (IUPWKZ = 1) is used to discretize the convective terms of the turbulent equations, cf. also Section 2.6 on page 25. The order of the upwind method may be specied. The parameter IORDKZ = 1 for rst order and IORDKZ = 2 for second order accuracy. To control the stability of the calculation, especially in the beginning of the computation, the local time step is restricted by the residual divided by the solution t = t , t R(k) R() 1 min 2 ,2 , CFL k (52)

where R is the residual and is the spectral radius of the negative source terms corresponding to a point implicit treatment of these source terms. This restriction prevents negative values of the turbulent quantities. A similar restriction is applied in the multigrid cycles when updating the solution from coarse grid corrections, for more information see Eliasson & Wallin (2000). 23

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

2.5.6.2

Stability for DRSM

The hyperbolic and viscous stability limits were investigated by Eisfeld (2003). The spectral radius for the hyperbolic part reads (h) = Uk nk + and for the viscous part T (p) = max c1 , c2 where c1 and c2 depend on the different diffusion and model coefcients, and T = K (55) (54) (2K 2 + a) (53)

The remaining completely local source term reads 2 1 1 1 0 Soij = C1 aij ij + C5 aik akj IIa ij 2 3 4 3 where = K and with the equation So() = 2 The equation to be analysed is, thus, [ui uj , ] =J t ui uj (58) (57) (56)

where J is the Jacobian. Since ui uj can be diagonalized, also the above equation can be, and the evolution of the Reynolds stresses may be replaced by the evolution of the eigenvalues of the Reynolds stresses, ri [i , ] =J t ri (59)

The Jacobian becomes a 4 4 matrix determined by J = So (r ) (60)

where So = [So11 , So22 , So33 , So() ] and r = [r1 , r2 , r3 , ]. The four eigenvalues of the Jacobian become 1 = 2 2 = 3,4 = 1 0 1 C C5 2 1 6 3 IIa 2 (61)

and the spectral radius is the magnitude of the smallest one (largest negative) max = max 2, , 1 0 1 C + C5 2 1 6 3 IIa 2 (62)

24

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

2.5.6.3

Realizable Time Stepping for DRSM

Realizability for DRSM is related to positivity for the K- equations. The rst requirement is that the model itself sustain realisable solutions. The second requirement is that the space discretization is monotonic, which is fullled by TVD schemes. These aspects will not be discussed here. Unrealizable solutions may occure during the iteration to steady state even if the model and spatial discretization is realizable. This is because of the iteration procedure and may occure both for implicit and explicit methods. Explicit methods will be discussed in the following. The updating of the Reynolds stresses ij ui uj is not that obvious since the individual components could be negative without violating realisability. The criteria is that shold be positive denite, i.e. all of the eigenvalues should be positive, but the eigenvalues are rather expensive to compute. A better measure is the determinant of , which is positive if all eigenvalues are positive. However, the determinant is positive also if two of the eigenvalues are negative, but this state may only be reached by passing through det ( ) = 0. A special technique is applied to restrict the time step in order to preserve a positive denite ui uj . 2.5.6.4 Free Stream and Initial Conditions

Initially, free stream values for k and are imposed. A good estimation of these free stream values can be derived from the turbulence level TUFREE (typically 1% or less) and the ratio of free stream turbulent and laminar viscosity VRFREE 3 k = (TUFREE u )2 , 2 T = VRFREE . (63)

2.6

Spatial Discretization

The nite volume discretization is obtained by applying the integral formulation of the governing equations in (4) to the control volume surrounding the unknown at node (U0 V0 ) + t
m0 m0

FI0k n0k S0k +


k=1 k=1

FV0k n0k S0k = Q0 V0 ,

(64)

where m0 is the number of neighbors to node 0 . The surfaces S0k enclose the control volume for node 0 and form the dual grid illustrated in Figure 1 in 2D for a given triangulation. The ux vectors FI0k and FV0k are computed on the edge consisting of nodes 0 and k where S0k is given, the source term Q0 is computed directly at the node.

2.6.1

Inviscid Fluxes

The schemes for the inviscid ux FI0k considered here are based on a central discretization with dissipation terms of either articial dissipation type or upwind ux difference splitting type. 25

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

2.6.1.1

Central Scheme with Articial Dissipation

The inviscid ux across the cell face between nodes 0 and 1 is computed as FI01 = FI U0 + U1 2 d01 , (65)

where d01 denotes the articial dissipation. A blend of second and fourth order differences are chosen as articial dissipation, this corresponds to a blend of rst and third order differences for the uxes. The following form has been shown to be suitable d01 = (01 (U1 U0 ) 01 ( where
2 (2) (4) 2

U1

U0 ))01 01 ,

(66)

denotes the undivided Laplacian operator and where


m0 2 m0

U0 =
k=1

(Uk U0 ) = m0 U0 +
k=1

Uk .

(67)

The local spectral radius 01 is dened as 01 = (|u01 n01 | + c01 )S01 , (68)

where u01 = (u0 + u1 )/2 and c01 = (c0 + c1 )/2 denote the cell face speed and cell face speed of sound respectively. The normal direction of the control surface to the edge between nodes 0 and 1 is denoted by n01 and S01 denotes its size. The factor 01 is introduced to account for the stretching in the grid. It is dened as 01 = 4 0 1 , 0 + 1 (69)

where 0 is dened as the ratio between the integrated spectral radius, 0 = where 0 =
k=0

0 401

(70)

m0

m0

(u0k nk + c0k )Sk =


k=1

0k ,

(71)

and where 0k is given in (68). The factor p = 0.3 was chosen to have a close resemblance with the Martinelli eigenvalue scaling for structured grids, Martinelli (1987). This gives a dissipation proportional to the local spectral radius 01 in the direction of the stretching. In the other directions a value slightly larger than the local spectral radius is obtained. The function 01 is chosen to be active in the neighborhood of shocks and small in smooth regions of the ow
m0 m0 (2)

01 = (2)
k=1

(2)

(pk p0 ) /
k=1

(pk + p0 ) s2

(72)

where (2) is a constant coefcient provided as input (VIS2) and s2 is a scaling factor to reduce the dependency on the number of neighbors. The size of s2 is chosen such that for 26

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

six neighbors the dissipation equals the dissipation in a structured scheme and a unit value is obtained, 3(m0 + m1 ) . (73) s2 = m0 m1 The fourth order difference dissipation is switched off in the vicinity of shocks 01 = max(0, (4) 01 )s4 ,
(4) (2)

(74)

where (4) is another user dened constant (VIS4) and s4 is a scaling factor chosen in accordance with s2 s2 s4 = 2 . (75) 4 The turbulent equations have VIS2KZ and VIS4KZ corresponding to VIS2 and VIS4. On coarser grids a simplied form of the articial dissipation operator based on second order differences only is used to save computational time but also to increase the amount of dissipation. The coarse grid operator looks like d01 = 01 (U1 U0 )01 01 , where 01 = (0) s2
(0) (0)

(76)

ndim , 3

(77)

and where (0) is another user dened constant (VIS0). At a boundary the articial dissipation should not contribute, i.e. the ux on the boundary is set to zero. In addition, a boundary condition on the second derivatives in the undivided Laplacian (67) is required. Following Mavriplis the conservative variables are extrapolated linearly which corresponds to a normal second derivative, 2U = 0. n2 (78)

Requiring no normal derivative of the variables in the computation of the Laplacian is equivalent to only account for the contributions along the boundary. With the notation in Figure 2 the undivided Laplacian becomes
2

U1 =
k=2,...,5

(Uk U1 ) = U2 2U1 + U5 .

(79)

The pressure sensor in equation (72) is not modied at a boundary, nor are the scaling factors s2 and s4 . In Figure 2 there are four ux contributions to the residual in node 1 , d12 , d13 , d14 and d15 , the number of legs to node 1 is m1 = 4. 2.6.1.2 Upwind Schemes

In addition to the central scheme, upwind schemes of second order accuracy are available. The upwind scheme is of Roe ux difference splitting type as opposed to the more commonly used MUSCL type upwind schemes. The main reason for this is to have a scheme as similar as possible to what is available in Euranus, the structured counterpart. 27

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

As for the central scheme, the inviscid term is computed as a central part with additional dissipation. The central part is computed as an average of the uxes through FI01 = compare with relation (65). The upwind dissipation d01 is here computed as 1 1 1 d01 = RR1 (U1 U0 ) = RL1 (V1 V0 ) = R dW01 , 2 2 2 (81) 1 (FI (U0 ) + FI (U1 )) d01 , 2 (80)

where U and V denote the conservative and the primitive variables respectively, the primitive variables being the ones used in the computer code. The characteristic variables are denoted by dW01 = L1 (V1 V0 ) = R1 (U1 U0 ). The tensor R is the right eigenvector matrix to the ux Jacobian, FI = RR1 , (82) q where the diagonal tensor contains the eigenvalues. A similar expression can be obtained for the tensor L belonging to the primitive variables. The diagonal matrix is obtained as = | |(I ), (83)

where is a diagonal matrix with limiters for second order accuracy. Note that = 0 for a rst order scheme. For a Roe ux difference splitting scheme the components of R, L, must be computed from the Roe averaged variables (IROEAV = 1) 01 = 0 1 , u 0 0 + u 1 1 u01 = , 0 + 1 (84) H 0 0 + H 1 1 H01 = , 0 + 1 c2 = ( 1) H01 |u01 |2 . 01 However, arithmetic averages usually provide good solutions and are computationally less expensive and may be used as an option (IROEAV = 0). The diagonal matrix in equation (83) contains the eigenvalues adjusted with an entropy x to prevent the eigenvalues to become zero and produce unphysical solutions. The following entropy x is used for each of the eigenvalues 2 2 i + , |i | , |i | = (85) 2 |i |, |i | > , where is a small fraction of the spectral radius, usually around 5%. The variable ENTRFX determines the size of the entropy x. Two values for ENTRFX are to be specied. The rst one applies to the linear eld (the characteristic variables that propagate with speed u n), the second value to the non-linear eld (the characteristic variables that propagate with speed u n c). For the turbulent equations the corresponding variable is TURFIX, see the Appendix in Edge User Guide. 28

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

To achieve second order accuracy (IORDER = 2) the limiter in (83) has to be computed from divided differences of the solution. Here we chose differences of the characteristics to avoid oscillations in the pressure, although it is computationally more expensive. Gradients of all primitive variables are needed to compute the characteristics in the nodes. The gradient in a node is computed by evaluating the surface integral of the gradient theorem 1 v0 = V0 1 vn dS V0 V0
m0 k=1

1 (vk + v0 )n0k S0k , 2

(86)

where v denotes a component of the primitive variables. The node valued characteristics dW0 and dW1 may be obtained as dW0 = L0 ( V0 (x1 x0 )), dW1 = L1 ( V1 (x1 x0 )), in addition to the face value dW01 in (81). However, on a structured Cartesian grid these characteristics correspond to a broad stencil, dWi = (Wi+1 + Wi1 )/2 using the expression in (81). To have a scheme that provides identical results compared to a structured scheme on a regular grid the following expression is used to compute the node valued characteristics dW0 = 2L0 ( V0 (x1 x0 )) dW01 , dW1 = 2L1 ( V1 (x1 x0 )) dW01 , which, on a regular Cartesian structured grid corresponds to dW01 = dWi+1/2 = Wi+1 Wi , dW0 = Wi Wi1 , dW1 = Wi+2 Wi+1 , i.e. dW0 and dW1 correspond to the left and right compact differences for the cell face i + 1/2 ux. There are three different limiters that can be used, the minmod limiter, the van Leer limiter and the superbee limiter. The variable LIMITE controls the type of limiter, the minmod limiter is the default and recommended limiter. The minmod function chooses the argument with the smallest amplitude provided all arguments have the same sign. If the signs are different the limiter is zero and the scheme reduces locally to a rst order accurate one. Two different ways of limiting are available. In the rst way the minmod limiter is computed as dw01 = minmod(dw0 , dw01 , dw1 ) (90) where and dw denote a component of and dW respectively. This way of limiting is similar to the new family of symmetric TVD schemes used in Euranus, the parameter for this is IARDIS = 2. The second way of limiting is more consistent with the ux difference splitting technique, IARDIS = 1. The limiter is then computed depending on the sign of the eigenvalues of the ux Jacobian, minmod(dw0 , dw01 ), i 0, dw01 = (91) minmod(dw01 , dw1 ), i < 0. At boundaries no particular modication to the scheme is made. The numerical ux due to the upwind dissipation is zero. 29 (89) (88) (87)

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

2.6.2

Viscous Fluxes

A compact discretization of the thin-layer approximation (IFULNS = 0) or the fully viscous terms (IFULNS = 1) is used. A thin-layer approximation only contains the normal derivatives of the viscous terms. The viscous stresses for the momentum equations can be divided as ij nj = (ij nj )tl + (ij nj )tan , (92)

where (ij nj )tl contains only normal derivatives and leads to a thin-layer discretization if only this term is considered. A fully viscous approximation is obtained if also the remaining part of the viscous terms (ij nj )tan are added. The components of the normal are here denoted n = (nx , ny , nz ) = (n1 , n2 , n3 ). The thin-layer part can then be formulated as, see Gnoffo (1990), ui 1 uj (ij nj )tl = + nj ni . (93) n 3 n The normal derivatives in equation (93) can be approximated on the edges as in Haaselbacher et al. (1999) where 01 1 0 = (94) n |x1 x0 | with the notation from Figure 1 and where the normal is directed from node 0 to node 1 . With this formulation only two points are involved in computing the normal gradients at the edges and hence automatically leads to a compact second derivative. By recalling the identity of the Laplaces equation dV =

dS, n

(95)

the following approximation of the Laplaces equation at node is 0 obtained as 0 1 V0


m0

S0k
k=1

k 0 . |xk x0 |

(96)

The remaining parts of the viscous terms contain gradients which may be added using the GreenGauss formulation in (86) and thus a fully viscous approach can be obtained.

2.7
2.7.1

Steady State Time Integration and Multigrid


Multigrid Strategy

Multigrid is used to speed up the rate of convergence. The preprocessor agglomerates the coarser grids that are read in by the ow solver. The input variable NGRID denotes the number of grid levels to be used in the ow solver. The multigrid method is based on the FAS approach. The V (input parameter MGRSTR = 1), W (MGRSTR = 2) and F -cycle (MGRSTR = 3) can be chosen by the user, or if preferred their saw tooth variant (MGRSTR = 4, 5, 6 for respectively V , W , F saw tooth). 30

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

In the saw tooth variant no smoothing (i.e. RungeKutta solver) will be applied in the coarse-to-ne part of the cycle. As a result, the solution is only prolongated when passing from coarse to ne. Consider a set of meshes denoted with an index l = 1, . . . , L with L the nest level. The NavierStokes problem on the nest level can be written as U L + NL (U L ) = 0, t (97)

where NL (U L ) is the spatial discretization of the NavierStokes operator on the nest mesh L. The problem is then approximated on coarser levels l as U l + Nl (U l ) = Fl , t with Fl the forcing function, dened recursively as
l l Fl = Nl (Il+1 U l+1 ) + Il+1 [Fl+1 Nl+1 (U l+1 )],

(98)

(99)

l l where Il+1 and Il+1 represent restriction operators of respectively the unknowns and the residuals from ner mesh l to coarser mesh l + 1. They are dened as

l Il+1 Rl+1 =
l Il+1 U l+1 =

Rl+1 , V l+1 U l+1 , V l+1

(100) (101)

where Rl+1 is dened as Rl+1 = Fl+1 Nl+1 (U l+1 ) (102) and V represents the cell volume. The summation in equation (100) and (101) is over the ne cells contained within a coarse cell. After temporal discretization equation (98) becomes SU l + Nl (U l(0) ) = Fl , where U l(0) is the current solution on mesh l which has to be smoothed. One has
l U l(0) = Il+1 U l+1 ,

(103)

(104)

where U l is an update of U l(0) and is to be calculated. The operator S is the smoother. It is the operator that corresponds to the chosen time integration method, in this case an explicit RungeKutta time stepping. Note that the number of smoothing sweeps (i.e. the number of times the RungeKutta operator) can be chosen by the user for each grid level (NSWPFC, cf. also below). Once the solution on the coarsest mesh is smoothed, the coarse-to-ne sweep of the multigrid cycle is initiated. The current solutions on ner grids are updated with the solution on the next coarser level l U l = U l + Il1 (U l1 Ill1 U l ). (105)
l The operator Il1 is a prolongation operator, currently of injection type, from coarser mesh l 1 to nder mesh l. A similar procedure as in equation (52) is used to guarantee positivity for concerned quantities.

31

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

In the basic V , W , F cycle (MGRSTR = 1, 2, 3 respectively) the new solution on the ner mesh is smoothed before proceeding to the next ner level, by solving (100), with U l(0) = U l . The number of sweeps of the smoothing operator is user input, NSWPCF. The user has also the possibility to smooth the corrections after prolongation (second term in the right-hand-side of equation (105)) before adding them to the current ner grid solution, by applying the residual smoothing operator to the corrections. This is governed by the input parameter SMCOR which has the same denition as RSMPAR, cf. Section 2.7.3 on page 33. The computing cost of a multigrid cycle is reduced by using simplifying assumptions on coarser (i.e. all levels but the nest) grids (input parameter MGSIMP). If MGSIMP = 1, a rst order accurate upwind scheme is used on coarser levels (if IUPWIN = 1), else a more diffusive central scheme is used on coarser levels (IUPWIN = 0). In order to create a good initial solution full multigrid is also available; it is used if the input parameter IFULMG = 1 which is default. The calculations start then on the coarsest mesh. After a residual drop of RESFMG orders of magnitude, the solution is prolongated to the next grid level. Two-grid cycles are now applied until the residual dropped once more RESFMG orders, after which the third grid level is included and three-grid cycles are used. The procedure is repeated until the nest grid is reached. The variable RESFMG is user input. The input variable NFMGCY gives the maximum number of cycles spent in each stage of the full multigrid.

2.7.2

Multistage RungeKutta

An explicit q-stage RungeKutta scheme for the equation dU = F (U ), dt can be written u1 = un + 1 tF (un ), u2 = un + 2 tF (u1 ), ... u = u + tF (u u
n+1 q n q q1

(106)

(107) ), =u .

The coefcients i determine the stability area and the order of accuracy of the Runge Kutta scheme. They can be chosen in such a way that they suit the problem to be solved. The local time step is computed for each node 0 according to t0 = min CFL V0 V0 , CFLVIS 0 v0 , (108)

where V0 is the volume and 0 is the integrated convective spectral radius according to equation (71). The corresponding viscous spectral radius v0 is dened as
m0

v0 =
k=1

0k 2ndim

2 Sk , 0k

(109)

32

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

where 0k is the sum of the dynamic and turbulent viscosity in a turbulent calculation on the edge between nodes 0 and k , i.e. 0k = (0 + k )/2. The parameters CFL and CFLVIS are user input and chosen according to the stability region of the RungeKutta scheme used. If the input variable CFLVIS < 0 the viscous CFL number, CFLVIS, is replaced by the inviscid CFL number, CFL. The actual local time step is then computed by weighting the inviscid and viscous time step according to a harmonic mean formula 1 1 t0 = CFL V0 0 v0 1 1 + 0 v0

(110)

For explicit time accurate calculations (ITIMAQ = 2), global time stepping is used, i.e. in all cells the same time step is used, which is, for stability reasons, the minimum of the local time steps. For steady state calculations a 3-stage, rst order accurate scheme which provides good smoothing for both central and upwind schemes is recommended and is default, 1 = 0.66667, 2 = 0.66667, and 3 = 1.0. (111)

This scheme allows good smoothing properties at with one computation of the articial viscosity in the rst stage. The parameters for the RungeKutta scheme are the number of stages (NSTAGE) and the coefcients (IRKCO). The rst element of IRKCO corresponds to the rst coefcient, the second element to the second, and so forth. A maximum of ten coefcients (i.e. a 10-stage scheme) is foreseen. The default setting is such that the numerical dissipation is calculated only once instead of in all RungeKutta stages. It is computed in the rst stage. This approach reduces the computational cost substantially. The disadvantage is that the dissipative terms need to be stored separately. The recalculation of the dissipative residuals is governed by the variables ISWV and IBOTH. For an m-stage RungeKutta scheme the m rst elements of this vector are used, the rst element corresponding to the rst stage, the second element to the second stage and so on. If the element of ISWV is zero it means that the dissipative residual should not be calculated at the corresponding stage, and the latest available dissipative residuals will be used. Note that for consistency the rst value of ISWV should always be one.

2.7.3

Implicit Residual Smoothing

To increase the maximum time step, implicit residual smoothing is employed. The smoothing is employed for each residual to all equations independently. The smoothing for node 0 can for the residual of each unknown be written R0 = R0 +
2

R0 ,

(112)

where is a constant, 2 is the undivided Laplacian dened in equation (67). Here R0 indicates a new smoothed residual. This may be written
m0

(1 + m0 )R0
k=1

Rk = R0 .

(113)

33

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

For a structured solver a tridiagonal system of equations is obtained. For the unstructured solver a sparse, diagonally dominant matrix is obtained. The sparse matrix is not inverted exactly, instead a few Jacobi iterations of (113) are done. This results in the following iterative scheme for the residual smoothing
m0 0 R0 + n+1 R0 = k=1 n Rk

1 + m0

0.

(114)

Usually two iterations give sufcient smoothing, the parameter for the number of iterations is NSMCYC. Theoretically for structured grids where implicit residual smoothing is combined with the direct solution of tridiagonal systems, the time step can be increased according to the value of , CFL 4 + 1, (115) = CFL where CFL and CFL are the CFL numbers of the unsmoothed and smoothed scheme. Typical values using a structured grid is = 2 corresponding to a doubling of the CFL number and to = 0.75. Here, where a few Jacobi iterations are carried out, usually = CFL 1.3, CFL (116)

for good efciency. This corresponds to a value of approximately 0.2. The input parameter RSMPAR = and the default is RSMPAR = 1.3. On stretched grids only smoothing in the direction of the stretching should be used. The smoothing in the other directions must be reduced or removed. With structured grids this is achieved by letting the coefcient be a function of geometric quantities. A similar procedure is used here. The stretching is accounted for as follows
m0 0 R0 + m0 n+1 R0 = k=1 n Rk k / k=1 m0

k , 0, (117)

1 + m0

where k contains the geometric information k =


2 S0k . |xk x0 |

(118)

This type of smoothing increases slightly the smoothing in the direction of the stretching and it is removed in the other directions. On a regular grid it reduces to equation (114). This smoothing is also applied to the corrections in the multigrid procedure. To account for the stretching the parameter IRESMO = 1 should be used. 34

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

2.8
2.8.1

Local Low-Speed Preconditioning


Preconditioning Matrix

In order to overcome problems with stiffness of Euler and NavierStokes equations in low speed ows the low speed preconditioning has been added to the code. It is based on the Turkels type of preconditioner and NavierStokes equations are modied as M 1 M 1

U d + t

(FI n)S +
faces

(FV n)S =
faces

d,

(119)

where 1 is the preconditioning matrix dened as + 1 0 1 0 0 1 = 0 0 0 c2 0

for the primitive variables V = (, u, v, w, p) 0 0 0 0 1 0 0 1 0 0 c2 + 2 2 c2 2 u 2 v , 2 w 2 c2 + 2 2

(120)

and M = U/V is the transformation matrix between conservative and primitive variables. The coefcient varies between 1 and 1, is in subsonic ow eld equal to one and in supersonic ow eld equal to zero. The coefcient is calculated using 2 = min(max(K1 u2 , K2 u2 ), c2 ), loc inf (121)

where uloc is the local velocity in the mesh cell. There are, however, problems with stability especially in the regions of rapid changes of velocity typical examples could be stagnation point or shock wave boundary layer interaction. Stability problems in the stagnation point could be removed by increasing constant resulting in covering this problematic region with constant . Low speed preconditioning is turned on by the parameter IPREPA = 1. The parameters K1 and K2 are set with the parameters RKBET1 and RKBET2 respectively. There is also a global Mach number RM0 above which no preconditioning is used. Usually RM0 = 1. Recommended values of the preconditioning constants are = ALPHA = 0, K1 = RKBET1 = 1, K2 = RKBET2 = 4, RM0 = 1, and K3 = RKBET3 = 0.33.

2.9

Time Accurate Calculations

There are two ways to perform time accurate calculations, either explicit RungeKutta time marching with a global time step or implicit time marching with explicit subiterations. 35

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

2.9.1

Explicit Time Accurate

Explicit time accurate calculation is available by setting the parameter ITIMAQ = 2. In that case a global time step is automatically computed from the minimum local time step in all domains. The calculation of the local time step can be found in equations (108) (110). A global time step is computed provided the parameter ISGLTS = 0 which is default. Optionally, the parameter ISGLTS = 1 and the time step can be set by the user using the parameter DELTAT. A RungeKutta scheme of at least second order accuracy in time is recommended, a good choice is the fourth order accurate, four stage RungeKutta with coefcients 1 = 0.25, 1 2 = , 3 3 = 0.5, and 4 = 1. (122)

The explicit time accurate option is not compatible with multigrid (NGRID = 1) or implicit residual smoothing (RSMPAR 0).

2.9.2

Implicit Time Accurate

The implicit solver is written as 1 (U V)n+1 + 0 (U V)n + 1 (U V)n1 + 1 R(U n+1 ) + 0 R(U n ) = 0, t (123)

where U V denotes the unknowns times the volume. The coefcients 1 , 0 , 1 and 1 , 0 can be chosen to yield desired accuracy and stability. The implicit solver is available through ITIMAQ = 1, the parameters 1 , 0 , 1 are available with names BETNP1, BETN, BETNM1 and 1 , 0 with names GAMNP1, GAMN respectively. Introduce the pseudo time , denote the dependent variables U n+1 by U ( ) and consider the steady state problem dU V n+1 + R (U ) = 0, (124) d where 1 V n+1 R (U ) = U + 1 R(U ) + Q, (125) t and 0 (U V)n + 1 (U V)n1 U + 0 R(U n ), (126) Q= t is a constant source term. As steady state in pseudo time is approached dU 0 U U n+1 . d (127)

Within each real time step, the set of ordinary differential equations (124) is solved using an explicit RungeKutta method. To accelerate the convergence, we can adopt the same multigrid strategy combined with local time stepping and implicit residual smoothing as for a steady state calculation. The local time step will be inuenced by the scaling of the residual and the additional term of the dependent variables in equation (124). The local time step is obtained as 0 = min t0 t , CFLVIS 1 1 , (128)

36

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

where t0 is the original steady state local time step in equation (108) or (110) and t is the implicit time step (parameter DELTA) specied by the user. The user can specify any three-level implicit scheme, the best scheme (which is default) is the second order accurate backward difference scheme 3 1 = , 2 0 = 2, 1 1 = , 2 1 = 1, and 0 = 0, (129)

which is A-stable and provides good smoothing also for large implicit time steps. The user must supply a convergence criteria using the coefcient RESTAQ where the inner iterations are interrupted and the solution is advanced to the next time level when log(max(|R()|)) < RESTAQ. (130)

Other residuals than the density can be specied with the variable NRRES. Note that convergence must be obtained in each time step before the solution can be advanced to the next time level. The user is recommended to put a value of RESTAQ such that the integrated forces dont change when the convergence criteria is satised. If the convergence fails the time step (DELTA) is most likely too large. The user can also specify the minimum and maximum number of inner iterations (parameters ITMNAQ and ITMXAQ respectively.) The different numerical and physical models combine as for a steady state solution. More o details of the implicit time accurate method is found in Eliasson & Nordstr m (1996).

2.10

Boundary Conditions

Implemented boundary conditions in the Edge code are given in Table 2. Most boundary conditions use a so called weak formulation, i.e. the boundary conditions are imposed through the ux and all unknowns on these boundaries are updated like any interior unknown. A few exceptions exist though, e.g. on viscous walls the velocity is imposed strongly through a no-slip condition. A strong formulation implies that values of a strongly imposed variable on the boundary are explicitly xed, i.e. they remain at their imposed values and are not considered as unknowns. Some of the boundary conditions are described theoretically below. The notations from Figure 2 are used in the following. Note that only the central, inviscid terms and the viscous terms that contribute to the uxes on the boundaries, the dissipative uxes are set to zero.

2.10.1

Connectivity Boundary Conditions

At all connecivity boundaries an inviscid ux is added to these boundaries by using the average between the value on the boundary and the value on the connected boundary. In the case of rotation symmetry the velocity on the connected boundary is roatated before averaged. On a propeller disk boundary a volume force is added to simulate the presence of a propeller. Only the inviscid uxes are added, the viscous uxes have so far been neglected. 37

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

Notation Periodic Rotation Propeller Weak euler Weak adiabatic Weak isothermal Weak euler weak characteristic weak charact. vortcor weak total states strong total states pressure weak inlet weak static pressure weak extrapolation weak free stream propulsion inlet propulsion outlet nacelle inlet nacelle exhaust mass ow inlet mass ow outlet mass ow outlet JWS Mach outlet

Meaning Connectivity boundary conditions A connectivity through a translational vector. A connectivity through a rotational matrix. Propeller disk model connectivity. Wall boundary conditions Zero normal velocity. No slip. Assumes zero normal derivative of the temperature. No slip. Assumes constant wall temperature. Symmetry boundary conditions Zero normal velocity. External boundary conditions Characteristic boundary conditions. Characteristic boundary conditions with vortex correction in 2D. Subsonic inow boundary condition. Subsonic inow boundary condition. Subsonic inow boundary condition. Subsonic outow boundary condition. Extrapolation of all variables. All variables specied to free stream. Propulsion inlet. Propulsion outlet. Nacelle inlet. Nacelle exhaust. Subsonic inow boundary condition. Subsonic outow boundary condition. Subsonic outow boundary condition. Subsonic outow boundary condition.
Table 2. Available boundary conditions.

38

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

2.10.2
2.10.2.1

Wall Boundary Conditions


Euler Wall and Symmetry Plane(Weak euler)

At an Euler wall the normal component of the velocity is zero u1 n = 0, and hence the inviscid wall ux becomes 0 p 1 n x S f1 = p1 ny S . p1 n z S 0 (131)

(132)

The uxes are added to the residuals for node 1 . The same boundary condition is used for a symmetry plane. Note that condition (131) is only implied through the ux, the unknown velocity itself will not necessarily satisfy this condition exactly. This is a consequence of using a weak boundary condition. 2.10.2.2 Viscous Wall (Weak Adiabatic, Weak Isothermal)

On a viscous wall the velocity is imposed strongly through a no-slip boundary condition u1 = 0. (133)

Both a weak and a strong formulation have been tested and evaluated. The strong formulation has shown better rates of convergence and has therefore been the chosen one. With a strong formulation, the residual of the velocity on the boundary does not need to be solved for since the velocity will be kept constant according to equation (133). This also implies that the uxes for the velocity need not to be computed. In addition to the velocity, for a turbulent calculation, also the turbulent quantities are imposed strongly through k1 = 0, 1 = 6Cwall 1 , 1 |x1 x3 |2 (134) (135)

where the value 1 on the boundary is obtained as for structured grids recommended by Hellsten (1998). The constants = 0.075, Cwall = 1.5 usually and |x1 x3 | is the distance from the wall node 1 to the closest internal node 3 for |x1 xk |, see Figure 2. At an iso-thermal wall there is a contribution from the viscous terms to the energy equation. The remaining boundary ux becomes fE1 = ( + T ) T , n1 (136)

where the gradient on the boundary node is computed as the difference of the temperature in the interior node and the wall node T3 T1 Tw T1 T = . n1 |x1 x3 | |x1 x3 | (137)

39

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

where Tw is the specied wall temperature. At an adiabatic wall there is no contribution from the viscous terms to the energy equation at a wall since the temperature gradient is zero, T = 0, n1 and hence the boundary ux is zero for both the density and energy equation. (138)

2.10.3
2.10.3.1

External Boundary Conditions


Fareld (Weak Characteristic)

Characteristic boundary conditions are used at the fareld. These boundary conditions can be used for both subsonic and supersonic in- and outow where the characteristics are either set from free stream quantities for ingoing characteristics or extrapolated from the interior for outgoing characteristics. Primitive variables are used and stored in the program since they lead to sparse and computationally less expensive expressions. Given a set of local primitive variables V1 = (, u, v, w, p)T at the boundary a new set of primitive variables V1 have to be computed to be used in the ux evaluation for node 1 . The characteristic variables are denoted W and the relation between the primitive and characteristic variables is V = LW, (139) where L is given in Appendix A.1 with its corresponding inverse. By computing characteristics based on both local and free stream primitive variables, WL = L1 VL , W = L1 V (140)

either local or the free stream characteristics are used depending on the sign of the eigenvalue. The local variables VL are computed by local extrapolation, VL = V1 , (141)

and the components of the transformation matrices L and L1 are computed using free stream values and the local surface normal vector, L = L(V , n), L1 = L1 (V , n). (142)

Depending on the sign of the eigenvalue the components of characteristics W1 can be obtained WLi , i > 0, w1i = (143) Wi , i 0, where i denotes the ith eigenvalue belonging to the ith characteristic. The variables V1 can then be obtained from (139) from which the ux on the boundary can be computed. 40

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

2.10.3.2

Fareld with Vortex Correction (Weak Charact. Vort)

Exactly the same boundary condition as the one above with the difference that the free stream values are no longer constant but depend on the integrated lift using a so called vortex correction method. This boundary condition is intended for 2D subsonic external problems where the external boundary is located relatively close to the computed object. It gives in general an increased accuracy of the solution. Local boundary data cannot be supplied.

2.10.3.3

Total States Inlet (Weak Total States)

Total pressure, total temperature and a ow direction are specied to constant or varying conditions. The Mach number is extrapolated upstream. The boundary condition is intended as an subsonic inow condition for internal aerodynamics.

2.10.3.4

Total States Inlet (Strong Total States Pressure)

This boundary condition is similar to the condition above. The difference is that the static pressure is extrapolated upstream, the other variables are extrapolated. An additional differnece is the strong condition implied on all variables.

2.10.3.5

Incompressible Inlet (Weak Inlet)

Density and velocity specied to constant or varying free stream conditions. Pressure is extrapolated if the ow is locally subsonic, it is specied if it is supersonic. The boundary condition is intended for an internal inow boundary.

2.10.3.6

Pressure Outlet (Weak Static Pressure)

A boundary condition intended for subsonic outows where the static pressure is specied. It may also be used at local supersonic outow conditions, in that case the pressure is not specied (all variables extrapolated).

2.10.3.7

Extrapolation (Weak Extrapolation)

All variables are extrapolated with this condition. Note that theoretically this boundary condition is only stable for supersonic outow.

2.10.3.8

Free stream (Weak Free Stream)

All variables specied weakly to free stream values. Local varying free stream data may be supplied at the boundary, any variable may be speed locally. Note that theoretically this boundary condition is only stable for supersonic inow. 41

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

2.10.3.9

Propulsion Inlet

Boundary condition for coupling to a ram jet module. This boundary condition is not available in the ofcial Edge distribution. 2.10.3.10 Propulsion Outlet

Boundary condition for coupling to a ram jet module. This boundary condition is not available in the ofcial Edge distribution. 2.10.3.11 Nacelle Inlet

This boundary condition is intended for an engine nacelle infow to which the capture area is specied. Details about this boundary condition is given in Conway (2004). The boundary may be connected to the nacelle exhaust boundary. 2.10.3.12 Nacelle Exhaust

This boundary condition is intended for an engine nacelle exhaust boundary. It is required to specify pressure and temperature ratios. Details about this boundary condition is given in Conway (2004). 2.10.3.13 Mass Flow Inlet

This boundary condition is can be prescribed at a subsonic inow boundary which requires given value of mass ow. This boundary condition is in principal identical to the total states inow boundary condition where the value of total pressure is a function of mass ow Jir sek (2006). The procedure is as follows. First value of velocity normal to the boundary a is found from the value of desired mass ow mr and density un = Then, the Laval number is dened as n = Finally, total pressure is calculated as 1 2 p0 = p 1 +1 n 2.10.3.14 Mass Flow Outlet
1

mr .

(144)

wn = c

2 u2 + vn n . c

(145)

(146)

This boundary condition can be prescribed at a subsonic outow boundary which requires given value of mass ow. This boundary condition is in principal identical to the static pressure inow boundary condition where the value of static pressure is a function of mass ow Jir sek (2006). This procedure is shown graphically in gure 5. For each value of total a 42

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

Figure 5. Mass ow and static pressure as function of Laval number.

state and given value of mass ow there is a corresponding value of static pressure. The mathematical way is to solve the the implicit equation for velocity un mr = 0 u n 1 2 1 u 2c2 n 0
1 1

(147)

where total states are known from solution and mr is desired value of mass ow. Velocity un is then used to calculate the value of Laval number n = co un
2 +1

(148)

where c0 is known value of the total speed of sound. The value of n is then used to determine required value of static pressure on the outow boundary p = p0 1 2 1 +1 n
1

(149)

2.10.3.15

Mass Flow Outlet JWS

This boundary condition relaxes the value of the static pressure at the outow boundary to its desired value using equation Slater (2001) pk+1 = pk 1 + (Mr M k )/M , (150)

where is relaxation parameter and Mr is the desired mass ow through the outow boundary. The value of relaxation parameter is supplied in boundary conditions le. Recommended value is = 0.02. 2.10.3.16 Mach Outlet

This condition is similar to the mass ow outow boundary condition Jir sek (2006). It is a basically the static pressure outow boundary condition, where the value of static pressure is expressed as as function of desired Mach number M and known value of total pressure p0 p = p0 1 2 1+ M 2
1

(151)

43

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

2.11

Aeroelastic Applications

Aeroelasticity is a multi-physics discipline, involving the interaction of aerodynamics and structural mechanics and is of major importance in the aircraft industry. An excellent review of the literature on Aeroelasticity is provided in Battoo (1999). The general process for aeroelastic computations comprises the following cycle of operations: Compute aerodynamic loads on all moving surfaces, given the geometry and its rate of change. Transform the aerodynamic loads to a load distribution on the structure. Integrate the structural equations to update the structural coordinates and velocities. Transfer the structural motion to the moving surface. Update the ow solution for the new surface position and velocity. The aeroelastic functionality in the present version of Edge is restricted to a modal representation of the structural model. In such a formulation, the time varying coordinates x(t) of the structural grid are represented as a linear combination of a set of constant modal basis vectors, k , of the form
Nm

x(t) = x0 +
k=1

qk (t)k .

(152)

Here, x(t) is a long column vector containing the coordinates (degrees of freedom) of nodes in the structural grid, and x0 is the same vector at time zero x(0). The scalar variables qk (t), are Lagrangian generalized coordinates also called modal coordinates. The modal basis vectors, k , also known as modeshapes, are vectors of the same class as x(0).

2.11.1

Aeroelastic Analysis using Natural Mode Shapes

For a very wide class of mechanical systems, the dynamics for small displacements can be accurately represented by a linear differential equation of the form M x + C x + Kx = f, (153)

where, as in equation (152), x is the vector of structural coordinates, and f (t) is the corresponding vector of structural forces. The mass, damping and stiffness matrices, M , C, and K respectively, are real and symmetric. The three structural matrices are in most cases sparsely populated and in practice usually hidden in the variables of a nite element structural model, for example a Nastran model. For the special case when the structural damping matrix, C, and the vector of external forces, f , are both zero, equation (153) reduces to a generalized eigenvalue problem,
2 Kk = k M k .

(154)

The solution eigenvectors k comprise a set of normal modes with modal angular frequencies, k , where k [1, N ] and N is the dimension of x (number of structural degrees 44

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

of freedom). It can be shown that the eigenvectors, k , satisfy the orthogonality conditions T M k = ak jk , j T Kk = ak k jk , j (155)

in which the normalization constant, ak , is known as the generalized mass for mode k. The eigenvalue problem is usually solved using an algorithm which extracts the eigenvectors in order of increasing k and the modal basis is truncated at order Nm N , such that k < Nm for k < Nm . Using the truncated modal basis, the structural equation of motion (153) can be reduced to a set of Nm scalar equations, coupled only through the external force term. Using (152) and premultiplying (153) by the transpose of k and using the orthogonality conditions (155) the equation of motions can be reduced to the form,
2 ak qk + 2k ak k qk + ak k qk = Qk ,

k [1, Nm ],

(156)

where k is the damping ratio for mode k and Qk = T f, k (157)

is the corresponding generalized force, or modal force. It is assumed that the structural damping matrix, C, is a linear combination of the mass and stiffness matrices M and K. This is a standard approximation and is known as proportional or Rayleigh damping. The modal equation of motion (156) is a simple diagonal system and, unlike equation (153) can be integrated without any matrix operations. However, this requires that the modal generalized forces Qk must be calculated at each time step and this presents a problem. The forces and modeshapes in equation (157) are dened on the structural grid but the forces computed by the ow solver are dened on the wetted surface boundary grid and these are usually completely separate point sets. This is known as the spatial coupling problem and arises in all partitioned aeroelastic methods. For small displacements and modal systems, however, the solution is relatively simple. We assume that there exists a constant linear transformation matrix, H, which maps displacements from the structural grid to the wetted surface grid. This transformation can be applied to the modal basis vectors to generate a corresponding set of modeshapes dened on the wetted surface W = HS , (158) k k where the labels W and S refer respectively to the wetted surface and structural grids. We now impose an energy conservation condition: that the work done by an arbitrary innitesimal displacement is invariant under the inter-grid transformation H. This may be written in the form W = (xS )T f S = (xW )T f W , (159) where the labeling is the same as in equation (158) and W is a scalar work integral. From this, it follows that for any linear displacement transformation, H, there is a unique, matching transformation which maps forces from the wetted surface to the structural grid HT f W = f S. (160)

From equation (157) it can be seen that the modal force Qk is dimensionally a work integral and is also invariant under a conservative transformation of the form given in equation (158) and (160). 45

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

For any modal system it is therefore necessary only to nd a suitable linear transformation and to compute a set of modeshapes transformed onto the wetted surface grid. The force transformation is hidden in the integral Qk so the explicit transformation matrix, H, is not required. This transformation of modeshapes is performed using the program aedbelast in the Edge system.

2.11.2

Structural Deformation and Moving Grids

In any aeroelastic simulation, the change in shape of the elastic body is determined by the solution of the structural mechanics or structural dynamics equations. The volume mesh which forms the computational domain for the ow solver must in turn be deformed such that it remains conformed to and connected with the moving boundary surface. The mesh deformation must also be such that the cell volumes remain positive and mesh quality properties are not compromised. It must be emphasized that in Edge, and similar unstructured codes, mesh deformation operations are applied to the primary grid nodes. In an aeroelastic computation, the dual grid metrics, surfaces and volumes, are re-computed after every incremental deformation of the primary grid. However, the connectivity of the mesh, including the agglomeration multigrid structure, remains constant. Mesh deformation is in general a rather complicated problem and there are several different methods available. One approach, which is used in the Tritet mesh generator, is to treat the volume mesh as a quasi-elastic system and solve a eld problem. The relevant components of Tritet are supplied in the Edge mesh adaption system and are accessed via the command line script aetribend. In the present version of Edge, elastic moving grids are implemented using a modal perturbation eld method in which the main deformation computation is performed off line in a preparatory operation. The programs used for this are aexbset, adbelast, aetribend and aeputpert and the procedure is described in the Edge User Manual. The perturbation eld method is based on an extension of the modeshape into the volume mesh. For each wetted surface modeshape, a matching deformed mesh is calculated using a mesh deformation tool. This mesh has the same connectivity as the base mesh so the difference can be represented simply by a perturbation eld comprising the node deections. The modal perturbation elds are stored and the time-varying coordinates of the primary mesh are rapidly computed using an expression similar to (152),
Nm

X(t) = X0 +
k=1

qk (t)Xk ,

(161)

where X0 is the coordinates eld of the basic mesh read from Edge.bmsh and Xk is the perturbation eld for mode k computed in preprocessing, using the ae programs of the Edge system. The perturbation eld method is inefcient in two respects: a full volume vector eld is stored for each mode and the deection elds are computed for deections of arbitrary magnitude rather than for the actual deection of the moving surface. It is also limited exclusively to modal systems. It has been implemented in Edge mainly for continuity with the older structured mesh code Euranus. In future versions of Edge it will be superseded by a system using on line mesh deformation. 46

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

2.11.3

Prescribed Motion Solutions

For prescribed motion solutions, the Edge.amot input le is used to set the exact behavior of the vector of modal coordinates, q(t), as a function of time. The vector, q(t), is thus a known input signal and the computed vector of aerodynamic modal forces, Q(t), is an output. The time history of both these modal vectors is recorded in the residuals le Edge.bres. The main application for prescribed solutions is the computation of aerodynamic transfer functions, which is a standard practice in the Aircraft industry. Typically, the motion would be prescribed as single mode input, with a selected pulse prole and generalized forces would be computed for the whole mode set. Using digital signal processing techniques, a linear, frequency domain SIMO (Single Input Multiple Output) analysis would be performed to extract one row of a transfer function matrix, H(), as dened in the expression Q() = H()(). q (162)

Linear transfer functions of this form can be used for utter prediction and dynamic loads calculations. More advanced, system identication, procedures are also available which can capture the non-linear dynamics of the modal system. However, no such functions are provided in the present code. Another application for modal prescribed motion solutions is the simulation of large displacement motions whilst still using the perturbation eld method. For example, large angle, rigid body rotations can be modeled by scheduling a sequence of perturbation elds for incremental rotations.

2.11.4

Generalized Forces

The generalized aerodynamic forces of (156) and (157) are surface integrals of pressure and viscous forces over the moving wall boundary. The integrals may be written Qk
aerodynamic

=
wall-boundary

T Xk (pn + n)dS,

k = 1, . . . , Nm ,

(163)

and are computed at each time step. Together with the modal coordinates these forces are stored in the residual time history le Edge.bres. The displacements needed for this integral are only on the boundary. Hence they have the same form regardless if the perturbation eld is given in the whole of the ow domain or only on the boundary. The generalized forces Qk can be used in post processing to obtain aerodynamic transfer functions or directly in the integration of the structural equations of motion (156).

2.11.5

Coupled Solution of the Modal Equations of Motion

The equations (156) are now written in the form A + Dq + Eq = Q. q (164)

where the matrix A is the diagonal modal generalized mass matrix with elements ak on the principal diagonal, D is a diagonal generalized damping matrix with elements 2k ak k , E 2 is the diagonal generalized stiffness matrix with elements ak k on the principal diagonal and, Q, is the vector of generalized forces. The generalized force vector, Q, includes the 47

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

aerodynamic surface loads, (163), and any forces on the structural grid, such as gravitation, centrifugal forces and direct mechanical inputs like weapon release loads. The modal equation of motion is discretized using a centered difference scheme for the time derivatives with a three point time averaging of the modal coordinates and forces dened as 1 q = (q n+1 + q n + q n1 ), 4 and Q= n+1 1 n n1 Q + Q + Q , 2 2 2 (166) (165)

respectively. The weights on the modal coordinates, q n , are chosen such that, for the unforced, undamped case, D = 0; Q = 0 and the total energy is conserved exactly. Formally, En+1/2 En1/2 = 0, n, where, En+1/2 = 1 1 (q n q n1 )T M (q n q n1 ) + (q n + q n1 )T M (q n + q n1 ). (167) 2(t)2 4

The same weights are usually chosen for the modal forces, = 1/2, which gives a robust and accurate scheme. Note that the scheme is implicit in q n+1 except for the special case when = 0. The update formula for q n+1 is given by 1 n n1 q n+1 = A1 A0 q n A1 q n1 + Qn+1 + Q + Q 1 2 2 2 where 1 1 A1 = 2 M + D + , 2 4 and = 1/t. Due to the orthogonality relations (155) matrices A1 , A0 and A1 are diagonal, which means that the modal coupled equation of motion can be integrated without solving an inverse problem. At each time step, n, the update equation (168) is iterated within the inner loop of the dual time stepping process, until the specied convergence is reached. The update equation is solved very rapidly, however, each time the vector of modal coordinates changes, a more time-consuming process is initiated: the primary mesh is moved and the metrics of the dual mesh are recomputed. The coupled process can be speeded up by reducing the number of structural updates within the inner loop using the parameter NITIN in the main input le. Modal parameters, are set using the le Edge.amop. The main modal parameters are the natural frequency, k , generalized mass, ak , damping ratio, k , and the initialization values for the modal coordinates and velocities. The modal frequency and generalized mass can be supplied together with the structural modeshape data via the MODES DEFINITION dataset in the, .amod, le and are automatically carried through to the Edge.bmos le which is read into Edge. However, these values are overridden by any settings in the Edge.bmos le. 48 1 1 A1 = 2 M D + , 2 4 1 A0 = 2 2 M + , 2 (169) (168)

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

2.12

Vortex Generator Model

The vortex generator model enables to calculate the effect of vortex generator without need to embed the actual geometry of the vortex generator into the computational mesh Jir sek a (2005). The model is based on Bender, Anderson and Yagle model which adds the source term Li to the NavierStokes equations Vi ui t =
j

FM S + Li FE S + ui Li
j

(170) (171)

E Vi t The source term is calculated as

Li = CV G SV G

Vi u2 l Vm

(172)

where CV G is the model constant, SV G is the planparallel area of vortex generator, Vi is the volume of the cell where the force is calculated, Vm is the sum of volumes of cells where the force term is applied, is the angle of local velocity u to the vortex generator and l is the unit vector on which the side force acts. The source term is calculated on the mean surface of the vortex generators and then linearly redistributed to the surrounding points of the computational mesh. In the implementation, the model constant CV G is kept constant and has value CV G = 10.

49

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

References

BATTOO , R. S. 1999 An introductory guide to the literature in Aeroelasticity. Aeronautical Journal 2401, 511518. B ERGLIND , T. 2000 An Agglomeration Algorithm for NavierStokes Grids. AIAA Paper 20002254. C ONWAY, S. 2004 Implementation and Validation of an Engine Nacelle Boundary Condition in Edge 3.2. Scientic Report FOI-R--1320--SE. Computational Physics Department, Aeronautics Division, FOI. E ISFELD , B. 2003 Die Eigenwerte des Systems aus RANS- und ReynoldsSpannungsgleichungen. Tech. Rep. IB 124-2003/1. DLR. E LIASSON , P. & N ORDSTR OM , J. 1996 Computations and Measurements of Unsteady Pressure on a Delta Wing with an Oscillating Flap. In Proceedings to ECCOMAS 1996, pp. 478484. E LIASSON , P. & WALLIN , S. 2000 Positive Multigrid Scheme with Two-Equation Turbulence Models. In Proceedings to ECCOMAS 2000. G NOFFO , P. A. 1990 An Upwind-Biased, Point-Implicit Relaxation Algorithm for Viscous, Compressible Perfect-Gas Flows. Technical Report NASA TP-2953. NASA. H AASELBACHER , A., M C G UIRK , J. & PAGE , G. 1999 Finite Volume Discretization Aspects on Mixed Unstructured Grids. AIAA Journal 37 (2), 177184. H ELLSTEN , A. 1998 On the solid-wall boundary condition for w in the k - type turbulence modes. Scientic Report Report No B-50, Series B. Helsinki University of Technology. H ELLSTEN , A. 2005 New advanced k turbulence model for high-lift aerodynamics. AIAA Journal 43 (9), 18571869. J IR ASEK , A. 2005 Vortex-generator model and its application to ow control. Journal of Aircraft 42 (6), 14861491. J IR ASEK , A. 2006 Mass ow boundary conditions for subsonic inow and outow boundary. AIAA Journal, 44 (5), 939947. KOK , J. C. 2000 Resolving the dependence on freestream vales of the k turbulence model. AIAA Journal 38, 12921295. M ARTINELLI , L. 1987 Calculation of Viscous Flows with Multigrid Methods. PhD thesis, MAE Department, Princeton University. 50

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

M ENTER , F. R. 1994 Two-equation eddy-viscosity turbulence models for engineering applications. AIAA Journal 32 (8), 15981605. P ENG , S.-H. 2005 Hybrid RANS-LES modelling based on zero- and one-equation models for turbulent ow simulation. In Proceedings of 4th Int. Symp. Turb. and Shear Flow Phenomena, , vol. 3, pp. 11591164. P ENG , S.-H. 2006 Algebraic hybrid RANS-LES modelling applied to incompressible and compressible turbulent ows. AIAA Paper 20063910. P ENG , S.-H., DAVIDSON , L. & H OLMBERG , S. 1997 A modied low-Reynolds-number k model for recirculating ows. ASME J. Fluids Engng 119, 867875. S LATER , J. W. 2001 Verication assessment of ow boundary conditions for cfd analysis of supersonic inlet ows. AIAA Paper 20013882. S MAGORINSKY, J. 1963 General circulation experiments with the primitive equations. Monthly Weather Review 91 (3), 99164. S MITH , J. 2005 Aeroelastic functionality in Edge, Initial Implementation and Validation. Scientic Report FOI-R--1485--SE. Computational Physics Department, Aeronautics Division, FOI. S PALART, P. R. & A LLMARAS , S. R. 1994 A one-equation turbulence model for aerodynamic ows. La recherche Aerospatiale 1, 521. S PALART, P. R., J OU , W.-H., S TRELETS , M. & A LLMARAS , S. R. 1997 Comments on the feasibility of les for wings and on a hybrid rans/les approach. In Advances in DNS/LES: Proceedings of the First AFOSR International Conference on DNS/LES (ed. C. Liu & Z. Liu). Greyden Press, Columbus. S PEZIALE , C. G., S ARKAR , S. & G ATSKI , T. G. 1991 Modelling the pressure-strain correlation of turbulence. J. Fluid Mech. 227, 245272. WALLIN , S. & J OHANSSON , A. V. 2000 An explicit algebraic Reynolds stress model for incompressible and compressible turbulent ows. J. Fluid Mech. 403, 89132. WALLIN , S. & J OHANSSON , A. V. 2002 Modelling streamline curvature effects in explicit algebraic Reynolds stress turbulence models. International Journal of Heat and Fluid Flows 23 (5), 721730. W ILCOX , D. C. 1988 Reassessment of the Scale Determining Equation for Advanced Turbulence Models. AIAA Journal 26 (11), 12991310. W ILCOX , D. C. 1994 Simulation of Transition with a Two-Equation Turbulence Model. AIAA J. 32, 11921198.

51

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

52

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

Appendix

A.1

3D Inviscid Jacobians and Eigenvectors

The 3D Euler system is written as q+ F+ G+ H = 0, t x y z (173)

where q = (, u, v, w, E)T are the conservative variables. Introducing the Jacobian of the conservative variables A, B, and C gives q + A q + B q + C q = 0, t x y z Alternatively the primitive variables may be used, denoted v = (, u1 , u2 , u3 , p)T v + A v + B v + C v = 0, t x y z (175) (174)

where A, B, and C are the Jacobians of the primitive variables, denoted non-conservative Jacobians. With the transformation matrix M= q, v (176)

between primitive and conservative variables the following relations between the Jacobians hold A = M 1 AM, B = M 1 BM, and C = M 1 CM. (177) Introducing the notation An = nx A + ny B + nz C, the conservative Jacobians can be made diagonal as follows An = RR1 , and the non-conservative Jacobians An = nx A + ny B + nz C, can be made diagonal as An = LL1 . (181) The diagonal matrix contains the eigenvalues to the Jacobians An and A, the matrices R and L contain the right eigenvectors as columns to the conservative and non-conservative 53 (180) (179) (178)

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

Jacobians, respectively. The eigenvectors given below are scaled in such a way that the characteristic variables have the dimension of a pressure. Note that the scaling of the eigenvectors is not unique, nor is the choice of the eigenvectors. The matrices are the following 1 u 1 M = u2 u 3
u2 2

0 0 0 0 0 0 0 0 0 u1 u2 u3 0 0

0 0 0 0
1 1

(182)

M 1

0
1

u1 u = 2 u3
u2 2

1 0 1 0 0 ( 1)u1 ( 1)u2 ( 1)u3

0 0 0

0 0 0 0 1

(183)

c2

0 L = nz c ny c 0

ny c2 nz c

nz c2 n

0
nx c

c nx c

0 0

1 c2 nx c ny c nz c

1 c2 nx c ny c nz c

(184)

L1

nx c2 0 nz c ny c nx ny c2 nz c 0 nz c ny 2 ny c nx c 0 nz = nz c ny c nx c nz c 1 0 2 2 2 2 n c 1 0 nx c y nz2c 2 2 2

(185)

un 0 0 0 0 0 un 0 0 0 0 0 un 0 0 = 0 0 0 un+c 0 0 0 0 0 unc

(186)

R = ML =

nx c2 u1 nx c2 u2 nx +cnz c2 u3 nz cny c2 |u|2 nx 2c2 + a1

ny c2 u1 ny cnz c2 u2 ny c2 u3 ny +cnx c2 |u|2 ny 2c2 + a2

nz c2 u1 nz +cny c2 u2 nz cnx c2 u3 nz c2 |u|2 nz 2c2 + a3

1 c2 u1 +cnx c2 u2 +cny c2 u3 +cnz c2 H+c(un) c2

1 c2 u1 cnx c2 u2 cny c2 u3 cnz 2 c Hc(un) c2

(187)

where a1 = (u2 nz u3 ny )/c, a2 = (u3 nx u1 nz )/c, a3 = (u1 ny u2 nx )/c. 54 (188)

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

R1

nx c2 b2 b1 u 1 n x b1 u2 nx + nz c b1 u3 nx ny c b1 nx b4 n c2 b b u n n c b1 u 2 n y b1 u3 ny + nx c b1 ny b5 z y 2 1 1 y n c2 b b u n + n c b u n n c b1 u 3 n z b1 nz b6 (189) = z 2 1 1 z y 1 2 z x c2 cny b1 u2 1 cnx b1 u1 cnz b1 u3 2 b3 2 2 2 2 cny b1 u2 1 cnx b1 u1 cnz b1 u3 c2 2 b3 2 2 2 2 b1 = 1, b2 = 1 ( 1)M 2 /2, b3 = ( 1)M 2 /2 (u n)/c, b4 = c(u2 nz u3 ny ), b5 = c(u3 nx u1 nz ), b6 = c(u1 ny u2 nx ), (190)

where

and where H is the total enthalpy H= E+p c2 1 = + |u|2 1 2 (191)

and c the speed of sound and M = |u|/c the Mach number.

55

FOI dnr 03-2870

Edge Theoretical Formulation

Issue 4.1.0

56

FOI is an assignment-based authority under the Ministry of Defence. The core activities are research, method and technology development, as well as studies for the use of defence and security. The organization employs around 1350 people of whom around 950 are researchers. This makes FOI the largest research institute in Sweden. FOI provides its customers with leading expertise in a large number of elds such as security-policy studies and analyses in defence and security, assessment of different types of threats, systems for control and management of crises, protection against and management of hazardous substances, IT-security an the potential of new sensors.

FOI Swedish Defence Research Agency SE-164 90 STOCKHOLM

Tel: + 46 8 555 03000 Fax: + 46 8 555 03100

www.foi.se

You might also like