automatic mesh motion for the unstructured finite...

18
Hrvoje Jasak ˇ Zeljko Tukovi´ c ISSN 1333–1124 AUTOMATIC MESH MOTION FOR THE UNSTRUCTURED FINITE VOLUME METHOD UDK 532.5:519.6 Summary Moving-mesh unstructured Finite Volume Method (FVM) provides a capability of tackling flow simulations where the spatial domain shape changes during the simulation. In such cases, the computational mesh needs to adapt to the time-varying shape of the domain and preserve its validity and quality. In this paper, we present a vertex-based unstructured mesh motion solver with polyhedral cell support which calculates internal point motion based on the prescribed motion of the boundary. Performance of the method is preserved through the choice of decomposition of polyhedral cells, bounded discretisation and use of iterative solvers. A mechanism for minimising mesh distortion through variable stiffness is proposed and tested on a simple deformation case, showing marked improvement over previous attempts. Finally, the moving mesh solver is used with an unstructured moving mesh FVM algorithm to simulate free-rising air bubble in water. Key words: Moving mesh, vertex motion, motion solver, arbitrarily unstructured mesh, polyhedral mesh, finite volume, free-surface, surface tracking 1. Introduction There exists a number of physical phenomena in which the continuum solution couples with ad- ditional equations influencing the shape of the domain or position of an internal interface. Exam- ples of such cases include prescribed boundary motion in pumps and internal combustion engines; free-surface flows, where the interface between the phases is a part of the solution; fluid-structure interaction, where the deformation of a solid changes the shape of the fluid domain etc. Numerical simulation techniques for such cases track the interface either by using marker particles, an indica- tor variable (e.g. [1, 2, 3]) or a distance function, or adjust the computational mesh to accommodate interface motion. In the deforming mesh method, the computational mesh is moved to follow the changing shape of the boundary by moving its points in every step of the transient simulation. The main difficulty in this case is maintaining mesh validity and quality without user interaction. Several deforming mesh algorithms have been presented in literature, with various approaches to defining mesh motion. The most popular method to date is the spring analogy [4]. Here, all point- to-point connections within the mesh are replaced by linear springs and point motion is obtained as a response to boundary displacement. However, this approach proved to lack robustness, particu- larly for arbitrarily unstructured (polyhedral) meshes. A review of merits and limitations of spring analogy and its variants is given by Blom [5]. In an effort to improve the robustness of the method, Degan and Farhat [6] propose addition of torsional springs to control all mechanisms of invalidating a tetrahedral cell. Other approaches to creating a robust mesh motion solver include the use of Laplacian smoo- thing [7] with constant and variable diffusivity and the pseudo-solid equation (static equilibrium equation for small deformations of a linear elastic solid) [8] in Arbitrary Lagrangian-Eulerian (ALE) FEM codes. In an effort to simultaneously control the position of a moving boundary and mesh spacing next to it, Helenbrook [9] proposes the use of a biharmonic equation to govern mesh motion. 1

Upload: dangtuong

Post on 21-Mar-2018

218 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: AUTOMATIC MESH MOTION FOR THE UNSTRUCTURED FINITE …powerlab.fsb.hr/ped/kturbo/OpenFOAM/papers/meshMotionFAMENA.pdf · Hrvoje Jasak Zeljko Tukoviˇ c´ ISSN 1333–1124 AUTOMATIC

Hrvoje JasakZeljko Tukovic

ISSN 1333–1124

AUTOMATIC MESH MOTION FOR THE UNSTRUCTUREDFINITE VOLUME METHOD

UDK 532.5:519.6

Summary

Moving-mesh unstructured Finite Volume Method (FVM) provides a capability of tacklingflow simulations where the spatial domain shape changes during the simulation. In such cases,the computational mesh needs to adapt to the time-varying shape of the domain and preserve itsvalidity and quality. In this paper, we present a vertex-based unstructured mesh motion solver withpolyhedral cell support which calculates internal point motion based on the prescribed motion ofthe boundary. Performance of the method is preserved through the choice of decomposition ofpolyhedral cells, bounded discretisation and use of iterative solvers. A mechanism for minimisingmesh distortion through variable stiffness is proposed andtested on a simple deformation case,showing marked improvement over previous attempts. Finally, the moving mesh solver is used withan unstructured moving mesh FVM algorithm to simulate free-rising air bubble in water.

Key words: Moving mesh, vertex motion, motion solver, arbitrarily unstructuredmesh, polyhedral mesh, finite volume, free-surface, surface tracking

1. Introduction

There exists a number of physical phenomena in which the continuum solution couples with ad-ditional equations influencing the shape of the domain or position of an internal interface. Exam-ples of such cases include prescribed boundary motion in pumps and internal combustion engines;free-surface flows, where the interface between the phases is a part of the solution; fluid-structureinteraction, where the deformation of a solid changes the shape of the fluid domainetc.Numericalsimulation techniques for such cases track the interface either by using marker particles, an indica-tor variable (e.g.[1, 2, 3]) or a distance function, or adjust the computational mesh to accommodateinterface motion.

In thedeforming meshmethod, the computational mesh is moved to follow the changing shapeof the boundary by moving its points in every step of the transient simulation. The main difficultyin this case is maintaining mesh validity and quality without user interaction.

Several deforming mesh algorithms have been presented in literature, with various approachesto defining mesh motion. The most popular method to date is thespring analogy[4]. Here, all point-to-point connections within the mesh are replaced by linearsprings and point motion is obtained asa response to boundary displacement. However, this approach proved to lack robustness, particu-larly for arbitrarily unstructured (polyhedral) meshes. Areview of merits and limitations of springanalogy and its variants is given by Blom [5]. In an effort to improve the robustness of the method,Degan and Farhat [6] propose addition of torsional springs to control all mechanisms of invalidatinga tetrahedral cell.

Other approaches to creating a robust mesh motion solver include the use of Laplacian smoo-thing [7] with constant and variable diffusivity and the pseudo-solid equation (static equilibriumequation for small deformations of a linear elastic solid) [8] in Arbitrary Lagrangian-Eulerian (ALE)FEM codes. In an effort to simultaneously control the position of a moving boundary and meshspacing next to it, Helenbrook [9] proposes the use of a biharmonic equation to govern mesh motion.

1

