• No results found

A Parallel Multiblock Structured Grid Method with Automated Interblocked Unstructured Grids for Chemically Reacting Flows.

N/A
N/A
Protected

Academic year: 2020

Share "A Parallel Multiblock Structured Grid Method with Automated Interblocked Unstructured Grids for Chemically Reacting Flows."

Copied!
124
0
0

Loading.... (view fulltext now)

Full text

(1)

ABSTRACT

SPIEGEL, SETH CHRISTIAN. A Parallel Multiblock Structured Grid Method with Automated Interblocked Unstructured Grids for Chemically Reacting Flows. (Under the direction of Dr. Hong Luo.)

(2)

© Copyright 2013 by Seth Christian Spiegel

(3)

A Parallel Multiblock Structured Grid Method with Automated Interblocked Unstructured Grids for Chemically Reacting Flows

by

Seth Christian Spiegel

A dissertation submitted to the Graduate Faculty of North Carolina State University

in partial fulfillment of the requirements for the Degree of

Doctor of Philosophy

Aerospace Engineering

Raleigh, North Carolina 2013

APPROVED BY:

Dr. Hassan A. Hassan Dr. Robert E. White

Dr. Jack R. Edwards, Jr. Co-chair of Advisory Committee

Dr. Hong Luo

(4)

DEDICATION

To my beautiful and loving wife Christy

and to my parents Jamie and Rhea Ann.

(5)

BIOGRAPHY

Seth Spiegel was born August 30, 1984 in Austin, Texas to Jamie and Rhea Ann Spiegel. He attended St. Paul Lutheran School from Pre-Kindergarten until 8th grade while growing up in the Austin suburb of Pflugerville. In 2002, he graduated from Pflugerville High School and enrolled at Texas State Univeristy in San Marcos, Texas.

(6)

ACKNOWLEDGMENTS

I would like to thank Dr. Luo and Dr. Edwards for the opportunity they have provided me in furthering my education. I would also like to thank Dr. Hassan, Dr. DeJarnette, and Dr. White for their support and wisdom.

(7)

TABLE OF CONTENTS

List of Tables . . . vii

List of Figures . . . viii

Chapter 1 Introduction . . . 1

Chapter 2 Governing Equations . . . 6

2.1 Navier-Stokes Equations . . . 6

2.2 Thermodynamic Closure . . . 7

2.3 Chemical Reaction Mechanism . . . 10

2.4 Turbulence Equations . . . 11

2.4.1 Turbulence Wall Functions . . . 13

Chapter 3 Numerical Methods . . . 16

3.1 Finite Volume Discretization . . . 16

3.2 Inviscid Fluxes . . . 17

3.3 Viscous Fluxes . . . 19

3.3.1 Mixed-Averaging Formulation . . . 19

3.3.2 Least Squares Formulation . . . 20

3.3.3 Accuracy Comparison with Blasius Solution . . . 23

3.4 Time Integration . . . 24

3.4.1 Explicit Time Integration . . . 24

3.4.2 Implicit Time Integration . . . 27

3.5 Parallel Implementation . . . 32

3.5.1 Domain Partitioning . . . 33

3.5.2 Inter-Processor Communication . . . 34

Chapter 4 Verification of FVFLO-NCSU . . . 39

4.1 Low Reynolds Number Sphere . . . 39

4.2 Supersonic Turbulent Diffusion Flame . . . 40

4.3 REST Scramjet Inlet . . . 46

Chapter 5 Unstructured Patch Grid Generator . . . 56

5.1 Triangulated Surface Grid . . . 57

5.2 Unstructured Grid Generation . . . 64

5.2.1 Advancing Front Technique . . . 66

5.2.2 Constrained Delaunay Triangulation . . . 67

5.3 Unstructured Patch Grid Finalization . . . 68

Chapter 6 Installation within Vulcan . . . 72

6.1 Preprocessor . . . 72

6.1.1 Load Balancing . . . 74

(8)

6.2.1 General . . . 80

6.2.2 Unstructured Cut Boundaries . . . 81

6.3 Postprocessor . . . 86

6.3.1 CFD General Notation System . . . 86

Chapter 7 Hybrid Results . . . 87

7.1 Reacting Supersonic 15° Compression Corner . . . 87

7.2 Supersonic Flat Plate . . . 89

7.2.1 Laminar Flow . . . 89

7.2.2 Turbulent Flow . . . 91

7.3 Supersonic Flow over a Bump . . . 91

7.3.1 Single Non-C0 Patch Boundary . . . 91

7.3.2 Two Non-C0 Patch Boundaries . . . 101

Chapter 8 Summary and Conclusions . . . 105

(9)

LIST OF TABLES

Table 4.1 Comparison of the integrated forces and loads for the REST scramjet inlet between VULCAN and FVFLO-NCSU. . . 55 Table 6.1 Weighting coefficients for unstructured block load balancing. . . 78 Table 7.1 Distribution of the blocks across the processors and the resulting parallel

performance for the two-bump simulation with one patch interface. . . 99 Table 7.2 Distribution of the blocks across the processors and the resulting parallel

(10)

LIST OF FIGURES

Figure 1.1 Multiblock grid separated into regions for use in VULCAN. . . 5

Figure 3.1 Formation of the union cell c from cellsiand j. . . 20

Figure 3.2 Comparison between the different viscous flux formulations for computing the skin friction coefficient of the Blasius problem on grids of varying mesh stretching. . . 25

Figure 3.3 Transformation of an unstructured mesh into its dual graph. . . 33

Figure 3.4 Partitioning an unstructured mesh using MeTiS. . . 34

Figure 3.5 Stencils for inter-processor communication. . . 37

Figure 4.1 Laminar flow past a sphere at a Mach number of 0.3 and Reynolds number of 117. . . 40

Figure 4.2 Mesh for zero-thickness splitter plate. . . 41

Figure 4.3 Temperature contours for zero-thickness splitter plate. . . 42

Figure 4.4 Outflow profiles for zero-thickness splitter plate. . . 43

Figure 4.5 Parallel speedup for the zero-thickness splitter plate. . . 44

Figure 4.6 A configuration of three modular REST inlets. The surfaces that embody the actual computational mesh are shown in red. . . 45

Figure 4.7 The computational mesh used for REST inlet simulations. Only one-quarter of the grid points are shown for extra clarity. . . 46

Figure 4.8 Static temperature contour slices for a REST inlet. . . 48

Figure 4.9 Mach number contour slices for a REST inlet. . . 49

Figure 4.10 Ratio of eddy/molecular viscosity contour slices for a REST inlet. . . 50

Figure 4.11 Turbulence kinetic energy contour slices for a REST inlet. . . 51

Figure 4.12 Turbulence frequency contour slices for a REST inlet. . . 52

Figure 4.13 Surface contours for the REST inlet. The top figure shows the surface heat-ing load whereas the bottom figure shows the surface shear stress force. . 53

Figure 5.1 Steps in converting patch interfaces to unstructured-mesh regions. . . 57

