Finite volume method on unstructured grids

Similar documents
A Multi-Dimensional Limiter for Hybrid Grid

Finite Volume Method

AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS

Entropy stable schemes for compressible flows on unstructured meshes

Divergence Formulation of Source Term

Numerical Solution Techniques in Mechanical and Aerospace Engineering

MULTIGRID CALCULATIONS FOB. CASCADES. Antony Jameson and Feng Liu Princeton University, Princeton, NJ 08544

AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS

Zonal modelling approach in aerodynamic simulation

First, Second, and Third Order Finite-Volume Schemes for Diffusion

Riemann Solvers and Numerical Methods for Fluid Dynamics

Inverse Lax-Wendroff Procedure for Numerical Boundary Conditions of. Conservation Laws 1. Abstract

Adjoint-based aerodynamic shape optimization

Incompressible Flow Solver by Means of Pseudo-Compressibility Method

ALGEBRAIC FLUX CORRECTION FOR FINITE ELEMENT DISCRETIZATIONS OF COUPLED SYSTEMS

( ) A i,j. Appendices. A. Sensitivity of the Van Leer Fluxes The flux Jacobians of the inviscid flux vector in Eq.(3.2), and the Van Leer fluxes in

Is My CFD Mesh Adequate? A Quantitative Answer

AN UNCERTAINTY ESTIMATION EXAMPLE FOR BACKWARD FACING STEP CFD SIMULATION. Abstract

Aerodynamic force analysis in high Reynolds number flows by Lamb vector integration

Application of Dual Time Stepping to Fully Implicit Runge Kutta Schemes for Unsteady Flow Calculations

On the Comparison of the Finite Volume and Discontinuous Galerkin Methods

Numerical methods for the Navier- Stokes equations

ENO and WENO schemes. Further topics and time Integration

Hierarchical Reconstruction with up to Second Degree Remainder for Solving Nonlinear Conservation Laws

Weighted Essentially Non-Oscillatory limiters for Runge-Kutta Discontinuous Galerkin Methods

Computation of Incompressible Flows: SIMPLE and related Algorithms

Chapter Two: Numerical Methods for Elliptic PDEs. 1 Finite Difference Methods for Elliptic PDEs

Comparison of cell-centered and node-centered formulations of a high-resolution well-balanced finite volume scheme: application to shallow water flows

A high-order discontinuous Galerkin solver for 3D aerodynamic turbulent flows

AeroFoam: an accurate inviscid compressible solver for aerodynamic applications

A finite-volume algorithm for all speed flows

Adjoint code development and optimization using automatic differentiation (AD)

Slip flow boundary conditions in discontinuous Galerkin discretizations of the Euler equations of gas dynamics

On limiting for higher order discontinuous Galerkin method for 2D Euler equations

A New Fourth-Order Non-Oscillatory Central Scheme For Hyperbolic Conservation Laws

Discontinuous Galerkin Methods

Finite Volume Schemes: an introduction

Hp-Adaptivity on Anisotropic Meshes for Hybridized Discontinuous Galerkin Scheme

CHAPTER 7 SEVERAL FORMS OF THE EQUATIONS OF MOTION

Estimation of grid-induced errors in computational fluid dynamics solutions using a discrete error transport equation

Spectral Difference Method for Unstructured Grids II: Extension to the Euler Equations

Manhar Dhanak Florida Atlantic University Graduate Student: Zaqie Reza

Shock Capturing for Discontinuous Galerkin Methods using Finite Volume Sub-cells

Advection / Hyperbolic PDEs. PHY 604: Computational Methods in Physics and Astrophysics II

Scientific Computing: Numerical Integration

Semi-Lagrangian Formulations for Linear Advection Equations and Applications to Kinetic Equations

Eigenmode Analysis of Boundary Conditions for the One-dimensional Preconditioned Euler Equations

How Many Steps are Required to Solve the Euler Equations of Steady, Compressible Flow: In Search of a Fast Solution Algorithm

Solution Methods. Steady State Diffusion Equation. Lecture 04

A gas-kinetic theory based multidimensional high-order method for the compressible Navier Stokes solutions