Page 2: AUTOMATIC MESH MOTION FOR THE UNSTRUCTURED FINITE …powerlab.fsb.hr/ped/kturbo/OpenFOAM/papers/meshMotionFAMENA.pdf · Hrvoje Jasak Zeljko Tukoviˇ c´ ISSN 1333–1124 AUTOMATIC

H. Jasak,Z. Tukovic Automatic mesh motion forunstructured finite volume method

In this paper we present a general-purpose moving mesh algorithm for deforming mesh simu-lations compatible with arbitrarily unstructured FV solvers. A new second-order polyhedral “mini-element” consistent with the FV mesh handling has been developed as a part of a vertex-basedsolution method. Two choices for a governing equation for mesh motion are examined: the Laplaceand the pseudo-solid equation. In an attempt to control meshquality by redistributing boundarydeformation and limiting cell distortion, a variable coefficient version of both equations has alsobeen implemented. A crucial requirement is that algorithmic efficiency of the mesh motion solvermatches the segregated FV flow solver, both is terms of storage and CPU time requirements.

The rest of this paper is organised as follows. In Section 2 the FV method for arbitrary movingvolumes is summarised and requirements on an automatic meshmotion system are given. Basedon deficiencies of previous efforts, Section 3 lays the foundation for a novel automatic mesh mo-tion method, starting from the requirements on a robust motion system, choice of motion equation,solution variable, appropriate polyhedral cell decomposition and control of mesh quality throughvariable diffusion in the motion equation. The new method istested on two sample mesh deforma-tion problems in Section 4. The paper is completed in Section5 with a simulation of a free-risingair bubble in water in 2- and 3-D and closed with a short conclusion.

2. Finite volume method on moving meshes

A static mesh FVM is based on the integral form of the governing equation over a control volume(CV) fixed in space. More generally, the integral form of the conservation equation for a tensorialpropertyφ defined per unit mass in an arbitrary moving volumeV bounded by a closed surfaceSstates:

d

dt

V

ρφ dV +

S

ρn•(v − vs)φ dS −

S

ρΓφn•∇φ dS =

V

sφ dV, (1)

whereρ is the density,n is the outward pointing unit normal vector on the boundary surface,v isthe fluid velocity,vs is the velocity of the boundary surface,Γφ is the diffusion coefficient andsφ isthe volume source/sink ofφ. The relationship between the rate of change of the volumeV and thevelocityvs of the boundary surfaceS is defined by the so calledspace conservation law(SCL):

d

dt

V

dV −

S

n•vs dS = 0. (2)

Unstructured FVM discretises the computational space by splitting it into a finite number ofconvex polyhedral cells bounded by convex polygons. The cells do not overlap and completelyfill the domain. The temporal dimension is split into a finite number of time-steps and equationsare solved in a time-marching manner. A sample cell around the computational pointP locatedin its centroid, a facef , the face areaSf , the face unit normal vectornf and the neighbouringcomputational pointN are shown in Fig. 1.

Second-order FV discretisation of Eqn. (1) transforms the surface integrals into sums of faceintegrals and approximates them and the volume integrals tosecond order using the mid-point rule.If a fully implicit second-order accurate tree time levels scheme is used for temporal discretisation,the discretised form of Eqn. (1) for the control volumeVP reads:

3ρnP φn

PV nP − 4ρo

P φoPV o

P + ρooP φoo

P V ooP

2∆t+

f

(mnf − ρn

f V nf )φn

f

=∑

f

(ρΓφ)nf Sn

f nnf •(∇φ)n

f + snφV n

P ,(3)

2

Page 3: AUTOMATIC MESH MOTION FOR THE UNSTRUCTURED FINITE …powerlab.fsb.hr/ped/kturbo/OpenFOAM/papers/meshMotionFAMENA.pdf · Hrvoje Jasak Zeljko Tukoviˇ c´ ISSN 1333–1124 AUTOMATIC

Automatic mesh motion forunstructured finite volume method

H. Jasak,Z. Tukovic

f

N

df

P

VP

nf

z

y

x

rP

Sf

Fig. 1 Polyhedral control volume (cell).

where the subscriptP represents the cell values,f the face values and superscriptsn ando the ”new”and ”old” time level,∆t = tn − to = to − too is the time step size,mf = nf •vfSf is the fluid massflux and Vf = nf •vsfSf is the cell face volume flux. The fluid mass fluxmf is usually obtainedas a part of the solution algorithm and satisfies the conservation requirements (if any). In order toprevent the introduction of errors in the form of artificial mass sources, the cell face volume fluxVf

must satisfy the discretised SCL where temporal discretisation scheme used for SCL should be thesame as that for the other conservation equations in the considered mathematical model (Demirdzicand Peric [10]).

2.1. Finite volume mesh definition

Traditionalpoints-and-cellsmesh definition consists of a list of points (vertices) and a list of cellsdefined in terms of point labels. Additionally, a vertex ordering pattern is pre-defined for each cellshape and allows cell faces to be assembled. This approach limits the number of available cellshapes which, while acceptable in the FEM (due to the fact that a shape function needs to be defineda-priori), is unnecessarily limiting for the face-addressed FVM [11].

In the face-addressedmesh definition, a polyhedral mesh for the FVM is defined by thefol-lowing components:

• A list of point co-ordinates; point label is implied from itslocation in the list;

• A list of polygonal faces, where a face is defined as an orderedlist of point labels. Faces canbe separated intointernal (between two cells) and boundary faces;

• A list of cells defined in terms of face labels. Note that the cell shape is unknown and irrelevantfor discretisation;

• Boundary faces are grouped into patches, according to the boundary condition;

With face addressing, each cell is only known in terms of its faces. This format, however, posesadditional requirements in examining mesh validity.

In general, one can distinguish betweentopologicalandgeometricalvalidity tests. Duringdeformation, mesh topology remains unchanged and an initially valid topology will be preserved.Geometrical tests deal with the positivity of face areas andcell volumes, convexness and orientationrequirements. Geometrical measures (cell and face centroid, face area, cell volumeetc.) are calcu-lated by decomposing the face into triangles and the cell into tetrahedra. Based on that, geometricalvalidity criteria can be summarised as follows:

3

Page 4: AUTOMATIC MESH MOTION FOR THE UNSTRUCTURED FINITE …powerlab.fsb.hr/ped/kturbo/OpenFOAM/papers/meshMotionFAMENA.pdf · Hrvoje Jasak Zeljko Tukoviˇ c´ ISSN 1333–1124 AUTOMATIC