Figure 5.2 Strips of unstructured cells used for patching a non-C0 interface. . . . 58

Figure 5.3 Unstructured surface meshes for a flat plate. . . 60

Figure 5.4 Disparity between structured blocks at the non-C0 interface. . . 61

Figure 5.5 Initial triangular front for unstructured mesh creation. . . 62

Figure 5.6 Surface mesh of finalized unstructured patch at the non-C0 interface. . . . 63

Figure 5.7 Multiple views of a completed unstructured patch . . . 71

Figure 6.1 Differences in computational cost between the structured and unstructured flow solvers using the same grid for varying flow parameters. . . 77

(11)

Figure 7.1 Flow contours for a reacting inviscid supersonic flow into a 15° compression corner. The solution above thex-axis is a structured-mesh block solved by VULCAN’s algorithms. The solution below the x-axis is an unstructured-mesh block solved using the FVFLO-NCSU algorithms that have been

in-tegrated into VULCAN. . . 88

Figure 7.2 Grids used for computing supersonic flow over a flat plate. The original grid patched using the traditional method within VULCAN is shown in red whereas the grid with an unstructured patch is shown in blue. . . 90

Figure 7.3 A closeup of the unstructured patch grid. . . 90

Figure 7.4 Flow contours for a laminar flat plate. . . 92

Figure 7.5 Flow contours for a turbulent flat plate. . . 93

Figure 7.6 Residual convergence comparison between the traditional patching method and the unstructured grid patching method for a supersonic flat plate. . . 94

Figure 7.7 Patch-yz grid configuration and the resulting configuration when patched using the unstructured patch grid generator. . . 95

Figure 7.8 Detailed views of the unstructured patch grids for the supersonic flow over a bump test case. . . 95

Figure 7.9 Flow contours for supersonic flow over a bump using the patch-y and hybrid-y grids. . . 97

Figure 7.10 Flow contours for supersonic flow over a bump using the patch-yz and hybrid-yz grids. . . 98

Figure 7.11 Residual convergence for the serial computation of supersonic flow over a bump. . . 98

(12)

Chapter 1

Introduction

C

omputationalFluid Dynamics (CFD) tools are a key component in the design-validation cycle of the development of the air-breathing propulsion system for the Highly Reliable Reusable Launch System (HRRLS). It is required that the CFD tools provide the predictions of the internal flow field in a propulsion system not only accurately, but also efficiently. NASA’s VULCANa (Viscous Upwind aLgorithm for Complex Flow ANalysis) code,1, 2 a multiblock structured-mesh Navier-Stokes solver for general reactive flows, is considered the state of the art for simulating such internal flows characteristic of high-speed propulsion systems. VULCAN is currently maintained by the Hypersonic Airbreathing Propulsion Branch (HAPB) at NASA Langley Research Center (LaRC) and has been developed over the past fifteen-plus years by Jeffery White, Robert Baurle, and various other co-workers.

VULCAN contains many features that are common to structured-mesh solvers, including generalized block-to-block connectivity (bothC0continuous and non-C0continuous block inter-faces), MPI parallelism, multigrid methods, and high-resolution upwind-differencing schemes. Parabolized and Full Navier-Stokes methods can be used for predominately supersonic flows, and time-derivative preconditioning can be used for more accurate simulations of very low speed flows. VULCAN also supports a number of one and two-equation turbulence models including a hybridization of Reynolds-averaged Navier-Stokes (RANS) methods and large eddy simulation (LES) methods. The grid resolution necessary to resolve turbulent boundary layers can also be reduced through the use of special turbulent wall treatments. VULCAN offers thermodynamic and kinetic model flexibility through the option of simulating a calorically perfect gas or an arbitrary mixture of frozen or chemically reacting thermally perfect gases.

In most cases, structured meshes are near optimal for aeropropulsion systems, but as the systems become more geometrically complex, the total amount of time required to conduct a tip-to-tail analysis of a new configuration is dominated by the time required to generate a high

a

(13)

quality structured mesh. Resolution of large arrays of fuel injector ports, for example, requires the use of fine structured meshes in the vicinity of the injector ports, but other regions (nozzles or straight combustor sections) do not require such fine resolution. To handle such situations economically, VULCAN currently uses a patched-mesh approach that allows non-C0 connec-tivity across block interfaces. Establishing the proper connecconnec-tivity is a nontrivial task which greatly increases the time required for setting up a problem. Furthermore, the interpolation methods used for patching non-C0 interfaces are not guaranteed to be conservative. An alter-native to a patching procedure is the use of unstructured, regional meshes that primarily serve to facilitate the transition between blocks with non-C0 interfaces.

Developing a stand-alone unstructured-mesh reactive-flow solver is certainly possible and is being pursued by a number of groups.3–7 However, the current work is built on the recog-nition that internal flows in ramjet/scramjet engines are nearly optimal for structured-mesh topologies. Such flows typically contain one direction which is aligned with the dominant mo-tion of flow. The transverse direcmo-tions typically require fine mesh stretching to resolve thin viscous layers, leading to high-aspect-ratio quadrilateral meshes. Relaxation or space marching in the streamwise direction, combined with an ADI or ILU implicit method for the transverse directions, provides a very efficient means of advancing the solution. The use of regular mesh orderings renders the relaxation process efficient in terms of computer memory usage, cache access, and overall execution time. Unstructured-mesh solvers, in general, cannot take advan-tage of possible flow alignment or nearest-neighbor access when used on structured meshes. As a result, space marching and other methods which rely on the underlying structure of the grid are incompatible with unstructured algorithms. By embedding an unstructured-mesh solver into VULCAN to take advantage of its superior ability to resolve complicated, local features, VULCAN’s efficient structured-mesh algorithms can be retained for the majority of the flow field.

A similar approach called DRAGON (DragonReplacement of ArbitraryGridOverlapping byNon-structured Grid) was developed at NASA Glenn Research Center from 1994 to 2003.8–11 The DRAGON framework was designed to replace regions of overlapping mesh in overset-grid methods with local unstructured meshes. The underlying idea behind this concept was preserving conservation between grid blocks through the elimination of interpolation methods to transfer information, the same principle guiding the work presented here. In the final evolution of the DRAGON concept, two established NASA flow solvers (OVERFLOW12, 13and USM3D14, 15) were weakly coupled together to solve viscous and inviscid flows on three-dimensional DRAGON meshes.

(14)

the unstructured flow solver will be integrated tightly within VULCAN, rather than being loosely coupled to it. The OVERFLOW/USM3D coupling described in Ref. 9 required the development of special fictitious structured grids to handle node-based (OVERFLOW) and cell-centered (USM3D) discretizations. The present work avoids this entirely through use of a similar cell-centered finite-volume method employed by VULCAN for the unstructured-mesh flow solver. Finally, the current framework focuses on chemically-reactive flows, which lead to larger, stiffer equation systems requiring robust and efficient implicit flow solvers for the structured and unstructured mesh systems.

