Journal of Computational Physics 230 (2011) 3178–3204
Contents lists available at ScienceDirect
Journal of Computational Physics journal homepage: www.elsevier.com/locate/jcp
Adaptive mesh redistribution method for domains with complex boundaries Jonghoon Bin 1, Ali Uzun 2, M. Yousuff Hussaini ⇑ Computational Science and Engineering, Florida State University, MCH 413, Tallahassee, FL 32306-4510, United States
a r t i c l e
i n f o
Article history: Received 13 May 2010 Received in revised form 23 December 2010 Accepted 11 January 2011 Available online 15 January 2011 Keywords: Boundary orthogonality Monitor function Scale factor Distortion factor Chevron nozzle Mesh redistribution method
a b s t r a c t An adaptive structured mesh redistribution method (ASMRM) that permits smooth transition from non-uniformly distributed boundary points to solution-adaptive interior points and enables the resolution of complex flow in the complex boundary region as well as away from the boundary is proposed. It is a variant of the traditional variational technique. It involves a combination of static and dynamic monitor functions, the former for mesh distribution in the vicinity of a complex boundary and the latter for mesh adaption with the evolving solution elsewhere. Its effectiveness is demonstrated on some example problems, and it is then applied to a chevron nozzle. The proposed method is shown to be capable of generating a mesh with a good balance of orthogonality and smoothness in the entire domain. Ó 2011 Elsevier Inc. All rights reserved.
1. Introduction To exactly resolve complicated flow structures with large flow variations, a numerical scheme that is sufficiently accurate and a mesh size that is sufficiently fine are both required. Once a numerical method is chosen, the accuracy of a numerical solution of a physical problem is critically dependent on the quality of the mesh whereon the governing equations are discretized. Numerical investigation of fluid flows that dynamically develop singular or nearly singular solutions in localized regions (e.g., shocks, shear flows, detonations and sharp interfaces in multiphase flows) requires an extremely fine mesh to accurately resolve large variations in these localized regions. It is commonly accepted that significant improvements in accuracy and efficiency can be obtained by dynamically adapting the mesh to the solution process. There have been numerous studies on solution-adaptive mesh methods [1–8]. These methods can be broadly divided into two groups – the local adaptive mesh refinement methods (also known as h-refinement) and the moving mesh or the timedependent coordinate transformation methods. In a local adaptive mesh refinement method (AMR) (see e.g., Aftosmis, Berger and Melton, Chapter 22 in [1]), solution adaptivity is achieved by adding or removing mesh-points at fixed time levels so that the solution is resolved to a prescribed accuracy. The advantages of such methods are their conceptual simplicity, reliability, and amenability to systematic error analysis. Their main disadvantage is that they require complicated data structures and sophisticated procedures to efficiently and accurately exchange information among elements at the same level or
⇑ Corresponding author. Tel.: +1 850 644 0601; fax: +1 850 645 1514. 1 2
E-mail addresses:
[email protected] (J. Bin),
[email protected] (A. Uzun),
[email protected]),
[email protected] (M. Yousuff Hussaini). Tel.: +1 850 645 9132; fax: +1 850 645 1514. Tel.: +1 850 645 9130; fax: +1 850 645 1514.
0021-9991/$ - see front matter Ó 2011 Elsevier Inc. All rights reserved. doi:10.1016/j.jcp.2011.01.021
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
3179
at different levels of refinement. In the time-dependent coordinate transformation or moving mesh approach (which may be viewed as r-refinement), the mesh points move continuously in the space–time domain to cluster in regions where the solution gradients are large and disperse in regions where they are mild or moderate, as the equations representing the coordinate transformation or the mesh map are strongly coupled with the governing equations of the physical problem. A priori error estimates are difficult, if not impossible, to obtain owing to this nonlinear coupling. An advantage of these methods is that they allow the use of standard solvers because the computations are carried out in the uniformly discretized transform domain. As the coordinate transformation generates a structured mesh, it is straightforward to combine it with existing structured CFD codes and the automatic topology techniques (see, e.g., Eiseman, Chapter 12 in [1]) to get high quality block structured meshes. Furthermore, an optimally working moving mesh method usually requires considerably fewer mesh points than a static method for a given accuracy. Moving mesh methods may further be subdivided into partial differential equation based methods and variational methods. Both may be considered as derivations from the Winslow method [4], which provides a mapping from the computational domain to the physical domain. The body-fitted curvilinear coordinate system approach of Thompson and coworkers (see e.g., Thompson et al. [8]) is of the former type that is based on the solution of a Poisson equation and addresses the issue of mesh-spacing near a boundary via certain control functions to control the spacing of coordinate lines. Sorenson [9] adjusted the control functions to impose boundary orthogonality in two dimensions keeping the boundary points fixed. This approach was later generalized by Thompson [10] to include three-dimensional boundaries. Recently a similar approach has been applied to the problem of supersonic inlet and gas jet nose tip problems [11] and a shock-induced combustion problem with sharp fronts and an induction zone between them [12] in a computational domain containing a hemisphere or a hemisphere plus a cylinder. The variational method of Brackbill and Saltzman [2] involves the minimization of a functional consisting of orthogonality, mesh smoothness, and adaptation measures via the solution of a system of elliptic partial differential equations. Eiseman’s method of adaptive mesh generation by mean-value relaxation is a robust mesh movement algorithm with a capability for mesh clustering on arbitrary surfaces, where the mesh movement is governed by the solution of some elliptic partial differential equation satisfying a maximum (or minimum) principle [17]. A review of the then state-of-the-art in adaptive mesh generation with an emphasis on the interrelationship between the various methods, including variational method, may be found in reference [18]. Another approach to orthogonal mesh generation system is due to Ryskin and Leal [13]. Its intrinsic drawback of mesh smoothness lack of control was addressed by Zhang et al. [14] who proposed a method to control the distortion function (that describes the mesh density or mesh aspect ratio distribution) of the orthogonal mesh generation system imposing the orthogonality in both the interior and boundary regions. Recently, Zhang et al. [15] further improved the method to treat boundary orthogonality in complex geometries with a two-dimensional elliptic orthogonal mesh generation system by using sliding boundary points with the aid of additional auxiliary mesh lines. However, this method is inherently inextensible to adaptive moving mesh generation. To circumvent this difficulty, Zhang et al. [16] developed Poisson-like mesh generation system with source terms derived by considering the cell area equal-distribution principle. Most of these investigations are confined to a demonstration of the methodology on example problems of an academic nature and the computation of flows having a comparatively simple flow structure, such as a free shear layer and a free jet flow in an open field, or internal flows with relatively simple boundaries which do not usually require careful boundary treatment because the mesh quality near the boundary does not considerably affect the computational flow results (usually the mesh points are distributed uniformly along the simple boundary). However, in many realistic problems, which include complex geometries, such as chevron jet flows [22], the mesh structures are not simple. A straightforward application of an adaptive moving mesh or a redistribution method to such problems yields poor mesh quality near the boundaries as well as away from the boundaries, because the mesh map equations do not satisfy the initial constraints of mesh distribution along the boundary, such as orthogonality, smoothness and fineness. Thus, despite the impressive progress achieved in high quality mesh generation procedures, the generation of an orthogonal mapping with sufficient smoothness in geometrically complex domains, which resolves the flow field in the vicinity of the boundaries as well as the complex flow structures away from the boundaries, still poses a challenge. In this paper, we propose an adaptive structured mesh redistribution method (ASMRM) that permits non-uniformly distributed boundary points and enables the resolution of complex flow in the complex boundary region as well as away from the boundaries. It is a variant of the method of Winslow [4] and employs two types of monitor functions – (i) a static monitor function for the weakly orthogonal mesh distribution near the fixed boundary and (ii) a dynamic monitor function for mesh adaptation consistent with solution evolution elsewhere. The methodology is demonstrated on some example problems and is then applied to chevron nozzle jet flow. The computational domain including chevrons is covered with a complex mesh to resolve the fine flow structures in the vicinity of the nozzle exit and the shear layers and wake downstream. This paper is organized as follows. In the next section, the adaptive structured mesh redistribution method (ASMRM) is described in detail and a strategy for the use of the ASMRM in a domain with complex boundaries is briefly explained. The treatment of the boundary-point distribution in the mesh generation and adaptation procedure and the methodology to determine the monitor functions to ensure orthogonality are described in Section 3. In Section 4, ASMRM is demonstrated in the case of two- and three-dimensional examples of complex geometries, as well as in the realistic case of chevron nozzle. Conclusions are presented in Section 5.
3180
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
2. Adaptive mesh generation system 2.1. Adaptive structured mesh redistribution method In this section we follow the spirit of Brackbill and Saltzman [2], Dvinski [3], Huang and Russell [5], and Brackbill [6] and briefly describe the general framework for a harmonic mesh map, which maps the physical domain Xp(x) to the computational domain Xc(n) (both assumed to be Riemannian manifolds):
nðxÞ : Xp ! Xc ;
x ¼ ðx1 ; x2 ; x3 Þ;
ð1Þ
where i; j; m; n ¼ 1; 2; 3:
ð2Þ
n ¼ ðn1 ; n2 ; n3 Þ;
and the corresponding energy integral,
I½n ¼
Z
X
gij
Xp i;j;m;n
@nm @nn dx; @xi @xj
Here gij and gij denote contravariant and covariant metric tensors, respectively, given by
@ni @xk @xk gij ¼ @ni
gij ¼
@nj ¼ rni rnj ; @xk @xk ¼ x ni x nj ; @nj
ð3Þ ð4Þ
^ where xni ¼ @x=@ni and r ¼ @=@xk ¼ ^i@=@x þ ^j@=@y þ k@=@z. Brackbill’s method [6] employs a special case of Eq. (2) with m = n, whose energy integral is
I½n ¼
Z
3 X
Xp m¼1
rnTm G1 m rnm dx;
ð5Þ
ij where Gm = gij and G1 m ¼ g are symmetric positive definite matrices that are referred to as tensor monitor functions. Brackbill further assumes
Gm ¼ xm I;
ð6Þ
where I is the identity matrix. This permits control of grid distribution in each direction independent of the other. The mapping x = x(n) or n = n(x) is made problem specific by choosing the monitor functions (or weight functions) xm(x) as functions of the geometric property, such as orthogonality and smoothness or physical property of the solution, such as velocity or density. Substituting the monitor functions (6) into Eq. (5), the energy integral becomes
I½n ¼
Z Xp
X
1
m
xm ðxÞ
jrnm j2 dx:
ð7Þ
Given that the mesh in the computational domain is uniform, we expect jrnmj to provide a measure of mesh-point density in the physical domain, where a region with large gradients in nm corresponds to a region in the physical domain where the points are clustered together. The Euler–Lagrange equations whose solution minimizes I[n] in Eq. (7) are
@ @nm 1 ¼r G1 rnm ¼ 0: m @xi @xi xm
ð8Þ
These elliptic equations ensure that the mesh thus generated is always smooth. This means that discontinuities in slope at the boundaries are not propagated into the interior of the physical domain. It is computationally expedient to obtain the solution of the elliptic system Eq. (8), as the steady state of the parabolic equation [5]:
@nm 1 þr rnm ¼ 0; @s xm
ð9Þ
where s represents the pseudo time, and it easily combines with a flow solver for the application of an adaptive moving mesh approach. In practice, however, one finds it convenient to solve the ‘‘inverse problem’’ for the Cartesian coordinates xi as functions of ni. The relevant partial differential equations for xi in terms of ni, can then be solved on a simple, possibly uniform, (n1, n2, n3)mesh, using finite difference approximations. The equation for the corresponding inverse problem may be obtained as
@xi 1 @xi @ Jgmn ¼ 0; þ @ s J @nm @nn xm
m; n ¼ 1; 2; 3;
ð10Þ
where xi(i = 1, 2, 3) represent the physical Cartesian coordinates. This equation can be written in vector form as
xs ¼
3 X 3 1X @x @ Jgmn ; J m¼1 n¼1 @nm @nn xm
ð11Þ
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
3181
^ xs ¼ @x=@ s and gij and g can be computed directly from the following where x ¼ ½x1 ; x2 ; x3 ½x; y; zT ¼ ^ix þ ^jy þ kz; ij relation:
gij ¼ ðgkm gln gkn glm Þ=g ;
ð12Þ
where (i, k, l) and (j, m, n) are cyclic, and g is given by
g ¼ J 2 ¼ detðgij Þ ¼ ½xn1 ðxn2 xn3 Þ2 ¼ ½xn ðyg zf yf zg Þ þ xg ðyf zn yn zf Þ þ xf ðyn zg yg zn Þ2 :
ð13Þ
The coefficients gij are the covariant components of the metric tensor, which are symmetric, gij = gji. By introducing the following sub-determinants, one can easily obtain the expression for gij from Eq. (12):
C1 ¼ g22 g33 ðg23 Þ2 ; C2 ¼ g11 g33 ðg13 Þ2 ; C3 ¼ g11 g22 ðg12 Þ2 ; C4 ¼ g13 g23 g12 g33 ; C5 ¼ g12 g23 g13 g22 ; C6 ¼ g12 g13 g11 g23 ;
ð14-bÞ
g11 ¼ C1 =g; g22 ¼ C2 =g;
ð14-cÞ
g33 ¼ C3 =g;
g12 ¼ C4 =g; g13 ¼ C5 =g; g23 ¼ C6 =g:
ð14-aÞ
In two dimensions Eq. (11) reads:
xs ¼
2 X 2 xg 1X @x @ Jgmn xn @ g22 @ g21 @ g12 @ g11 ¼ þ ; J m¼1 n¼1 @nm @nn xm @ g J x1 @n J x2 @ g J x2 J @n J x1 J
ð15Þ
where J = xnyg xgyn and x = [x, y]T. In this case, gij(i, j = 1, 2) is simply given by
g11 g21
g12 g22
¼
x2n þ y2n
xn xg þ yn yg
xn xg þ y n y g
x2g þ y2g
!
:
ð16Þ
The mesh generation system in three dimensions is:
3 X 3 1X @x @ Jgmn xn @ C1 @ C4 @ C5 ¼ þ þ J m¼1 n¼1 @nm @nn xm @ g J x1 @f J x1 J @n J x1 x g @ C4 @ C2 @ C6 x f @ C5 @ C6 @ C3 þ þ þ þ : @ g J x2 @f J x2 @ g J x3 @f J x3 J @n J x2 J @n J x3
xs ¼
ð17Þ
These equations are usually solved on a uniform mesh or on an appropriate initial mesh suited to the problem. As pointed out in the introduction, adaptive moving mesh methods work very well in complex flows in simple domains, and a naive application to complex geometries results in poor mesh quality near the boundaries and away from the boundaries as well. This issue is addressed in the next section. 2.2. Application of ASMRM in a complex domain A proper choice of monitor functions is critical in ASMRM to obtain an optimal mesh distribution from the mesh generator system of Eq. (11). As the constraints on the mesh in the vicinity of complex boundaries and away from the boundaries differ, the two mesh components are handled separately. First, an appropriate monitor function, xstatic ðxÞ, is chosen to conm struct an initial mesh satisfying the constraints of orthogonality, smoothness and fineness in the vicinity of boundaries. Next, the monitor function, xdynamic ðx; tÞ that adapts the mesh to the solution as it evolves is superimposed: m
xm ðx; tÞ ¼ xstatic ðxÞ þ xdynamic ðx; tÞ: m m
ð18Þ
One of the simplest and most popular choices for dynamic monitor functions is xdynamic ðx; tÞ ¼ m qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ^ A specific 1 þ a2 juðx; tÞj2 þ b2 jruðx; tÞj2 , where a and b are adjustable parameters and r ¼ ð@=@xÞ^i þ ð@=@yÞ^j þ ð@=@zÞk. choice in the context of chevron jet flows is discussed in [22]. In the following section, a strategy to obtain an appropriate static monitor function xstatic ðxÞ given an initial mesh, which accommodates a complicated geometry, specifically a chevronm nozzle exit configuration, with non-uniformly distributed mesh points is described. 3. The orthogonal mesh in the vicinity of boundaries In this section we discuss how to accommodate the constraints of orthogonality, smoothness and fineness in the nearboundary mesh without affecting mesh adaptivity to flow variation away from the boundary. 3.1. Mathematical formulation for mesh with boundary orthogonality The distribution of mesh points on the boundary is usually given. For simplicity, we assume that all mesh points on the boundary are fixed (Dirichlet boundary) and construct a mesh that is almost orthogonal to the boundary (Dirichlet orthogonality).
3182
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
3.1.1. Two-dimensional mesh To satisfy the orthogonality constraint on the boundary surface, we use the condition,
where x ¼ ½x; yT ;
xTn xg ¼ xn xg þ yn yg ¼ 0;
ð19Þ
in the mesh generator Eq. (15), which reduces (in the steady state) to
@ 1 @ 1 xn þ xg ¼ 0: xTg static xg xTn static xn @n @g J x1 J x2
ð20Þ
By taking the scalar product of Eq. (20) with xTn and xTg , we obtain
@ 1 @ 1 xTg static xg ¼ 0; and xTn static xn ¼ 0: @n @g J x1 J x2
ð21Þ
Integrating once, we obtain
xTg
1 Jx
static 1
xg ¼
x2g þ y2g J xstatic 1
¼ const: along the n-direction;
ð22-aÞ
¼ const: along the g-direction:
ð22-bÞ
and
xTn
1 Jx
static 2
xn ¼
x2n þ y2n J xstatic 2
In general, ðx2g þ y2g Þ is not proportional to ðx2n þ y2n Þ along the boundary and therefore, two monitor functions, xstatic (along 1 the n-coordinate) and xstatic (along the g-coordinate), are required to satisfy Eq. (22): 2
x2g þ y2g
xstatic ¼ AðgÞ 1
!
J
along the n-direction;
ð23-aÞ
along the g-direction:
ð23-bÞ
and
xstatic ¼ BðnÞ 2
x2n þ y2n J
!
The scale factors in the n- and g-directions are defined as
1=2 hg ¼ x2g þ y2g
1=2 and hn ¼ x2n þ y2n ;
ð24Þ
and the distortion factor f is defined as the ratio of the scale factors, i.e.,
fn ¼
hg ¼ hn
x2g þ y2g x2n þ y2n
!1=2 and f g ¼
hn ¼ hg
x2n þ y2n x2g þ y2g
!1=2 :
ð25Þ
This can also be regarded as the aspect ratio of the mesh in the computational domain. As is obvious from Eq. (23), each 2 2 monitor function can be represented as the ratio of the scale factors (hg and hn Þ and the Jacobian, defined at each boundary point, as depicted in Fig. 1. If the coefficients are set to A(g) = B(n) = q = const., then the monitor functions can be written as 2 2 xstatic ¼ qhg =J; and xstatic ¼ qhn =J: 1 2
Fig. 1. The Jacobian and the scale factors: (a) two-dimensional mesh and (b) three-dimensional mesh.
ð26-aÞ
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
3183
In particular, if the orthogonality condition is satisfied along the boundary, we can approximate the Jacobian as 1=2
1=2 2 xg þ y2g . J hn hg ¼ x2n þ y2n
xstatic ¼ qf n ; xstatic ¼ qf g 1 2
ð26-bÞ
If all of the mesh points along the boundaries are fixed, then the values of the distortion factor f can be determined along the boundaries, and therefrom, the static monitor functions can be determined from Eq. (26) along the boundaries. 3.1.2. Three-dimensional mesh A practical way of constructing a three-dimensional mesh is to keep the surface nodes fixed and allow the interior values of the mesh x(n, g, f) to vary as in the case of a two dimensional mesh. The boundary orthogonality of the mesh can be enforced using the monitor functions, xstatic, computed on the boundary surface. If the orthogonality condition in three dimensions,
xTn xg ¼ xTn xf ¼ xTg xf ¼ 0;
where x ¼ ½x; y; zT
ð27Þ
is applied along the boundaries in Eq. (17), it reduces (in steady state) to
xg @ xn @ C1 C2 xf @ C3 þ þ ¼ 0: J @n J xstatic J @ g J xstatic J @f J xstatic 1 2 3
ð28Þ
Taking the scalar product of Eq. (28) with xTn ; xTg and xTf , we obtain:
! @ C1 @ g22 g33 ðg23 Þ2 ¼ 0; ¼ @n J xstatic @n J xstatic 1 1 ! @ C2 @ g11 g33 ðg13 Þ2 ¼ 0; ¼ @ g J xstatic @g J xstatic 2 2 ! @ C3 @ g11 g22 ðg12 Þ2 ¼ 0: ¼ @f J xstatic @f J xstatic 3 3
ð29-aÞ
ð29-bÞ
ð29-cÞ
These equations can be rewritten as
x2g þ y2g þ z2g x2f þ y2f þ z2f g22 g33 ¼ ¼ const: along the n-direction; J xstatic J xstatic 1 1 2
xn þ y2n þ z2n x2f þ y2f þ z2f g11 g33 ¼ ¼ const: along the g-direction; J xstatic J xstatic 2 2 2
xn þ y2n þ z2n x2g þ y2g þ z2g g11 g22 ¼ ¼ const: along the f-direction: J xstatic J xstatic 3 3
ð30-aÞ ð30-bÞ
ð30-cÞ
From the boundary mesh points, the monitor functions xstatic ; m ¼ 1; 2; 3, along the n-, g-, and f-coordinates, respectively, m are determined from the following relations:
x
static 1
xstatic 2 xstatic 3
0
1 x2g þ y2g þ z2g x2f þ y2f þ z2f A along the n-direction; ¼ A ðg; fÞ @ J 2
! xn þ y2n þ z2n x2f þ y2f þ z2f along the g-direction; ¼ B0 ðn; fÞ J 1 0
x2n þ y2n þ z2n x2g þ y2g þ z2g A along the f-direction:: ¼ C 0 ðn; gÞ @ J 0
ð31-aÞ
ð31-bÞ
ð31-cÞ
Each monitor function comprises the ratio of the scale factors in the relevant two different directions and the Jacobian, J, defined at each mesh point. The scale factors in the n-,g-, and f-directions are:
1=2 hn ¼ x2n þ y2n þ z2n ;
1=2 hg ¼ x2g þ y2g þ z2g ;
1=2 hf ¼ x2f þ y2f þ z2f
and the distortion factors (fn,fg,ff) in three dimensions are:
ð32Þ
3184
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
hg hf fn ¼ ¼ hn fg ¼
hn hf ¼ hg
hn hg ¼ f ¼ hf
h
i1=2 x2g þ y2g þ z2g x2f þ y2f þ z2f ; 2
1=2 xn þ y2n þ z2n
ð33-aÞ
1=2 x2n þ y2n þ z2n x2f þ y2f þ z2f ; 1=2 x2g þ y2g þ z2g
h
f
ð33-bÞ
i1=2
x2n þ y2n þ z2n x2g þ y2g þ z2g : 2
1=2 xf þ y2f þ z2f
ð33-cÞ
In particular, if the coefficients in Eq. (31) are set to
," 0
0 n
A ¼q ¼1
# ," # L M X X 0 0 ðhn Þi;j;k =L ; B ¼ qg ¼ 1 ðhg Þi;j;k =M ; i¼1
," # N X and C ¼ q ¼ 1 ðhf Þi;j;k =N ; 0
0 f
j¼1
k¼1
where (L M N) denote the mesh sizes in the n-, g- and f-directions, respectively, then the monitor functions can be written as 2 2 2 2 2 2 xstatic ¼ q0n hg hf =J; xstatic ¼ q0g hn hf =J; xstatic ¼ q0f hn hg =J: 1 2 3
ð34-aÞ
As the orthogonality condition is satisfied along the boundaries, we can approximate the Jacobian as J hnhghf, and rewrite the monitor functions in terms of the distortion factors:
xstatic ¼ q0n f n ; xstatic ¼ q0g f g ; xstatic ¼ q0f f f : 1 2 3
ð34-bÞ
If all the mesh points along the boundaries are fixed, then the values of the distortion factors fn, fg, and ff can be determined along the boundaries, and consequently, the monitor functions xstatic can be determined from Eq. (34). The next step m is to determine the monitor functions in the interior of the domain ensuring that they are smooth and positive-valued while keeping the distortion factors fixed at the boundaries. 3.2. Determination of the monitor functions 3.2.1. Method 1: Interpolation from the boundary distribution The initial mesh is determined algebraically or generated by interpolation from the given boundary point distribution. Then xstatic on the boundary are computed using Eq. (34) and their values in the interior of the domain are obtained by linear m transfinite interpolation (LTFI) (see e.g., R.E. Smith, Chapter 3 in [1]). For a two-dimensional mesh, the monitor function, xstatic ¼ F, can be determined by its values along the four sides of the m boundary and at the four corner points. Here F(n, 0), F(n, 1), F(0, g) and F(1, g) are the four boundary values, and F(0, 0), F(0, 1), F(1, 0) and F(1, 1) are the known values at the four corner points and n, g 2 [0, 1]. Substituting F(n, g) in xstatic , the blendm ing representation of xstatic is obtained: m
xstatic ðn; gÞ ¼ U þ V UV; m
ð35-aÞ
where
Uðn; gÞ ¼
2 X
ai ðnÞFðni ; gÞ; Vðn; gÞ ¼
i¼1
UVðn; gÞ ¼
bj ðgÞFðn; gj Þ;
ð35-bÞ
j¼1
2 X 2 X i¼1
2 X
ai ðnÞbj ðgÞFðni ; gj Þ; where fn1 ; g1 g ¼ f0; 0g and fn2 ; g2 g ¼ f1; 1g;
ð35-cÞ
j¼1
a1 ðnÞ ¼ 1 n; a2 ðnÞ ¼ n; b1 ðgÞ ¼ 1 g; b2 ðgÞ ¼ g; and n; g 2 ½0; 1:
ð35-dÞ
Similarly, the monitor function can be determined in three dimensions using its values along the six boundary surfaces, the twelve edges, and at the eight corner points of the domain (defined in Eqs. (26) and (34)):
xstatic ðn; g; fÞ ¼ U þ V þ W UV VW UW þ UVW: m
ð35-eÞ
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
3185
Here
Uðn; g; fÞ ¼ Vðn; g; fÞ ¼
2 X i¼1 2 X
ai ðnÞFðni ; g; fÞ;
ð35-fÞ
bj ðgÞFðn; gj ; fÞ;
ð35-gÞ
j¼1
Wðn; g; fÞ ¼
2 X
UVðn; g; fÞ ¼
ck ðfÞFðn; g; fk Þ;
k¼1 2 X
2 X
i¼1
j¼1
UWðn; g; fÞ ¼ VWðn; g; fÞ ¼
ð35-hÞ
ai ðnÞbj ðgÞFðni ; gj ; fÞ;
2 X 2 X
ð35-iÞ
ai ðnÞck ðfÞFðni ; g; fk Þ;
i¼1 k¼1 2 X 2 X
gc
bj ð Þ k ðfÞFðn; j¼1 k¼1 2 X 2 X 2 X
UVWðn; g; fÞ ¼
ð35-jÞ
gj ; fk Þ;
ð35-kÞ
ai ðnÞbj ðgÞck ðfÞFðni ; gj ; fk Þ;
i¼1
ð35-lÞ
j¼1 k¼1
where {n1, g1, f1} = {0,0,0}, {n2, g2, f2} = {1, 1, 1} and n, g, f 2 [0,1]; and
a1 ðnÞ ¼ 1 n; a2 ðnÞ ¼ n; b1 ðgÞ ¼ 1 g; b2 ðgÞ ¼ g; c1 ðfÞ ¼ 1 f; c2 ðfÞ ¼ f:
ð35-mÞ
This interpolation procedure can generate smooth good two- or three-dimensional monitor functions, but does not guarantee mesh orthogonality in the interior domain. 3.2.1.1. Case A: Interpolation without updating the monitor functions. Having obtained the value of the monitor function xstatic m along the boundary, the simplest and most practical way to get the values of the monitor function within a domain is by the LTFI from the fixed boundary values without updating them at every iteration process of adaptive mesh generation based on Eqs. (15) and (17) in two and three dimensional cases, respectively. It is found that the use of Eq. (34-b) for computing xstatic m results in a better mesh aspect ratio than the use of Eq. (34-a). 3.2.1.2. Case B: Interpolation coupled with updating the monitor functions at every iteration. The monitor functions in the interior of the mesh are interpolated from the boundaries using LTFI as in Case A, but then they are updated during the iteration process of the ASMRM system (Eqs. (15) and (17)). In this case, it is found that the use of Eq. (34-a) for defining xstatic , leads to m a better mesh aspect ratio than the use of Eq. (34-b). This is due to the fact that the Jacobian reflects the continuous mesh variation during the iteration. On the other hand, the use of a fixed distortion factor constrains the mesh variation, which sometimes results in the skewness or overlapping of local regions in the interior of the domain. Further discussion is deferred to Section 4. 3.2.2. Method 2: Weak orthogonality The approach of the previous section imposes the orthogonality condition at the boundary but not in the interior. The monitor function, xstatic , is a function of both the geometry of the domain and the mesh size. Enforcement of strict orthogonality m and mesh adaptivity to flow variation results in mesh distortion, particularly in a domain with complex geometry as shown Fig. 7(f). In order to slightly relax the orthogonality condition locally (weak orthogonality) [14], the following approach is proposed. Consider a mesh size of L M in the n- and g-directions for the two-dimensional case or a size of L M N in the n-, g- and f-directions for the three-dimensional case. Now, we define the averaged monitor functions as follows:
ðKn Þi ¼ M1
M P j¼1
ðKn Þi;j ;
ðKg Þj ¼ 1L
2
L P i¼1
9 = ðKg Þi;j >
2
where Kn ¼ qhn =J and Kg ¼ qhg =J ðKn Þi ¼
1 MN
1 ðKg Þj ¼ LN
M P N P j¼1 k¼1 L P N P i¼1 k¼1
ðKn Þi;j;k
ðKg Þi;j;k
> ;
in 2-D;
ð36-aÞ 9 > > > > > > > > > > > > =
> > > > > ðKf Þk ¼ ðKf Þi;j;k > > > i¼1 j¼1 > > > > 2 2 2 where Kn ¼ qhn =J; Kg ¼ qhg =J and Kf ¼ qhf =J ; 1 LM
L P M P
in 3-D:
ð36-bÞ
3186
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
Here, the subscripts (i, j) and (i, j, k) denote the mesh indices in the computational domain. For example, ðKn Þi is the averaged monitor function along the g-direction at the n = i line in two dimensions and along the g- and f-directions at the n = i surface in three dimensions. These terms in Eq. (36) characterize the local smoothness resulting from averaging the local monitor function values satisfying mesh orthogonality. Therefore, a proper local balance of orthogonality and smoothness can provide improved mesh quality in a domain. In the present approach, this balance is achieved by the weighting of the averaged monitor functions and the local monitor functions satisfying local orthogonality:
xstatic ¼ k1 ðKn Þi þ ð1 k1 ÞðKn Þi;j ; xstatic ¼ k2 ðKg Þj þ ð1 k2 ÞðKg Þi;j in 2-D; 1 2
ð37-aÞ
9
xstatic ¼ k1 ðKn Þi þ ð1 k1 ÞðKn Þi;j;k > 1 > = static x2 ¼ k2 ðKg Þj þ ð1 k2 ÞðKg Þi;j;k in 3-D: > > xstatic ¼ k3 ðKf Þk þ ð1 k3 ÞðKf Þi;j;k ; 3
ð37-bÞ
Here kl(l = 1, 2 in 2-D or l = 1, 2, 3 in 3-D) are adjustable parameters assuming a value between 0 and 1. Setting the parameters kl equal to zero yields Eqs. (26) and (34), which enforce local orthogonality at all mesh points. Setting the parameters kl equal to 1, the strict local orthogonality constraint is slightly relaxed. As mentioned previously, kl are adjustable parameters that the user can specify in a given problem. However, it is desirable to find a criterion for kl that automatically balances orthogonality and smoothness in the whole domain. A possible criterion is to define kl as the ratio of the difference and the sum of the local monitor function (Kni Þ and the averaged monitor function (Kni Þ in the corresponding directions:
ðk1 Þi;j ¼
ðk1 Þi;j;k
ðKn Þi ðKn Þi;j
ðKg Þj ðKg Þi;j
; ðk2 Þi;j ¼ ð2-DÞ; ðKn Þi þ ðKn Þi;j ðKg Þj þ ðKg Þi;j
ðKn Þi ðKn Þi;j;k
ðKg Þj ðKg Þi;j;k
ðKf Þk ðKf Þi;j;k ¼ ; ðk2 Þi;j;k ¼ ; ðk3 Þi;j;k ¼ ðKn Þi þ ðKn Þi;j;k ðKg Þj þ ðKg Þi;j;k ðKf Þk þ ðKf Þi;j;k
ð38-aÞ
ð3-DÞ:
ð38-bÞ
In some situations, a hybrid method combining methods 1 and 2 may prove effective. For example, one can apply method 2 along a complicated boundary surface while one can use method 1 along the surface having simple two-dimensional shape:
xstatic ðn; gÞ ¼ U þ V UV; 1 xstatic ðn; gÞ ¼ k2 ðKg Þj þ ð1 k2 ÞðKg Þi;j in 2-D; 2
ð39-aÞ ð39-bÞ
where U, V and UV are already defined in Eq. (35). The monitor function in Eq. (39-a) will keep the mesh distribution along the n-direction fixed during the iteration. On the other hand, the monitor function in Eq. (39-b) will adjust the mesh size along the g-direction by balancing orthogonality and the smoothness in a domain. 3.3. Mesh clustering close to the boundary In some cases, one may need mesh clustering near the boundary to improve the resolution of boundary layers. An efficient way to deal with this issue is to adjust the monitor function in the region where mesh concentration is needed. For example, if the clustering is required on two sides, as shown in Fig. 2, the final monitor function can be written as a linear combination of monitor functions:
Fig. 2. The schematic for grid clustering near the boundary.
3187
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
x¼m xstatic þ xdynamic þ xc1 ; m m
ð40Þ
c 1
c 1
where x is the monitor function for mesh clustering. The following functions can be good choices for x in two dimensions. (a) Gaussian function:
xc1 ¼ xstatic ð1; jÞ Func1 ði; jÞ þ xstatic ðL; jÞ Func2 ði; jÞ; 1 1
ð41-aÞ
Func1 ði; jÞ ¼ a1 exp½b1 ði 1Þ=ðL 1Þ;
ð41-bÞ
Func2 ði; jÞ ¼ a2 exp½b2 ðL iÞ=ðL 1Þ;
ð41-cÞ
where i = 1, . . . , L, j = 1, . . . , M and an and bn (n = 1, 2) are adjustable parameters. (b) Hyperbolic tangent function:
xc1 ¼ Func1 ði; jÞ þ Func2 ði; jÞ; Func1 ði; jÞ ¼ 0:5a1 ½xstatic ð1; jÞ xstatic ð1; jÞ tanhfb1 ði i1 Þ=ðL 1Þg; 1 1 static static ði; jÞ ¼ 0:5a x ðL; jÞ þ x ðL; jÞ tanhfb2 ði i2 Þ=ðL 1Þg ; Func2 2 1 1
ð42-aÞ ð42-bÞ ð42-cÞ
where in, an, and bn(n = 1, 2) are adjustable parameters. Mesh clustering in other directions can be done in a similar manner. Also, this approach can be easily extended to three dimensions. 3.4. Numerical solution technique 3.4.1. Numerical discretization In 2-D, for example, it is assumed that the computational domain (Xc) is a rectangle and a uniform mesh is used where (ni, gj), i = 1, . . . , L and j = 1, . . . , M. In this study, the spatial derivative terms are discretized using the central finite difference scheme:
! 2 2 @ g22 @ xg þ yg ¼ @n J x1 i;j @n J x1 i;j
x2g þ y2g
!
J x1
iþ1=2;j
x2g þ y2g J x1
! ;
ð43-aÞ
i1=2;j
where
ðxg Þiþ1=2;j ¼
1 1 1 ðxiþ1;jþ1 xiþ1;j1 Þ þ ðxi;jþ1 xi;j1 Þ ; 2 2 2
ð43-bÞ
ðxn Þiþ1=2;j ¼ ðxiþ1;j xi;j Þ where x ¼ ðx; yÞ;
ð43-cÞ
ðJÞiþ1=2;j ¼ ½ðxn Þiþ1=2;j ðyg Þiþ1=2;j ðxg Þiþ1=2;j ðyn Þiþ1=2;j ; and 1 1 1 ðx1 Þiþ1=2;j ¼ fðx1 Þiþ1;j þ ðx1 Þi;j g þ fðx1 Þiþ1;jþ1 þ ðx1 Þi;jþ1 þ ðx1 Þiþ1;j1 þ ðx1 Þi;j1 g : 2 2 4
ð43-dÞ ð43-eÞ
The subscripts denote mesh points as shown in Fig. 1. Other terms in the ASMRM are discretized in the same manner as Eq. (43) and the extension to 3-D is straightforward. As shown in Fig. 1, all of the derivative terms are discretized using the midpoints. For example, the derivative term, @/@n, is discretized using the values at (i + 1/2, j, k) and (i 1/2, j, k). For the pseudo time derivative, the first order Euler forward method is used. 3.4.2. Boundary conditions The boundary conditions have a considerable effect on the resulting mesh distribution. In general, two types of boundary conditions are employed: the Dirichlet boundary condition with a fixed specified nodal distribution along the boundaries, and the Dirichlet–Neumann boundary condition (called the sliding boundary condition), which allows the mesh nodes to slide along the boundary (Dirichlet) in order to satisfy the Neumann condition. In the current study, only the Dirichlet boundary condition is used for all boundaries to test the proposed method. 3.4.3. Determination of time step and convergence criterion The time step for the temporal advancement in Eqs. (15) and (17) is determined in 3-D by [22]
n1d ¼ j@xi =@n1 j=J; n2d ¼ j@xi =@n2 j=J; n3d ¼ j@xi =@n3 j=J; ( ) sn1 sn2 sn3 1 Ds ¼ Min CFL for all mesh points; sn1 sn2 þ sn2 sn3 þ sn1 sn3 Maxfxm g i;j;k where sn1 ¼ 1=n1d ; distribution.
ð44-aÞ ð44-bÞ
sn2 ¼ 1=n2d and sn3 ¼ 1=n3d . In this study, CFL is constant and varies in each problem to get the smooth mesh
3188
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
The convergence condition is based on the maximum mesh speed defined as the ratio of the maximum mesh movement to the time step. The mesh is said to have converged and the computation is stopped if the maximum mesh speed is less than a certain user-specified tolerance:
kdx=dsk1 Max xðkÞ xðk1Þ =dsðkÞ < tolerance;
ð45Þ
where k is the iteration number in the ASMRM. 3.4.4. Smoothing of monitor functions The dynamic monitor function, xdynamic , is usually not smooth in all of the domain since it is determined by the flow varim ables u(x, t). (The monitor function, for instance, may be of the form xdynamic ðx; tÞ ¼ ½1 þ ðajuðx; tÞjÞ2 þ ðbjruðx; tÞjÞ2 1=2 ; as m mentioned in Section 2.2). It is common to use temporal or spatial smoothing on the monitor function, or directly on the mesh map. In this study, we apply the following low-pass filter for the spatial smoothing:
wm i;j wm i;j;k
1 1 m 1 m m m m m þ wm þ wm w þ w wm i1;j þ wi;jþ1 þ wi;j1 þ iþ1;j1 þ wi1;jþ1 þ wi1;j1 ; 4 i;j 8 iþ1;j 16 iþ1;jþ1 1 m 1 m m m m m wi;j;k þ wiþ1;j;k þ wm i1;j;k þ wi;jþ1;k þ wi;j1;k þ wi;j;kþ1 þ wi;j;k1 8 16 1 m m m m m m m m þ w þ wm i;j1;kþ1 þ wi;jþ1;k1 þ wi;j1;k1 þ wiþ1;j;kþ1 þ wiþ1;j;k1 þ wi1;j;kþ1 þ wi1;j;k1 þ wiþ1;jþ1;k 32 i;jþ1;kþ1 1 m m m m m þ wm wm þ wm iþ1;j1;k þ wi1;jþ1;k þ wi1;j1;k þ iþ1;j1;kþ1 þ wi1;jþ1;kþ1 þ wi1;j1;kþ1 þ wiþ1;jþ1;k1 64 iþ1;jþ1;kþ1 m m þ wm iþ1;j1;k1 þ wi1;jþ1;k1 þ wi1;j1;k1 :
ð46-aÞ
ð46-bÞ
In the initial mesh generation step (Section 3.5), it is possible to obtain smooth meshes without spatial smoothing of the monitor function or the mesh map. In the adaptive mesh generation step, however, spatial smoothing of the dynamicmon dynamic dynamic itor function (xdynamic Þ is applied by setting wm in two dimensions, where m = 1, 2 and wm in m i;j ¼ xm i;j;k ¼ xm i;j i;j;k three dimensions, where m = 1, 2, 3. 3.4.5. Criteria for mesh quality Mesh quality is evaluated quantitatively by the standard academic criteria, such as maximum deviation orthogonality (MDO), averaged deviation from orthogonality (ADO), maximum mesh aspect ratio (MAR), and averaged mesh aspect ratio (AAR) [14]. ADO and MDO are used to measure orthogonality, while AAR and MAR evaluate global smoothness. These indicators are defined in two dimensions as follows: (a) MDO = Max(hi,j).
180
P 1 PL 1 xn xg þyn yg
where h (b) ADO ¼ M1 M h ¼ cos 90 i;j j¼1 L i¼1 i;j
p
. hn hg i;j h i g n (c) MAR ¼ Max Max fi;j ; fi;j . i P h1 PL g n (d) AAR ¼ M1 M . j¼1 L i¼1 Max fi;j ; fi;j For all of the examples, the initial meshes with a non-uniform distribution along the four boundaries are generated by the algebraic method. 3.5. General solution process Basically, mesh point movement can be achieved in two different ways, namely, by a static or a dynamic method. In a static method, the mesh points are redistributed at a fixed time according to a mesh generating rule. All of the physical variables in the new mesh are interpolated from those in the old mesh. In a dynamic, or moving, mesh method, the mesh points move continuously in the space–time domain according to a moving mesh equation without any interpolation. The ASMRM can be applied to both cases. This study employs the static procedure, which consists of two parts: initial mesh generation with the treatment of the boundary distribution discussed in Section 3, and adaptive mesh generation discussed in Section 2. This procedure is simply described as follows: 3.5.1. Initial mesh generation stage (a) (b) (c) (d)
Identify the boundaries of the domain. Set up an initial mesh using the algebraic method as the initial condition. Calculate the distortion factor f ni from the definition of Eq. (25) or Eq. (33). Calculate the monitor functions from Eq. (26) or Eq. (34).
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
3189
(e) Determine the monitor functions xstatic inside the domain through the process of Section 3.2. m (f) Solve Eq. (15) or Eq. (17) with the monitor functions obtained from step (e). Update the mesh and the monitor functions. (g) Check if the convergence condition of Eq. (45) is satisfied. If not, repeat steps from (c) to (f). If convergence is reached, save the mesh points and the monitor functions. Start the following adaptive mesh generation step with the additional monitor function xdyamic for mesh adaptation in the region where flow large variations exist. m 3.5.2. Adaptive mesh generation stage ðnÞ ðnÞ ðnÞ ðnÞ (a) Save the mesh points, dependent variables, and the monitor functions x0 ; u0 ðx0 Þ; xm;0 ðx0 Þ where xm;0 ¼ dynamic static xm þ xm;0 . (The sub-script (0) denotes the iteration number in the ASMRM of Eq. (15) or Eq. (17) and the super-script represents the physical time at t(n) = nDt.) During the computation, xstatic remains fixed. m ðnÞ ðnÞ ðnÞ ðnÞ (b) Update xkþ1 from xk and xm;k by solving Eq. (15) or Eq. (17). During the computation, interpolate xm;kþ1 from the ðnÞ ðnÞ starting values xm;0 ðx0 Þ onto the new mesh xkþ1 . (c) Repeat step b until convergence is reached. ðnÞ (d) If convergence is reached, save the mesh points. Interpolate all dependent variables ukþ1 from the values saved in ðnÞ step (a) onto the new computational mesh (xkþ1 Þ. ðnÞ (e) Compute physical solutions (u(n+1)) from the transformed underlying values ukþ1 and compute xdynamic with the m smoothing of Eq. (46) at (n + 1) time. (f) Go to step (a) for the mesh adaptation. In the static method, the interpolation technique is required to approximate both the flow variables, u(x), and the monitor functions, xm, from the original mesh to the newly adapted mesh. In this paper, bilinear and trilinear interpolation is used for two-dimensional and three-dimensional meshes, respectively. In practice, step (b) in Section 3.5.2 is repeated 3–5 times. Compared to the iterative mesh generation method, the ASMRM advances in time and the mesh gradually adapts to the region where large variation in a flow exists. Therefore, interpolation procedure is rather simple because the updated mesh points do not move too far from their previous positions. For example, if the mesh index of the previous mesh is (l(k), m(k), n(k)), searching a point is performed in the range of 3 < l(k + 1) l(k), m(k + 1) m(k), n(k + 1) n(k) < 3.
4. Numerical results and discussion 4.1. Two-dimensional examples 4.1.1. Effect of the static monitor function To show the effect of the static monitor function, xstatic , the following mesh computation is performed in two dimensions. m Initially, the mesh points are distributed uniformly along the y-direction, while the mesh point distribution along the xdirection is defined by the following function:
xðiÞ ¼ ½Dxmin þ d ði 1Þ ði 1Þ;
yðjÞ ¼ Dy ðj 1Þ Dy ðM 1Þ=2;
ð47Þ
where d = (Dxmax Dxmin)/(L 1), Dxmin = 0.01, Dxmax = 0.05, Dy = 0.04 and the mesh size is (L, M) = (51,51). All of the boundary points are fixed during the computation. Fig. 3 shows the mesh generation result obtained from the ASMRM using Eq. (15). The mesh in Fig. 3(a) is obtained using Eq. (15) with x1 = x2 = 1, which corresponds to the traditional elliptic mesh generation equation without mesh clustering. The mesh in Fig. 3(b) is computed using the following monitor functions, which are determined by Eq. (26):
x1 ¼ xstatic ¼ y2g =J 1
i;j¼M
¼ ðf n Þi;j¼M ;
x2 ¼ xstatic ¼ ðx2n =JÞi¼L;j ¼ ðf g Þi¼L;j : 2
ð48Þ
Eq. (15) with x1 = x2 = 1 has the intrinsic characteristic of a smooth and one-to-one mapping between the physical and the computational domains, and results in a quasi-equal length distribution in each mesh. Quasi-equal length distribution means that the aspect ratio of each mesh cell is approximately equal to one (as shown in Fig. 3), which is due to the fact that the elliptical mesh equation does not have a preferred propagation direction. Even though the mesh is smooth within the domain, the mesh quality along the boundary does not seem satisfactory in terms of orthogonality. Fig. 3(b) shows the result computed with the monitor function given by Eq. (48). During the iteration, the monitor function was fixed. The result shows that good orthogonality along the boundary is obtained when Eq. (48) is employed. Furthermore, the interior mesh lines within the domain are orthogonal or almost orthogonal. The second case is a mesh with non-uniformly distributed mesh points along the y-direction and uniformly distributed mesh points along the x-direction. This kind of mesh is usually used for the computation of a boundary layer flow in a channel or pipe. The initial mesh is:
3190
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
0.5
0.5
0
0
y
1
y
1
-0.5
-0.5
-1
0
1
0.5
1.5
x
2
-1
2.5
0
0.5
1
(a)
1.5
x
2
2.5
(b)
Fig. 3. Mesh generation result from ASMRM: (a) mesh result without the static monitor function and (b) mesh result with the static monitor function.
x ¼ ði 1Þ=ðL 1Þ; ( Ab1 ðeab=b1 1Þ=ðea 1Þ : 0 6 b 6 b1 ; y¼ A Að1 b1 Þðeað1bÞ=ð1b1 Þ 1Þ=ðea 1Þ : b1 6 b 6 1;
ð49Þ
where b = (j 1)/(M 1), a = 4.0, A = 0.75,b1 = 0.5, and (L, M) = (51, 51) is the mesh size. The mesh in Fig. 4(b) is computed using the following monitor functions, which are also determined by Eq. (26):
xstatic ¼ ðf n Þi;j ¼ ðhg Þi¼1;j =ðhn Þi;j¼1 ; xstatic ¼ ðf g Þi;j ¼ ðhn Þi;j¼1 =ðhg Þi¼1;j ; 1 2 2
2
ð50-aÞ
2
xdynamic ¼ 10:0 e10½20ðx0:5Þ þ50ðy0:4Þ 1 where m ¼ 1; 2: m
ð50-bÞ
Fig. 4(a) shows the result from the general mesh generation with xm = 1. The mesh size is nearly uniform in the entire domain, except in the region near the boundary. Fig. 4(b) shows the result from the method suggested in this study with
only the static monitor function xm ¼ xstatic used to satisfy boundary orthogonality. When the boundary mesh distribution m is considered, it is seen that we can obtain a smooth and well-behaved mesh distribution along the boundary. Finally, Fig. 4(c) shows the result of adaptive mesh generation combined with the method proposed in this study. In this case, the final monitor functions are given by xm ¼ xstatic þ xdynamic . In this figure, it is shown that this method can provide good m m mesh quality in the entire domain, including the boundary, whether mesh adaptation is performed or not. 4.1.2. Numerical test The following examples are analyzed using the method proposed in this study to show the effectiveness and the robustness of the method. For all examples, the initial meshes with uniform or non-uniform nodal distribution along the four boundaries are created using the algebraic method. As mentioned before, the Dirichlet boundary condition is applied at all boundaries. The initial mesh is generated algebraically using uniformly distributed points along the x-axis and a mesh size of (L, M) = (51, 51). Example 1. A domain with concave boundary is bounded by
xb ¼ 0; xb ¼ 1; yb ¼ 0; and yb ¼ 0:75 þ 0:25 sin½pð0:5 þ 2xÞ
0.7
0.7
0.6
0.6
0.6
0.5
0.5
0.5
0.4
0.4
0.4
y
0.7
y
y
and the mesh on the left and the right boundaries is clustered by using Eq. (49).
0.3
0.3
0.3
0.2
0.2
0.2
0.1
0.1
0.1
0
0
0
0.25
0.5
x
(a)
0.75
1
0
0.25
0.5
x
(b)
0.75
1
0
0
0.25
0.5
x
0.75
1
(c)
Fig. 4. Mesh generation result from the ASMRM: (a) mesh result without the monitor functions (xm = 1), (b) mesh result only with the static monitor
, and (c) mesh result with both the static and the dynamic monitor functions (xm ¼ xstatic functions xm ¼ xstatic þ xdynamic Þ. m m m
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
3191
Example 2. A domain with convex boundary is bounded by
xb ¼ 0:5;
xb ¼ 0:5;
yb ¼ 0; and yb ¼ 0:75 þ 0:25 sin½pð0:5 þ 2xÞ
and the mesh on the left and the right boundaries is clustered by using the second term of Eq. (49). Example 3. A domain with complex boundaries in both sides is bounded by
xb ¼ 0;
xb ¼ 2 þ 0:05 sin½3py=1:45;
yb ¼ 0:1 cos½4px; and yb ¼ 1:2 þ 0:25 cos½2px:
Figs. 5–7 show the meshes generated by different methods and treatments for each example. In these figures, method 1 represents use of the interpolation method from the boundary distribution and method 2 depicts weak orthogonal treatment, which was already mentioned in Section 3.2. It is shown that the method proposed in this study with the ASMRM of Eq. (15) does not yield a folded mesh and large skewness in either a convex or a concave domain. Fig. 5 shows the meshes obtained by the methods introduced in this study at the initial mesh generation stage in a domain with a concave boundary (Example (1)). In this example, CFL = 5.0 103 and tolerance = 1.0 102were used in Eq. (44) and (45), respectively. In method 1, two approaches are implemented: One is to use interpolation without updating the monitor functions at every iteration (Case A), and the other is to utilize interpolation with an update of the monitor functions (Case B). Fundamentally, the monitor functions are evaluated at the boundaries and interpolated to the interior using linear transfinite interpolation. As seen in Figs. 5(a) and (b), orthogonality along the boundaries is better in Fig. 5(b) than that in Fig. 5(a). This is due the fact that the monitor functions in Fig. 5(a) are initially determined and kept constant during the computation, while those in Fig. 5(b) are continuously updated at each iteration to maintain orthogonality along the boundary. Figs. 5 (c)–(e) show the mesh results obtained from method 2 with different parameter values of k. There is little difference among these meshes, even though different values of k are used. However, it seems that the orthogonality performance in automatic adjustment given by Eq. (38) is better than that in the other cases of method 2. By the definition of Eq. (37) in method 2 to determine the monitor functions, one can automatically obtain the balance between local orthogonality and local smoothness. Specifically, it is shown that a smooth and continuously varying mesh distribution can be obtained using method 2. It is also found that the boundary orthogonality in method 1 is much more satisfactory than that in method 2, as shown in this figure. Method 1 is based on the boundary orthogonality whereas method 2 is based on the global averaging between the smoothness and the orthogonality in a domain. Fig. 5(f) represents the mesh obtained from the hybrid method combining the two methods. The static monitor functions xstatic and xstatic are determined from method 1 (Case A) and method 2 (k1 = k2 = 1), respectively. Due to the uniform mesh 1 2 distribution along the bottom boundary, xstatic is constant ((fn)i, j=1) in this case. However, xstatic has the spatial distribution 1 2 shown in Fig. 5(f). Using the hybrid method, it is possible to cluster the mesh near the top and bottom boundaries while maintaining a horizontal mesh line along the x-axis. This approach may be a good choice to generate the mesh for an internal flow computation, such as convergent-divergent nozzle flow. Fig. 6 shows the meshes of Example (2), which has a convex boundary. In this example, CFL = 5.0 103 and tolerance = 1.0 103were used. In the convex example, a very different mesh distribution is obtained when method 1 is applied, as shown in Fig. 6(a) and (b). The updating process of the distortion factors at every iteration results in a coarser mesh distribution along the convex boundary than in other regions. This means that the interpolation with the update of the monitor functions does not fix the mesh size along the boundary, especially in the convex region, and allows the mesh to slide along the boundary to get the minimum of the functional which satisfies the orthogonality condition in the whole domain. Therefore, careful consideration is required when method 1 with the update is applied in a convex domain. This can be determined by performing mesh clustering along the convex boundary mentioned in Section 3.3, which will be shown later. Figs. 6(c)–(e) show the mesh results obtained from method 2 with different parameter values (k). It is found that there is little difference among these meshes except the region along the convex boundary even though different values of k are used. Specifically, using method 2 with automatic adjustment of Eq. (38), it is shown that the values defined in Eq. (38) are adequate to get a smooth and continuously varying mesh distribution in the whole domain, including the convex boundary region. In these figures, it is seen that the mesh lines along the boundaries other than the top boundary are non-orthogonal. This shows that it is very difficult to satisfy orthogonality at all mesh points, including the mesh points along the boundaries, in the ASMRM using Eq. (26) or Eq. (34). The reason for this is that the ASMRM derived from the minimization process of Eq. (7) tries to find the global minimum of Eq. (7). So, a good way to maintain boundary orthogonality is to use the sliding boundary condition along the boundary, which is called the Dirichlet–Neumann boundary condition. The method introduced in this study can also be combined with the sliding boundary condition, but this will be not considered in this study because it introduces additional difficulties to move nodal points along the complex boundary. This work will be performed in a future study. It is also found that method 2 with automatic adjustment shows a good mesh distribution near the convex boundary, whereas method 2 with global averaging (k1 = k2 = 1) results in a coarser mesh along the convex boundary. Fig. 6(f) shows the mesh obtained using the hybrid method. The static monitor functions xstatic and xstatic are determined 1 2 from method 1 (Case A) and method 2 (k1 = k2 = 0.5), respectively. Due to the uniform mesh distribution along the bottom boundary, xstatic is constant ((fn)i,j=1) in this case. However, xstatic has the spatial distribution shown in Fig. 6(f). Using the 1 2 hybrid method, it is possible to obtain a mesh clustered on the top boundary and a constant mesh line along the x-axis.
3192
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
Fig. 5. Mesh results during initial mesh generation stage in a domain with a concave boundary (Example (1)): mesh (left), xstatic (middle), xstatic (right). 1 2
Fig. 7 shows the meshes in a domain with complex boundaries on both sides (Example (3)). In this example, CFL = 5.0 103 and tolerance = 1.0 102 were used. Different mesh distributions are obtained when methods 1 and 2 are applied, as shown in Figs. 7(a)–(e). In method 1, the update of the static monitor function allows the mesh to be more
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
3193
Fig. 6. Mesh results during initial mesh generation stage in a domain with a convex boundary: Example (2).
orthogonal along the boundary than the approach without updating. However, mesh smoothness seems to be worse, especially along the n-direction and mesh coarseness is increased along the convex region when method 1 with the update is used. Figs. 7(c)–(e) show the meshes obtained from method 2 with different parameter values (k). In this figure, it is shown
3194
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
(a) Method 1 (Case A): without updating (b) Method 1 (Case B): with updating
Fig. 7. Mesh results during initial mesh generation stage in a domain with complex boundaries at both sides: Example (3).
that a balance between orthogonality and smoothness in each mesh can be a good choice to generate a mesh with good quality in a domain with a complex boundary. Compared to method 1, mesh coarseness can be decreased using method 2. Fig. 7(f) shows the mesh generation result with fully orthogonal treatment in the whole domain (k1 = k2 = 0) in Example (3). It is observed that a severe mesh line skewness is generated when orthogonality is applied at all mesh points by setting the coefficients in Eq. (37) to zero, k1 = k2 = 0. As seen in this figure, generating a mesh satisfying orthogonality at all points is very difficult because of complicated boundary shapes and nodal distribution. Therefore, the compromise of orthogonality for smoothness by using averaging along each direction can be good choice to get a smooth and weakly orthogonal mesh. Fig. 8 shows the error histories in these examples. In order to compare the convergence in each approach, the maximum norm of the mesh speeds defined in Eq. (45),kLk1, are chosen and plotted in Fig. 8. Fig. 8(a) shows the time histories for
3195
Method1: without updating Method2: global averaging Method2: local adjustment Method2: automatic adjustment
Method1: with updating Method2: local adjustment
0
Method2: automatic adjustment
-1
-3
0.06
0.08
0.1
Method2: global averaging Method2: local adjustment Method2: automatic adjustment 0
10
time
(a) Example (1)
-1
10
-2
10
0.04
Method1: with updating
10
10
0.02
Method1: without updating 1
10
Method2: global averaging
10
100
10-1
Method1: without updating
1
10
Method1: with updating 1
10
L ∝ norm of the mesh speeds
L ∝ norm of the mesh speeds
L ∝ norm of the mesh speeds
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
-2
0.2
0.4 time
0.6
0.8
10
(b) Example (2)
0.1
0.2
time
0.3
0.4
0.5
(c) Example (3)
Fig. 8. Time histories of L1-norm of the mesh speed in each example.
Example (1). In the case of method 1, the convergence without updating is faster than that with updating. In the case of method 2, automatic adjustment shows the fastest convergence speed. In Example (2), as shown in Fig. 8(b), method 1 results in much faster convergence than method 2. Especially, it is observed that the convergence speed in method 2 with automatic adjustment is very fast in the early stages but decreases with time due to the automatic adjustment between orthogonality and smoothness at all points. Fig. 8(c) shows the error histories in Example (3). In this figure, method 1 shows continuously decreasing mesh speeds when compared with method 2. In the case of method 2, it is observed that the consideration of local orthogonality decreases the mesh convergence speed during the early stages but the convergence speeds for each case become approximately equal as time increases. Therefore, it can be concluded that the different boundary shapes and mesh distributions in each problem determine the convergence rate. Table 1 shows the computational results of criteria mentioned in Section 3.4.5 for mesh quality in 2-D examples. MDO and ADO are utilized to measure the orthogonality, whereas MAR and AAR are introduced to evaluate the smoothness. In the case of Example (1), method 2 with automatic adjustment shows the best orthogonal characteristic. On the other hand, method 1 with updating (Case B) shows the best smoothness characteristic. In the case of Example (2), method 1 with updating (Case B) and method 2 with global averaging (k1 = k2 = 1) represent the best results of orthogonality and smoothness, respectively. As shown in this table, it is difficult to improve both orthogonality and smoothness at the same time. Therefore, one must choose the appropriate method based on which characteristic is more important in a mesh, i.e., method 1 for improving local orthogonality along the boundary and method 2 for the global balance between orthogonality and smoothness. 4.1.3. Mesh clustering result along the boundary In some cases, one may need mesh clustering near the boundary to improve the numerical solution of the flow. As seen in Fig. 6(b), the ASMRM of the elliptic type may generate a coarse mesh distribution near the convex region. To overcome this difficulty, and to generate a fine mesh in some regions (e.g., the boundary), the numerical treatment mentioned in Section 3.3 is used. Fig. 9 shows the effect of mesh clustering by using Eq. (41) on the mesh generation of method 1 with the update of the static monitor function. The values a1 = a2 = 3.0 and b1 = b2 = 50.0 were used in Eq. (41). By introducing xc2 , mesh clustering along the g-direction was achieved, as shown in Fig. 9. The proposed method is also capable of generating a mesh with a
Table 1 Computation results of criteria for mesh quality in examples. MDO
ADO
MAR
AAR
Example (1)
Case Method Method Method Method Method
1: 1: 2: 2: 2:
without updating with updating global averaging local adjustment automatic adjustment
31.78 26.95 21.15 15.10 14.10
10.06 8.40 11.13 8.19 7.43
20.49 13.38 21.56 25.14 25.32
4.71 3.84 4.62 4.87 4.91
Example (2)
Method Method Method Method Method
1: 1: 2: 2: 2:
without updating with updating global averaging local adjustment automatic adjustment
30.58 30.15 39.48 33.69 46.95
13.53 8.45 11.36 14.01 15.19
12.68 13.88 7.32 24.18 32.76
2.57 2.41 2.17 3.69 4.19
Example (3)
Method Method Method Method Method
1: 1: 2: 2: 2:
without updating without updating global averaging local adjustment automatic adjustment
52.85 48.40 63.96 53.32 55.07
14.87 11.24 7.97 7.59 9.63
4.75 7.07 20.33 39.91 48.57
1.94 2.33 2.85 3.62 3.76
3196
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
Fig. 9. The effect of grid clustering on mesh generation in method 1 with the update of the static monitor function.
Fig. 10. Mesh generation results combined with the dynamic monitor function for mesh adaptation in time: Example (3). This computation starts from the mesh obtained by method 2 with automatic adjustment.
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
3197
good balance between orthogonality and smoothness in the whole domain, without performing mesh adaptation in time based on flow variation. In the following section, we will apply the proposed method to mesh adaptation. 4.1.4. Coupling results of the static monitor function with the dynamic one So far, we have established that the static monitor function creates a mesh satisfying almost-perfect orthogonality in a domain with a complex boundary. In this section, we will show the effectiveness and robustness of the proposed method by applying it to mesh adaptation. In order to consider the effect of the flow evolution in time on mesh generation, we introduce the following dynamic monitor function with a different radius (ra):
2
x
dynamic ðx; yÞ m
( )2 3 2 2 x 1:0 y 0:7 ¼ 50 exp 43 þ 1 5: ra ra
ð51Þ
In this example, CFL = 1.0 103 and tolerance = 1.0 102 were used. Fig. 10(a) shows the mesh obtained from method 2 with automatic adjustment, which is the same as Fig. 7(e). This mesh is used as the initial mesh for mesh adaptation. Fundamentally, the dynamic monitor function, xdynamic , is determined by the flow variables, as mentioned in Section 2.2. For m simplicity, this, however, is assumed to have the analytic form of Eq. (51). Fig. 10 shows the mesh distribution generated by different monitor functions with radii, ra = 0.15, ra = 0.30, and ra = 0.45. In this figure, it is shown that the mesh behaves well as long as boundary orthogonality is maintained during mesh adaptation. It is concluded that the ASMRM in conjunction with the static monitor function determined by the method proposed here is directly applicable to mesh adaptation for fluid flow PDEs in space and time for computing time-dependent solutions that can develop singular or near singular behavior. 4.2. Application to three dimensional domain with complicated geometry The ASMRM with the orthogonal boundary treatment proposed in this study is applied to a three-dimensional domain with complicated geometry. The initial mesh is generated algebraically from the boundary distribution using uniformly distributed points along the x- and y-directions. All of the points along the surface of the block are fixed (Dirichlet). The boundary of the block is given by
x ¼ 0;
x ¼ 2;
y ¼ 0;
y ¼ 2;
z ¼ 0:5 þ 0:1 cosð2pxÞ cosð2pyÞ;
z ¼ 0:75 þ 0:25 cos½pðx 0:25Þ cos½pðy 0:25Þ:
ð52-aÞ ð52-bÞ
The mesh points used are (L, M, N) = (51, 51, 51). In this example, CFL = 5.0 103 and tolerance = 1.0 101 were used. Fig. 11 shows the initial mesh generated algebraically with the six boundary surfaces of Eq. (52). In this 3-D example, two methods are used for the initial mesh generation step of Section 3.4.1: method 1 with an update of the monitor functions and method 2 with automatic adjustment. For method 1, mesh clustering along the lower and upper boundary surfaces, xc3 , uses the following Gaussian distribution function, which was mentioned in Section 3.3:
Fig. 11. The initial mesh for the ASMRM in 3-D.
3198
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
Fig. 12. Computational results of the mesh adaptation with ra = 0.3: (a) method 1 ( Case B) with the update of the monitor functions and (b) method 2 with automatic adjustment.
Fig. 13. Computational results of the mesh adaptation with ra = 0.5: (a) method 1 (Case B) with the update of the monitor functions and (b) method 2 with automatic adjustment.
xc3 ¼ xstatic ði; j; 1Þ Func1 ði; j; kÞ þ xstatic ði; j; NÞ Func2 ði; j; kÞ; 3 3
ð53Þ
k1 Nk where Func1 ði; j; kÞ ¼ a1 exp b1 N1 , Func2 ði; j; kÞ ¼ a2 exp b2 N1 and the coefficients are a1 = a2 = 10 and b1 = b2 = 30. To consider mesh clustering within a block, the following dynamic monitor functions with an analytic form are used:
2
ðx 1Þ2 ðy 1Þ2 ðz 0:1Þ2 xdynamic ðxÞ ¼ 100 exp 410 þ þ 1 m r2a r 2a r 2a
!2 3 5:
ð54Þ
The use of an analytic form of Eq. (54) allows mesh adaptation based on the distribution of the dynamic monitor functions, without interpolation from the physical values mentioned in Section 3.5.2, so it makes the ASMRM easily applicable to mesh adaptation. Fig. 12 shows the results of mesh adaptation with ra = 0.3 in Eq. (54) for two cases. The mesh behaves well according to the monitor functions of Eq. (54) in both cases and the method introduced in this study allows the mesh along the boundary to be very smooth and almost orthogonal. Fig. 13 shows the results of mesh adaptation with ra = 0.5 in Eq. (54) for two cases. It is also shown that the monitor functions of Eq. (54) result in a well-behaved mesh in both cases. Comparing the two methods, it seems that method 2 shows better adaptation than method 1, which uses boundary clustering. It is due to the fact that boundary clustering is additionally included in the case of method 1 when the initial mesh is generated. This is used as a constraint while the mesh adaptation is performed.
3199
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
10 0.8
0.8
0.6
0.6
9
y
y
8 0.4
7
0.2
0.2
6
-3.9
-3.8
-3.7
-3.6
y
0 -4
0.4
-3.5
-3.4
x
-3.3
-3.2
-3.1
0 -0.5
-3
-0.4
-0.3
-0.2
-0.1
0
x
0.1
0.2
0.3
0.4
0.5
5
4
3
2
1
0
-7
-6
-5
-4
-3
-2
-1 x
0
1
2
3
4
5
Fig. 14. The mesh distribution generated by the initial mesh generation process using method 2 with automatic adjustment.
0. 7
5 0.7
w1 0.9
0.7
0.5
y
0.9
3
0.5
4
0.9
2 1.3
0. 7
1.7
0.7 1.10.9
1.3
1. 3
0.7
1. 3
1.5
y
0.9 0.7
1 1.
3 1.
1.5
1.9
1.9
1.5
1.3
2.5
1. 7 2.3
-5
1.3
1.7
2.1
-5
1. 5
1.5 1.3
-4
1.1 .5 0
2.3
0.9
1.7
-3
2.1
1.5 1.1
1.3
1.3
0. 9
2.9
0.9 1.
0.7
1. 1
-1
0.5
1.70.9
1.1
1 1.
0.9
0
-2
1.9
1 0.9
1. 1
1.5
0.7
x
1.9 3 2
0
Fig. 15. The spatial distribution of static monitor functions in 2-D.
w2 5
3200
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi Fig. 16. The density contours and the adapted mesh distribution obtained by using xdynamic ðx; tÞ ¼ 10 a2 ju0 ðx; tÞj2 þ b2 jruðx; tÞj2 for Mach number, M = 2.0: (a) a = 1 and b = 0, (b) a = 0 and b = 7.
4.3. Numerical application of the present method to a specific problem 4.3.1. Numerical simulation of a supersonic projectile in two dimensions In this section, we test the present adaptive mesh redistribution method for a specific 2D problem including a blunt body and supersonic shock flow. A mesh for a spherical projectile that is flying at a supersonic Mach number M = 2.0 will be generated. The mesh point distribution along the projectile wall is generated initially using the geometrical configuration, while the boundary mesh point distribution on the far-field boundary can be generated algebraically or by using commercial mesh generation software. The interior mesh is generated by the method proposed in this paper. Fig. 14 shows the mesh generated using method 2 with automatic adjustment of the static monitor functions at the initial mesh generation stage mentioned in Section 3.5.1. In this computation, the Dirichlet boundary condition is used along the wall and the far-field boundary. Along the x-axis, however, the Dirichlet–Neumann boundary condition is used for the axi-symmetric flow. In this figure, it is observed that a smooth and almost orthogonal mesh distribution is obtained using the ASMRM and that boundary orthogonality is also satisfied comparatively well. Fig. 15 shows the spatial distribution of static monitor functions obtained from method 2 with automatic adjustment. In this case, tolerance = 1.0 101 and CFL = 1.0 103 were used. Even though the contours do not show a simple and continuous distribution, the variation of the monitor function is comparatively small in a localized region. Therefore, the mesh distribution is not significantly influenced by this small variation of the monitor function. One could expect that it would be possible to obtain a smooth distribution of the monitor function if the computation time is increased. Fig. 16 shows the density contours and the mesh distribution obtained using the adaptation. For the flow computation, the axi-symmetric Euler equations are used as the governing equations of the flow. The slip boundary condition is used on the wall of the projectile while the symmetry boundary condition is used along the x-axis. The Riemann invariant is used to treat the far-field boundary. All computations are initialized from the free-stream conditions and are assumed to reach steady state when the residual reaches 109. Steger & Warming FVS Method [19] and AF-ADI implicit method [20] are used for space and time discretizations, respectively. The CFL number is set to 1. During the adaptive mesh generation stage, a proper choice of the dynamic monitor function is important to obtain an improved mesh distribution. As mentioned earlier qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi in Section 2.2, xdynamic ðx; tÞ ¼ 10 a2 ju0 ðx; tÞj2 þ b2 jruðx; tÞj2 is used for dynamic monitor functions here, where u(x, t) is the physical solution to be used in the mesh adaptation process, and u0 (x,t) = u(x,t) u1(x), where the subscript (1) denotes the ambient condition. In the present case, the density variable is used for u(x, t). In the figure, it is shown that the adapted mesh distribution is highly dependent upon the dynamic monitor functions. It appears that in the vicinity of the shock wave, the use of the gradient of the flow variable is a better choice than the physical variable itself. In this figure, it is also shown that the sharp density gradient is captured well when the gradient term is used as the dynamic monitor function. 4.3.2. Numerical simulation of a chevron nozzle jet flow in three dimensions The mesh redistribution procedure is applied to the simulation of a turbulent jet flow issuing from the SMC006 chevron nozzle [22], which contains six symmetric chevrons [21]. The initial mesh for this jet flow-field, including the inlet pipe that is used to generate turbulent inflow conditions for the chevron nozzle, contains approximately 175 million mesh points. The purpose of the present effort is to appropriately cluster the mesh in the free shear layers (whose location is not known a priori)while keeping the total number of mesh points fixed.
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
3201
Fig. 17. The mesh blocks used in the computation.
Fig. 18. The geometry of the first block and the comparison between the original and the redistributed mesh planes on different axial planes.
To exploit the symmetry, we only consider a 90-degree slice (containing one and a half chevrons), which is one-fourth of the full domain of flow computation, shown in Fig. 17. This figure also displays the time-averaged axial velocity contours. Thus the computational domain is given by xin 6 x 6 xout, rmin 6 r 6 rout, 0° 6 h 6 90°. The initial mesh for the computational domain has the dimensions (nx, nr, nh) = (287, 383, 163), where nx, nr and nh denote the number of axial, radial and circumferential mesh points, respectively. This computational domain is divided into two blocks in the axial direction: the
3202
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
near-nozzle block (1 6 i 6 85) and the downstream block (85 6 i 6 287), where i is the mesh index running along the axial direction. For the initial surface mesh, which is generated using the commercial software Gridgen [23], in the near-nozzle region, the mesh is body-oriented and adapted to the shape of the chevrons; the mesh in the downstream region is cylindrical. The near-nozzle block mesh is treated by the present ASMRM with method 2 with automatic adjustment for the initial mesh generation, whereas the downstream block mesh is treated by the same ASMRM by setting the monitor function xstatic m to unity. After the near-nozzle block mesh and the downstream block mesh are generated by the present ASMRM with method 2 with automatic adjustment and by LTFI algebraically, respectively, the mesh points are redistributed by the adaptive technique with the appropriate dynamic monitor function, xdynamic(x). Due to the large number of mesh points in the downstream block, the domain is divided into 10 sub-blocks along the axial direction for parallel computing. However, the nearnozzle block is solved as a single block during the initial mesh generation stage and the adaptive mesh generation stage. Once a satisfactory mesh point distribution is obtained within the near-nozzle block, the surface mesh on its last axial plane, which is located at i = 85, is used to exactly match the inlet plane of the downstream block. Boundary conditions: At r = rmin and r = rout, Dirichlet conditions are applied. At the symmetry surfaces, h = 0° and h = 90°, Dirichlet–Neumann (sliding) boundary conditions are used. At the inflow axial surface located at i = 1, the Dirichlet condition is applied while the Dirichlet–Neumann (sliding) boundary condition is applied at the outflow axial surface x = xout. In order to achieve appropriate mesh-point clustering within the shear layer region, the following dynamic monitor function xdynamic is constructed to depend on the mean axial velocity such that it assumes large values in the shear layer where the velocity gradients are large, and values close to zero where the velocity gradients are small [22]:
xdynamic ¼ 16
uðr; hÞ uðr; hÞ ; 1:0 U c ðxÞ U c ðxÞ
ð55Þ
Fig. 19. Redistributed mesh (right) and the mean axial velocity contours superimposed on the original mesh (left) on the axial plane i = 1.
Fig. 20. Original mesh (left), redistributed mesh (right) and the mean axial velocity contours superimposed on the original mesh (down) on the axial plane i = 41.
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
3203
Fig. 21. Original mesh (left), redistributed mesh (right) and the mean axial velocity contours superimposed on the original mesh (down) on the axial plane i = 61.
where u is the axial velocity, Uc is the time-averaged axial velocity at the symmetry axis r = 0 of the jet, and r and h are the radial and azimuthal coordinates, respectively. It is observed in the present case that the velocity gradient along the axial direction in a jet flow is much smaller than that along the radial and azimuthal directions. In the present study, as mentioned earlier, we employ the static method, which is based on the time-averaged velocity, for the dynamic monitor function (xdynamic). The simulation is first run on an initial static mesh to gather some time-averaged statistical information about the flow field, which is then used in the monitor function to redistribute the mesh to resolve the jet shear layer gradients. Therefore, the procedure of d to f in Section 3.5.2 is not performed in this case in order to avoid the large computational cost. The flow solver is then run on the new redistributed mesh with the enhanced resolution. Mesh adaptation is carried out just once, as the mean quantities used in the monitor function are stationary. The details of the governing equations and numerical method used for the flow solution can be found in [24]. Fig. 18 shows the geometry of the first block in which the static monitor function is used and the comparison between the original and the redistributed mesh on different axial planes. Specifically, Figs. 19–21 show the mean axial velocity contours superimposed on the initial mesh of the SMC006 chevron nozzle and the solution-adaptive mesh-point redistribution on four axial planes. The axial indices of these planes are i = 1, i = 41 and i = 61. In these figures, we see mesh point clustering within the shear layer region where large axial velocity gradients exist. As seen from the velocity contour plots, the clustered mesh points conform to the star-shaped jet shear layer. The rather complicated geometrical shape of the chevron nozzle makes it quite difficult to enforce boundary orthogonality in the near-nozzle block. Nevertheless, the mesh distribution near the boundaries is satisfactory, even though strict boundary orthogonality is not enforced within the nearnozzle block.
5. Summary and concluding remark In this work, we have developed an effective adaptive structured mesh redistribution method that accommodates geometrically complex boundaries. Its effectiveness is demonstrated in the case of time-dependent problems in two and three dimensions. To generate a good mesh (satisfying orthogonality and smoothness constraints), static monitor functions are introduced in a variational framework. Two methods are proposed to determine the static monitor function. In the first method, the monitor function xstatic along the boundary is determined using the orthogonality condition, m and then linear transfinite interpolation is simply used to obtain the monitor function values in the interior domain. These values are not updated during the adaptive mesh generation process. The use of a distortion factor in computing xstatic is found to yield a better mesh aspect ratio than the use of the Jacobian. If xstatic is updated during the mesh adapm m tation process, the use of a fixed distortion factor constrains the mesh variation, which sometimes results in skewness or overlapping of local regions in the interior of the domain. In both cases, mesh coarseness is noticed in the concave region of the boundary. In the second method, the orthogonality condition is slightly relaxed by averaging the values of the static monitor function in the interior of the domain. In addition, the ratio of local orthogonality and mesh smoothness is controlled through parameters that can be specified by the user or automatically determined by an indicator function. Additional monitor functions can be linearly combined to handle cases that need further mesh clustering to resolve boundary layers or shear layers. In conclusion, the proposed methodology is flexible, robust and can also be used in a dynamic mode.
3204
J. Bin et al. / Journal of Computational Physics 230 (2011) 3178–3204
Acknowledgments This work was partially supported by NASA Glenn Research Center under cooperative agreement # NNX07AB91A and Dr. Nicolas Georgiadis was the monitor. References [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24]
J.F. Thompson, B.K. Soni, N.P. Weatherill (Eds.), Handbook of Grid Generation, CRC Press, Boca Raton, FL, 1999. J.U. Brackbill, J.S. Saltzman, Adaptive zoning for singular problems in two dimensions, Journal of Computational Physics 46 (3) (1982) 342–368. A.S. Dvinsky, Adaptive grid generation from harmonic maps on Riemannian manifolds, Journal of Computational Physics 95 (1991) 450–476. A.M. Winslow, Numerical solution of the quasilinear Poisson equation in a nonuniform triangle mesh, Journal of Computational Physics 135 (2) (1997) 128–138. W. Huang, R.D. Russell, Moving mesh strategy based on a gradient flow equation for two-dimensional problems, SIAM Journal on Scientific Computing 20 (3) (1999) 998–1015. J.U. Brackbill, An adaptive grid with direction control, Journal of Computational Physics 108 (1993) 38–50. B.N. Azarenok, Variational method for adaptive mesh generation, Computational Mathematics and Mathematical Physics 48 (5) (2008) 786–804. J.F. Thompson, Z.U.A. Warsi, C.W. Mastin, Automatic numerical generation of body-fitted curvilinear coordinate system for field containing any number of arbitary two-dimensional bodies, Journal of Computational Physics 15 (1974) 299–319. R.L. Sorenson, A Computer Program to Generate Two-dimensional Grids about Airfoils and Other Shapes by the Use of Poisson’s Equations, NASA TM 81198, NASA Ames Research Center, 1980. J.F. Thompson, A general three-dimensional elliptic grid generation system on a composite block structure, Computer Methods in Applied Mechanics and Engineering 64 (1987) 377–411. L. Kania, Elliptic adaptive grid generation and area equidistribution, International Journal for Numerical Methods in Fluids 30 (1999) 481–491. L. Yuan, T. Tang, Resolving the shock-induced combustion by an adaptive mesh redistribution method, Journal of Computational Physics 224 (2007) 587–600. G. Ryskin, L.G. Leal, Orthogonal mapping, Journal of Computational Physics 50 (1983) 71–100. Y. Zhang, Y. Jia, S.S.Y. Wang, 2D nearly orthogonal mesh generation with controls on distortion function, Journal of Computational Physics 218 (2006) 549–571. Y. Zhang, Y. Jia, S.S.Y. Wang, H.C. Chan, Boundary treatment for 2D elliptic mesh generation in complex geometries, Journal of Computational Physics 227 (2008) 7977–7997. Y.X. Zhang, Y. Jia, S.S.Y. Wang, Two-dimensional adaptive mesh generation, International Journal for Numerical Methods in Fluids 54 (2007) 1327– 1350. P.R. Eiseman, Adaptive grid generation by mean value relaxation, Journal of Fluids Engineering 107 (1985) 477–483. P.R. Eiseman, Adaptive grid generation, Computer Methods in Applied Mechanics and Engineering 64 (1987) 321–376. J.L. Steger, R.F. Warming, Flux vector splitting of the inviscid gasdynamic equations with application to finite-difference methods, Journal of Computational Physics 40 (1981) 263–293. W.K. Anderson, J.L. Thomas, B. Van Leer, Comparison of finite-volume flux-vector-Splittings for the Euler equations, AIAA Journal 24 (1986) 1453–1460. J. Bridges, C.A. Brown, Parametric Testing of Chevrons on Single Flow Hot Jets, NASA/TM 2004-213107, 2004, Also AIAA Paper 2004-2824. J. Bin, A. Uzun, M.Y. Hussaini, Adaptive mesh refinement for chevron nozzle jet flows, Computers and Fluids 39 (2010) 979–993. Gridgen, POINTWISE, Inc., grid Generation Software, V15.11, 213 South Jennings Avenue, Fort Worth, Texas. A. Uzun, M.Y. Hussaini, High-fidelity numerical simulation of a chevron nozzle jet flow, in: 15th AIAA/CEAS Aeroacoustics Conference (30th AIAA Aeroacoustics Conference), 2009, AIAA Paper 2009-3194.