H. Jasak,Z. Tukovic Automatic mesh motion forunstructured finite volume method

• All faces and cells must be weakly convex,i.e.all triangle normals in face decomposition mustpoint in the same direction as the resultant face normal; fora cell, all pyramids constructedwith a face base and cell centroid apex must have positive volume;

• For all internal faces, the dot-product of the face normal vectornf and thedf = PN , Fig. 1,must be positive. This is usually termed theorthogonality test:

df •nf > 0. (4)

We shall assume the existence of an initial topologically and geometrically valid mesh.

3. Polyhedral vertex-based motion solver

The defining feature of a moving mesh simulation is temporal variation of the external shape of thedomain. Thus, one can distinguish betweenboundary motionandinternal point motion. Boundarymotion can be considered as given, either prescribed by external factors or a part of the solution.The role of internal point motion is to accommodate boundarymotion and preserve the validity andquality of the mesh. It influences the solution only through mesh-induced discretisation errors [12]and is detached from the remainder of the problem, owing to ALE formulation of the conservationequations. Consequently, internal point motion can be specified in a number of ways, ideally withoutuser interaction.

3.1. Mesh deformation problem

The mesh deformation problem can be stated as follows. LetD represent a domain configuration ata given timet with its bounding surfaceB and a valid computational mesh, Fig. 2. During a timeinterval∆t, D changes shape into a new configurationD′. A mapping betweenD andD′ is soughtsuch that the mesh onD forms a valid mesh onD′ with minimal distortion of control volumes.

x

y

Bf B′

f

D D′t t + ∆t

BmB′

m

Initial configuration Final configuration

r′rB = Bm ∪ Bf B′ = B′

m ∪ B′

f

x

y

u : r 7→ r′

Fig. 2 Mesh deformation problem.

In this study, the displacement vectoru is chosen as the dependent variable in the mesh motionproblem. Thus, point position in the deformed configurationis calculated as:

r′ = r + u, (5)

wherer ∈ D andr′ ∈ D′ are point position vectors.

4

Page 5: AUTOMATIC MESH MOTION FOR THE UNSTRUCTURED FINITE …powerlab.fsb.hr/ped/kturbo/OpenFOAM/papers/meshMotionFAMENA.pdf · Hrvoje Jasak Zeljko Tukoviˇ c´ ISSN 1333–1124 AUTOMATIC

Automatic mesh motion forunstructured finite volume method

H. Jasak,Z. Tukovic

3.2. Choice of motion equation

It remains to consider the choice of equation to govern mesh deformation. Mesh validity constraintsindicate that a domain could be considered as a solid body under large deformation, governed by thePiola-Kirchoff stress-strain formulation. This is a non-linear equation and thus expensive to solve;as stresses are of no interest, a similar and numerically cheaper approach along the same lines issought. Two obvious choices are the pseudo-solid equation [8] and the Laplace equation [7].

While the Laplace equation only allows direction-decoupled transfinite mapping, the pseudo-solid equation also allows rotation. However, this comes ata relatively high price: the pseudo-solidequation couples the components of the motion vector due to rotation, [13]. The choice here iseither an increase in storage associated with the block solution of all displacement components oran iterative segregated solution method.

3.3. Solution method for motion equation

The simplest idea for automatic mesh motion in the FV framework would be to re-use the availablenumerical machinery and solve an equation to provide point motion. However, as the FVM providesthe solution in cell centres and motion is required on the points, this necessarily leads to interpola-tion. Experience shows it is extremely difficult to construct an interpolation practice which stops thecells from degenerating even if the cell-centred motion field is bounded. Moreover, motion of cornerpoints (belonging to only one cell) and intersections of free-moving boundaries cannot be reliablyreconstructed. Finally, while the FVM is unconditionally bounded for the convection operator, onbadly distorted meshes one needs to sacrifice either the second-order accuracy or boundedness inthe Laplacian, due to the explicit and potentially unbounded nature of non-orthogonal correction[14]. A combination of the two has forced us to quickly abandon this approach with the lesson thata point-based solution for the motion equation is essential.

We can state the following requirements on the mesh motion solver for the selected meshmotion equation:

• A vertex-based solution method, avoiding the need for interpolation;

• Use of iterative solvers for efficiency, implying positive definite matrices resulting from dis-cretisation;

• No triangles or tetrahedra in the cell decomposition shouldbe inverted.

Use of a classical FEM solver for mesh motion is unsatisfactory: to the authors’ knowledge,definition of shape functions for arbitrary polyhedra does not exist. Also, it is unclear whether sucha shape function would produce a positive definite matrix we are seeking for efficiency reasons.

Tetrahedral finite elements for a Laplacian produce a symmetric positive definite matrix andsecond-order discretisation. Also, matrix coefficients tend to infinity when a tetrahedral elementapproaches a degenerate state. We can illustrate this by analysing the expression for calculation ofmatrix coefficients for a linear tetrahedron in real space, Fig. 3. The coefficient contribution for apoint pair(i, j) and the Laplacian operator can be calculated as [15]:

aij =

VT

∇Ni•∇Nj dV =Sτ

i •Sτj

9 Vτ

, (6)

whereNi is the element shape function,Sτi is the surface-area vector on the triangle opposite pointi

andVτ is the volume of the tetrahedron. Consider a case where a tetrahedron approaches a degener-ate state, either by a point approaching another point or theopposite face. The face area vectorsSi

andSj remain finite (and come close to being parallel), whereas thevolume approaches zero. Thus,with the finite numerator and the denominator approaching zero in Eqn. (6),aij tends to infinity. Asa result, the tetrahedral FEM discretisation will remain bounded irrespective of mesh quality.

5

Page 6: AUTOMATIC MESH MOTION FOR THE UNSTRUCTURED FINITE …powerlab.fsb.hr/ped/kturbo/OpenFOAM/papers/meshMotionFAMENA.pdf · Hrvoje Jasak Zeljko Tukoviˇ c´ ISSN 1333–1124 AUTOMATIC

H. Jasak,Z. Tukovic Automatic mesh motion forunstructured finite volume method

1

2

4

3

Sτ1

Sτ3

Fig. 3 Calculating matrix coefficients for a tetrahedron in real space.