Pressure-velocity correction method Finite Volume solution of Navier-Stokes equations Exercise: Finish solving the Navier Stokes equations

Accuracy-Preserving Source Term Quadrature for Third-Order Edge-Based Discretization

EQUADIFF 9. Mária Lukáčová-Medviďová Numerical solution of compressible flow. Terms of use:

MASSACHUSETTS INSTITUTE OF TECHNOLOGY DEPARTMENT OF MECHANICAL ENGINEERING CAMBRIDGE, MASSACHUSETTS NUMERICAL FLUID MECHANICS FALL 2011

A recovery-assisted DG code for the compressible Navier-Stokes equations

Block-Structured Adaptive Mesh Refinement

PDE Solvers for Fluid Flow

Basic Aspects of Discretization

Solution Methods. Steady convection-diffusion equation. Lecture 05

The RAMSES code and related techniques I. Hydro solvers

Numerical Solution of Partial Differential Equations governing compressible flows

Advanced numerical methods for nonlinear advectiondiffusion-reaction. Peter Frolkovič, University of Heidelberg

An Introduction to the Discontinuous Galerkin Method

Fluid Animation. Christopher Batty November 17, 2011

Self-similar solutions for the diffraction of weak shocks

A Bound-Preserving Fourth Order Compact Finite Difference Scheme for Scalar Convection Diffusion Equations

High Speed Aerodynamics. Copyright 2009 Narayanan Komerath

A High-Order Discontinuous Galerkin Method for the Unsteady Incompressible Navier-Stokes Equations

Compressible Navier-Stokes (Euler) Solver based on Deal.II Library

Simulation of Condensing Compressible Flows

A Linear Multigrid Preconditioner for the solution of the Navier-Stokes Equations using a Discontinuous Galerkin Discretization. Laslo Tibor Diosady

AProofoftheStabilityoftheSpectral Difference Method For All Orders of Accuracy

An Extended Finite Element Method for a Two-Phase Stokes problem

Initial and Boundary Conditions

Implicit Solution of Viscous Aerodynamic Flows using the Discontinuous Galerkin Method

An Overview of Fluid Animation. Christopher Batty March 11, 2014

Numerical Solutions for Hyperbolic Systems of Conservation Laws: from Godunov Method to Adaptive Mesh Refinement

A Higher-Order Generalized Ghost Fluid Method for the Poor for the Three-Dimensional Two-Phase Flow Computation of Underwater Implosions

[N175] Development of Combined CAA-CFD Algorithm for the Efficient Simulation of Aerodynamic Noise Generation and Propagation

The one-dimensional equations for the fluid dynamics of a gas can be written in conservation form as follows:

Construction of very high order Residual Distribution Schemes for steady problems

Numerical Solution Techniques in Mechanical and Aerospace Engineering

Project #1 Internal flow with thermal convection

High Order Accurate Runge Kutta Nodal Discontinuous Galerkin Method for Numerical Solution of Linear Convection Equation

Solving the Euler Equations!

The Finite Volume Particle Method (FVPM)

Discontinuous Galerkin methods for compressible flows: higher order accuracy, error estimation and adaptivity

Positivity-preserving high order schemes for convection dominated equations

The Simulation of Wraparound Fins Aerodynamic Characteristics

On a class of numerical schemes. for compressible flows

Finite Elements. Colin Cotter. January 15, Colin Cotter FEM

Algebraic flux correction and its application to convection-dominated flow. Matthias Möller

Force analysis of underwater object with supercavitation evolution

Introduction to numerical simulation of fluid flows

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science. CASA-Report March2008

Numerical Solutions to Partial Differential Equations

Aerodynamics. High-Lift Devices

Efficient solution of stationary Euler flows with critical points and shocks

NUMERICAL OPTIMIZATION OF THE SHAPE OF A HOLLOW PROJECTILE

Turbulent Boundary Layers & Turbulence Models. Lecture 09

Transcription:

Finite volume method on unstructured grids Praveen. C praveen@math.tifrbng.res.in Tata Institute of Fundamental Research Center for Applicable Mathematics Bangalore 560065 http://math.tifrbng.res.in/~praveen April 1, 2013 1 / 52