The significance of this research is that it provides a method for utilizing unstructured- and mesh technology where each is the most optimal and most efficient. As structured-mesh regions will be solved using the original VULCAN algorithms, memory and CPU overhead associated with a fully unstructured approach will be minimized. The unstructured “patches” will provide a natural means of ensuring conservation and maintaining ease of mesh generation as well as providing the flexibility to handle complex features within high-speed aeropropulsion devices, such as fuel injector ports, cavity flame holders, vortex generators, and other flow obstructions.

However, if unstructured meshes are to be used to patch non-C0 interfaces, VULCAN must have the ability to generate a solution within these patch grids. This unstructured solver must be capable of replicating solutions produced by VULCAN on structured grids for confidence to be found in the unstructured patch solutions. Therefore, the unstructured solver was developed as a stand-alone code and separate from VULCAN in order to verify the unstructured solu-tions through comparison with solusolu-tions found by VULCAN. Clearly, VULCAN provides an expansive suite of capabilities but only certain features have been prioritized for initial inclusion within the unstructured-mesh solver. These features include but are not limited to: explicit and implicit time-integration of the Euler and Full Navier-Stokes equations in three dimensions, MPI parallelism, high resolution upwind-differencing schemes, arbitrary mixtures of frozen or chemically reacting thermally perfect gases based on VULCAN’s thermodynamic and chemical reaction database files, Wilcox’s 1998 kω model with corresponding wall matching functions. To summarize, the scope of this project can be separated into three primary tasks. The first task involves the creation and verification of a stand-alone unstructured-mesh solver that is capable of solving chemically reacting flows on unstructured grids. The second task encom-passes the creation of the unstructured patch grid generator. The final task entails coupling the unstructured solver and patch grid generator with the VULCAN code. The following chapters use these three tasks in the order presented as the underlying framework for this document.

(15)

chemically reacting flows on unstructured grids. Chapter 3 describes the numerical methods used in solving said equations and finally chapter 4 presents the results of various test cases in an effort to validate the fidelity of the unstructured solver. Additional details regarding FVFLO-NCSU can be found in Ref. 24–27.

The second task of creating the unstructured patch grid generator is described in chapter 5 which breaks the process down in to three phases: 1) creation of the triangulated surface grid for the void at the interface; 2) triangulation of the interior of the void using a 3D mesh generator; and 3) finalization of the unstructured patch grid. Each of these phases are expanded in detail including discussions on the advancing front technique and constrained Delaunay triangulation which are the two methods used for generating the interior tetrahedral grids.

The final task is detailed in chapters 6 and 7. Chapter 6 describes the process of installing the unstructured solver and patch grid generator within VULCAN. Included in this discussion are descriptions of the numerous unstructured additions to VULCAN, reasonings behind various decisions, and any difficulties encountered during the installation process. Finally, chapter 7 presents numerous simulations aimed at testing various aspects of the unstructured additions to VULCAN.

A quick overview of the grid hierarchy and connectivity used by VULCAN is needed before continuing with the following chapters. The total computational domain for a simulation solved by VULCAN is given by a single grid file written in the PLOT3D file format. The computational domain is subdivided into a nonoverlapping set of ‘blocks’ with each block consisting of an ijk ordered set of finite-volume grid cells. The PLOT3D grid file describes each structured block by giving the nodal dimensions of each block and the coordinates for each node. How each of these blocks are used within the solver and the connectivity between blocks is provided separately by the VULCAN input file.

The VULCAN input file assigns each block to a ‘region’ which simply groups together blocks solved simultaneously using a common algorithm. One of the primary uses of multiple regions is to separate blocks solved using an elliptic method from those using a space-marching algorithm. An example of a computational grid composed of multiple blocks and separated into regions is given in figure 1.1. In this figure, there exists a total of eight blocks divided into five regions which are identified by blocks outlined by the same color. Three additional rules apply to the way regions are set up and used: 1) regions are solved in ascending order; 2) marching blocks that connect across block i-faces must be in different regions; and 3) marching blocks can be marched in thei-direction only. Because unstructured grids are incapable of using space-marching methods, all unstructured blocks will need be assigned to elliptical region.

(16)

1. Block: A logicali,j, kgroup of grid nodes or cells

2. Region: A group of blocks solved simultaneously using a common algorithm a) Spatially elliptic: EB,R; Solve block B in region R using an elliptic algorithm

b) Spatially marched: MB,R; Solve block B in region R using a space marching algorithm

Figure 1.1: Multiblock grid separated into regions for use in VULCAN.

(17)

Chapter 2

Governing Equations

The overall goal in the development of the unstructured grid CFD flow solver was to provide VULCAN with the facility to utilize unstructured grids and complement its already expansive suite of capabilities. With this goal in mind, the unstructured solver is required to possess a fundamental subset of VULCAN’s capabilities in order to successfully complement the struc-tured grid solver. This fundamental subset of features was selected for functionality and ver-satility and includes but is not limited to: explicit and implicit time-integration of the Euler and Full Navier-Stokes equations in three dimensions, spatial discretization using high resolu-tion upwind-differencing schemes, arbitrary mixtures of frozen or chemically reacting thermally perfect gases, and turbulence modeling via Wilcox’s kω turbulence model.28–30 Within this chapter, the following sections expand in detail the governing equations comprising this feature subset but leave the numerical methods for approximating these equations to the following chapter.

2.1 Navier-Stokes Equations

The Navier-Stokes equations completely describe the motion of a fluid as a continuum, and three continuity equations for the mass, momentum vector, and energy form the basis of the Navier-Stokes equations. For a fluid flow containing more than one chemical species, these three equations are amended to include individual conservation of mass equations for each additional chemical species. The Navier-Stokes equations in integral form over a control volume Ω with boundary Γ = dΩ are expressed as

∂t

Z

UdΩ + Z

Γ

FjnjdΓ = Z

Γ

GjnjdΓ + Z

(18)

where index notation has been used andnj is the outward unit normal to Ω. The conservative flow variable solution vector Uand the inviscid flux vector Fj are defined as

U=        ρYs ρ ρui ρE       

and Fj =       

ρujYs

ρuj

ρujui+P δij

uj(ρE+P)        (2.2)

If the right-hand-side of equation (2.1) is set to zero, the Euler equations representing an inviscid flow are recovered exactly. Otherwise, the viscous flux vectorGj and source term vectorS are defined as

Gj =        Jjs 0 τji

uiτij +qj +hsJsj       

and S=

       ˙ ws 0 0 0        (2.3)

Here, ρ is the mixture density, P is the static pressure, ui is the velocity of the flow in the coordinate directionxi, and Ys represents the mass fraction of the individual molecular species

swith the total number of species within the system denoted by the variableNCS. Finally, the total energy of the system, sometimes referred to as the stagnation energya, is represented by the variable E.

2.2 Thermodynamic Closure