3.4. Cell decomposition

It remains to choose an appropriate decomposition of a polyhedron into tetrahedra; two methodsused in this study are shown in Fig. 4.

(a) Cell split. (b) Cell-and-face split.

Fig. 4 Decomposing a polyhedral cell into tetrahedra.

A cell is decomposed by introducing a point in its centroid and building tetrahedra above thetriangular decomposition of a face. The two methods proposed here are thecell decomposition, Fig.4(a), where additional points are introduced only in cell centres; andcell-and-face decomposition,Fig. 4(b), where points are introduced in both face and cell centres. In the first, the number ofalgebraic equations in the matrix equals the sum of cell and point count, while the second adds anequation for each face, giving a considerable increase in the number of unknowns.

3.5. Controlling mesh distortion

When the Laplace equation governs mesh motion, the prescribed boundary deformation is not uni-formly distributed through the domain. The nature of the equation is such that point movement islargest adjacent to the moving boundary, potentially leading to local deterioration in mesh quality.Ideally, largest deformation should be confined to the internal part of the mesh, where it causes lessdistortion. This can be achieved by prescribing variable diffusivity in the Laplacian. It is unclearhow to formulate variable diffusivity in general and two ideas are examined in this study:

1. Distance-based method. Here, the diffusion coefficientγ is a function of cell distance to thenearest moving boundaryl:

γ(l) =1

lm, (7)

6

Page 7: AUTOMATIC MESH MOTION FOR THE UNSTRUCTURED FINITE …powerlab.fsb.hr/ped/kturbo/OpenFOAM/papers/meshMotionFAMENA.pdf · Hrvoje Jasak Zeljko Tukoviˇ c´ ISSN 1333–1124 AUTOMATIC

Automatic mesh motion forunstructured finite volume method

H. Jasak,Z. Tukovic

wherem is a positive exponent. Alternatively, exponential equation has also been tested:

γ(l) = e−l. (8)

2. Distortion energy method. Based on total mesh displacement

utot =

u dt, (9)

the distortion energyUd for a fictitious elastic body is calculated:

Ud =1

2ε •

• dev(σ), (10)

whereε = 1

2

[

∇utot + (∇utot)T]

, σ = 2µε + λ tr(ε) I, and Lame coefficients are taken tobe constant:µ = λ = 1. This corresponds to the Poisson’s ratioν = 0.25. The diffusioncoefficient is calculated from the distortion energy:

γ(Ud) = Umd + ǫ, (11)

whereǫ is a small constant.

In both cases, integer values ofm, 1 ≤ m ≤ 3 have been tested.

3.6. Efficiency concerns

A critical requirement on the motion solver is that it shouldmatch the FVM flow solver in efficiencyand storage requirements. Unlike the face-addressed FV solver [12], where the matrix is assembledby looping over mesh faces, the FEM assembles the matrix by looping over all elements. Thenumber of tetrahedra in the cell decomposition is considerably higher than the number of cells:for efficiency, cell decomposition is done “on-the-fly” for each visited cell and poses only limitedstorage overheads.

On the linear equation solver side, the matrix structure from the motion equation closely mim-ics the FVM matrices: it is symmetric positive definite and well suited for iterative solvers. Thus,the same solver can be used for both purposes, providing equivalent performance and possibility ofparallelisation in the domain decomposition mode [15].

One should note that in segregated FVM fluid flow solvers, the memory peak occurs duringthe pressure-velocity solution (using SIMPLE [16] or PISO [17]), when the momentum and pres-sure matrices are stored simultaneously. The mesh motion solver operates either before or afterthe pressure-velocity block and the released storage can bere-used. This somewhat decreases theperceived storage peak of the motion solver relative to the FVM part of the algorithm.

3.7. Final form of the motion solver

In summary, the polyhedral mesh motion solver is constructed as follows:

1. Every polyhedral cell is split into tetrahedra by splitting its faces into triangles and introducinga point in cell centroid and optionally in face centres.

2. For cases with variable diffusivity,γ is calculated from the current state1.

1In some cases, it is beneficial to preserve the diffusivity field from the undeformed configuration. This may help tominimise possible hysteresis effects, especially for cases whereγ is a function of the distance to the moving wall.

7

Page 8: AUTOMATIC MESH MOTION FOR THE UNSTRUCTURED FINITE …powerlab.fsb.hr/ped/kturbo/OpenFOAM/papers/meshMotionFAMENA.pdf · Hrvoje Jasak Zeljko Tukoviˇ c´ ISSN 1333–1124 AUTOMATIC

H. Jasak,Z. Tukovic Automatic mesh motion forunstructured finite volume method

3. The Laplace equation:

∇•(γ∇u) = 0 (12)

and Eqn. (5) are used to determine new point positions. Eqn. (12) is discretised on the tetra-hedral decomposition using a second-order finite element method and produces a symmetricpositive definite matrix. For efficiency reasons, matrix coefficients are calculated in real spaceusing Eqn. (6). The pseudo-solid equation:

∇•

[

µ∇u + µ (∇u)T + λ tr (∇u) I]

= 0, (13)

will also be used for comparison purposes.

4. Boundary conditions for the motion equation are enforcedfrom the known boundary motion;this may include free boundaries, symmetry planes, prescribed motion boundaryetc.

5. The matrix is solved using an iterative linear equation solver; here the choice falls on theIncomplete Cholesky preconditioned Conjugate Gradient (ICCG) solver [18], also used bythe FVM solver.

One could consider it an overkill to implement a fully-fledged FEM solver to move the meshin an existing FVM code. In this study, the motion solver is implemented in OpenFOAM [19, 20],an object-oriented C++ computational continuum mechanicslibrary. The software is constructedto allow extensive code re-use, typically impossible in more traditional designs. OpenFOAM cur-rently implements a second-order collocated FVM on arbitrarily unstructured meshes. It is writtenin operator form and has a class hierarchy designed to be shared between various discretisationpractices. Lower level objects, including mesh, matrix, field, boundary conditions, linear solversetc.are re-used without change.

The actual motion solver is implemented by using the discretisation operators in the FEMlibrary and packed for ease of use in a separate module, together with the necessary boundarycondition handling, mesh checking and setup tools. Furtherdetails on code organisation, boundaryconditions and parallelisation in the domain decomposition mode are given in [15].