Mesh and Finite volumes The basic idea of FVM is to divide domain Ω into a set of disjoint finite volumes and apply the conservation law on each finite volume. The division of Ω gives rise to the mesh or grid. Ω i, i = 1, 2,..., N Ω Ω = N Ω i=1 For simplicity we take each Ω i to be a polygonal cell. Ω i 2 / 52

Mesh and Finite volumes The mesh can consist of different types of cells, e.g., triangular and quadrilateral cells in 2-D. Such a mesh is called hybrid mesh. Usually the mesh is taken to be conforming in the sense that there are no hanging nodes. But it is possible to use grids with hanging nodes also, which can be advantageous when doing grid adaptation. 3 / 52

Mesh and Finite volumes Let us denote the set of vertices in the mesh by V = {V i : i = 1, 2,..., N V } 4 / 52

Finite volumes Once a mesh has been formed, we have to create the finite volumes on which the conservation law will be applied. This can be done in two ways, depending on where the solution is stored. 1 If the solution is stored at the center of each Ω i, then Ω i itself is the finite volume or cell, C i = Ω i. This gives rise to the cell-centered finite volume scheme. 2 If the solution is stored at the vertices of the mesh, then around each vertex i we have to construct a cell C i. This gives rise to the vertex-centered finite volume scheme. 5 / 52

Finite volumes In either case we obtain a collection of disjoint finite volumes {C i }, i = 1, 2,..., N c such that Ω = N c i=1 C i 6 / 52

Some geometric information Interior Face Boundary face For each cell C i S ij = C i C j = common face between C i and C j S ib = C i Ω = face of C i on boundary of Ω N i = {C j : C i and C j have a common face S ij } C i C i 7 / 52

Some geometric information Remark: Instead of saying C j N i we will simply say that j N i 8 / 52

Vertex-centered finite volumes There are several ways to define the finite volume around a vertex. Join the mid-point of the edges and cell centers. This leads to the median dual cell. (Triangular grids only) Join the circum-center of the triangles to the edge mid-points. For obtuse angled triangles, use the mid-point of largest side. This is called the containment dual cell. Useful in boundary layers. For vertices on the boundary, the finite volume is closed by a portion of the boundary edges. Centroid Mid point 9 / 52

Vertex-centered finite volumes containment dual Median-dual cells containment-dual cells 10 / 52

Vertex-centered finite volumes 150 Chapter 5. Unstructured Finite Volume Schemes Median-dual cells Figure 5.10: Comparison of median-dual (a) and containment-dual (b) control volumes for a stretched right-angle triangulation. containment-dual cells 11 / 52

Vertex-centered finite volumes Turbulent flow over RAE2822 airfoil: vertex-centered scheme Mach = 0.729, α = 2.31 deg, Re = 6.5 million 1.5 1 Median Cell Containment Expt. 0.5 C p 0 0.5 1 1.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 x/c 12 / 52

FVM for Compressible NS equations U t + F x + G y = P x + Q y Integrating over cell C i U C i t dv + (F x + G y )dv = (P x + Q y )dv C i C i Define cell average value U i (t) = 1 C i C i U(x, y, t)dv Using divergence theorem C i du i dt + (F n x + Gn y )ds = (P n x + Qn y )ds C i C i 13 / 52

FVM for Compressible NS equations C i du i dt + j N i = j N i S ij (F n x + Gn y )ds + S ij (P n x + Qn y )ds + S ib Ω S ib Ω S ib (F n x + Gn y )ds S ib (P n x + Qn y )ds nij C j C i We have to approximate the flux integral by quadrature. For first order and second order accurate schemes, it is enough to use mid-point rule of 14 / 52