Two equations of state are required to close the preceding equations for an arbitrary mixture of thermally perfect gases. The first equation of state is the definition of the total, or stagnation, energy for a mixture of thermally perfect gas in terms of the mixture enthalpy, hmix, given by

ρE=ρhmix+ 1

2ρuiui−P (2.4)

The second equation of state is provided by the ideal gas law for a gas mixture

P =ρRT

NCS X s=1 Ys Ms (2.5)

where T is the static temperature, R is the universal gas constant and Ms is the molecular weight of species s.

a

(19)

Certain thermodynamic properties can be broken down into a quantity specific to each individual species with the traditional property defined as a mixture of these individual quan-tities through some relation. Such examples include the mixture enthalpy, hmix, and mixture specific heat at constant pressure, cp,mix, of a system. The respective individual quantities for species s are denoted by hs and cp,s. These two thermodynamic properties, along with the Gibbs free energy for speciess,gs, are modeled using polynomial curve fits based on the static temperature. The VULCAN code includes a number of database files containing curve fit in-formation for a large collection of species commonly encountered throughout the combustion process of propulsion systems. These database files provide a curve fit model and the necessary curve fit coefficients which have been compiled from data in McBride et al.31, 32 For example, one database file provides the nine coefficients As,Bs, Cs, Ds,Es,Fs,Gs,Hs, and Is for the following thermodynamic curve fit models

cp,s Rs

= As T2 +

Bs

T +Cs+DsT +EsT 2+F

sT3+GsT4 (2.6)

hs

Rs

=−As

T +BslnT+CsT +DsT

2

2 +

EsT3

3 +

FsT4

4 +

GsT5

5 +Hs (2.7)

and

−gs

RsT = As

2T2

Bs(1 + lnT)

T −Cs(1lnT) +DsT

2 +

EsT2

6 +

FsT3 12 +

GsT4 20

Hs

T +Is (2.8)

where Rs denotes the species gas constant found by the relation Rs = R/Ms. The mixture enthalpy for the system can now be computed as a function of the individual species enthalpies given by the relation

hmix= NCS

X

s=1

Yshs (2.9)

Similarly, a analogous relation is used to compute the mixture specific heat at constant pres-sure. At the completion of each time step, the conservative variables in the solution vector U

are updated and equations (2.4), (2.5), (2.7) and (2.9) are used to compute the state variables required to close the system. Unfortunately, the complex, nonlinear dependence of these equa-tions on temperature requires the use of a Newton iteration to solve equaequa-tions (2.4) and (2.5) for the state variables.

(20)

vectorJsj for speciess given by Fick’s first law in terms of the laminar Schmidt number Sc

Jjs=

µmix Sc

∂Ys

∂xj

(2.10)

the viscous stress tensorτij based on Stokes’ hypothesis

τij =µmix

∂ui

∂xj +∂uj

∂xi 2

3 ∂ul ∂xlδij

!

(2.11)

and the heat flux vector qj modeled using Fourier’s law

qj =λmix

∂T ∂xj

(2.12)

The diffusion terms in equations (2.10), (2.11) and (2.12) respectively describe the transport of mass, momentum, and energy based on the measurable quantities of molecular viscosity, µ, and thermal conductivity,λ. The molecular viscosity for an individual species can be modeled using Sutherland’s formula

µs=µo,s T To,s

!32

To,s+Ss T+Ss

(2.13)

whereµo,s,To,s, andSs are constants found in the database files used to get the constants for equations (2.6) to (2.8). The mixture viscosity for the fluid,µmix, can be determined by Wilke’s formula33 given by the equation

µmix= NCS

X

s=1

Xsµs NCS

X

j=1 Xjφsj

where φsj = "

1 +µs µj

12M j

Ms 14

#2

81 +Ms

Mj

1 2

(2.14)

and Xs refers to the mole fraction of speciess.

From here, two options are provided to calculate the mixture thermal conductivity λmix. The first option is to use a relation between the mixture viscosity, the Prandtl number Pr, and the mixture specific heat at constant pressure

λmix=

cp,mixµmix

Pr (2.15)

(21)

Sutherland’s formula

λs=λo,s T To,s

!32

To,s+Ss T+Ss

(2.16)

As with using Sutherland’s formula for the molecular viscosity,λo,s,To,s, andSsare also found in the VULCAN database files. Wassiljewa’s formula34 is analogous to Wilke’s formula for the mixture viscosity and obtains the mixture thermal conductivity through the equation

λmix= NCS

X

s=1

Xsλs NCS

X

j=1 Xjφsj

where φsj = "

1 +λs λj

12M j

Ms 14

#2

81 +Ms

Mj

1 2

(2.17)

2.3 Chemical Reaction Mechanism

Finally, the species source terms ˙ws found within the source term vector are computed using the law of mass action35

˙

ws =Ms NCR

X

r=1

νr,00s −νr,0s

"

kf,r NCS Y m=1 0 r,m m −kb,r

NCS Y n=1 00 r,n n # (2.18)

which calculates the total production rate of species s by summing the production rates of species s for each individual reaction over the total number of chemical reactions NCR. Each individual reaction rate is found using the participating species concentrationsCmandCnwith

νr,00m and νr,0m being their stoichiometric coefficients. The forward rate coefficient for reaction r, kf,r, is modeled using the Arrhenius law

36, 37

kf,r =ArT ηr exp ε A,r RT (2.19)

The three coefficients, Ar, ηr, and εA,r, are included in reaction database files provided by VULCAN. The backward reaction rate coefficient,kb, is found by using the relationkb =kf/keq. The equilibrium coefficient for reactionr,keq,r is modeled using the total change in Gibbs free energy, ∆Gr, and the equation

keq,r = h

RTi(m

00

r−m0r) exp

G r

RT

(2.20)

(22)

stoichiometric coefficient for that species in the current reaction

Gr= NCS

X

s=1

νr,00s −νr,0sgs (2.21)

2.4 Turbulence Equations

Almost all fluid flows of engineering interest contain nonlinear instabilities characteristic of turbulent flows. The primary challenge lies in the prediction of the turbulent motion with the flow and its effect on the overall motion of the fluid. Direct numerical simulation, DNS, refers to a simulation aimed at fully modeling the turbulent motion of a fluid and requires resolving the very smallest scales of turbulence. However, the grid resolution necessary to resolve the finest turbulent scales makes DNS only practical for the simplest of fluid flows due to the extreme computational requirements. Large eddy simulation (LES) reduces the grid resolution requirements by filtering the Navier-Stokes equations in order to directly compute only the large-scale turbulent structures and model the stresses associated with the subgrid-scales. An even greater reduction in the computational requirements for modeling a turbulent fluid can be accomplished by solving the Reynolds-averaged Navier-Stokes (RANS) equations and this is the method used in this work.