4. Examples of mesh motion

We shall now apply the novel motion algorithm on two test problems and examine the mesh qualityfor various definitions of non-constant diffusion fields. The first example is set up to test the limits ofapplicability of the new mesh deformation solver, while thesecond illustrates a typical applicationof interest.

4.1. Motion of a cylinder

The case consists of a circle moving in a channel in 2-D2. Identical setup and a triangular meshhas been used by Baker [21] with the pseudo-solid equation, and Helenbrook [9] on the biharmonicequation. Figure 5 shows the polygonal mesh used for the test, whereD is the cylinder diameter,the height of the channel is2 D and average mesh size is0.15 D. The polygonal mesh is generatedusing the algorithm proposed by Virag and Dzijan [22, 23].

The first test consists determining the maximum displacement of the cylinder in one stepwithout mesh inversion when the outside boundary remains fixed. Mesh quality is determined interms of the non-orthogonality angleαf betweendf andnf , Fig. 1. For reference, on the initialpolygonal meshαf,max = 18.45◦ andαf,mean = 0.34◦. The deformed meshes obtained using the

2In reality, the mesh is 3-D and consists of prismatic elements, as the software only operates on 3-D meshes.

8

Page 9: AUTOMATIC MESH MOTION FOR THE UNSTRUCTURED FINITE …powerlab.fsb.hr/ped/kturbo/OpenFOAM/papers/meshMotionFAMENA.pdf · Hrvoje Jasak Zeljko Tukoviˇ c´ ISSN 1333–1124 AUTOMATIC

Automatic mesh motion forunstructured finite volume method

H. Jasak,Z. Tukovic

Fig. 5 Cylinder motion in 2-D: Initial polygonal mesh.

Laplace and pseudo-solid mesh motion equations for one stepmaximum cylinder displacement areshown in Fig. 6. Maximum achievable single-step cylinder displacement is∆max = 0.636 D for theLaplace equation and∆max = 0.995 D for the pseudo-solid equation.

(a) Laplace equation:∆max = 0.65 D,αf,max = 83.4◦, αf,mean = 4.1◦.

(b) Pseudo-solid equation:∆max = 0.97 Dαf,max = 88.14◦, αf,mean = 6.64◦.

Fig. 6 Cylinder motion in 2-D: Single-step mesh deformation.

In transient simulations, the mesh is moved in a number of time-steps. This situation will beexamined by repeating the above test, but with prescribed cylinder motion of0.15 D per time-stepuntil the mesh becomes invalid. This equates to the effective Courant number of unity, based on theboundary motion velocity. Fig. 7 shows that this approach allows considerably higher deformation,because it handles inherent non-linearity of the mesh motion problem. It is interesting to noticethat the Laplace and pseudo-solid equations allows the samecylinder displacement∆max = 1.2 D,contrary to the previous test. On the other hand, increased cost of solving the pseudo-solid equationcompared to the Laplace equation does not seem to be justifiedwith the higher allowed single-stepmesh deformation [15]. For this reason, the Laplace equation will be used in the rest of this study.

Remains to show how the proposed methods for defining the variable diffusivity in the Laplaceequation influence the mesh motion performance. Fig. 8 showsthe deformed meshes for max-imum single-step cylinder displacement obtained with various non-constant diffusivity fields inthe Laplace mesh motion equation. One can see that all proposed variable diffusivity fields allowconsiderably higher single-step displacement of the cylinder. Maximum single-step displacement∆max = 1.39 D is achieved using the diffusivity proportional to the distortion energy,γ(Ud) = Ud.For distance based methods maximum single-step displacement ∆max = 1.1 D is obtained with thediffusivity field inversely proportional to the distance from the moving boundary,γ(l) = l−1.

4.2. Pitching airfoil

The second test case consists of a pitching airfoil with a 2-Dhybrid mesh. The airfoil of chordlengthc moves according to the sinusoidal law, including both translation and pitching. Rotationwith the amplitude of10◦ is centred0.3 c downstream of the leading edge and superimposed bytranslation in they-direction of0.5 c amplitude. The period of motion for both components is2 s,which is discretised with the time step size∆t = 0.005 s.

Figure 9 shows the initial mesh around the airfoil. Of particular interest is the mesh around thetrailing edge. Maximum and mean non-orthogonality angles of the initial mesh areαf,max = 29.8◦

9

Page 10: AUTOMATIC MESH MOTION FOR THE UNSTRUCTURED FINITE …powerlab.fsb.hr/ped/kturbo/OpenFOAM/papers/meshMotionFAMENA.pdf · Hrvoje Jasak Zeljko Tukoviˇ c´ ISSN 1333–1124 AUTOMATIC

H. Jasak,Z. Tukovic Automatic mesh motion forunstructured finite volume method

(a) Laplace equation:∆max = 1.2 D,αf,max = 86.8◦, αf,mean = 6.6◦.

(b) Pseudo-solid equation:∆max = 1.2 D,αf,max = 86.5◦, αf,mean = 8.1◦.

Fig. 7 Cylinder motion in 2-D: Mesh deformation with time stepping.

(a) γ(l) = l−1, ∆max = 1.1 D, αf,max = 80◦,αf,mean = 7.3◦.

(b) γ(l) = l−2, ∆max = 0.95 D, αf,max = 82◦,αf,mean = 7◦.

(c) γ(l) = e−l, ∆max = 0.94 D, αf,max = 85.1◦,αf,mean = 6.3◦.

(d) γ(Ud) = Ud, ∆max = 1.39 D, αf,max = 85◦,αf,mean = 10.4◦.

(e) γ(Ud) = U2

d : ∆max = 1.19 D, αf,max = 78.5◦,αf,mean = 10◦.

(f) γ(Ud) = U3

d , ∆max = 0.67 D, αf,max = 68◦,αf,mean = 6.2◦.

Fig. 8 Deformed mesh for the limiting cylinder displacement with various non-constant diffusivity fields inthe Laplace mesh motion equation.

Fig. 9 Oscillatory motion of a NACA airfoil, initial mesh.

10

Page 11: AUTOMATIC MESH MOTION FOR THE UNSTRUCTURED FINITE …powerlab.fsb.hr/ped/kturbo/OpenFOAM/papers/meshMotionFAMENA.pdf · Hrvoje Jasak Zeljko Tukoviˇ c´ ISSN 1333–1124 AUTOMATIC