(P n x + Qn y ) ij R ij, (P n x + Qn y ) ib R ib 15 / 52 FVM for Compressible NS equations integration. S ij (F n x + Gn y )ds (F n x + Gn y ) ij S ij How to compute the flux? We have two states U ij and U ji coming from cells C i and C j. We will use a numerical flux function of Godunov-type or flux vector splitting, etc (F n x + Gn y ) ij H(U ij, U ji, n ij ) On boundary faces S ib the flux is determined using appropriate boundary conditions (F n x + Gn y ) ib H b (U ib, U b, n ib ) The viscous fluxes are computed using central difference type approximations which we discuss later

FVM for Compressible NS equations Finally we have the semi-discrete scheme C i du i dt + H(U ij, U ji, n ij ) S ij + j N i = R ij S ij + R ib S ib j N i S ib Ω S ib Ω H b (U ib, U b, n ib ) S ib We now have a system of ODE which we can integrate in time using various schemes like Runge-Kutta or implicit schemes. 16 / 52

First order finite volume In this case, we assume that the solution inside each cell is a constant in space. Then on any interior face S ij we have the two states U ij = U i, U ji = U j The convective flux is then approximated as H(U i, U j, n ij ) which leads to a first order accurate scheme. If the numerical flux H is designed well, then these schemes are very stable, robust and have good properties like monotonicity and entropy condition. But they introduce too much error and lead to poor resolution of shocks, contact waves and vorticity. 17 / 52

Reconstruction To achieve more than first order accuracy, we can reconstruct the solution inside each cell. The simplest approach is to perform piecewise linear reconstruction. The reconstruction can be performed on conserved variables primitive variables (ρ, u, v, p) or (T, u, v, p) characteristic variables R U C j U L C i 18 / 52

Reconstruction Conserved variables allow satisfaction of conservation of reconstucted solution very easily. Primitive variables make it easy to ensure positivity of density and pressure which leads to a more robust scheme. Characteristics variables leads to more accurate schemes at a slightly more computational cost. Let us denote by W the set of variables that are going to be reconstructed. Using the reconstruction process, obtain two states W ij and W ji at each face S ij and compute the flux H(W ij, W ji, n ij ) 19 / 52

Gradient-based reconstruction: Cell/vertex-centered case Assume that we have the gradient of W at the cell centers. Then inside each cell C i the reconstructed solution is W (x, y) = W i + (r r i ) W i, r = (x, y), r i = (x i, y i ) At the mid-point r = r ij of face S ij we obtain two states W ij = W i + (r ij r i ) W i, W ji = W j + (r ij r j ) W j In order to ensure monotone solutions, a limiter function is calculated on each cell and the limited reconstructed values are W ij = W i + φ i (r ij r i ) W i, W ji = W j + φ j (r ij r j ) W j Since W has several components, the limiter function is computed for each component. Popular limiters are min-max limiter of Barth-Jespersen and Venkatakrishnan limiter which are explained later. 20 / 52

MUSCL-type Reconstruction: vertex-centered case i 1 i L R i+1 i+2 U L = U i + 1 [ 2 Limiter (U i+1 U i ), P ] ip i+1 P i P i 1 (U i U i 1 ) or, using vertex-gradients Van-albada limiter U L = U i + 1 2 Limiter [ (U i+1 U i ), ( P i+1 P i ) U i ] Limiter(a, b) = (a2 + ɛ)b + (b 2 + ɛ)a a 2 + b 2, ɛ 1 + 2ɛ 21 / 52

MUSCL-type Reconstruction: vertex-centered case (See Lohner, Section 10.4.2) This extends the MUSCL idea to unstructured grids. W ij = W i + 1 4 [(1 k) i + (1 + k)(w j W i )] W ji = W j 1 4 [(1 k) + j + (1 + k)(w j W i )] where the forward and backward difference operators are given by i = W i W i 1 = 2r ij W i (W j W i ) + j = W j+1 W j = 2r ij W j (W j W i ) where r ij = r j r i In 1-D case, k = 1/3 gives third order accurate scheme. 22 / 52

MUSCL-type Reconstruction: vertex-centered case With limiter W ij = W i + s i 4 [(1 ks i) i + (1 + ks i )(W j W i )] W ji = W j s j 4 [(1 ks j) + j + (1 + ks j)(w j W i )] s i = L( i, W j W i ), s j = L( + j, W j W i ) Limiter function, van-albada type limiter [ ] 2ab + ɛ L(a, b) = max 0, a 2 + b 2 + ɛ 23 / 52