Very simply, the RANS equations describe an averaged fluid flow through the application of Reynolds averaging to the Navier-Stokes equations. Reynolds averaging filters the turbulent fluctuations out of the general fluid motion through the use of time averaging or some other averaging method. This is akin to the process of cleaning up an audio recording by filtering out any unwanted or background noise to focalize on whatever is of actual interest. However, Reynolds averaging does not account for mass or temperature fluctuations characteristic of compressible fluid flows. Thus, a mass averaging, or Favre averaging, must also be applied to the Navier-Stokes equations resulting in the Favre-averaged Navier-Stokes equations.

Various models have been created for the resulting RANS equations with most models requiring one or more additional equations to model new turbulence variables needed for clo-sure. The Wilcox 1998 kω turbulence model was chosen for inclusion within FVFLO-NCSU out of the numerous turbulence model options within VULCAN. The kω turbulence model introduces two new conservation equations to the Navier-Stokes equations: the equation for tur-bulence kinetic energy,k, and the equation for the rate of turbulence dissipation, or turbulence frequency,ω. The addition of the turbulence kinetic energy to the system of equations requires the definition of the total energy in equation (2.4) to be changed to

ρE=ρh+1

(23)

and adding two new viscous flux terms to the energy equation. Furthermore, the Reynolds-averaging procedure introduces the Reynolds-stress tensor, tij, which must be added to the viscous fluxes of the original momentum and energy equations. Before the final RANS equations are presented, one final modification is made to equations (2.2) and (2.3) by removing the continuity equation altogether. The conservation of mass equation is redundant because the mixture density can be found by simply summing over all the individual species densities, thus reducing the computational overhead of the linear solver. Finally, with the viscous flux vector split into laminar, GLj, and turbulent, GTj, components where Gj =G

L j +G

T

j, the resulting system of equations is given by

U=          ρYs ρui ρE ρk ρω         

Fj =         

ρujYs

ρujui+P δij

uj(ρE+P)

ρujk

ρujω         

GLj =          Jjs τji

uiτij +qj +hsJsj 0 0         

GTj =           0 ρtji

ρuitij + µTcp

PrT

∂T

∂xj + (µ+σkµT) ∂k ∂xj (µ+σkµT)

∂k ∂xj (µ+σωµT)

∂ω ∂xj          

and S=           ˙ ws 0 0 Pk− Dk Pω− Dω+σdωρ∂x∂kj∂x∂ωj

          (2.23)

where PrT is the turbulent Prandtl number andσk,σω, and σd are closure constants.

The viscous stress tensor in equation (2.11) describes the transport of momentum within the fluid resulting from molecular interactions governed by the molecular viscosity. The Reynolds-stress tensor is analogous to the viscous Reynolds-stress tensor in that it models the transport of momen-tum caused by velocity fluctuations within the flow field. This semblance between these two terms leads to the Boussinesq approximation for the Reynolds-stress tensor

ρ tij =µT ∂ui ∂xj

+∂uj ∂xi 2 3 ∂ul ∂xl ! 2

3ρkδij (2.24)

where the eddy viscosity,µT, governs the transport of momentum due to turbulent eddies using the relation

µT =ρk

ω (2.25)

(24)

shocks and stagnation points due to large normal stresses.38, 39Various stress limiters have been explored38–42 to enforce the realizability of turbulence energy production including the addition of a stress limiter term to the computation of the eddy viscosity in Wilcox’s 2006kω model.28 An alternative to stress limiters for enforcing realizability is found by recasting the turbulence production in terms of the magnitude of the vorticity,υ, which approaches zero at a stagnation point. The resulting turbulence source terms are given by the equations

Dk=β∗ρkω =βρω2 (2.26)

Pk= minhµT|υ|2, αDki Pω= minhγρ|υ|2, αDωi (2.27)

In equation (2.27), α is a numerical-stability parameter used to limit the non-equilibrium be-havior of the production source terms proportional to the destruction terms, Dk and Dω. All that remains for the previous equations is to define the various closure coefficients

