conditions, the velocity at the wall becomes zero only for very fine meshes. ... An example of weak and strong boundary conditions is illustrated in Fig. 1 ... Figure 1. Velocity vectors at the leading edge of a NACA0012 airfoil in viscous flow. ..... by considering the two dimensional frozen coefficient Navier-Stokes equations.
AIAA 2009-3551
19th AIAA Computational Fluid Dynamics 22 - 25 June 2009, San Antonio, Texas
The Influence of Weak and Strong Solid Wall Boundary Conditions on the Convergence to Steady-State of the Navier-Stokes Equations Peter Eliasson1 FOI, Swedish Defence Research Agency, SE-16490 Stockholm, Sweden Sofia Eriksson2 Uppsala University, Dep. of Information Technology, SE-75105, Uppsala, Sweden Jan Nordström3 FOI, Swedish Defence Research Agency, SE-16490 Stockholm, Sweden Uppsala University, Dep. of Information Technology, SE-75105, Uppsala, Sweden In the present paper we study the influence of weak and strong no-slip solid wall boundary conditions on the convergence to steady-state. Our Navier-Stokes solver is edge based and operates on unstructured grids. The two types of boundary conditions are applied to no-slip adiabatic walls. The two approaches are analyzed for a simplified model problem and the reason for the different convergence rates are discussed in terms of the theoretical findings for the model problem. Numerical results for a 2D viscous steady state low Reynolds number problem show that the weak boundary conditions often provide faster convergence. It is shown that strong boundary conditions can prevent the steady state convergence. It is also demonstrated that the two approaches converge to the same solution. Similar results are obtained for high Reynolds number flow in two and three dimensions.
E
I. Introduction
XPLICIT Runge-Kutta methods in combination with multigrid have shown to be efficient for inviscid fluid dynamics problems1-3 where steady state convergence may be obtained in O(102) iterations as well as for viscous RANS computations4-6 on stretched grids where steady state convergence is obtained in O(103) iterations. Time dependent flow can be computed by an extension of theses steady state solvers with a dual time stepping approach by solving a steady state problem in each time step7-8. The solution approaches for these methods are well described in the literature for structured and unstructured grids using solution schemes based on both cell center and node vertex schemes. A proper description of the boundary conditions is, however, often missing. In particular node vertex schemes where the unknowns are located on the boundaries and to which this work is devoted, often lack a proper description of how to numerically impose the boundary conditions in a stable and accurate way. The formulations of the no-slip solid wall boundary conditions for the Navier-Stokes equations and the related slip condition for the Euler equations are well known. Less well known is the relation between these two formulations. One of the more striking features is the fact that with a weak implementation of the boundary conditions, the velocity at the wall becomes zero only for very fine meshes. In fact it has been shown9-11 that the Navier-Stokes solution converges to the Euler solution for coarse meshes. In this paper we will consider a new effect of using weak boundary conditions, namely that it in many cases speeds up the convergence to steady-state. A node vertex edge based flow solver for unstructured grids, the Edge code12-14, is used for the investigation and a comparison between weak and strong boundary conditions applied to no-slip adiabatic wall boundaries is done. For viscous flow computations, strong boundary conditions have up to now been applied for the velocity on no-slip 1
Deputy Research Director, Department of Aeronautics and Systems Integration, AIAA Member. PhD student Department of Information Technology, AIAA member. 3 Director of Research in Numerical Analysis, Department of Aeronautics and Systems Integration and Adjunct Professor, Department of Information Technology, AIAA member. 2
1 American Institute of Aeronautics and Astronautics
Copyright © 2009 by P.Eliasson, S. Eriksson, J. Nordström. Published by the American Institute of Aeronautics and Astronautics, Inc., with permission.
walls, i.e. a zero velocity is injected. This has also been applied for the turbulent flow quantities and for the density on iso-thermal walls to obtain the specified wall temperature. In this paper we specify these boundary conditions weakly in an accurate and stable manner. In the following sections, we introduce the concept of weak and strong boundary conditions followed by a theoretical analysis of a model problem. After that we describe our flow solver, Edge, followed by a description of the numerical implementation and solution procedure of the weak and strong boundary conditions. Then we present numerical results for viscous flow problems for steady state flow computations in two and three space dimensions.
II. Weak and strong boundary conditions Our flow solver is based on a finite volume discretization with the unknowns in the nodes, the solver is described below. There are two distinctly different ways to prescribe boundary conditions for node vertex solvers where the unknowns are located on the boundary. One can use weak or strong boundary conditions. A weak boundary condition implies that a flux is computed on the boundary. The flux is added to the residual used to update the unknown boundary quantity. The flux is computed from variables with prescribed values according to the specific boundary condition. The unknown boundary value typically deviates slightly from the prescribed value but the deviation is reduced as the grid is refined. With a strong boundary condition, the specified boundary value is injected on the boundary. The boundary quantity is no longer an unknown quantity and there is hence no need to compute a boundary flux since the residual will not be used to update that quantity. An example of weak and strong boundary conditions is illustrated in Fig. 1 below in which a no-slip zero velocity is imposed through weak and strong boundary conditions. The velocity field is illustrated on a coarse and fine grid with the two types of boundary conditions. There is a small velocity component on the wall boundary with the weak boundary condition. The wall velocity is reduced though as the grid is refined. Away from the wall, the difference between the solutions decay fast.
Figure 1. Velocity vectors at the leading edge of a NACA0012 airfoil in viscous flow. No-slip boundary conditions imposed with weak and strong boundary conditions on a coarse and fine grid. We will consider a new effect of using weak boundary conditions, namely that it speeds up the convergence to steady-state. The theoretical explanation of that phenomenon is not yet fully understood except that it must push the numerical spectrum21 further to the left in the complex plane. The net effect is demonstrated in the numerical examples below. The speedup is very important for steady-state calculations and may be even more important for implicit time-dependent calculations where thousands of sub-iterations (steady-state calculations in pseudo time) are performed. We consider both strong (velocities and temperature condition specified strongly), semi-strong (velocities weakly, temperature strong) and weak formulations (both velocities and temperature weakly). Below we discuss the speed-up effect in terms of a model problem. A. The scalar model problem, energy estimates and spectrum We consider the continuous one-dimensional scalar half plane model problem
ut + au x = εu xx , u (0, t ) = g
(1)
where a > 0, 0 < ε 0. 2 2
(4)
The second derivative is approximated with an SBP operator of the form P −1 Mv and the matrix M can be decomposed as M = − S T RS + BS , where (Sv)0 ≈ (ux)0 and R is symmetric and positive semi-definite. By multiplying Eq. (3) from the left with ν T P and disregarding the right boundary we obtain
( where Sv
2 R
= ( Sν ) T R ( Sν ) and v
2 P
v
2 P
)t + 2ε
Sv
2 R
= av02 − 2εv0 ( Sv) 0
= ν T Pν which mimics Eq. (2) perfectly. We now split the norm as
2 Sv R = Sv r + Δx(Sv )0 where the matrix r is identical with R, except that R1,1 = Δx whereas r1,1 = 0 ( r is also 2
2
positive semi-definite). Using ( Sv ) 0 = (v1 − v 0 ) Δx yields
(
v
2 P
)t + 2ε Sv r
2
= av 02 − 2εv 0 (Sv) 0 − 2εΔx(Sv) 20 = av 02 − 2ε(v 0v1 − v12 ) /Δx
(5)
So far we have not taken the implementation of the boundary condition into consideration. The discretization using strong boundary conditions ( v 0 (t ) = g implemented with injection) in matrix form is
0 ⎡ ⎡0 0 ⎤ ⎡0 0 ⎤ a ε ⎞ ⎢ ⎛ ⎢ ⎥ ⎢ ⎥ ⎟g a ⎢0 0 1 ε ⎢0 − 2 1 1 ⎢⎜ + ⎥ ⎥ v= 2 v+ vt + ⎝ 2 Δx ⎠ ⎢ 1 − 2 1 ⎥ Δx 2Δx ⎢ − 1 0 1 ⎥ Δx ⎢ 0 ⎢ ⎢ ⎥ ⎢ ⎥ O O O O ⎢ ⎣ ⎦ ⎣ ⎦ M ⎣ By adding and subtracting terms we rewrite this using the SBP-operators and obtain with g
vt + aP −1Qv + aP −1 Ev = εP −1Mv + εP −1 Fv. The additional terms aP −1 Eν and εP −1 Fν (compare Eq. (3) and (6)) are defined below.
3 American Institute of Aeronautics and Astronautics
⎤ ⎥ ⎥ ⎥. ⎥ ⎥⎦
=0 (6)
⎡2 − 2 ⎤ a ⎢ aP Ev = 1 0 0 ⎥⎥ v, 2 Δx ⎢ ⎢⎣ 0 O⎥⎦
⎡0
⎤ 0 ⎥⎥ v 0 O⎥⎦ 0
ε εP Fv = 2 ⎢⎢− 1 0
−1
−1
Δx
⎢⎣
Multiplying Eq. (6) by ν T P and observing that 2ν T Eν = ν 02 and 2ν T F ν = − 2ν 0ν 1 Δx yields,
(
v
2 P
2
)t + 2ε (Sv) r2 = −2ε v1
Δx
(7)
Hence the problem is stable (the right-hand-side of Eq. (7) is non-positive) using a strong boundary condition. Next we consider the boundary condition implemented weakly by using a penalty term17-20 of the form −1 P τ (v0 − g )e0 where e0 = [1, 0, L, 0]T to the right-hand-side of Eq. (3). We add the resulting contribution (using g=0) from the penalty term to the estimate in Eq. (5) and get the growth rate
(
v
)t + 2ε
2 P
2
Sv r = (a + 2τ )v02 + 2ε (v0 v1 − v12 )/Δx
With the choice τ = − a 2 − σε Δx where σ ≥ 1 / 4 , we get the final form of the growth rate,
(
v
2 P
)t + 2ε
2
Sv r = −
2ε 2 2ε 2εσ 2 v1 + v0v1 − v0 Δx Δx Δx
(8)
The energy rates in Eq. (7) and (8) both lead to stability, i.e. the energy does not grow. Here we are interested in which one leads to the fastest convergence to steady state. The left-hand sides of Eq. (7) and (8) are of the same form, the rate of convergence is given by the size of the right-hand-sides (RHS). We have
(
Strong :
Weak :
(
v
2 P
v
)t
2 P
)t
T
+ 2ε Sv
2 r
2ε ⎡v 0 ⎤ ⎡0 0⎤ ⎡v 0 ⎤ =− Δx ⎢⎣ v1 ⎥⎦ ⎢⎣0 1⎥⎦ ⎢⎣ v1 ⎥⎦
(9)
T
+ 2ε Sv
2 r
- 1/2⎤ ⎡v 0 ⎤ 2ε ⎡v 0 ⎤ ⎡ σ =− ⎥ ⎢ ⎢ Δx ⎣ v1 ⎦ ⎣- 1/2 1 ⎥⎦ ⎢⎣ v1 ⎥⎦
(10)
First we note that if the problem is infinitely resolved we will have v 0 = 0 also in the weak case and then the two estimates are identical. Next we consider the two boundary matrices on the RHS of Eq. (9) and (10). The different boundary conditions lead to different eigenvalues of the boundary matrices on the RHS of Eq. (9),(10). We get
Strong : λ1, 2 =
1 1 ± 2 2
Weak : λ1, 2 =
1+ σ (1 + σ ) 2 1 − 4σ ± + 2 4 4
(11)
Both eigenvalues in the weak implementation increase with the penalty strength σ . The eigenvalues for two choices of σ are given in the table below. It should be noted that stability requires σ ≥ 1 / 4 . A large value of σ will increase the maximum eigenvalues. This is not necessarily a desired property since the stiffness may increase leading to smaller time steps with smaller CFL values in an explicit time stepping scheme.
4 American Institute of Aeronautics and Astronautics
Table 1. Values of λ with strong and weak boundary conditions. Method λ1 λ2 Strong Weak, σ = 1 / 4 Weak, σ = 1
0 0 1/2
1 5/4 3/2
The procedure described above is the one we have used to analyze and modify the solid wall boundary procedure for the different boundary condition implementations. We formalize the procedure using the following notation. Consider Eq. (6) as the semi-discrete version in space including the boundary conditions and let the boundary data be zero. We can formally write Eq. (6) on the form
~ vt + P −1 Hv = 0.
(12)
We use the energy-method which means that we multiply with vTP from the left and obtain the equation for the energy rate
(
2 ~ ~ v p ) t = −v T ( H + H T )v.
(13)
Equation (13) corresponds to Eq. (9) and (10) where every term except the time derivative of the norm forms a ~ ~ part of v T ( H + H T )v. The general procedure can be described as follows: − We discretize and impose boundary conditions such that we obtain a system of ordinary differential equations of the form (12). − We use the energy-method and derive an energy rate of approximately the same form for the different boundary procedures. The RHS, see Eq. (13), is different due to the different boundary conditions. − We choose boundary conditions such that we optimize the smallest negative eigenvalue of the RHS in (13). − We calculate the eigenvalues of P −1H˜ in Eq. (12) to quantify the resulting effect in terms of the least positive real part of the utmost left lying eigenvalue. B. The model problem for a solid boundary, energy estimates and spectrum Once we have derived a suitable set of boundary procedures we compute the eigenvalues of the whole semidiscrete system of ordinary differential equations. We expand our model problem to a system of equations. The model equation is obtained by considering the two dimensional frozen coefficient Navier-Stokes equations. Next we Fourier-transform tangential to the solid boundary and consider the least dissipative case, namely the one corresponding to ω = 0 . ω is the dual variable to the tangential coordinate. The system we obtain and the boundary conditions at the solid boundary are
U t + AU x = εBU xx ,
u (0, t ) = 0, Tx (0, t ) = 0
(14)
where
⎡u a 0 ⎤ A = ⎢⎢ a u b ⎥⎥, ⎣⎢ 0 b u ⎦⎥
⎡0 0 0 ⎤ ⎡ρ ⎤ ⎢ ⎥ B = ⎢0 Θ 0 ⎥, U = ⎢⎢ u ⎥⎥. ⎣⎢0 0 Φ ⎦⎥ ⎣⎢T ⎥⎦
(15)
and where u is the mean normal velocity close to the solid wall, a = c γ , b = c (γ − 1) / γ and c speed of sound. The coefficients Θ , Φ are of order one and Eq. (14) is the symmetrized version of the one-dimensional Navier-Stokes equations21. 5 American Institute of Aeronautics and Astronautics
The dependent variables ρ , u , T are scaled versions of the density, the normal velocity and the temperature, respectively. It is straight forward to show (using the energy-method) that Eq. (14) is well-posed for u ≤ 0 . We discretize the problem Eq. (14) using the SBP operators in Eq. (3),(4) above and obtain the system
Vt + ( P −1Q ⊗ A)V = ε ( P −1 M ⊗ B)V .
(16)
where A ⊗ B is the so called Kronecker product17-20. By using the notation
P =P⊗I
and
H =Q ⊗ A−εM ⊗ B
where I is the 3×3 identity matrix, and including the boundary conditions, we can rewrite Eq. (16) to be on the same ~ form as Eq. (12). (When the boundary conditions are implemented the spatial operator H will be modified to H and be different for weak or strong boundary conditions). The procedure is now exactly the same as for the scalar model problem above, see Eq. (12), (13) and the description below. Fast convergence to steady-state is obtained if ~ the outmost left eigenvalue to P −1 H have a maximal positive real part. C. Eigenvalues and convergence to steady-state By using the procedure described above we have implemented three types of numerical solid boundary conditions that all mimic the continuous boundary conditions in Eq. (14). As mentioned above, we refer to the implementation of
u (0, t ) = 0, Tx (0, t ) = 0 as weak, semi-strong and strong, respectively. (However, in the figures the notation weak-weak, strong-weak and strong-strong is sometimes used). At the right boundary at x=1 (which we are not really interested in) we specify all ~ the variables (ρ, u and T) weakly using penalty terms. The eigenvalues for the full operator P −1 H (boundary treatment included) are then computed. In Fig. 2 we show the full spectrum for the weak case with a linear and logarithmic scaling of the real axis. The logarithmic scaling reveals details close to Real(eig)=0. The other spectrums, for semi-strong and strong, are rather similar to the weak one.
Figure 2. Eigenvalues of P −1H˜ in the weak-weak case. Here ε=0.1, u = −0.1, σ = 1 4 and N=64 (number of grid points). Left: Linear scaling of real axis. Right: Logarithmic scaling of real axis. The most interesting eigenvalue in the spectrum is the one with smallest real part (the one furthest to the left in R R , determines how fast the solution will go to steady-state21 (the larger λmin , the faster Fig. 2). This eigenvalue, λmin 6 American Institute of Aeronautics and Astronautics
R convergence). In Fig. 3 we have plotted λmin for the three cases weak, semi-strong (strong-weak) and strong. We see that for fine meshes all three cases go to the same value, approximately − u . However, as long as the grid is not sufficiently resolved (a common scenario in many practical simulations) the weak case has a significantly higher R R value of λmin . For both the semi-strong and strong cases λmin lies on a rather constant level, barely affected by the grid resolution. Hence we conclude that the convergence to steady-state is faster for the weak formulation than for the strong-weak and strong formulations, at least for coarse meshes. We see that the resolution can be regarded as sufficient for N≈25=32 when ε = 0.1 , and for N≈27=128 when ε = 0.01 since for that number of grid points all R formulations have the approximately the same smallest λmin .
~
Figure 3. Smallest real part of eigenvalues of P −1 H . Two different u . σ = 1 4 . N is between 4 and 256. Left: ε = 0.1 . Right: ε = 0.01 .
III. The Flow Solver Edge The CFD solver employed in the calculations is the Edge code (http://www.edge.foi.se/), which is an edge- and node-based Navier-Stokes flow solver applicable for both structured and unstructured grids12-14. Edge is based on a finite volume formulation where a median dual grid forms the control volumes with the unknowns allocated in the centres. The governing equations are integrated explicitly with a multistage Runge-Kutta scheme to steady state and with acceleration by FAS agglomeration multigrid. A pre-processor creates the dual grid and the edge based data structure, which is also employed to agglomerate coarser control volumes for the multigrid and to split up the computational domain for parallel calculations15. The Edge solver is able to provide different options such as different spatial discretization techniques, turbulence models and high temperature extensions. Throughout this paper, a central scheme is used for the convection to which usually a small amount of numerical dissipation is added. The viscous terms are discretized with a compact discretization of the normal derivatives of the viscous operator16 and that the remaining derivatives are based on node based gradients to have a full viscous operator. There are numerous boundary conditions in Edge for walls, external boundaries and periodic boundaries. Almost all boundary conditions are implemented weakly in which a set of temporary flow variables are computed and used in the calculations of the boundary flux added to the residual. The residual then updates all unknown variables including the boundaries. A strong boundary condition, on the other hand, implies that the boundary value of the variable is injected in the solution removing the variable from the list of unknowns. Hence the residual of this variable is not used. A few boundary conditions have been implemented strongly since it was, up to now, unclear how to do the weak implementation in an accurate and stable way. These are wall boundary conditions for which the wall no-slip velocity, the iso-thermal temperature and the turbulent wall variables have been implemented strongly and remaining variables weakly. Below the implementation of weak boundary conditions are shown with the emphasis on the implementation of weak no-slip wall conditions. A. Implementation details of weak wall boundary conditions Consider a control volume Vi for an arbitrary node with subscript i. The spatial discretization of the NavierStokes equations with a finite volume formulation on an unstructured grid for this node may be written in semidiscrete form as 7 American Institute of Aeronautics and Astronautics
Vi
ni ∂qi ni + ∑ f ik = ∑ g ik ∂t k =1 k =1
(17)
where qi = ( ρ i , ui , Ei ) contains the conservative variables of density, velocity vector and total energy for node i. f ik denotes the convective flux between nodes i and k, ni is the number of nodes connected with an edge to node i, g ik the corresponding viscous flux. The convective and viscous fluxes may be formulated as
0 ρ ik (uik ⋅ S ik ) ⎛ ⎞ ⎛ ⎞ ⎜ ⎟ ⎜ ⎟ f ik = ⎜ ρ ik (u ik ⋅ S ik )u ik + pik S ik ⎟ + ADik ; g ik = ⎜ τ ik S ik ⎟ ⎜ u τ S − κ∇T S ⎟ ⎜ (u ⋅ S )( E + p ) ⎟ ik ik ik ik ik ik ⎠ ⎝ ik ik ik ⎝ ⎠
(18)
where S ik denotes control surface to the two nodes i and k, uik the velocity between the nodes and ADik numerical dissipation12. Tik denotes the temperature and τ ik is the stress tensor computed with a thin-layer approximation22 as
τ ik Sik = μ (
∂u 1 ∂u + ( ⋅ n)n) S ik ∂n 3 ∂n
(19)
where S ik = n S ik , μ the dynamic viscosity or the sum of dynamic and turbulent viscosity for turbulent flow. The remaining tangential derivatives can be added from nodal Green-Gauss integration to have a full viscous operator. The normal derivative in Eq. (19) is approximated as
u − ui ∂u = k ∂n ik xk − xi where xi , xk are the coordinates of the two nodes. The discretization can be shown to lead to a positive and stable discretization of the Laplace operator23. The computation of fluxes is done in two steps in the code. In the first step the fluxes are computed for all edges in the entire computational domain, the fluxes are added and subtracted to the corresponding residuals of the two nodes involved. In the second step, the boundary flux is computed and added to the residuals of the boundary nodes to close the control volume. The second step can be omitted for quantities specified strongly, e.g. a strong implementation of no-slip velocity boundary condition for which the residual of the momentum equations will not be used. For all wall boundary conditions the convective wall boundary flux is computed assuming a zero normal velocity component, u ik ⋅ S ik = 0 , in f ik in Eq. (18) leaving
(20)
S23
3 2
S01
1 0
only the wall pressure and wall control surface contributing to the momentum equation. S0 To implement a no-slip wall weakly in a viscous flow calculation, a corresponding Figure 4. Wall boundary viscous wall boundary flux for the momentum has to be determined. The same grid (solid line) with its expression for the boundary flux is used as for the interior. The wall flux and the normal dual grid (dashed). derivatives are computed according to Eq. (19) and (20) as:
τ 0 S0 = μ (
∂u 1 ∂u + ( ⋅ n) n) S 0 ; ∂n 3 ∂n
∂u (u 0 − u1 ) − σ (U − u 0 ) = x1 − x0 ∂n
(21)
where indices 0 and 1 denote the boundary node and the first interior node respectively according to Fig. 4 showing the notation of nodes with the primary (solid) and dual grid (dashed) at a wall boundary. σ is the free penalty strength parameter defined in Section II A above and σ ≥ 1 4 is required for stability. Note that it is assumed that 8 American Institute of Aeronautics and Astronautics
the grid is structured normal to the wall which is typical for hybrid unstructured grids with quadrilateral (2D) or prismatic (possibly hexahedral) near-wall elements (3D). U in Eq. (21) denotes the prescribed wall velocity, typically U = 0 on a no-slip wall, but it is included here to simplify the explanation. The wall flux can now be added to the wall residual to be used in the update of the velocity. This procedure can be also used to implement weak boundary conditions for an iso-thermal wall with prescribed temperature and for the turbulent equations with prescribed turbulent wall quantities. The normal derivative of the temperature or turbulent quantity is then computed in the same way as for the velocity in Eq. (21). In the calculations below we will evaluate the weak no-slip velocity boundary conditions on adiabatic walls and compare the computed results to the corresponding results obtained with the velocity specified strongly, i.e. where u 0 = 0 is enforced. We will also show results where we have implemented the adiabatic temperature condition
∂T0 ∂n = 0 in a strong way by enforcing the wall pressure to fulfill
p0 = p1 ρ 0 ρ1
.
(22)
In the corresponding weak temperature boundary condition, both wall density and pressure are unknowns and the zero temperature gradient is inserted in the wall energy equation wall flux in Eq. (18).
IV. Numerical results Numerical results are presented for steady state viscous calculations. In all calculations, a three stage explicit Runge-Kutta scheme with coefficients (α1 ,α 2 ,α 3 ) = (2 3 , 2 3 ,1) and a CFL number of CFL=1.25 is used to integrate to a steady state using local time steps. Multigrid is usually applied to accelerate the speed of convergence. A. Flow over a flat plate The first test case shows the advantage with weak boundary conditions where two different boundaries are connected and sharing a node where the two boundaries coincide. The common node will appear in the flux calculation for both boundaries. In case if one of the two boundaries employs a strong boundary condition, a decision has to be made whether to treat the node weakly or strongly. This decision is avoided if all boundaries and variables are treated in a weak manner. For the flat plate test case in Fig. 5 a symmetry boundary condition implemented weakly with zero normal velocity is connected to an adiabatic wall with no-slip boundary conditions. In case of strong wall boundary Figure 5. Flat plate with a symmetry and conditions, the common node between the two boundaries is wall boundary. treated strongly. The flat plate test case employs weak characteristic boundary conditions on the inflow and top boundary and the static pressure is specified weakly on the outflow boundary. The velocity is low, M∞ = 0.07, and low speed preconditioning is used24. The height of the computational domain is Δy=0.25 and the wall boundary extends about 30 computational heights down stream. The length of the symmetry boundary is the same as the computational height, Δx=0.25. The symmetry and wall boundaries coincide at x=0. The calculations are started from a free stream condition, three multigrid levels are used and the flow is assumed to be fully turbulent with an algebraic Reynolds stress model for the turbulence25,26. Three different wall boundary conditions are compared. Weak boundary conditions for the no-slip velocity (denoted Weak-Weak), strong velocity boundary conditions (Strong-Weak) and strong velocity conditions combined with strong conditions for the zero normal temperature gradient according to Eq. (22) (Strong-Strong). The rate of converge and the velocity profiles in the vicinity of the junction between the symmetry and wall boundaries are displayed in Fig. 6. The convergence is similar initially. With strong boundary conditions, however, local high residuals at the junction between the symmetry and wall prevent the convergence to a steady state. This is most notable with strong-strong conditions for which only about two orders of residual reduction is obtained. The velocity distributions are very similar though, only at the junction between the boundaries there is a noticeable difference. 9 American Institute of Aeronautics and Astronautics
Figure 6. Computations over a flat plate with 3 wall boundary conditions. Velocity and temperature gradient weak (Weak-Weak), velocity strong and temperature gradient weak (Strong-Weak) and both strong (Strong-Strong) Left) Convergence of density residual. Right) Velocity profiles close to symmetry and wall boundary junction. B. Laminar flow over an airfoil The second test case is a low Reynolds number test case in which we compare the difference between weak and strong boundary conditions in terms of steady state convergence, grid refinement and solution difference. Five grids were generated27,28 over the NACA0012 airfoil. The grids were consistently refined in all directions with approximately a factor of 2 in each dimension between each grid. The flow conditions, M∞ = 0.69, Re = 500, α = 0°, correspond to subsonic flow where the Reynolds number is low enough to assume laminar flow. The solid wall is an adiabatic wall, the velocity and the normal zero temperature gradient is treated in either a weak or strong manner. Due to the low Reynolds number, no numerical dissipation has been used in the calculations presented below. Table 2 Data about the 5 successively refined NACA0012 grids. Grid No. of nodes N No. of bound. nodes No. of quads No. of triangles 3 3 Coarsest 3.2×10 100 1.8×10 2.5×103 3 3 Coarse 8.4×10 200 3.8×10 9.1×103 400 7.6×103 36×103 Medium 25.5×103 3 3 800 15×10 143×103 Fine 87.4×10 3 3 1600 30×10 580×103 Finest 321×10
Figure 7. NACA0012 grids. Left) Coarsest grid. Mid) Coarse. Right) Medium.
Figure 8. NACA0012 grids. Blow up at the trailing edge. Successive refinement from left to right. 10 American Institute of Aeronautics and Astronautics
The data about the grids are given in Table 2 and in Fig. 7-8. Varying number of quad cells are used, the layer with quadrilateral cells shrink closer to the surface as the grid is refined. The velocity field close to the leading edge of the airfoil is displayed for the two coarsest grids in Fig. 1 above. A small wall velocity vector can be observed using weak boundary conditions, the velocity vector is reduced as the grid is refined indicating that the two solutions approach each other. Figure 9 displays the convergence of density using the three types of boundary conditions on the coarsest, medium and finest grids. No multigrid is used. Three values of the parameter σ are compared, σ = 0.25,1,10 . The asymptotic rate of convergence is the same for all approaches, i.e. the slope of the convergence for lower residual values are fairly similar between all boundary conditions. With weak boundary conditions, however, the residuals reach somewhat lower values faster. Note that all these calculations are well resolved, also on the coarsest grid.
Figure 9. Rate of convergence, density residual; NACA0012 at M∞ = 0.69, α = 0°, Re=500. Velocity and temperature gradient weak (Weak-Weak), velocity strong and temperature gradient weak (Weak-Strong) and both strong (Strong-Strong). No multigrid. a) Coarsest grid. b) Medium grid. c) Finest grid.
Figure 10. Rate of convergence, density residual; NACA0012 at M∞ = 0.69, α = 0°, Re=500. Velocity and temperature gradient weak (Weak-Weak), velocity strong and temperature gradient weak (Weak-Strong) and both strong (Strong-Strong). Three multigrid levels. a) Coarsest grid. b) Medium grid. c) Finest grid. The corresponding plots using three levels of multigrid are displayed in Fig. 10. With strong boundary conditions for the zero temperature gradient the convergence to steady state is destroyed which is most noticeable on the coarser grids. With weak boundary conditions for the velocity a faster convergence to steady state is obtained compared to using strong wall velocity conditions. When multigrid is used, the coarsest level is not well resolved. 11 American Institute of Aeronautics and Astronautics
The fastest convergence is obtained with σ = 0.25 although the rate of convergence is similar with σ = 1 . For larger values, σ > 20 , no convergence or divergence is obtained probably due to the stiffness introduced requiring lower CFL values. The converged forces are displayed in Tab. 3 on the three coarsest grids. Very small differences are observed; the differences reduce as the grid is refined indicating that the solutions converge to the same solution. Table 3 Grid convergence of drag force for NACA0012 grids. M∞ = 0.69, α = 0°, Re=500 CD, Weak-Weak, σ=1 ΔCD, % Grid CD, Weak-Strong 0.1969 0.1964 0.21 Coarsest 0.1973 0.1972 0.079 Coarse 0.1978 0.1978 0.030 Medium C. Turbulent flow over NACA0012 The next test case involves turbulent transonic flow over a NACA0012 airfoil on three successively refined and stretched grids in the boundary layer. The grids have been generated with an in-house grid generator27,28 with a varying normal distance from the airfoil to the first interior node being 10-5, 10-6 and 10-7 chord lengths respectively. The grids have the same number of nodes on the airfoil, about 310 nodes, and have a varying number of quad cells in the wall normal direction with about 35, 45, and 55 layers in average. The triangular grid outside of these layers are the same for all grids, the total number of nodes is about 51×103, 54×103 and 57×103 nodes respectively. The maximum aspect ratio of the stretching is 1.5×103, 15×103 and 150×103 which make the finest grid extremely stretched. The grids were originally generated to evaluate a line-implicit approach for which grid independent convergence was obtained6. The high grid stretching motivated the inclusion in this study. Three levels of full multigrid W-cycles are used with directional semi-coarsening with coarsening ratios 1:4 is used in the boundary layer. The flow conditions are M∞ = 0.754, Re = 6.2×106, with a small angle of attack, α = 2.57°. The Spalart-Allmaras one-equation model was used29; the turbulent equations are discretized with a 2nd order upwind method. Figure 11 displays convergence of the density residual to steady state on the three grids. Adiabatic wall conditions are used with either weak boundary conditions for both the no-slip velocity and turbulence or strong conditions for the corresponding quantities. The zero temperature gradient is from now on computed weakly only. As for the previous test case, three values of the parameter σ are evaluated, σ = 0.25,1,10 . As expected with explicit integration, the convergence is fastest on the coarsest and less stretched grid with similar rates of convergence. The strong boundary conditions converge slightly faster on this grid although the differences are small. The situation is reversed on the next finer grid. On the finest and most stretched the fastest rate of convergence is obtained with the weak boundary conditions and with σ =1 . The highest value σ = 10 results in slower convergence indicating that it is close its upper limit of what can be used without reducing the CFL number.
Figure 11. Rate of convergence of density residual of turbulent NACA0012 calculations at M∞ = 0.754, α = 2.57°, Re=6.2×106. Weak and strong wall boundary conditions for velocity and turbulence. Three grids with different wall distances. a) Wall distance 10-5 chords, b) wall distance 10-6 chords, c) wall distance 10-7 chords. 12 American Institute of Aeronautics and Astronautics
D. Three-dimensional flow over the M6 wing The next example demonstrates viscous flow calculations over the ONERA M6 wing30,6. The flow conditions are M∞ = 0.84, α = 3.06°, and Re = 11.3×106. A grid with 0.92×106 nodes is used. The grid has a constant number of 30 prismatic layers and about 20×103 nodes on the wing surface. The grid contains 1.2×106 prismatic cells and 1.8×106 tetrahedral cells. The wall normal distance to the first interior node is about 1.5×10-6 chords. Semi-coarsening is used normal to the wall in the prismatic layer with 4 fine dual cells merged into one coarse cell. An average coarsening ratio of 8 is used in the tetrahedral region. Spalart-Allmaras turbulence model is used29 and an upwind discretization of the turbulent equations is used where a minmod TVD limiter ensures 2nd order spatial accuracy. The wall is assumed to be adiabatic and weak boundary conditions are used for the temperature gradient. Strong and weak boundary conditions are used for the velocity, three values of σ are evaluated, at σ = 0.25,1,10 . One to three multigrid levels are used. The rate of convergence of the density residual and the lift force is shown in Fig. 12. The solutions converge to the same lift values but have been separated in the plot to facilitate the plotting. The rate of convergence increases as expected as the number of grid levels increases. The rate is similar between weak and strong boundary conditions without multigrid. With two grid levels the rate of convergence is still similar between the two types of boundary conditions although the lowest residuals are obtained with σ = 0.25 . With three levels of multigrid, weak boundary conditions converges faster to a steady state, in particular with σ = 1 . The convergence of lift is Figure 12. Rate of convergence for viscous flow over the ONERA M6 wing. also clearly faster with weak Weak and strong boundary conditions for the no-slip velocity with 1-3 multigrid boundary conditions. Note that levels. Left: Convergence of density residual, Right: Convergence of lift (values with the value σ = 10 , the separated for 1-3 grid levels). calculation with three multigrid levels does not converge to a steady state. E. DPW4 CRM Configuration The last test case is the test case used in the 4th Drag Prediction Workshop (DPW4)31 in which a common wingbody-tail configuration is computed. A family of hybrid unstructured grids have been generated with an in-house tool27,28 with different tail incidences to investigate the trimmed condition of the aircraft. In addition, a grid convergence study is required for one of the tail settings. Three grids were generated according to specified conditions with a uniform successive grid refinement of about 1.5 in each coordinate direction. The surface grid of the medium grid can be seen in Fig. 13. The three grids contain Figure 13. An overview of the DPW4 CRM model approximately 3.2, 10.1 and 32.1 million nodes. Presented here are results of the grid convergence with strong and weak no-slip adiabatic wall boundary conditions. The flow conditions are M∞ = 0.85, α = 3.06°, and Re = 5×106. In the grid convergence study the angle of attack is adjusted such that CL=0.5 is obtained which corresponds approximately to α ≈ 2.5°. Three levels of multigrid are used in the calculations with semi-coarsening, ratio 1:4, in the boundary layer. Full multigrid is applied to provide a good fine grid initial solution. An algebraic Reynolds stress model (EARSM)25,26 is used for the turbulence and the flow is assumed to be fully turbulent.
13 American Institute of Aeronautics and Astronautics
The convergence to steady state of the density residual and lift is displayed in Fig. 14 together with the grid convergence of the pressure and friction parts of the integrated drag force. Results are compared with strong and weak wall boundary conditions of the no-slip velocity and the turbulent quantities. In the grid convergence plot of the drag components, the quantities are plotted against N −2 3 ~ h 2 which should be proportional to the square of a typical grid size. Provided that the grids have been uniformly refined in all directions and that the flow solver is second order accurate in space, this should result in a straight line. The steady state convergence of the density residual is similar with the two boundary conditions. It is initially faster with weak conditions but becomes about the same after a while. The convergence of the lift is different though, the lift force converges faster with weak conditions. The reason for this is that the level of the lift becomes closer to the final value on coarser grids with weak boundary conditions. The grid convergence is also similar between the two types of boundary conditions; however, with weak boundary conditions the deviation from a straight line is smaller. As expected, the main difference is observed on the coarsest grid and in the Figure 14. DPW4 CRM case at M∞ = 0.85, CL=0.5, Re=5×106 Weak and viscous friction drag. It can strong wall boundary conditions for velocity and turbulent variables. a) Steady clearly be seen that the solutions state convergence of density residual and lift force on the medium grid. b) Grid converge to the same values at convergence of pressure and friction drag on a coarse, medium and fine grid. infinite grid resolution.
V. Summary and conclusions An investigation of weak and strong boundary conditions for no-slip wall boundary conditions is presented. A weak boundary condition implies that the wall quantity is unknown and the boundary flux is computed with prescribed values according to the specific boundary condition. A strong boundary condition implies that the specified wall value is injected in the solution removing the quantity from the list of unknowns. The objective is to investigate the convergence to steady state of the node vertex, finite volume solver Edge for unstructured grids. A theoretical investigation is carried out for a scalar model problem and for the linearized Navier-Stokes equations. The analysis shows that weak boundary conditions affect eigenvalues and spectra and can give improved rates of convergence, in particular for coarse grids. The two types of boundary conditions are then numerically investigated for a number of viscous steady state flow problems in two and three dimensions. Results from several of the test cases show that the steady state convergence is improved using weak wall boundary conditions for the velocity and, in case of turbulent flow, the turbulent wall variables. In particular in combination with multigrid the rate of convergence is often improved where weak boundary conditions on the coarser grids contribute to the convergence in line with the theory. It is also demonstrated that strong boundary conditions can prevent the convergence to a steady state. Furthermore, it is demonstrated that the two boundary conditions converge to the same flow solution as the grid is refined. A penalty parameter σ is part of the wall flux formulation for the weak boundary condition and it is shown that σ ≥ 1 4 is required for stability. It is also demonstrated that too large values, σ ≥ 10 , introduces stiffness that can prevent the convergence to steady state unless the CFL number in the explicit time marching is reduced. A value of σ = 1 has resulted in good convergence in all calculations.
Acknowledgments This work has been carried out within the CESAR project. It has partly been supported by the European Commission under contract No. AIP5-CT-2006-030888. 14 American Institute of Aeronautics and Astronautics
References 1
Jameson, A. “Solution of the Euler Equations by a multigrid Method”, Applied Mathematics and Computation, Vol. 13, 1983, pp. 327-356. 2 Mavriplis, D. J., Venkatakrishnan, V. “A Unified Multigrid Solver for the Navier-Stokes Equations on Mixed Elements”, International Journal for Computational Fluid Dynamics, Vol. 8, 1997, pp. 247-263. 3 Peraire, J., Peirö, J., Morgan, K., “A 3D Finite-Element Multigrid Solver for the Euler Equations”, AIAA Paper 92-0449, 1992. 4 Mavriplis, D. J., “On Convergence Acceleration techniques for unstructured Meshes”, AIAA Paper 1998-2966, 1998. 5 Mavriplis, D. J., “Directional Agglomeration Multigrid techniques for High Reynolds Number Viscous Flows”, AIAA 980612, 1998. 6 Eliasson, P., Weinerfelt, P., Nordström, J. “Application of a Line-implicit Scheme on Stretched Unstructured Grids”, AIAA Paper 2009-0163. 7 Jameson, A. “Time Dependent Calculations using Multigrid, with application to unsteady Flows Past Airfoils and Wings”, AIAA 91-1596, 1991. 8 Arnone, A., Liou, M. and Povinelli, L. “multigrid Time-Accurate Integration of Navier-Stokes Equations”, NASA TM 206373, 1993. 9 Efraimsson, G., Gong, J., Svärd, M. and Nordström, J. “An Investigation of the Performance of a High-Order Accurate Navier-Stokes Code”, European Conference on Computational Fluid Dynamics, ECCOMAS CFD 2006, paper no. 413, TU Delft, The Netherlands, 2006. 10 Abbas, Q. and Nordström, J., “Weak Versus Strong No-slip Boundary Conditions for the Navier-Stokes Equation”, Sixth South African Conference on Computational and Applied Mechanics SACAM08 Cape Town, 26-28 March 2008. 11 Svärd, M. and Nordström, J., “A Stable High-Order Finite Difference Scheme for the Compressible Navier-Stokes Equations: Wall Boundary Conditions”, Journal of Computational Physics, Vol. 227, 2008, pp. 4805-4824. 12 Eliasson, P., “EDGE, a Navier-Stokes Solver for Unstructured Grids”, FOI report, FOI-R-0298-SE, 2005. 13 Eliasson, P., “EDGE, a Navier-Stokes Solver for Unstructured Grids”, Proceedings to Finite Volumes for Complex Applications III, 2002, pp. 527-534. 14 Eliasson, P., Weinerfelt, P. “Recent Applications of the Flow Solver Edge”, Proceedings to 7th Asian CFD Conference, Bangalore, India, 2007. 15 Berglind, T., “An Agglomeration Algorithm for Navier-Stokes Grids”, AIAA-2000-2254, 2000. 16 Haselbacher, A., McGuirck, J. J., and Page, G.J., “Finite Volume Discretization Aspects for Viscous Flows on Mixed Unstructured Grids”, AIAA Journal, Vol. 37, No. 2, 1999, pp. 177-184. 17 Carpenter, M., H., Nordström, J. and Gottlieb, D. “A Stable and Conservative Interface Treatment of Arbitrary Spatial Accuracy”, Journal of Computational Physics, Vol 148 No. 2, 1999, pp. 341-365. 18 Nordström, J. and Carpenter, M. H. “Boundary and Interface Conditions for High Order Finite Difference Methods Applied to the Euler and Navier Stokes Equations”, Journal of Computational Physics, Vol 148 No. 2, 1999, pp. 621-645. 19 Nordström, J. and Carpenter, M. H. “High Order Finite Difference Methods, Multidimensional Linear Problems and Curvilinear Coordinates”, Journal of Computational Physics, Vol 173, 2001, pp. 149-174. 20 Nordström, J., Forsberg, K. Adamsson, C. and Eliasson, P. “Finite Volume Methods, Unstructured Meshes and Strict Stability”, Applied Numerical Mathematics, Vol. 48, 2003, pp. 453-473. 21 Nordström, J. “The Influence of Open Boundary Conditions on the Convergence to Steady State of the Navier-Stokes Equation”, Journal of Computational Physics, Vol. 85, No. 1, 1989, pp. 210-244. 22 Gnoffo, P. A., “An Upwind-Biased, Point-Implicit Relaxation Algorithm for Viscous, Compressible Perfect Gas Flows”, NASA TP-2953, 1990. 23 Svärd, M. and Nordström, J. “Stability of Finite Volume Approximations for the Laplacian Operator on Quadrilateral and Triangular Grids”, Applied Numerical Mathematics, Vol. 51, 2004, pp. 101-124. 24 Turkel, E., “Robust Low Speed Preconditioning for Viscous High Lift Flows”, AIAA Paper 2002-0962. 25 Wallin, S. & Johansson, A.V. “An Explicit Algebraic Reynolds Stress Model for Incompressible and Compressible Turbulent Flows”, Journal of Fluid Mechanics , Vol. 403, 2000, pp. 89-132. 26 Hellsten, A., “New Advanced k-ω Model for High Lift Aerodynamics”, AIAA Journal, Vol. 43, No. 9, 2005, pp. 18571869. 27 Tysell, L., Berglind, T. and Eneroth, P., "Adaptive Grid Generation for 3D Unstructured Grids," Numerical Grid Generation in Computational Field Simulation, Proceedings of the 6th Conference, London, England, July 6-9, 1998, pp. 391400. 28 Tysell, L., "Hybrid Grid Generation for Complex 3D Geometries," Numerical Grid Generation in Computational Field Simulation, Proceedings of the 7th Conference, Whistler, British Columbia, Canada, Sept. 25-28, 2000, pp. 337-346. 29 Spalart, P. R., Allmaras, S. R., “A one-equation turbulence model for aerodynamic flows” AIAA Paper 1992-0439, 1992. 30 Schmitt, V., Charpin, F., “Pressure Distributions on the ONERA-M6 Wing at Transonic Mach Numbers” AGARD-AR138, 1979. 31 Vassberg, J, DeHaan, M. A., Rivers, S. M., Wahls, R. A., “Development of a Common Research Model for applied CFD Validation Studies”, AIAA Paper 2008-6919, 2008.
15 American Institute of Aeronautics and Astronautics