Gradient computation: least squares Given data at positions W 0, W 1, W 2,..., W n r 0, r 1, r 2,..., r n, r i = (x i, y i ) 2 3 0 1 4 24 / 52

Gradient computation: least squares Compute W 0 = (a, b). From Taylor formula W i = W 0 + (r i r 0 ) W 0 + O ( h 2) = W 0 + (x i x 0 )a + (y i y 0 )b + O ( h 2) Define W i = W i W 0, x i = x i x 0, y i = y i y 0 Neglecting higher order terms, we have an over-determined system of equations W i = x i a + y i b, i = 1, 2,..., n Let us determined (a, b) by solving the weighted minimization problem min a,b n ω i [ W i x i a y i b] 2 i=1 25 / 52

Gradient computation: least squares The weight function is usually chosen to be of the form i=1 ω i = 1 r i r 0 p, p = 0 or p = 2 Conditions for extremum are n n ω i [ W i x ia y ib] 2 [ = 2 ω i Wi x i + ( x i) 2 a + x ] i y ib = 0 a b i=1 i=1 n n ω i [ W i x ia y ib] 2 [ = 2 ω i Wi y i + x i y ia + ( y i) 2 b ] = 0 i=1 We obtained two coupled equations ( i ω i x 2 i )a + ( i ω i x i y i )b = i ω i W i x i ( i ω i x i y i )a + ( i ω i y 2 i )b = i ω i W i y i 26 / 52

Gradient computation: least squares In matrix form [ i ω i x 2 i i ω i x i y i i ω ] [ ] i x i y i a i ω i yi 2 = b [ i ω ] i W i x i i ω i W i y i Assume that the points do not all lie on the same straight line. Then the matrix on the left has determinant ( i ω i x 2 i )( i ω i y 2 i ) ( i ω i x i y i ) 2 > 0 and hence is invertible. Choice of stencil: We need atleast two neighbouring cells to apply least squares method. We can choose the face neighbouring cells N i which is usually sufficient to apply least squares. If necessary one can add extra cells by using the neighbours of neighbours. 27 / 52

Gradient computation: least squares Remark: The LS derivative formula is exact for linear polynomials. The derivatives obtained by this approach are in general first order accurate, i.e., W x W exact x = O (h) On smooth and symmetric stencils, we can obtain close to second order accuracy. Remark: The least squares method gives accurate gradient estimates. But on highly stretched grids, it can lead to unstable schemes. The use of distance based weight alleviates the problem to some extent. Remark: This idea can be easily extended to three dimensions. We can also use quadratic reconstruction where we retain terms involving second derivatives in the Taylor expansion. This gives derivatives which are second order accurate (exact for quadratic polynomials) and we also obtain second derivatives which are first order accurate. 28 / 52

Gradient computation: Green-Gauss Green theorem applied to cell C i W dv = W nds C i C i W i = 1 1 C i 2 (W i + W j )n ij S ij j N i This formula has to be modified for boundary cells. 29 / 52

min-max limiter The basic idea is that the reconstructed states W ij must remain between the minimum and maximum values in the stencil of C i. Define W m i = min j N i (W j, W i ), W M i = max j N i (W j, W i ) Then we want to choose the largest value of 0 φ i 1 so that W m i W i + φ i (r ij r i ) W i W M i, C j N i Define ij = (r ij r i ) W i ( ) min 1, W i M W i ij if ij > 0 ( ) φ ij = min 1, W i m W i ij if ij < 0 1 otherwise 30 / 52

min-max limiter Then φ i = min j N i φ ij For scalar conservation laws, one can show that the FV scheme with a monotone flux satisfies local maximum principle and hence is stable in maximum norm. For Euler equations, this leads to a very robust scheme but it is not very accurate since it can clip smooth extrema also. Moreover, the limiter is not a smooth function due to use of min and max functions. This leads to slow convergence to steady state solutions and in fact we do not obtain convergence to machine zero in most cases. 31 / 52