Automatic mesh motion forunstructured finite volume method

H. Jasak,Z. Tukovic

(a) γ(l) = const.,αf,max = 78.8◦,αf,mean = 4.26◦.

(b) γ(l) = l−1, αf,max = 35.4◦, αf,mean = 2.3◦.

(c) γ(l) = l−2, αf,max = 34.5◦, αf,mean = 2.2◦. (d) γ(Ud) = Ud, αf,max = 39.2◦,αf,mean = 2.5◦.

(e) γ(l) = U2

d , αf,max = 37.94◦,αf,mean = 2.4◦.

(f) γ(Ud) = U3

d , αf,max = 37◦, αf,mean = 2.3◦.

Fig. 10Oscillatory motion of a NACA airfoil, mesh quality around the trailing edge.

11

Page 12: AUTOMATIC MESH MOTION FOR THE UNSTRUCTURED FINITE …powerlab.fsb.hr/ped/kturbo/OpenFOAM/papers/meshMotionFAMENA.pdf · Hrvoje Jasak Zeljko Tukoviˇ c´ ISSN 1333–1124 AUTOMATIC

H. Jasak,Z. Tukovic Automatic mesh motion forunstructured finite volume method

andαf,mean = 1.4◦.Figure 10 shows how various diffusivity fields influence meshquality in the region of interest

when airfoil is in maximum pitch position. A quantitative confirmation of improved mesh qualityin respect to maximum and mean non-orthogonality angles of the mesh is also given in Fig. 10.Distance-based methods produce meshes with lowest non-orthogonality, while the constant diffu-sivity method considerably distorts the mesh. However, in all cases the resulting mesh remainsvalid.

Numerical experiments show that the cell decomposition is sufficiently robust for 2-D and“trivial” 3-D meshes. Comparing the performance of two polyhedral decompositions on com-plex 3-D meshes, it has been noted that the cost of solution ofthe cell-and-face decompositionin total execution time becomes substantially lower than that for the cell decomposition. This iscounter-intuitive, as the number of unknowns for the cell-and-face decomposition is considerablylarger. However, higher quality of tetrahedra in the cell-and-face decomposition results in a better-conditioned matrix which is considerably cheaper to solve using ICCG, thus counterbalancing thecost of solving a larger linear system.

5. Free-surface flow simulations

This study concludes with a two-phase interface tracking simulations. Here, the fluid flow equationsare solved in both phases and coupled across the interface through boundary conditions [15]. Theinterface is represented as a mesh interface whose motion depends on the flow solution. A schematicrepresentation of the computational domain and interface conditions is given in Fig. 11.

Second-order FVM is used for the fluid flow [15]. On the interface, a double boundary con-dition is imposed: the dynamic condition (equilibrium of forces) and kinematic condition (zero netmass flux) need to be satisfied simultaneously. The fluid flow equations are solved using a seg-regated SIMPLE procedure. The zero net mass flux condition issatisfied in an iterative sequence[15, 24]. First, the dynamic condition, including the surface tension [15], is enforced on the interfaceand consequently a non-zero net mass flux is obtained. Position of the faces in the interface patchis adjusted such that the face volume fluxVf equals the fluid volume flux for the face (mf/ρf ) andthe automatic mesh motion solver described above adjusts the mesh to interface motion. Clearly,the change in domain shape influences the fluid flow solution and the procedure is repeated in aniterative manner for every time-step until convergence.

Details of the interface tracking algorithm and validationon cases with analytical solutionshave been presented by Tukovic [15]; here, we shall limit ourselves to examining the performanceof the mesh motion solver.

5.1. Free-rising air bubbles in water

The driving force behind this study is a desire to assemble a tool for Direct Numerical Simulation(DNS) of air bubbles in water, with the aim of providing lift and drag data needed for two-phaseEulerian modelling [15, 25]. Here, we shall report some initial results for free rising air bubbles inwater in 2- and 3-D.

The bubble is located in a large box, Fig. 12, and the flow boundary conditions are adjustedsuch that it remains centred in the domain [15]. The bubble rises through a quiescent fluid and thematerial properties of air and water are used, including surface tension effects. Note that, unlikein the surface capturing methods, the strength of surface tension or the jump in the density andviscosity do not pose a problem due to a more robust handling of inter-phase coupling and accuratecurvature calculation.

We shall first examine a 2-D problem: while this is not physically realistic, it contains allrelevant modes of interaction between the two phases, as well as the coupling with the movingmesh solver.

12

Page 13: AUTOMATIC MESH MOTION FOR THE UNSTRUCTURED FINITE …powerlab.fsb.hr/ped/kturbo/OpenFOAM/papers/meshMotionFAMENA.pdf · Hrvoje Jasak Zeljko Tukoviˇ c´ ISSN 1333–1124 AUTOMATIC

Automatic mesh motion forunstructured finite volume method

H. Jasak,Z. Tukovic

Fluid B, ρB, µB

Fluid A, ρA, µA MeshA

n

MeshB

Interface

Kinematic condition:

g

σ

n•σA

n•σB

vA − vB = 0

n•σA − n•σB = σκn

Dynamic condition:

Fig. 11 Definition of the spatial domain and interface conditions for the moving mesh interface trackingmethod, where subscripts A and B represent the values at the two sides of the interface,σ is the surfacetension,κ is twice the mean curvature of the interface,σ is the stress tensor,µ is the dynamic viscosity andgis the gravity.

Interface

Bubblepath

rF

vb = −vF

y

x

x′

aF

o

vFy′

Outflow part of theouter boundary

Inflow part of theouter boundary

o′

Fig. 12 Moving reference frame setup for free-rising bubble simulation, wherevF andaF are the velocityand acceleration of the moving reference frame,rF is the position vector of the moving reference frame inrespect to fixed reference frame.

13

Page 14: AUTOMATIC MESH MOTION FOR THE UNSTRUCTURED FINITE …powerlab.fsb.hr/ped/kturbo/OpenFOAM/papers/meshMotionFAMENA.pdf · Hrvoje Jasak Zeljko Tukoviˇ c´ ISSN 1333–1124 AUTOMATIC

H. Jasak,Z. Tukovic Automatic mesh motion forunstructured finite volume method