σk= 0.5 σω = 0.5 σd= (

0 if 0 ∂x∂k i ∂ω ∂xi 1 8 if ∂k ∂xi ∂ω ∂xi >0 γ = 13

25 β=

9 125 β = 9 100 (2.28)

2.4.1 Turbulence Wall Functions

To further expand the utility of the unstructured solver, wall functions for turbulence were included allowing for turbulent flow simulations without the costs incurred by regions of very fine resolution near no-slip boundaries. The exact wall functions installed within FVFLO-NCSU are very similar to the methods used by VULCAN and based on the functions derived by Wilcox.29 The law of the wall for the streamwise velocity,u∗, is given by the equation

u∗ =uτ

" 1 κln u τy νw

1.13 y ρwu2τ

∂P ∂x + 5.0

#

(2.29)

whereν, defined byν =µ/ρ, is the kinematic viscosity, y is the distance to the wall, κ= 0.41 is the von Kármán constant, and the subscript ‘w’ denotes a property evaluated at the wall. A Newton iteration is required to solve for the friction velocity,uτ, and subsequently used to find the wall function values fork andω using the equations

kw = ρw

ρ u2τ

β∗ "

1.0 + 1.16 y ρwu2τ

∂P ∂x

#

(2.30)

and

ωw =

rρ

w ρ

uτ

β∗κy

"

1.00.3 y ρwu2

τ

∂P ∂x

#

(25)

Ify+is sufficiently low,y+ <10.8, a blending is performed between the wall function values and the approximate solution for the viscous sublayer. The approximate solutions for kand ω in the viscous sublayer are given by

kSL∼y2 and ωSL = 6.0 νw

βy2 (2.32)

VULCAN computes the approximate solution for the turbulence kinetic energy in the viscous sublayer by taking advantage of the ordered nature of structured blocks. The solution for the turbulence kinetic energy in the second interior grid cell off the wall is assumed within the viscous sublayer and satisfies the approximate solution in equation (2.32). This assumption gives a direct relation between the solutions for the first two cells off the wall:

kSL=k2

y

y2

2

(2.33)

given the second cell off the wall, denoted by the subscript ‘2’, can be formally defined. In a face-based method used for unstructured meshes, it is generally impossible to locate this second interior cell, most notably when applied to cell geometries such as triangles, tetrahedra, pyramids, and prisms. Therefore, the unstructured solver requires its own distinct method for computing the approximate solution for the turbulence kinetic energy in the boundary cell consonant to equation (2.33) used by VULCAN.

The derivation of the sublayer turbulence kinetic energy for the unstructured boundary cells starts by relating the van Driest mixing length model to thekω definition for eddy viscosity

νT = k

ω = (κy) 2

"

1exp −y +

A+o !#2 du∗ dy (2.34)

Applying a Taylor-series expansion on the term contained by the square brackets and solving for the turbulence kinetic energy yields

k=ω(κy)2 "

y+ A+o

#2 du∗ dy (2.35)

Next, the dimensionless quantities for streamwise velocity,u+, and normal distance to the wall, y+, are introduced as

y+= uτy νw

and u+= u

(2.36)

(26)

the two terms in equation (2.36) equal and rearranging yields

u∗= u 2

τy

νw

where du

dy = u2τ νw

(2.37)

Inserting the resulting derivative term in equation (2.37) back into equation (2.35) along with expanding ony+ obtains

k=ω(κy)2 "

uτy

A+w

#2

u2τ νw

(2.38)

where the absolute value on the derivative in equation (2.35) has been removed because andνw are positive by definition. Rearranging equation (2.38) and adding the subscript ‘SL’ to

denote the value of a variable evaluated within the viscous sublayer yields

kSL =ωSLκ 2u4

τy4

A+o2νw3 (2.39)

Substituting the approximate solution for the turbulence frequency, given in equation (2.32), into equation (2.39) gives the final approximate solution for the turbulence kinetic energy in the viscous sublayer. The final viscous sublayer solutions for the unstructured solver are given by the equations

kSL = 6.0 β

"

κy A+w

#2

u4τ (2.40)

and

ωSL =

6.0 β

νw

(27)

Chapter 3

Numerical Methods

3.1 Finite Volume Discretization

The governing Reynolds-averaged Navier-Stokes equations, presented as a system of equations in equation (2.23), are discretized in space using a cell-centered volume method. In the finite-volume method, the computational domain, Ω, is divided into a set of nonoverlapping control volumes, Ωi. The integral form of the governing conservation equations given by equation (2.1) is required to be satisfied within each of these control volumes. In the framework of the FVFLO-NCSU code, this set of control volumes is said to be a hybrid grid, which is defined as an arbitrary combination of the four most common element types: tetrahedra, prisms, pyramids, and hexahedra.

Looking back to equation (2.1), this integral form of the conservation equations can be rewritten in a semi-discrete form as

Vi

d dtUi+

X

j

Fij·nij Γij =X j

Gij·nij Γij +ViSi (3.1)

whereVi is the volume of the control volume, Ωi. The solution vector, Ui, is comprised of the cell-averaged flow variables in conservative form with the working variable,ui, defined by

ui = 1 Vi

Z

i

udV (3.2)

(28)

The fluxes through the control volume surfaces are given by the boundary integration terms in equation (2.1), and approximated using a one point quadrature at the midpoint of the surface Γij. The data structures used in FVFLO-NCSU are designed for grid transparency; any of the conventional finite-element cell types (tetrahedra, pyramids, prisms, hexahedra, or combinations thereof) can be solved with the same set of routines, given element face and volume data. To accomplish this, all dependencies on the cell type have been eliminated through the adoption of a face-based data structure. The computation of fluxes and their contribution to cells can be effectively implemented by loops over the faces through gather/scatter operations. Additionally, a face based data structure has the advantage there are no limitations on the number of faces which can be connected to an element, and thus it can handle hanging nodes with ease.

3.2 Inviscid Fluxes

FVFLO-NCSU adopts the low-diffusion flux-splitting scheme (LDFSS) of Edwards43, 44to com-pute the inviscid fluxes at the cell interfaces. LDFSS exactly captures a stationary contact wave, rendering it suitable for viscous flows. It also captures grid aligned and non-grid aligned shock waves in a monotone fashion and is less susceptible to carbuncle-type behavior than some other flux schemes. The adoption of a face-based data structured makes the extension of LDFSS to arbitrary meshes trivial. LDFSS falls into the category of flux-splitting schemes where all that is needed to compute the fluxes at the interface are the flow variables for the left and right states. These states are simply the reconstructed flow variables for the cells iand jon the interface ij and the face-based data structure ensures this information is readily available.

Four methods to compute the left and right states at the cell interface are available within the FVFLO-NCSU:

1. Cell-centered data 2. Linear reconstruction 3. Minmod based TVD scheme 4. Van Albada TVD scheme

(29)

prone to introduce oscillations in the vicinity of flow discontinuities. Fortunately, the introduc-tion of slope limiters46–49 to the reconstruction process can prevent the creation of new local extrema as long as the limiter obeys the total variation diminishing (TVD) conditions.46, 47 The last two methods use the minmod and Van Albada48 slope limiters to satisfy the TVD conditions and create higher-order solutions on unstructured grids.

The TVD schemes may prevent new local extrema from being created during the recon-struction process, but they can result in non-physical solutions at the interface if care is not taken. For example, the left and right states for density, pressure, and enthalpy (by means of temperature) are required to compute the inviscid fluxes using LDFSS. The reconstructed values for these three quantities, however, must still satisfy the equations of state and remain physical in value. To avoid over-defining the state and ensure a physical solution, two of these quantities can be reconstructed and the third evaluated using the equations of state. Further care is required when using a mixture of thermally perfect gases, where the individual conti-nuity equations require the reconstructed mass fractions to compute the inviscid fluxes. The definition for the mass fraction states that summing the mass fractions over all species should produce unity which is not a guaranteed result from reconstruction. A simple fix is to simply rescale the mass fractions to ensure a sum of unity.

Finally, the divergence theorem, also commonly referred to as the Green-Gauss theorem, is used to find the cell-centered gradients by evaluating the volume integral of the gradients within the control volume. The Green-Gauss theorem in vector form is given by

Z

∇udΩ = Z

Γ

unˆdΓ (3.3)

where the scalar term u is the working flow variable and ˆn is the outward unit normal to the surface Γ. Using the assumption that the gradient is constant within the control volume Ω, equation (3.3) can be rewritten in a semi-discrete form for the discrete cell ias

Vi∇ui = X

j

uijsijnˆij (3.4)

where sij is the area of the face ij. Equation (3.4) means the cell-centered gradient can be evaluated by simply summing the value of the flow variable, uij, at each face ij over all the faces constituting cell i.

(30)

for the cell-centered gradient that is equivalent to the reconstructed gradient found using an inverse distance weighted least-squares method that is known to be consistent and second-order accurate. Therefore, the interface values are computed using the relation

uij =

xjui+ ∆xiujxi+ ∆xj

(3.5)

where ∆xi and ∆xj are the magnitudes of the distance from the midpoint of the faceij to the center of cells iand j, respectively.

3.3 Viscous Fluxes

The finite volume approximation of the viscous fluxes requires the evaluation of both the flow variables and their derivatives at the interface. Two methods have been chosen for the dis-cretization of the viscous terms in FVFLO-NCSU. The first method involves using an inverse distance weighting to calculate the flow variables at the interface while gradient computation is based on a mixed averaging of gradients. The second method takes the union of cellsiandj, with respective volumes Vi andVj, and uses a volume weighting to calculate the flow variables for the new union cell. The gradients for the new union cell are subsequently computed using a least-squares formulation. From here, the flow variables and gradients at the interface are reconstructed from the union cell using a Taylor series expansion. The new cell formed from the union ofiand j will be referred to as cell c as illustrated in figure 3.1.

3.3.1 Mixed-Averaging Formulation

For the mixed-averaging formulation, the reconstructed flow variables at the interface ij are given by an inverse distance weighting using equation (3.5). An initial value of the gradient at the cell interfaces may be obtained by averaging the gradients from the two adjacent cells,∇ui and ∇uj, to give

∇uij = 1

2[∇ui+∇uj] (3.6)

Subsequently, a correction is applied to remove the component of ∇uij in the direction of the vector connecting the centers of cells iand j. This correction, sij, is given by the relation

sij =

rj−ri

|rjri| (3.7)

(31)

xi

xij xj

interfaceij

(a) Cellsiandj.

xc

(b) Cellc =i∪j.

Figure 3.1: Formation of the union cell c from cellsiand j.

After applying these modifications, the resulting mixed-averaging formulation for the gra-dients at the interface is given by the equation

∇uRij =∇uij sij "

∇uij·sij

uj −ui |rj ri|

#

(3.8)

These modifications result in a stable discretization of the viscous terms and do not affect the accuracy as long as the interface integration point is located halfway between the two cell centers. Unfortunately, this is not the case on a non-uniform grid, rendering this type of viscous discretization highly mesh dependent.

3.3.2 Least Squares Formulation

The second method for evaluating the viscous fluxes attempts to reconstruct a higher-order solution at the interface ij using the flow solution in a conjoined cellc created from the union of cellsiand j. The formation of the union cellc from cellsiandj is illustrated in figure 3.1.

Assuming the flow variables for the union cell, uc, and their respective derivatives,∇uc, are known, the second-order solution at the interface can be reconstructed using a Taylor series

uRij =uc+∇uc·(xij xc) (3.9)

where xij and xc are the coordinates for the centers of face ij and union cell c, respectively. The viscous fluxes also require the flow variable gradients at the interface which are evaluated using a first-order approximation given by the relation

∇uij =∇uc (3.10)

(32)

solutions in cellsiand j and the solution in the union cell cmust be derived.

The creation of the union cell begins by defining both the coordinates for the center of the cell and the cell-centered solutions, each of which can be accomplished through numerous techniques. In the current work, both of these parameters are evaluated using a simple volume weighting of the cells on the interface and given by the equations

xc=

xiVi+xjVj

Vi+Vj

and uc=

uiVi+ujVj

Vi+Vj

(3.11)

Conversely, the union cell-centered gradients provide a greater challenge to evaluate while main-taining a stable and accurate viscous discretization.

To form the gradient of the flow variables forc, an over-determined system of eight equations is formed which is subsequently solved using the method of least-squares. The first two equations are given by

ui =uc+ (∇uc)·(xi−xc) (3.12a)

uj =uc+ (∇uc)·(xj−xc) (3.12b)

and require that the flow variables and the respective gradients for cellccan be used in a Taylor series expansion to reconstruct the flow variables for cellsiand j. The other six equations

Wi·∇uc=Wi·∇ui (3.13a)

Wj·∇uc=Wj·∇uj (3.13b)

require that the variable gradients withincbe equal to the gradients for both cellsiandj, with weighting parametersWi and Wj multiplied to both sides of the respective equation.

These eight equations written in matrix form Ax=b are

                 

xic yic zic

Wi,x 0 0

0 Wi,y 0

0 0 Wi,z

xjc yjc zjc

Wj,x 0 0

0 Wj,y 0

0 0 Wj,z

                           ∂uc ∂x ∂uc ∂y ∂uc ∂z          =                          

ui−uc

Wi,x ∂u∂xi

Wi,y ∂u∂yi

Wi,z ∂u∂zi

uj −uc

Wj,x ∂u∂xj

Wj,y ∂u∂yj

(33)

where the coefficients of the form xab simply refer to the relation xab =xa−xb. To solve this equation for the solution vector x, the method of least-squares is applied by multiplying both sides by the transpose of matrixA,AT, resulting in the equationATAx=ATb. This system of equations can be solved using Cramer’s rule or some other method giving the gradients of the flow variables at the center of union cellc. Finally, this solution and the computed flow variables within the union cell are used to reconstruct the solution at the interface using equations (3.9) and (3.10) and subsequently evaluate the desired viscous fluxes.

Within the current work, two different weighting factors were utilized for the gradient equa-tions. The first weighting factor is based on the overall size of the cells attached to the interface and provides an unequal weighting for each dimension. The characteristic sizes for the cells were chosen to be the differences between the maximum and minimum node coordinate values for each dimension. For example, the weighting factorWi for a tetrahedral cell iis given by the equations

Wi,x= max [xp1, xp2, xp3, xp4]min [xp1, xp2, xp3, xp4]

Wi,y = max [yp1, yp2, yp3, yp4] min [yp1, yp2, yp3, yp4] (3.15) Wi,z= max [zp1, zp2, zp3, zp4] min [zp1, zp2, zp3, zp4]

In these equations, the subscripts p1,p2,p3, andp4 refer to the specific nodes of the elementi. This first method using the weighting factors given by equation (3.15) can be interpreted as a dimensional scaling of the gradients.

The second method replaces the vector length-scale weighting factor in the first method with a scalar length scale. This scalar length scale was chosen to be the magnitude of the vector from the cell center to the centroid of the union cell. Therefore, the weighting factor is given by the equation

Wi,x=Wi,y =Wi,z = q

(xi−xc)2+ (yi−yc)2+ (zi−zc)2 (3.16)

The third and final least-squares method for computing the interface gradients diverges from the previous two by eliminating the gradient equations from equation (3.13). These equations are replaced with six equations to reconstruct pointwise values at three interface nodes using the cell-centered solutions from cells iand j. For example, solutions are reconstructed at ‘Point-1’ on the interface, identified by the subscriptp1, using the equations

(34)

where the superscripts i and j denote the cell from which the solution was reconstructed. Repeating this pointwise reconstruction for two other nodes on the interface results in a system of equations of the form

                 

xic yic zic

xp1c yp1c zp1c

xp2c yp2c zp2c xp3c yp3c zp3c

xjc yjc zjc

xp1c yp1c zp1c xp2c yp2c zp2c

xp3c yp3c zp3c

                           ∂uc ∂x ∂uc ∂y ∂uc ∂z          =                  

ui−uc

uip1−uc

uip2−uc

uip3−uc

uj−uc

ujp1−uc

ujp2−uc

ujp3−uc                   (3.19)

3.3.3 Accuracy Comparison with Blasius Solution

The mixed-averaging formulation and the three least-squares methods for evaluating flow vari-ables and their respective gradients at cell interfaces were tested to find their effects on the accuracy of a flow solution. This test comprised of using each of the four interface interpolation schemes in computing a solution for Blasius flow over a flat plate. The accuracy of each method can be directly evaluated with a comparison to the known analytical similarity solution found by Blasius. This solution allows the direct computation of the skin friction coefficient, Cf, for the flat plate given by the relation

Cf = 0.664

r µ

ρu0x (3.20)

Two grids with vertical cell stretching ratios, Θ, of 1.2 and 1.3 were used for each of the interface interpolation methods. These two grids, while having different stretching ratios, have the same overall dimensions,the same distribution of grid points in thex-direction, and the same total number of grid cells and grid points. However, the initial grid point off the wall for the Θ1.2 grid is roughly 0.55×103m whereas the initial point off the wall is roughly 0.74×104m for the Θ1.3grid. Thus, the Θ1.3 grid contains more cells within the boundary layer just downstream of the leading edge and a consistent numerical method will produce a solution in closer agreement to the analytical solution when compared to the coarser Θ1.2 grid. The results of these tests for the different flux formulations are shown in figure 3.2.

(35)

when using the coarser grid. The differences are found in the frequency and amplitude of the oscillations. The least squares formulations have higher frequencies in their oscillations but the amplitude of the error is reduced. In the case of the least squares method which imposes pointwise values at the interface points shown in figure 3.2d, the amplitude of the error is reduced to around 15 % from the 40 % found using the mixed-averaging formulation shown in figure 3.2a.

3.4 Time Integration

3.4.1 Explicit Time Integration

Explicit time-integration schemes generally require low storage and computational costs and are easy to implement due to their simplistic nature. However, the stability requirements for explicit methods can be very limiting in regards to the maximum allowable time step. The low computation costs make explicit methods ideal when time-accurate solutions are desired for simulations containing flow characteristics developing within the same time scale as the maximum allowable time step. Conversely, this stability limit can prove costly and result in a high number of unnecessary time steps when the large time-stepping abilities of implicit methods are preferred. Additionally, the simplicity of explicit schemes provides an excellent environment for developing time-independent sections of the code and general debugging purposes.

The family of Runge-Kutta methods50–53 is one of the most commonly used explicit time-integration schemes. Runge-Kutta methods achieve a higher-order, in time, flow solution for each time step by combining incremental flow solutions evaluated at multiple stages within each time step using the previous time step solution. The number of stages comprising a Runge-Kutta method is customizable as are the coefficients used for computing the final solution from the incremental solutions. Through this customization, the Runge-Kutta family of methods is essentially infinite in number and the extreme limit is capable of attaining a solution with maximum order of accuracy in time.

Various Runge-Kutta schemes have been installed within VULCAN and include the follow-ing: 1) a generalizedK-stage, second-order accurate scheme, 2) Heun’s three-stage, third-order accurate scheme, 3) a three-stage, third-order accurate, Total Variation Diminishing (TVD) scheme by Shu and Osher,52 and 4) the Carpenter-Kennedy five-stage, fourth-order accurate scheme.53