Venkatakrishnan limiter This is a smooth modification of the minmax limiter which has good convergence properties for steady state problems. L(Wi M W i, ij ) if ij > 0 φ ij = L(Wi m W i, ij ) if ij < 0 1 otherwise Then L(a, b) = a2 + 2ab + ω a 2 + 2b 2 + ab + ω φ i = min j N i φ ij We have essentially replaced the min function in min-max limiter with the above smooth function. There is a paramater ω which is chosen as ω = (Kh) 3 32 / 52

Venkatakrishnan limiter 9-1.1 - / Here h represents the cell size. One can take E c 1.Oe- -_ / / o h = (area of cell) 1/2 m - 0.9-, h = (volume of cell) 1/3 _ / 0.7 - v or take h to be average cell size in the grid. The value of K affects the 0.6- amount of limiting, with K = 0 giving highest amount of limiting. 1.3-1.2-0.8 - % /ja Figure 5.16" Effect of the constant K in Venkatakrishnan's limiter, given by Eq. (5.67), on the solution for an inviscid flow past a circular arc. / / / f? 5.3. Discretisation of the Convective Fluxes 171 1.5 -- 1.4-1.3-1.2-9 - 1.1 - E c 1.O- e- -_ o m - 0.9- _ % / % %% /ja / / / / / f? / 0.0-0.5 m m -1.0 "10.m.e -1.5 C m -2.0 "o.m m E -2.5 o -3.0 C o E -3.5 L r o.j~ -4.0 K=5, 20, 50 unlimited K=O 0.8 - -4.5 0.7-0.6- v -5.0 500 1000 1500 2000 Iterations Figure 5.16" Effect of the constant K in Venkatakrishnan's limiter, given by Eq. (5.67), on the solution for an inviscid flow past a circular arc. Figure 5.17: Effect of the constant K in Venkatakrishnan's limiter on the convergence for an inviscid flow past a circular arc. 0.0-0.5 33 / 52

Venkatakrishnan limiter Performance depends on K Oscillations are not completely avoided May fail with strong strongs, hypersonic flows Works best when used with non-dimensional variables 34 / 52

Third order scheme U R 1 U L 1 C j C i U L 2 U R 2 Quadratic reconstruction in cell C i Ũ(x, y) = U i + a i (x x i ) + b i (y y i ) + c i (x x i ) 2 + d i (x x i )(y y i ) + e i (y y i ) 2 35 / 52

Third order scheme 2-point Gauss quadrature for flux F ij = ω 1 F (U L 1, U R 1, ˆn ij ) + ω 2 F (U L 2, U R 2, ˆn ij ) For more, see Barth, VKI Lecture notes, 1994. 5.3. Discretisation of the Convective Fluxes 163 Figure 5.14: Stencil of the quadratic reconstruction method due to Delanaye [62], [63] in 2D (filled rectangles). Dashed line represents the integration path of the Green-Gauss gradient evaluation (control volume gtt). Crosses denote the quadrature points for integration of the fluxes. 5.3.4 Evaluation of the Gradients 36 / 52

Viscous flux Viscous flux requires gradients of velocity and temperature at the mid-point of the cell face. There are two options Compute gradient at cell centers and average to obtain gradient at face. These gradients are anyway already computed for reconstruction purpose. It can be used in cell-centered or vertex-centered schemes. Compute gradient at face center directly. This approach can be used in the cell centered case. It requires additional least squares or Green-Gauss technique to be applied at each face. Hence it requires more computations. Vertex-centered grids: A finite element type approach can also be used which leads to a compact stencil for viscous fluxes. 37 / 52

Viscous flux: Using cell gradients Assume that gradients of W at cell center are available using least squares or Green-Gauss technique. To compute viscous flux at face S ij, obvious thing to do is W ij = W ij = 1 2 ( W i + W j ) and then compute viscous flux using these gradients. But this leads to odd-even decoupling problem. To avoid this we approximate gradient as ( ) Wj W i W ij = W ij + r j r i W ij ˆr ij ˆr ij where ˆr ij = r j r i = unit vector from i to j r j r i 38 / 52