Fig. 13 shows the mesh deformation and the pressure field around a 2-D air bubble of1.5 mmdiameter freely rising in water. After the initial transient, the bubble reaches terminal velocity andshape. The mesh in this simulation consists of12 480 CVs in two disconnected regions and capturesthe interface through the coupled free surface condition.

(a) t = 0 s, αf,max = 26.1◦, αf,mean = 1.1◦. (b) t = 0.035 s, αf,max = 32.41◦, αf,mean = 3.8◦.

(c) t = 0.075 s, αf,max = 37.9◦, αf,mean = 5.5◦. (d) t = 0.25 s, αf,max = 39.9◦, αf,mean = 6.1◦.

Fig. 13Free-rising air bubble in water in 2-D: pressure field and interface deformation.

Finally, a simulation of a free rising air bubble of the2 mm diameter in 3-D will be presented.The mesh consists of561 920 cells with sufficient near-surface resolution as describedby Blancoand Magnaudet [26]. A detailed breakdown of the timing for a single SIMPLE iteration of thesimulation is given in Table 1. The simulation is performed on a Linux computer with a2 GHzIntel Pentium IV processor and1 GB of memory. However, the cost of94.36 s per iteration on asingle CPU computer is too high for the available resources and a coarser mesh with113 600 cellswill be used instead. The maximum and mean non-orthogonality angles of the initial mesh areαf,max = 25.5◦, αf,mean = 2.8◦.

Fig. 14 shows the deformed 3-D bubble and the velocity field onthe coarse mesh for severalsnap-shots in time, corresponding to zero and maximum recorded lift coefficient. As in the 2-Dcase, the quality of the mesh is preserved during the simulation.

In Fig. 15, the bubble centre velocity variation in time is shown. One can see that bubblemoves along the zig-zag trajectory. The simulated mean rising velocityvz = 0.325 m/s is in goodagreement with the results by de Vries et al. [27, 28] ofvz = 0.316 m/s. Some of the error can alsobe associated with insufficient mesh resolution.

Fig. 16 shows the visualisation of massless particle streaks, indicating a symmetrical double-threaded wake behind the bubble. This feature of the flow is also in close agreement with the

14

Page 15: AUTOMATIC MESH MOTION FOR THE UNSTRUCTURED FINITE …powerlab.fsb.hr/ped/kturbo/OpenFOAM/papers/meshMotionFAMENA.pdf · Hrvoje Jasak Zeljko Tukoviˇ c´ ISSN 1333–1124 AUTOMATIC

Automatic mesh motion forunstructured finite volume method

H. Jasak,Z. Tukovic

Table 1Timing breakdown for a 3-D bubble simulation.

Operation Time(s) Cumulative(s)

Building momentum matrix 6.34 6.34Solving momentum equation 3.16 9.50Building pressure matrix 3.09 12.59Solving pressure equation 29.02 41.61Building motion matrix 12.80 54.41Solving motion equation 39.95 94.36

YX

Z

(a) t = 0.56 s, αf,max = 38.5◦, αf,mean = 10◦.

YX

Z

(b) t = 0.595 s, αf,max = 43.3◦, αf,mean = 10.4◦.

YX

Z

(c) t = 0.63 s, αf,max = 41.4◦, αf,mean = 9.96◦.

YX

Z

(d) t = 0.665 s, αf,max = 42◦, αf,mean = 10◦.

Fig. 14Free-rising air bubble in water in 3-D: Free surface and velocity vectors in the centralx − z plane.

15

Page 16: AUTOMATIC MESH MOTION FOR THE UNSTRUCTURED FINITE …powerlab.fsb.hr/ped/kturbo/OpenFOAM/papers/meshMotionFAMENA.pdf · Hrvoje Jasak Zeljko Tukoviˇ c´ ISSN 1333–1124 AUTOMATIC

H. Jasak,Z. Tukovic Automatic mesh motion forunstructured finite volume method

-0.15

-0.1

-0.05

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0 0.2 0.4 0.6 0.8 1

v x,v

y,v

z,

m/s

t, s

vx

vy

vz

de Vries [27],vz

Fig. 15Rising velocity components for a 3-D bubble.

reported flow visualisation experiments [27].

Z

Y

X

Fig. 16Particle streaks for a 3-D bubble,t = 0.56 s.

The cost associated with the mesh motion solver is50 − 60% of the complete cost of sim-ulation, which is high but acceptable. However, the selected mesh motion algorithm is inherentlyparallel, both in terms of selected discretisation and choice of linear equation solvers. A combina-tion of a massively parallel FVM flow solver already available in OpenFOAM and a parallel motionsolver working on the identical mesh decomposition offers considerable scope in reducing execu-tion time. Good parallel efficiency seems to be the best way tohandle the cost of long transient runsneeded to accumulate sufficient DNS statistics.

6. Conclusion

This study describes a novel a vertex-based automatic mesh motion algorithm. Its purpose is todetermine the point positions based on the prescribed boundary motion which can be prescribed by

16

Page 17: AUTOMATIC MESH MOTION FOR THE UNSTRUCTURED FINITE …powerlab.fsb.hr/ped/kturbo/OpenFOAM/papers/meshMotionFAMENA.pdf · Hrvoje Jasak Zeljko Tukoviˇ c´ ISSN 1333–1124 AUTOMATIC

Automatic mesh motion forunstructured finite volume method

H. Jasak,Z. Tukovic

external events or calculated as a part of the solution. Validity and quality of the mesh is preservedthrough vertex-based discretisation and automatic tetrahedral decomposition of polyhedral cells.

Having analysed several popular automatic mesh motion approaches and their advantagesand drawbacks, we have settled on a second-order quasi-tetrahedral Finite Element method and theLaplace operator to govern the motion. Support for polyhedral cells is provided using the “mini-element” technique, where each cell splits into tetrahedraon-the-fly and a linear shape function isused. The chosen method of discretisation produces a symmetric positive definite matrix ideal foriterative linear equation solvers.

The quality of the mesh in motion is preserved by prescribingnon-constant diffusion field inthe Laplace operator. Several techniques have been tested,most notably the distance-based diffu-sion, where the coefficient depends on the distance between the cell centre and the nearest boundaryof interest, as well as one based on cell distortion.

A combination of the above components with a second-order FVflow solver creates a robustand efficient dynamic mesh motion solver capable of handlingfree surface flows using a surface-tracking algorithm. The solver has been tested on simulation of free rising air bubbles in water.Overall, the cost of the automatic motion solver is about50− 60% of the overall cost of simulation.

