Jan 7, 2011 - Dynamic Mesh Deformation for Adaptive Grid. Refinement with Staggered Spectral Difference and. Finite Volume Mesh. K. Ouâ and A.
49th AIAA Aerospace Sciences Meeting including the New Horizons Forum and Aerospace Exposition 4 - 7 January 2011, Orlando, Florida
AIAA 2011-196
Dynamic Mesh Deformation for Adaptive Grid Refinement with Staggered Spectral Difference and Finite Volume Mesh K. Ou∗ and A. Jameson
†
Aeronautics and Astronautics Department, Stanford University, Stanford, CA 94305
Better computational efficiency and reduced computational cost for high order CFD method are areas of active research. In this study, we investigate the potential of using dynamic deforming mesh to locally refine a region of interest in the flow domain. With given number of nodes or degree of freedoms, this has the advantage of achieving an optimal distribution of mesh points, concentrating the computational resource on areas of high gradients, and leaving areas of low gradient with less points. This can be very useful for high order finite element methods that usually have difficulties capturing clean shocks due to the large size of the mesh element, despite the large number of solution and flux poitns within the element. With deforming mesh, the mesh elements can be deformed and gathered near solution with steep gradient, hence leading to high resolution solution of discontinuity. In low gradient regions, despite the diminishing cells, the high order methods are very efficient at resolving the flow with small number of mesh cells.
I.
Introduction
Traditional computational fluid dynamics (CFD) methods are very efficient, robust and reliable, proven by years of industrial applications, but in general limited to second order accuracy. High order finite element methods such as Discontinuous Galerkin and its other variants have somewhat the opposite characteristics at the current stage of development, i.e. the order of accuracy can be arbitrarily high leading to mininum dissipassive methods, while on the other hand quests to improve their robustness, reliablility, stability, timestep restriction, and computational efficiency are still areas of ongoing research. In this paper, we propose to improve the computational efficiency of the high order spectral difference (SD) method by formulating the dynamic mesh deformation problem as an optimization problem that optimally redistributes the mesh points according to flow solution. We also employ a staggered CFD solver structure that combines the traditional finite volume method and the high order method, allowing us to take advantages of the efficiency and the flexibility of the finite volume mesh, and the high order of accuracy of the high order method, leading to a flexible and accurate hybrid method. In short, the finite volume method will be augmented by higher accuracy; the high order method will be augmented by greater flexibility and efficiency. This sets the theme for the paper.
II.
Spectral Difference Method
The numerical experiments in this paper are mostly conducted in 1D, hence only the spectral difference method in 1D is outlined here. This is also the best way to illustrate the key ideas of the method. To start, in the SD scheme, the discrete solution is locally represented by Lagrange polynomial on the solution collocation points xj as n X uj lj (x) uh = j=1
∗ PhD
Candidate, Aeronautics and Astronautics Department, Stanford University, AIAA Student Member. V Jones Professor, Aeronautics and Astronautics Department, Stanford University, AIAA Fellow.
† Thomas
1 of 16 Institute of Aeronautics Astronautics Copyright © 2011 by Kui Ou and Antony Jameson. PublishedAmerican by the American Institute of Aeronautics and and Astronautics, Inc., with permission.
where for polynomials of degree p, n = p + 1. uh is the discrete solution in a reference element spanning [-1,1]. The flux is represented by a separate Lagrange polynomial, ˆlj (x), of degree p + 1, defined by the n + 1 flux collocation points x ˆj n+1 X fj ˆlj (x) fh = j=1
(a) 3rd order SD in 1D element
(b) 3rd order SD in 2D element
Figure 1. Position of solution (triangles) and flux (circles) points on the standard 1D (left) and 2D (right) element for 3rd order SD
For this discrete flux, the interior values at the flux collocation points fj are set equal to f (uh (ˆ xj )) where uh (ˆ xj ) is interpolated from uh (x). At the element boundaries f (−1) and f (1) are defined to be the single valued numerical flux fˆ. Again follow the flux reconstruction procedure proposed by Huynh5 and rewrite the boundary flux in terms of boundary corrections fCL and fCR , the discrete flux can be expanded and rewritten as n+1 X fj ˆlj (x) + fCR ˆln+1 (x) fh (x) = fCLˆl1 (x) + j=1
For linear advection f = au, and also since auh (x) is a polynomial of degree p, it is exactly represented by the sum in the middle term. Hence fh (x) = fCLˆl1 (x) + auh (x) + fCR ˆln+1 (x) Finally by differentiating the flux polynomial at the solution collocation we arrive at the SD scheme as ∂uh (x) ∂uh ′ ′ ˆ ˆ + a + fCL l1 (x) + fCR ln+1 (x) = 0 ∂t ∂x
SD has been well tested in 2D and 3D with a lot of applications to complex problems including those requiring moving deforming mesh.3, 4 For complete SD formulations in 2D and 3D, please refer to the reference6–8 for more details.
III.
Advantage of High Order Method
With high order method such as SD, for solution polynomial of degree p, the number of solution points required is n = p + 1, and the method is expected to yield accuracy of order n. Hence for a fixed mesh element size, a SD method with n solution points will yield an nth order accurate method, while a traditional finite volume method with the same mesh size is second order accurate. However, the high order method with n solution points have n times more degree of freedoms than a finite volume method with the same mesh element size. A better comparison is for both methods to have the same number of degree of freedom for a given mesh width. Hence, consider a nth order SD method with a mesh element size of h, and a finite volume method with a mesh size of nh for the same convection problem. The advantage of the high order method is considerable, as can be seen from the result. 2 of 16 American Institute of Aeronautics and Astronautics
1.5
1.5
1
1
0.5
0.5
0
0
−0.5 −5
−4
−3
−2
−1
0
1
2
3
4
−0.5 −5
5
(a) finite volume method with 100 Cells
−4
−3
−2
−1
0
1
2
3
4
5
(b) 5th order SD with 20 elements
Figure 2. Comparison of Numerical Dissipation Between Finite Volume and SD Methods with the Same Number of DOFs After 20s for a Convection Problem
IV.
Dynamic Mesh Mapping for Moving Boundary Problem
For general dynamic mesh problems, the solution in the dynamic physical domain can be obtained by first solving a transformed problem in a stationary computational domain and subsequently mapping the computational result to the physical space. The time dependent mapping function that establishes the geometric relationship between the fixed computational mesh and the dynamic moving mesh at any one time can be differentiated to obtain the transformation metrics, which are needed to formulate the transformed problem. Physical Space Equation Consider the general advection-diffusion equation in 1D in the true physical space defined by x, ∂u ∂f i ∂f v + + =0 ∂t ∂x ∂x or more explicitly expressing the inviscid and viscous flux as the advection and diffusion term, we get ∂u ∂u ∂2u +a −µ 2 =0 ∂t ∂x ∂x Now assuming this is the governing equation for a dynamic mesh problem. The physical mesh points, which are labelled as xi (t), are moving in time. Mapping Function In order to solve the physical problem in a computational space, the geometric relationship between the fixed computational mesh and the dynamical changing physical space mesh need to be established at any instant in time. Now consider a mapping function F exists that establishes the relationship between the physical space defined by xi and the computational space defined by ξi at any one time such that xi = F (ξi , t) then it can be differentiated with respect to ξ or t to obtain the transformation metric or Jacobian (in 1D) and the mesh velocities ∂x ∂F J= = ∂ξ ∂ξ V =
∂F ∂x = ∂t ∂t
3 of 16 American Institute of Aeronautics and Astronautics
Computational Space Equation With the transformation metrics, the moving physical space equation in x can be transformed to the fixed computational space in ξ. Starting with the physical space equation and using chain rule of differentiation for every term to arrive at, firstly ∂u ∂ξ ∂u ∂t ∂u ∂ξ ∂x ∂u ∂u 1 ∂u ∂u(ξ, t) = + = + =− V + ∂t ∂ξ ∂t ∂t ∂t ∂ξ ∂x ∂t ∂t ∂ξ J ∂t secondly, a
∂u ∂u ∂ξ ∂u 1 =a =a ∂x ∂ξ ∂x ∂ξ J
and lastly, ∂u 1
µ
∂u 1
∂u 1
∂( ∂ξ J ) ∂( ∂ξ J ) ∂ξ ∂( ∂ξ J ) ∂J ∂ξ ∂( ∂u ∂u 1 ∂ 2 x ∂ 2u 1 ∂2u ∂x ) = µ =µ =µ =µ =µ 2 2 −µ 2 ∂x ∂x ∂x ∂ξ ∂x ∂J ∂ξ ∂x ∂ξ J ∂ξ J 3 ∂ξ 2
The transformed equation in the computational domain now assumes the following form J
∂u ∂u ∂2u 1 ∂u 1 ∂ 2 x =0 + (a − V ) −µ 2 +µ ∂t ∂ξ ∂ξ J ∂ξ J 2 ∂ξ 2
Geometric Conservation Law The governing equation in the physical domain can be written in the conservative form as ∂u ∂fi ∂fv ∂u ∂(au) ∂(−µ ∂u ∂x ) + + = + + =0 ∂t ∂x ∂x ∂t ∂x ∂x The transformed governing equation can also be written in the conservative form. But firstly define the following variable in the computational domain as uc = Ju , fic = fi − V u , fvc = fv The conservative form of the transformed equation is now written as ∂f c ∂(Ju) ∂(a − V )u ∂(−µ ∂u ∂uc ∂fic ∂x ) + + v = + + =0 ∂t ∂ξ ∂ξ ∂t ∂ξ ∂ξ The transformed conservative equation can also be expanded as ∂J ∂(a − V ) ∂u 1 ∂ 2 x ∂u ∂u ∂2u 1 +u +u =0 J + (a − V ) −µ 2 + µ ∂t ∂t ∂ξ ∂ξ ∂ξ J ∂ξ J 2 ∂ξ 2 | {z } | {z } ∂(Ju) ∂t
∂(a−V )u ∂ξ
and be rearranged to assume the following form u
∂J ∂(a − V ) ∂u ∂u ∂2u 1 ∂u 1 ∂ 2 x +u +J + (a − V ) −µ 2 +µ =0 ∂t ∂ξ ∂t ∂ξ ∂ξ J ∂ξ J 2 ∂ξ 2 | {z } =0
where the term in the bracket sums to zero from the last equation in the previous section. Now let’s investigate the property of the transformed conservative equation to preserve a constant property by considering the case whereby the physical solution u in the entire physical domain is a constant and stationary, i.e. a = 0, while at the same time the mesh is moving and deforming so that V 6= 0 and J˙ 6= 0. We expect the transformed equation in the computational domain also yields a constant solution. Hence by setting the solution variable u to 1 and the convection speed to a = 0. The transformed equation reduces to ∂V ∂J + =0 ∂t ∂ξ which effectively translates into the statement that the rate of change of the mesh volume (or area) should be equal to the divergence of the mesh velocity. In another word, the conservation of the geometric volume should be conserved, just as the conservation of mass. This is termed the Geometric Conservation Law, or GCL, when dealing with dynamic deforming mesh. 4 of 16 American Institute of Aeronautics and Astronautics
V.
Flow Solution on Dynamic Deforming Mesh with High Order Method
In this section, we aim to show an example of solving flow solution on dynamic deforming mesh, and to demonstrate the effect of applying and not applying the Geometric Conservation Law. This section is presented for completeness. Dynamic mesh problems with GCL for the gas dynamic equations in multidimensions have been investigated by the authors.3, 4 To demonstrate the key ideas, we consider here the non-linear 1D euler shock tube problem. Note that even though the previous formulation is based on advection and diffusion equation, the same approach applies to the gas dynamic equations as well. The flow domain is deforming according to the following function: xp = xr + sin(2πfs )sin(2πft ) where fs and ft is the spatial and temporal frequencies. The fs is chosen to ensure the end points are fixed and have zero grid velocities. Suitable ft is assigned to induce grid deformation. Bad choice of ft could lead to negative mesh volume, and render the solution unstable. For our test, we used fs = 0.05 and ft = 0.1. The SOD’s shock tube problem is solved with the following initial conditions in a domain spanning [0, 10]: ( ( ( 1.0 x < 5 0 x