Viscous flux: Using cell gradients This definition is consistent in the sense that it gives correct directional derivative ( ) Wj W i W ij ˆr ij = W ij ˆr ij + r j r i W ij ˆr ij ˆr ij ˆr ij = W j W i r j r i This corrected scheme avoids the odd-even decoupling problem. Remark: The stencil for this scheme is large since it involves secondary neighbours. 39 / 52

Viscous flux: using face gradient approach This is used in case of cell-centered schemes. There are several approaches. One possibility is to interpolate W from cell centers to the vertices. compute gradient using Green-Gauss theorem on the face centered control volume Second approach: Compute gradient at the vertices using Green-Gauss formula. Then average gradient to find gradient at face center. (Jameson s vertex-centroid scheme) Another approach due to Frink also makes use of vertex values (x j x i )W x + (y j y i )W y = W j W i (x 2 x 1 )W x + (y 2 y 1 )W y = W 2 W 1 This coupled system can be solved to obtain the derivatives W x and W y. 40 / 52

Viscous flux: FEM approach This approach can be used for vertex-centered scheme on triangular and tetrahedral grids. The boundary C i of dual cell C i contains portions located inside different triangles. On each triangle T we know the solution at its three vertices i, j, k and we can approximate the gradient using Green-Gauss theorem W T = 1 T [ Wi + W j N ij = 2 N ij + W j + W k 2 N jk + W ] k + W i N ki 2 [ ] +(yj y i ) = normal to edge ij (x j x i ) The flux across the face inside triangle T is computed using W T. Thus the stencil of the scheme involves only the nearest neighbours. 41 / 52

Boundary conditions There are natural boundaries: solid wall artificial boundaries: inlet, outlet, farfield, symmetry plane, etc. Natural boundary conditions are known from the PDE problem itself. Artificial boundary conditions have to be cooked up to lead to a stable scheme. Characteristics are useful to know how much information has to be specified. In the finite volume method, boundary conditions are implemented through fluxes (mostly). 42 / 52

Solid wall: inviscid flux The condition is that normal velocity must be zero. Fluid cannot enter into a solid surface. This is true of both inviscid and viscous flows. In inviscid flows, there can be a tangential component of velocity but this has to be determined from the numerical scheme. If normal velocity is zero, the flux is 0 pn x pn y 0 Cell-centered case: First order scheme, use the pressure in the adjacent cell to compute the flux. To get higher order accuracy, one can extrapolate the pressure from the cell center to the face mid-point. Vertex-centered case: We already know pressure on the boundary face. Use it to calculate the flux. 43 / 52

Solid wall: inviscid flux using ghost cells We can introduce a ghost cell inside the solid surface and set the values in the ghost cell to appropiately recover the flux. Inviscid flows: The density and pressure in ghost cell are set to be same as in the real cell. The tangential velocity is same as in real cell but normal velocity is reversed. Viscous flows: Adiabatic wall: Density and pressure are set same as in real cell. Isothermal wall: Pressure is same as in real cell, density is computed using specified temperature and known pressure. All velocity components are reversed in the ghost cell. Now we have two states at the boundary face and we can use a numerical flux function to compute the flux. It is important to ensure that mass and energy fluxes are zero. 44 / 52

Solid wall: Viscous flux We know the gradients of velocity at the solid wall face by some procedure. We use this to calculate shear stress and the viscous fluxes due to shear stress. If we have adiabatic wall, then the heat flux is set to zero. For isothermal wall, heat flux is calculated from Fourier law and added to energy equation. Vertex-centered case: We have unknowns on the solid wall. It is usual practice to set the velocity at these location to zero after updating the solution. For isothermal wall, the temperature is set to the specified wall temperature. 45 / 52

Supersonic inflow and outflow At supersonic inflow, all wave speeds are positive. So the flux must be determined from the inflow conditions. Similarly, at a supersonic outflow, the flux is determined from the state in the boundary cell. 46 / 52

