Finite Volume Methods
Total Page:16
File Type:pdf, Size:1020Kb
FINITE VOLUME METHODS LONG CHEN The finite volume method (FVM) is a discretization technique for partial differential equations, especially those that arise from physical conservation laws. FVM uses a volume integral formulation of the problem with a finite partitioning set of volumes to discretize the equations. FVM is in common use for discretizing computational fluid dynamics equa- tions. Here we consider elliptic equations. 1. GENERAL FORM OF FINITE VOLUME METHODS We consider finite volume methods for solving diffusion type elliptic equation (1) − r · (Kru) = f in Ω; with suitable Dirichlet or Neumann boundary conditions. Here Ω ⊂ Rd is a polyhedral domain (d ≥ 2), the diffusion coefficient K(x) is a d × d symmetric matrix function that is uniformly positive definite on Ω with components in L1(Ω), and f 2 L2(Ω). We have discussed finite element methods based on the discretization of the weak formulation and finite difference methods based on the classic formulation. We shall now present finite volume methods based on the following balance equation Z Z (2) − (Kru) · n ds = fdx; 8 b ⊂ Ω; @b b where n denotes the unit outwards normal vector of @b. We first recall how the equation (1) is derived. When the equilibrium is reached, numerous physical models are based on conservation and constitutive laws. The balance equation for the conservation law: Z Z (3) q · n dS = f dx; for any domain b ⊂ Ω; @b b where q denoting the flux density and n the unit outward normal field of @b. The constitutive equation: (4) q = −Kru: If u denotes the: chemical concentration, temperature, electrostatic potential, or pressure, then equation (4) is: Fick’s law of diffusion, Fourier’s law of heat conduction, Ohm’s law of electrical conduction, or Darcy’s law of flow in the porous medium, respectively. Suppose u and q are smooth enough. In view of Gauss theorem, (3) can be written as Z Z (5) r · q dx = f dx; 8 b ⊂ Ω: b b Since b is arbitrary, letting b ! fxg, it implies (6) r · q(x) = f(x) 8 x 2 Ω: Substituting q = −K(x)ru into (6), we then obtain the classic formulation (1). 1 2 LONG CHEN Finite volume methods are discretizations of the balance equation (2) so that the con- servation holds in the discrete level. The discretization consists of three approximations: (1) approximate the function u by uh in a N-dimensional space V; (2) approximate “arbitrary domain b ⊂ Ω” by a finite subset B = fbi; i = 1 : Mg; (3) approximate boundary flux (Kru) · n on @bi by a discrete one (Krhuh) · n. We then end with a method: to find uh 2 V such that: Z Z (7) − (Krhuh) · n dS = f dx; 8 bi ⊂ Ω; i = 1 : M: @bi bi We call any method in the form (7) finite volume methods (FVMs). Since finite volume methods discretize the balance equation (2) directly, an obvious virtue of finite volume methods is the conservation property comparing with finite element methods based on the weak formulation. This property can be fundamental for the simula- tion of many physical models, e.g., in oil recovery simulations and in computational fluid dynamics in general. On the other hand, the function space and the control volume can be constructed based on general unstructured triangulations for complex geometry domains. The boundary con- dition can be easily built into the function space or the variational form. Thus FVM is more flexible than standard finite difference methods which mainly defined on the struc- tured grids of simple domains. 2. CELL-CENTERED FINITE VOLUME METHODS Let T be a triangular or Cartesian grid of Ω. We choose the finite dimensional space 2 V = fv 2 L (Ω) : vjτ is constant for all τ 2 T g. Then dim V = NT , the number of elements of T . We also choose B = T . See Figure2(a). To complete the discretization, we need to assign the boundary flux of each element. This can be done in a finite difference fashion. For example, for an interior side e (an edge in 2-D and a face in 3-D) shared by two elements τ1 and τ2, we can define uhjτ2 − uhjτ1 (8) rhuh · ne := ; cτ2 − cτ1 where the normal vector ne is the outward unit normal vector of e in τ1, i.e. pointing from τ1 to τ2 and cτi 2 τi; i = 1; 2 are points in each element such that the line segment connecting cτ2 and cτ1 is orthogonal to the side e. By the symmetry, for rectangles or cubes cτ is the mass center of τ. For simplex, cτ should be the circumcenters which imposes restriction on the triangulation. When the mesh is a uniform rectangular grid, it is reduced to the cell centered finite difference method; see Section 4 of Chapter: Finite Difference Methods. The error analysis can be carried out in the finite difference fashion by considering the truncation error and stability of the resulting system. Theory and computation along this approach is summarized in the book [8]. Another approach to discretize the boundary flux is through mixed finite element meth- ods. The gradient operator is understood as r : L2 ! H−1. Optimal error estimate can be easily obtained by using that of mixed finite element methods [13]. Since the control volume is the element (also called cell) of the mesh and the unknown is associated to each element/cell, it is often called cell-centered finite volume methods and the difference scheme (8) is also known as cell centered finite difference methods. FINITE VOLUME METHODS: FOUNDATIONFINITE VOLUME AND METHODS: ANALYSIS FOUNDATION AND7 ANALYSIS 7 2. Finite volume (FV) methods2. Finite for nonlinear volume (FV)conservation methods laws for nonlinear conservation laws In the finite volume method,In the the computational finite volume method, domain, theΩ computationald, is first tessellated domain, Ω into aRd, is first tessellated into a R ⊂ collection of non overlappingcollection control volumes of non overlapping that completely control⊂ cover volumes the domain. that completely Notationally, cover the domain. Notationally, let denote a tessellation oflet the domaindenoteΩ awith tessellation control of volumes the domainT Ω suchwith thatcontrolT volumesT = ΩT. such that T T = Ω. T T ∈ T ∪ ∈T ∈ T ∪ ∈T Let h denote a length scaleLet associatedhT denote with a length each control scale associated volume T , with e.g. h each controldiam(T). volume For T , e.g. hT diam(T). For T T ≡ ≡ two distinct control volumestwoT and distinctT in control, the volumes intersectionTi and is eitherTj in an, orientedthe intersection edge (2-D) is either an oriented edge (2-D) i j T T or face (3-D) e with orientedor normal face (3-D)ν oreij elsewith a setoriented of measure normal atν mostij or elsed 2. a set In each of measure control at most d 2. In each control ij ij − volume, an integral conservationvolume, law anstatementintegral is conservation then imposed. law statement− is then imposed. Definition 2.1 (Integral conservationDefinition 2.1 law) (IntegralAn integral conservation conservation law) lawAn asserts integral that conservation the law asserts that the rate of change of the total amountrate of of change a substance of the with total density amountu ofin a a substance fixed control with volume densityTuisin a fixed control volume T is equal to the total flux of theequal substance to the through total flux the of boundary the substance∂T through the boundary ∂T d d u dx + f(u) dν =0 . u dx + f(u) dν =0(15). (15) dt · dt T ∂T · !T !∂T ! ! This integral conservation lawThis statement integral conservationis readily obtained law statement upon spatial is readily integration obtained of theupon spatial integration of the divergence equation (1a) indivergence the region equationT and application (1a) in the of region the divergenceT and application theorem. of The the divergence theorem. The choice of control volume tessellationchoice ofFINITE is control flexible VOLUME volume in the METHODSfinitetessellation volume is method. flexible in For the example, finite volume Fig. method. 3 For example, Fig. storage location storage location control volume control volume (a) Control volumes of the cell-centered FVM (b) Control volumes of the vertex-centered FVM a. Cell-centered b.a. Vertex-centered Cell-centered b. Vertex-centered FIGUREFigure1. Meshes 1. Control and volume control variantsFigure volumes used 1. in Control the of finite twovolume volume FVMs. variants method: The used inunknowns the finite volume method: (a) cell-centered and (b) vertex-centered(a) cell-centered control and volume (b) vertex-centered tessellation. control volume tessellation. are associated to black nodes. 1 depicts a 2-D triangle complex1 depicts and a two 2-D typical triangle control complex volume and tessellations two typical control (among volume many tessellations (among many others) used in the3. finite VERTEX volumeothers)-CENTERED method. used in In the the FINITEfinitecell-centered volume VOLUME method.finite volume METHODS In the methodcell-centered shownfinite in volume method shown in Fig. 1a, the triangles themselvesFig. serve1a, the as triangles control volumes themselves with serve solution as control unknowns volumes (degrees with ofsolution unknowns (degrees of Wefreedom) now stored discuss onanother a per trianglefreedom) popular basis. stored choice In the onvertex-centered ofa perV triangleand B. basis.finite To simplifyvolume In the vertex-centered method the notation, shownfinite in we volume con- method shown in siderFig. two 1b, dimensional control volumes triangular areFig. formed 1b, grids as control a geometric and volumes homogenous dual are to formed the Dirichlet triangle as a geometric complex boundary dual and tosolution condition. the triangle We complex and solution referunknowns to [15] stored for the on a general per triangulationunknowns treatment stored vertex in on basis.high a per dimensional triangulation vertex simplicial basis.