(36)

(a) Mixed-averaging formulation. (b) Weighting factor given by equation (3.15).

(c) Weighting factor given by equation (3.16). (d) Impose pointwise values at interface points.

(37)

less demanding due to the already existing infrastructure in VULCAN that couples the four Runge-Kutta schemes.

The semi-discrete form of the governing equations, given in equation (3.1) for the control volumei, can be simplified in terms of the residual vector,Ri, resulting in the equation

Vi

d

dtUi =Ri =fi+ViSi (3.21)

where the flux residual,fi, constitutes both the inviscid and viscous fluxes using the relation

fi =X j

h

Fij Giji·nijΓij (3.22)

The K-stage Runge-Kutta is generalized in order to give the user the freedom to choose the number of stages and the update coefficients, α1, . . . , αK, using the simulation input file. Ap-plying this Runge-Kutta method and the user provided coefficients to equation (3.21) yields the following sequence of equations for the updated solution at the new time stepn+ 1:

U(0)i =Uni U(1)i =Uni +

t

Vi

α1

R(0)i

..

. (3.23)

U(iK−1) =Uni + t

Vi

αK1

Ri(K−2)

Uni+1=U(iK) =Uni + t

Vi

αK

R(iK−1)

where ∆tdenotes the change in time from time step nto the new time step n+ 1.