Subsonic inflow We have three positive and one negative eigenvalue. u n a, u n, u n < 0 u n + a > 0 So we have to specify three pieces of information on the inflow side and the remaining information must be taken from the interior cell. One choice is to specify velocity and pressure or density from the inflow conditions and the remaining is taken from the interior cell. Alternately one can use local characteristic variables. Alternately, we can use an upwind numerical flux like Steger-Warming which is already based on characteristic splitting to compute the flux at inflow face H sw (U 0, U, n) = A + (U 0, n)u 0 + A (U, n)u 47 / 52

Subsonic outflow We have three positive and one negative eigenvalue. u n a < 0 u n, u n, u n + a > 0 So we have to specify three pieces of information on the interior side and the remaining information must be taken from the exterior of the domain. Usually, one knows the pressure on the outlet side so this can be specified. The density and velocity is taken from the interior cell. Alternately one can use local characteristic variables. This is explained in the far-field boundary conditions. Alternately, we can use an upwind numerical flux like Steger-Warming to compute the flux at outflow face H sw (U 0, U out, n) = A + (U 0, n)u 0 + A (U out, n)u out U out is determined using the known outlet pressure and remaining values are taken from the interior cell. 48 / 52

Farfield conditions This is typical of aerospace applications like flow around an airfoil or aircraft. The real domain contains the whole exterior of the airfoil but for computational purpose, we have to use a finite domain. It is important to place the farfield domain sufficiently far away from the lifting bodies. Characteristic approach: (See Wesseling, section 12.4) We look at a one dimensional problem in the direction of the outward normal ignoring the variation in other directions. Then one can find characteristic variables (Riemann invariants) and corresponding speeds as W 1 = u n W 2 = S, W 3 = u t, W 4 = u n + 2a γ 1, 2a γ 1, λ 1 = u n a λ 2 = u n λ 3 = u n λ 4 = u n + a 49 / 52

Farfield conditions At the far-field face we calculate W f as W f,i = { W 0,i λ i 0 W,i λ i < 0, i = 1,..., 4 Once W f is obtained then we can calculate the state (ρ, u, v, p) at the face from which the flux can be obtained. u n,f = 1 2 (W f,1 + W f,4 ), a f = γ 1 (W f,4 W f,1 ) 4 u t,f = W f,3, S f = p f ρ γ f = W f,2 Remark: At some outflow boundaries, one usually knows the outlet pressure, maybe the atmospheric pressure. In that case, the known pressure can be used. 50 / 52

Farfield conditions Remark: There are other sets of characteristic variables, see Lohner, section 8.5 and Blazek, section 8.3.1 Characteristic-based flux approach: Alternately, we can use an upwind numerical flux like Steger-Warming which is already based on characteristic splitting to compute the flux at farfield face H sw (U 0, U, n) = A + (U 0, n)u 0 + A (U, n)u Remark: For lifting problems like airfoils in 2-D, the far-field domain may have to be placed about 50-100 chord lengths away from the airfoil in order to minimize the effect of artificial boundary conditions. One can use point vortex model to correct the far-field conditions which allow placing the outer boundary closer to the airfoil, see Blazek, Chap. 8. It is good to do some study on the effect of outer boundary position on lift and drag coefficients. 51 / 52

_ S Farfield conditions 8.3. Fartield 285 0.36 - s ~ " -- - -- -- -- 0.34 4r /.J o 0.32 / / / 0.30 I I I 0.28 = with vortex correction - -~ - without vortex correction 0.26... t... I, = ~, I,,, = I, ~,, I 20 40 60 80 100 distance to farfield Figure 8.7: Effects of distance to the farfield boundary and of single vortex on the lift coefficient. NACA 0012 airfoil, M~ -0.8, a- 1.25 ~ investigated. The farfield radius was set to 5, 20, 50, and 99 chords. As we can see, simulations without the vortex correction experiences a strong dependence on the farfield distance. On the contrary, simulations with the vortex remain sufficiently accurate up to a distance of about 20 chords. This leads to a significant reduction of the number of grid cells/points. It was demonstrated in Ref. [19] that by using higher-order terms in the vortex correction, the farfield boundary can be placed only about 5 chords away without loss of accuracy. 52 / 52