In future work, the flow solver will be used in DNS simulationsof gas bubbles in liquids,establishing a base for phase interaction modelling in Eulerian multi-phase simulations. Extensionsallowing topological changes for the volume and surface mesh are also being considered.

REFERENCE

[1] Harlow, F. H., Welch, J. E., Numerical calculation of time-dependent viscous incompressible flow of fluid withfree surface, Phys. Fluds 8 (12) (1965), pp. 2182–2189.

[2] Hirt, C. W., Nichols, B. D., Volume of fluid (VOF) method for the dynamics of free boundaries, Journal ofcomputational physics 39 (1981), pp. 201–225.

[3] Ubbink, O., Issa, R., A method for capturing sharp fluid interfaces on arbitrary meshes, Journal of computationalphysics 153 (1999), pp. 26–50.

[4] Batina, J. T., Unsteady Euler airfoil solutions using unstructured dynamic meshes, AIAA Journal 28 (8) (1990),pp. 1381–1388.

[5] Blom, F. J., Considertions on the spring analogy, International journal for numerical methods in fluids 32 (2000),pp. 647–669.

[6] Degan, C., Farhat, C., A three-dimensional torsional spring analogy method for unstructured dynamic meshes,Computers and structures 80 (2002), pp. 305–316.

[7] Lohner, R., Yang, C., Improved ALE mesh velocities for moving bodies, Communications in numerical methodsin engineering 12 (1996), pp. 599–608.

[8] Johnson, A. A., Tezduyar, T. E., Mesh update stategies inparallel finite element computations of flow problemswith moving boundaries and interfaces, Computer methods inapplied mechanics and engineering 119 (1994), pp.73–94.

[9] Helenbrook, B. T., Mesh deformation using the biharmonic operator, International journal for numerical methodsin engineering 56 (2003), pp. 1007–1021.

[10] Demirdzic, I., Peric, M., Space conservation law infinite volume calculations of fluid flow, International journalfor numerical methods in fluids 8 (1988), pp. 1037–1050.

[11] Jasak, H., Weller, H. G., Gosman, A. D., High resolutionNVD differencing scheme for arbitrarily unstructuredmeshes, International journal for numerical methods in fluids 31 (1999), pp. 431–449.

[12] Jasak, H., Error analysis and estimation for finite volume method with applications to fluid flows, Ph.D. thesis,Imperial College, University of London, 1996.

17

Page 18: AUTOMATIC MESH MOTION FOR THE UNSTRUCTURED FINITE …powerlab.fsb.hr/ped/kturbo/OpenFOAM/papers/meshMotionFAMENA.pdf · Hrvoje Jasak Zeljko Tukoviˇ c´ ISSN 1333–1124 AUTOMATIC

H. Jasak,Z. Tukovic Automatic mesh motion forunstructured finite volume method

[13] Jasak, H., Weller, H. G., Application of the finite volume method and unstructured meshes to linear elasticity,International journal for numerical methods in engineering 48 (2000), pp. 267–287.

[14] Jasak, H., Gosman, A. D., Automatic resolution controlfor the finite volume method. Part 1: A-posteriori errorestimates, Numerical heat transfer, Part B 38 (2000), pp. 237–256.

[15] Tukovic,Z., Finite volume method on domains of varying shape (in Croatian), Ph.D. thesis, Faculty of mechanicalengineering and naval architecture, University of Zagreb,2005.

[16] Patankar, S. V., Numerical heat transfer and fluid flow, Hemispher Publiching Corporation, 1980.

[17] Issa, R. I., Solution of the implicitly discretised fluid flow equations by operator-splitting, Journal of computationalphysics 62 (1) (1986), pp. 40–65.

[18] Hestens, H. R., Steifel, E. L., Method of conjugate gradients for solving linear systems, Journal of research 29(1952), pp. 409–436.

[19] Weller, H. G., Tabor, G., Jasak, H., Fureby, C., A tensorial approach to computational continuum mechanics usingobject orientated techniques, Computers in physics 12 (6) (1998), pp. 620–631.

[20] Jasak, H., Weller, H., Nordin, N., In-cylinder CFD simulation using a C++ object-oriented toolkit, SAE 2004World Congress & Exhibition, SAE Technical Paper 2004-01-0110, 2004.

[21] Baker, T. J., Mesh modification for solution adaptationand time evolving domains, 7th International Conferenceon Numerical Grid Generation in Computational Field Simulations, Whistler, British Columbia, Canada, 2000.

[22] Virag, Z., Dzijan, I.,Savar, M., Unstructured grid solver for the convection-diffusion equation, S. Atluri (Editor)Proceedings of the 2003 International Conference on Computational & Experimental Engineering & Science,Tech Science Press, Corfu, Greece, 2003.

[23] Dzijan, I., Numerical method for fluid flow analysis on unstructured grid (in Croatian), Ph.D. thesis, Faculty ofmechanical engineering and naval architecture, University of Zagreb, 2005.

[24] Muzaferija, S., Peric, M., Computation of free-surface flows using the finite-volume method and moving grids,Numerical heat transfer, Part B 32 (1997), pp. 369–384.

[25] Rusche, H., Computational fluid dynamics of dispersed two-phase flows at high phase fractions, Ph.D. thesis,Imperial College, University of London, 2002.

[26] Blanco, A., Magnaudet, J., The structure of the axisymmetric high-Reynolds number flow around an ellipsoidalbubble of fixed shape, Physics of fluids 7 (6) (1995), pp. 1265–1274.

[27] de Vries, A. W. G., Path and wake of a rising bubble., Ph.D. thesis, University of Twente, 2001.

[28] de Vries, A. W. G., Biesheuvel, A., van Wijngaarden, L.,Notes on the path and wake of a gas bubbles rising inpure water, International journal of multiphase flow 28 (2002), pp. 1823–1835.

Submitted: 3.11.2006.

Accepted:

Doc. dr. sc. Hrvoje [email protected] Ltd.10 Palmerston House,60 Kensington Place,London W8 7PU, England

Dr. sc.Zeljko [email protected] of Mechanical Engineeringand Naval Architecture,University of Zagreb,Ivana Lucica 5,10 000 Zagreb, Croatia

18