(38)

The semi-implicit treatment of the source terms starts by replacing the source-term vector in the residual of equation (3.21) by an approximation of the source terms at the updated time step. Linearization in time of the source-term vector is accomplished by performing a Taylor expansion on the vector yielding the approximation

Sni+1 Sni +S n i

UU n

i (3.24)

where ∆Uni = Uni+1 Uni is the difference of the solution vector between time steps n and n+ 1. Substituting this into equation (3.21) and approximating the time derivative using the Euler explicit method gives

VitU

n

i =Rin+Vi

Sni

UU n

i (3.25)

and then combining the terms containing the solution update Vi

t

It∂S

n i

U

Uni =Rni (3.26)

and substituting the termSi for the matrix defined by bracketed term yields the final equation

Si

VitU

n

i =Rin (3.27)

Note that the matrix Si is essentially the source-term Jacobian matrix itself and requires no additional matrix operations of significance in its evaluation. Equation (3.27) is simply a matrix equation of the formAx=bwhich can be solved by multiplying the inverse of the matrixAto both sides of the equation. Removing the approximation on the time derivative and performing this matrix inversion step produces the equation

Vi

d

dtUi =S 1

i Rni (3.28)

This is in the exact same form as equation (3.21) and any explicit time-integration method can be used including the Runge-Kutta method given in equation (3.23).

3.4.2 Implicit Time Integration

(39)

How-ever, each time step requires considerably more system memory and CPU time from having to store and solve a linear system of equations. The additional computational requirements for implicit methods are amplified when applied to unstructured grids leading to excessive storage from having to store the full Jacobian matrix. Fortunately, the system of governing equations can be linearized using various approximations to prevent storing the Jacobian matrix.

Two fast, matrix-free implicit methods have been successfully installed within FVFLO-NCSU. The first method, the lower-upper symmetric Gauss-Seidel (LU-SGS) method, has been successfully generalized and extended to unstructured grids54–57 and storage of the Jacobian matrix can be eliminated through various approximations. The second implicit method, uses the generalized minimal residual (GMRES) method to iterate to a steady-state solution. The conver-gence rate of the GMRES method benefits from a preconditioning step that attempts to cluster the eigenvalues of the system along the diagonal of the coefficient matrix. The GMRES+LU-SGS17, 18 method uses the matrix-free LU-SGS method as a preconditioner resulting in an efficient low-storage iterative method on unstructured grids.

Both implicit methods start by discretizing equation (3.21) in time using the backwards Euler implicit scheme resulting in

ViUni

t =R

n+1

i =f

n+1

i +ViSni+1 (3.29)

This can be linearized in time using the same method used to derive the semi-implicit treatment for the source terms in equation (3.24) which yields

ViUni

t =f

n i +

fni

UU n

i +ViSni +Vi

Sni

UU n

i (3.30)

Moving all of the terms with ∆Uni to the left-hand side and recombining the explicit residual gives the following equation

V

itI−Vi

Sni

U

fni

U

Uni =Rin (3.31)

Grouping the identity matrix and source-term Jacobian gives the simplification

V

it

It∂S

n i

U

−∂f n i

U

Uni =Rni (3.32)

where the term in the brackets is simplySi from equation (3.27). Making this substitution and rearranging equation (3.32) gives

References

Related documents