Automatic Mesh Motion for the Unstructured Finite Volume Method

30
Automatic Mesh Motion for the Unstructured Finite Volume Method Hrvoje Jasak a,* ˇ Zeljko Tukovi´ c b a Nabla Ltd. The Mews, Picketts Lodge, Picketts Lane, Salfords, Surrey, RH1 5RG England b Faculty of Mechanical Engineering and Naval Architecture, University of Zagreb, Ivana Luˇ ci´ ca 5, 10000 Zagreb, Croatia Abstract Moving-mesh unstructured Finite Volume Method (FVM) is a good candidate for tackling flow simulations where the shape of the domain changes during the simu- lation or represents a part of the solution. For efficient and user-friendly approach to the problem, it is necessary to automatically determine the point positions in the mesh, based on the prescribed boundary motion. In this paper, we present a vertex-based unstructured mesh motion solver designed to work with the moving- mesh FVM. Motion is determined by solving the Laplace equation with variable diffusion on mesh points, using a tetrahedral decomposition of polyhedral cells. Cell decomposition and discretisation guarantees that an initially valid mesh re- mains geometrically valid for arbitrary boundary motion. Efficiency of the method is preserved by careful discretisation and the choice of iterative solvers, allowing the motion solver to efficiently couple with the FVM flow solver. This combination is tested on two free surface tracking flow simulations, including the simulation of free-rising air bubbles in water. Key words: Moving mesh, vertex motion, motion solver, unstructured, finite volume, free surface AMS: 74S10, 65M99, 76T10, 74S05 * Corresponding author Email address: [email protected] ( Hrvoje Jasak ). URL: http://www.nabla.co.uk ( Hrvoje Jasak ). Preprint submitted to Elsevier Science 20 February 2004

Transcript of Automatic Mesh Motion for the Unstructured Finite Volume Method

Page 1: Automatic Mesh Motion for the Unstructured Finite Volume Method

Automatic Mesh Motion for the Unstructured

Finite Volume Method

Hrvoje Jasak a,∗ Zeljko Tukovic b

a Nabla Ltd. The Mews, Picketts Lodge, Picketts Lane, Salfords, Surrey, RH1 5RG

England

b Faculty of Mechanical Engineering and Naval Architecture, University of Zagreb,

Ivana Lucica 5, 10 000 Zagreb, Croatia

Abstract

Moving-mesh unstructured Finite Volume Method (FVM) is a good candidate fortackling flow simulations where the shape of the domain changes during the simu-lation or represents a part of the solution. For efficient and user-friendly approachto the problem, it is necessary to automatically determine the point positions inthe mesh, based on the prescribed boundary motion. In this paper, we present avertex-based unstructured mesh motion solver designed to work with the moving-mesh FVM. Motion is determined by solving the Laplace equation with variablediffusion on mesh points, using a tetrahedral decomposition of polyhedral cells.Cell decomposition and discretisation guarantees that an initially valid mesh re-mains geometrically valid for arbitrary boundary motion. Efficiency of the methodis preserved by careful discretisation and the choice of iterative solvers, allowingthe motion solver to efficiently couple with the FVM flow solver. This combinationis tested on two free surface tracking flow simulations, including the simulation offree-rising air bubbles in water.

Key words: Moving mesh, vertex motion, motion solver, unstructured, finitevolume, free surfaceAMS: 74S10, 65M99, 76T10, 74S05

∗ Corresponding authorEmail address: [email protected] ( Hrvoje Jasak ).URL: http://www.nabla.co.uk ( Hrvoje Jasak ).

Preprint submitted to Elsevier Science 20 February 2004

Page 2: Automatic Mesh Motion for the Unstructured Finite Volume Method

1 Introduction

There exists a number of physical phenomena in which the continuum solutioncouples with additional equations which influence the shape of the domain orthe position of an internal interface. Examples of such cases include prescribedboundary motion simulations in pumps and internal combustion engines, freesurface flows, where the interface between the phases is captured by the mesh,solidification and solid-fluid interaction, where the deposition or deformationof a solid changes the shape of the fluid domain etc. Two most popular ap-proaches are based on tracking the front of interest, either by marker particlesor an indicator variable (e.g. [1–3]), or by deforming the computational meshto accommodate the interface motion.

In the deforming mesh method, the computational mesh is adjusted to theshape of the boundary which is updated in every step of the transient sim-ulation. Motion of all points internal to the mesh is based on the prescribedboundary motion. The main difficulty in tackling cases with variable geometryis maintaining the mesh quality.

Several deforming mesh algorithms have been presented in the past, withvarious approaches to defining mesh motion. Behr and Tezduyar [4,5] useexplicit algebraic expressions in the horizontal and vertical direction with aFinite Element (FE) Arbitrary Lagrangian-Eulerian (ALE) solver to simulatefree-surface flows with mesh deformation. The most popular method to date isthe spring analogy [6,7]. Here, all point-to-point connections within the meshare replaced by linear springs and point motion is obtained as a response tothe boundary loading. Several Finite Volume (FV) variants exist, e.g. [6,8,9],covering mostly unstructured triangular meshes in 2- and 3-D. However, thisapproach proved to lack robustness, particularly for arbitrarily unstructuredmeshes common in FV simulations. A review of merits and limitations ofspring analogy and its variants is given by Blom [7]. In an effort to improvethe robustness of the method, Farhat et al. [10,11] propose the addition oftorsional springs to control all mechanisms of invalidating a tetrahedral cell.

Numerous other approaches to creating a robust mesh motion solver includethe use of Laplacian smoothing [12–15] with constant and variable diffusivityand the pseudo-solid approach [16–22] in the ALE FEM codes. Notably, in aneffort to simultaneously control the position of the free boundary and meshspacing next to it, Helenbrook [23] proposes the use of a biharmonic equationto govern mesh motion.

From the FV viewpoint, research into dynamic mesh deformation seems to belimited to various forms of spring analogy and sometimes limited to triangu-lar/tetrahedral cells. In order to remedy the lack of robustness, spring analogy

2

Page 3: Automatic Mesh Motion for the Unstructured Finite Volume Method

is sometimes used in conjunction with re-meshing techniques, providing a res-cue path when the motion algorithm fails.

In this paper we will present a general-purpose moving mesh algorithm devel-oped to simulate deforming mesh cases compatible with arbitrarily unstruc-tured FV solvers. A new second-order polyhedral “motion element” consistentwith the FV mesh handling has been developed and used with a vertex-basedsolution method. A crucial part of the algorithm is that its efficiency matchesthe segregated FV flow solvers, both is terms of storage and CPU time re-quirements.

The deforming mesh solver will be validated in isolation and as a part of a FVfree surface flow solver based on the surface tracking approach. Robustnessand efficiency of the motion solver will be examined on several 2- and 3-Dtest cases. The objective of the study is to assemble a FV surface trackingsolver capable of performing Direct Numerical Simulation (DNS) of rising gasbubbles in liquids. For this purpose, the two solvers will be closely integrated,with particular attention to their joint efficiency and data sharing. Here, theflow equations are solved using a standard FVM approach and the motion ofthe free surface is obtained as a part of the solution.

The rest of this paper will be organised as follows. In Section 2 the FV methodfor arbitrary moving volumes will be summarised. We will present the require-ments on the automatic mesh motion system and review the deficiencies ofpast efforts in this direction in Section 3. A notable part of this effort is a re-view of mesh handling in an unstructured FVM code, together with the typicalerrors in the mesh structure (both topological and geometrical). Section 4 laysthe foundation for a novel automatic mesh motion method, starting from therequirements on a robust motion system, choice of motion equation, solu-tion variable, appropriate polyhedral cell decomposition and control of meshquality through variable diffusion in the motion equation. A crucial part of de-velopment is the support for motion of arbitrary polyhedra. The new methodis tested on two sample problems in Section 5. The paper is completed withtwo examples of free surface flows, including a simulation of a free-rising airbubble in water in 2- and 3-D and a closed with a short summary.

2 Finite Volume Method on Moving Meshes

A “static mesh” FVM is based on the integral form of the governing (conserva-tion) equation over a Control Volume (CV) fixed in space. More generally, theintegral form of the conservation equation for a tensorial property φ definedper unit mass in an arbitrary moving volume V bounded by a closed surface

3

Page 4: Automatic Mesh Motion for the Unstructured Finite Volume Method

S states:

d

dt

V

ρφ dV +∮

S

ds•ρ(u − ub)φ = −

S

ds•ρqφ +∫

V

Sφ dV, (1)

where ρ is the density, u is the fluid velocity, ub is the boundary velocity andqφ and Sφ are the surface and volume sources/sinks of φ, respectively. As thevolume V is no longer fixed in space, its motion is captured by the motion ofits bounding surface S by the velocity ub.

Unstructured FVM discretises the computational space by splitting it into afinite number of convex polyhedral cells bounded by convex polygons whichdo not overlap and completely cover the domain. The temporal dimension issplit into a finite number of time-steps and the equations are solved in a time-marching manner. A sample cell around the computational point P located inits centroid, a face f , its area vector sf and the neighbouring computationalpoint N are shown in Fig. 1.

N

P

f

sf

�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

x

z

y

Fig. 1. Finite volume cell.

Second-order FV discretisation of Eqn. (1) transforms the surface integralsinto sums of face integrals and approximates them to second order using themid-point rule:

(ρPφPVP )n− (ρPφPVP )

o

∆t+

∑f

ρf (F − Fs)φf = −∑f

sf •ρqφ + SφVP , (2)

where the subscript P represents the cell values, f the face values and su-perscripts n and o the “new” and “old” time level, VP is the cell volume,F = sf •uf is the fluid flux and Fs is the mesh motion flux. The fluid fluxF is usually obtained as a part of the solution algorithm and satisfies theconservation requirements (if any).

4

Page 5: Automatic Mesh Motion for the Unstructured Finite Volume Method

Compared with the FVM on a static mesh (e.g. [24]), Eqn. (2) shows onlytwo differences: the temporal derivative introduces the rate of change of thecell volume and the mesh motion flux accounts for the grid convection. Therelationship between the two is governed by the space conservation law [25]:

d

dt

V

dV −

S

ds•ub = 0. (3)

While Eqn. (3) is always satisfied in the integral form, it also needs to bepreserved in the discrete form:

V nP − V o

P

∆t−

∑f

Fs = 0. (4)

For this reason, the mesh motion flux Fs is calculated as the volume swept bythe face f in motion during the current time-step rather than from the gridvelocity ub, making it consistent with the cell volume calculation.

3 Deforming Mesh Simulation

From the case setup point of view, it is the fact that the shape of the domainchanges in time that influences the solution; in fact, the boundary shape itselfmay in some cases be a part of the solution. Thus, one can distinguish be-tween boundary motion and internal point motion. Boundary motion can beconsidered as given: it is either prescribed by external factors, e.g. piston andvalve motion for in-cylinder flow simulations in internal combustion engines,or a part of the solution as in free surface tracking simulations.

The role of internal point motion is to accommodate changes in the domainshape (boundary motion) and preserve the validity and quality of the mesh.Internal point motion influences the solution only through mesh-induced dis-cretisation errors [26] and is therefore detached from the remainder of theproblem. Consequently, internal point motion can be specified in a number ofways, ideally without user interaction.

In the past, point motion in the FVM has been provided in various ways,ranging from pre-calculated point positioning, interaction with a pre-processoror a mesh generator, to the more flexible and user-friendly automatic methods.The latter provide great advantage, both in terms of easier and faster casesetup, allowing for dynamically changing topology (e.g. adaptive refinement)or automatic improvements of mesh quality.

5

Page 6: Automatic Mesh Motion for the Unstructured Finite Volume Method

In summary, the objective of automatic mesh motion is to determine internalpoint motion (not involving topological changes) to conform with the givenboundary motion while preserving mesh validity and quality.

3.1 Mesh Definition and Validity

A valid mesh is a pre-requisite for a good numerical solution and a critical in-gredient of automatic mesh motion. For this reason, we will briefly summarisethe validity and quality measures from the FVM standpoint.

The investigation of mesh validity can be separated into topological and geo-metrical tests. The first group contains the tests that can be performed withoutknowing the actual point positions, while the second deals with the shape ofcells and the boundary. Note that it is the job of mesh generation to producea mesh satisfying these requirements; here, we shall concentrate on typicalerrors found in real-life meshes and on methods of preserving the validity ofan initially valid computational mesh.

3.1.1 Face-Based Mesh Definition

Traditional points-and-cells mesh definition consists of a list of points and alist of cells defined in term of point labels. Additionally, the vertex orderingpattern is pre-defined for every available cell shape and allows the mesh facesto be calculated. This approach limits the number of available cell shapeswhich, while acceptable in the FEM (due to the fact that a shape functionneeds to be defined a-priori for every possible cell shape), it is unnecessarilylimiting for the face-addressed FVM [27].

In the face-addressed mesh definition, a polyhedral mesh for the FVM is de-fined by the following components:

• A list of points. For every point, its space co-ordinates are given; the pointlabel is implied from its location in the list. Every point must be used in atleast one face;

• A list of polygonal faces, where a face is defined as an ordered list of point la-bels. Faces can be separated into internal (between two cells) and boundaryfaces. Every face must be used by at least one cell;

• A list of cells defined in terms of face labels. Note that the cell shape isunknown and irrelevant for discretisation;

• Boundary faces are grouped into patches, according to the boundary con-dition. A patch is defined as a list of boundary face labels.

Additionally, face ordering is also enforced. For internal faces it is possible to

6

Page 7: Automatic Mesh Motion for the Unstructured Finite Volume Method

define the owner and neighbour cell such that owner appears first in the celllist. Face orientation is determined using the right-hand rule and it is suchthat the area vector points outwards from the owner cell. The face list willfirst collect all internal faces and then all boundary faces patch by patch inthe order of patch definition. Internal faces are ordered to contain all facesfrom the first cell with the increasing neighbour label, followed by the facesowned by the second cell etc. This approach has proven to be robust and easyto handle as it enforces strict and unique face ordering 1 .

3.1.2 Topological Tests

Face-addressed mesh definition is exposed to some mesh topology errors whichare “impossible” in the points-and-cells approach; interestingly, the errors ac-tually occur even there but typically remain undetected. Topological validitytests consist of the following criteria:

• A point can appear in a face only once;• A face can appear in a cell only once. A face cannot belong to more thantwo cells. A boundary face can belong to only one patch;

• Two cells can share no more than one face;• Collecting all faces from one cell and decomposing faces into edges, everyedge must appear in exactly two cell faces;

• Collecting all faces from the boundary and decomposing faces into edges,every edge must appear in exactly two boundary faces.

The first four conditions control the validity of the mesh definition while thelast two check that all cells and the boundary hull are topological closed.Additionally, mesh ordering rules are checked and enforced.

3.1.3 Geometrical Tests

Geometrical tests deal with the positivity of face areas and cell volumes, aswell as convexity and orientation requirements. In the context of second-orderFVM, it is sufficient to use the weak definition of a convex shape. Here, thegeometrical measures (face area and normal vector, face and cell centroid,volume swept by the face in motion etc.) for a polygonal face are calculated bydecomposing the face into triangles. Two possible triangular decompositionsof a polygon (with different severity of the convexness criteria) are shown inFig. 2.

1 An alternative definition, giving the owner and neighbour cell index for meshfaces instead of the faces of a cell is also possible. The difference between the twois only in terms of enforcing the ordering of the face list.

7

Page 8: Automatic Mesh Motion for the Unstructured Finite Volume Method

����

����

����

����

��

��

(a) Using face centroid.

��

����

����

����

����

����

(b) Using internal edges.

Fig. 2. Decomposing a face into triangles.

A face is considered convex if all triangle normals point in the same direction.For a cell, where the metrics are calculated on a tetrahedral decomposition, anequivalent convexness definition is used. The tetrahedra are constructed usingthe (approximate) cell centroid and the triangles of the face decomposition.

Geometrical validity criteria can be summarised as follows:

• All faces and cells must be weakly convex;• All cells must be geometrically closed: the sum of outward-pointing facearea vectors for a cell faces must be zero to machine tolerance;

• The boundary must be geometrically closed (see above);• For all internal faces, the dot-product of the face area vector sf and the

df = PN , Fig. 1, must be positive; this is usually termed the orthogonalitytest:

df •sf > 0. (5)

While some of the tests are clearly redundant (e.g. if a cell is closed topologi-cally it is also closed geometrically), experience shows that various combina-tions of failures indicate common errors in mesh generation. We shall assumethe existence of a topologically and geometrically valid mesh as a startingpoint for automatic mesh motion.

3.1.4 Preserving Mesh Quality in Motion

During mesh motion, mesh topology remains unaffected and only the pointpositions change. Thus, preserving the mesh quality only relates to the ge-ometrical tests. Moreover, once the convexness and orthogonality tests aresatisfied, an initially valid mesh remains valid if no triangles or tetrahedraare inverted. We will use this criterion to examine existing automatic mesh

8

Page 9: Automatic Mesh Motion for the Unstructured Finite Volume Method

motion algorithms and devise a new approach.

3.2 Failure Modes of Simple Motion Algorithms

Let us consider the limitations and failure modes of some existing mesh motiontechniques as a basis for the new approach.

3.2.1 Cell-Based Motion Equation

The simplest suggestion for automatic mesh motion in the FV frameworkwould be to re-use the available numerical machinery and solve a Laplace (ora linear elastic solid) equation to provide vertex motion. However, as the FVMprovides the solution in cell centres and motion is required on the points, thisnecessarily leads to interpolation. Experience shows that is extremely difficultto construct an interpolation practice which stops the cells from flipping anddegenerating even if the cell-centred motion field is bounded. Moreover, motionof corner points (belonging to only one cell) and intersections of free-movingboundaries cannot be reconstructed reliably. Finally, while the FVM is un-conditionally bounded for the convection operator, on badly distorted meshesone needs to sacrifice either the second-order accuracy or boundedness in theLaplacian, due to the explicit (and unbounded) nature of the non-orthogonalcorrection [24]. A combination of the two has forced us to quickly abandon thisapproach with the lesson that a point-based solution for the motion equationis essential.

3.2.2 Spring Analogy

The first obvious point-based solution strategy is the spring analogy [7]. Here,all edges in the mesh are replaced by elastic springs and point motion isobtained by “loading” the spring system with the prescribed boundary motion.The linear system of motion equations is obtained from the force balance inall points.

While this seems intuitively right, a number of failure modes has been ob-served, especially on polyhedral cells. This has occured in spite of the factthat the system of linear equations describing point motion has been solvedto machine tolerance before moving the mesh. In other words, the failure isassociated with the final solution rather than intermediate mesh states or therelaxation procedure. Let us start by imagining a linear spring analogy solverand examining various failure modes using the rules from Section 3.1.3. Aftereach failure, an improvement on the method will be suggested.

9

Page 10: Automatic Mesh Motion for the Unstructured Finite Volume Method

a b

b’a’

(a) Coincident points.

c

c’

(b) Triangle flip.

Fig. 3. Failure modes for triangle motion in spring analogy.

The simplest failure mode is a situation where two points a and b of a triangle(separate at the beginning of the motion) end up on top of each other, Fig.3(a), and the triangle degenerates into a line.

The cause of the failure is the fact that with linear spring analogy the forceresulting from an edge being collapsed to a point does not tend to infinity.This can be easily remedied, by introducing non-linearity, i.e. by making thestiffness coefficient length-dependent, using e.g. the exponential spring law.The price, however, is substantial: a linear elastic problem has been convertedinto a non-linear problem and an iterative solution procedure is required.Additional problems exist with relation to unloading (long non-linear springstend to relax faster than the short ones), but for the case of presentation, wemay consider this problem as solved.

The second mode of failure is a triangle flip, Fig. 3(b). Here, a triangle be-comes degenerate by pushing point c through the opposite edge without everdegenerating any of its edges. No edges are reduced to zero length and thenon-linear spring fix mentioned above will not remedy the problem. Farhat etal. [10,11] propose a solution by introducing torsional springs in points whichcontrol internal edges of triangles. Additional equations are now obtained fromthe torque balance in all points.

One can easily infer that a torsional spring will need to be replaced by itsnon-linear equivalent to produce a torque moment tending to infinity as theangle between two adjacent edges approaches zero, with additional correctionson unloading. Additionally, the problem of torsional springs becomes substan-tially more complex on 3-D polyhedra in relation to a tetrahedron flip. Thus,a reliable spring analogy setup would consist of linear and torsional springswith length/angle-dependent coefficient sensitised on loading/unloading, Fig.

10

Page 11: Automatic Mesh Motion for the Unstructured Finite Volume Method

Fig. 4. Combined linear-torsional spring analogy.

4.

Taking a step back, it seems that a reliable spring-based mesh motion systemhas come at a very high price: a non-linear component-coupled system whichis difficult and costly to solve. At the same time, the FEM community uses alinear Laplace equation with impunity, producing reliable and bounded motionfields at a fraction of a price, indicating that a fundamental re-think may berequired.

4 Polyhedral Vertex-Based Motion Solver

Looking at the previous section, it seems that spring analogy continually at-tempts to overcome numerical deficiencies by introducing non-linearity. Atthe same time, one could clearly claim that the Laplacian operator is a per-fect choice to govern mesh motion 2 , as it is unconditionally bounded; it onlyremains to devise a solution strategy that will preserve boundedness in thediscrete form. One could claim that spring analogy is no more than a numeri-cally clumsy approach to solving a Laplacian-based mesh motion equation onthe points of the mesh.

Taking a lead from the FEM practice, we can state the following requirementson the mesh motion solver:

• A vertex-based solution method, avoiding the need for interpolation;• Use of iterative solvers for efficiency, implying diagonally dominant matricesresulting from discretisation;

• No triangles or tetrahedra in the cell decomposition should be inverted –this should be guaranteed by the discretisation practice.

2 We shall examine the pseudo-solid approach as an alternative choice later in thetext.

11

Page 12: Automatic Mesh Motion for the Unstructured Finite Volume Method

4.1 Tetrahedral Elements and Discretisation of a Laplacian

The “obvious” solution of using a classical FEM solver to solve for mesh motionis rejected: to the authors’ knowledge, automatic definition of shape functionsfor arbitrary polyhedra does not exist and it is impractical to categorise all“allowed” cell shapes in the face-addressed mesh. Also, it is unclear whethersuch a shape function would produce a diagonally dominant matrix we areseeking for efficiency reasons.

At the same time, tetrahedral finite elements for a Laplacian produce a diag-onally equal matrix and second-order discretisation. Also, matrix coefficientstend to infinity for both degenerate situations in Fig. 3. We can prove thisby considering a trick for calculating the off-diagonal matrix coefficient for atetrahedron in real space, Fig. 5.

��������

��������

����

����

i

s

j

k

l

i

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

The coefficient contribution for a point pair (i, j) and the Laplacian operatorcan be calculated as:

aij =∫

VT

∇Ni•∇NjdV =si•sj

9VT. (6)

Here, N is the element shape function, si is the surface-normal vector on thetriangular face opposite point i and VT is the volume of the tetrahedron.

Consider a case where a tetrahedron approaches a degenerate state, either bya point approaching another point or the opposite face. In this case, the facearea vectors si and sj will still be finite (and come close to being parallel),whereas the volume will approach zero. Thus, as the denominator in Eqn. (6)approaches zero and the nominator remains finite, aij tends to infinity. As aresult, the tetrahedral FEM discretisation will remain bounded irrespective ofmesh quality and, if used to solve for point motion, it guarantees no tetrahedrawill be collapsed or flipped.

12

Page 13: Automatic Mesh Motion for the Unstructured Finite Volume Method

The final step in the analysis is the recognition that the cell measures we aretrying to preserve are obtained by using a tetrahedral decomposition (whichcan be performed irrespective of the shape): it is precisely these tetrahedrawhose quality we need to preserve.

The matrix discretising the motion equation governed by a Laplacian as de-scribed above will be sourceless and diagonally dominant, allowing the use ofiterative solvers. The motion variable will be bounded irrespective of meshquality, thus answering all the motion solver requirements stated above.

4.2 Choice of Cell Decomposition

It remains to choose an appropriate decomposition of a polyhedron into tetra-hedra; two methods investigated in this study are shown in Fig. 6.

����

����

����

����

��

��

�� ���

(a) Cell decomposition.

����

����

����

����

����

����

���� ���

� ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! "!"!"!"!""!"!"!"!""!"!"!"!""!"!"!"!"

#!#!#!##!#!#!##!#!#!##!#!#!##!#!#!##!#!#!##!#!#!##!#!#!##!#!#!##!#!#!##!#!#!##!#!#!##!#!#!##!#!#!##!#!#!##!#!#!##!#!#!##!#!#!##!#!#!##!#!#!##!#!#!#

$!$!$!$$!$!$!$$!$!$!$$!$!$!$$!$!$!$$!$!$!$$!$!$!$$!$!$!$$!$!$!$$!$!$!$$!$!$!$$!$!$!$$!$!$!$$!$!$!$$!$!$!$$!$!$!$$!$!$!$$!$!$!$$!$!$!$$!$!$!$$!$!$!$

%!%!%!%%!%!%!%%!%!%!%%!%!%!%&!&!&!&&!&!&!&&!&!&!&&!&!&!&

'!'!'!'!''!'!'!'!''!'!'!'!''!'!'!'!''!'!'!'!''!'!'!'!''!'!'!'!''!'!'!'!''!'!'!'!''!'!'!'!''!'!'!'!''!'!'!'!''!'!'!'!''!'!'!'!''!'!'!'!''!'!'!'!''!'!'!'!''!'!'!'!''!'!'!'!''!'!'!'!''!'!'!'!'

(!(!(!(!((!(!(!(!((!(!(!(!((!(!(!(!((!(!(!(!((!(!(!(!((!(!(!(!((!(!(!(!((!(!(!(!((!(!(!(!((!(!(!(!((!(!(!(!((!(!(!(!((!(!(!(!((!(!(!(!((!(!(!(!((!(!(!(!((!(!(!(!((!(!(!(!((!(!(!(!((!(!(!(!()!)!)!)!)!)!)!)!)!))!)!)!)!)!)!)!)!)!))!)!)!)!)!)!)!)!)!))!)!)!)!)!)!)!)!)!))!)!)!)!)!)!)!)!)!))!)!)!)!)!)!)!)!)!))!)!)!)!)!)!)!)!)!))!)!)!)!)!)!)!)!)!))!)!)!)!)!)!)!)!)!))!)!)!)!)!)!)!)!)!))!)!)!)!)!)!)!)!)!))!)!)!)!)!)!)!)!)!))!)!)!)!)!)!)!)!)!))!)!)!)!)!)!)!)!)!))!)!)!)!)!)!)!)!)!))!)!)!)!)!)!)!)!)!))!)!)!)!)!)!)!)!)!))!)!)!)!)!)!)!)!)!))!)!)!)!)!)!)!)!)!)

*!*!*!*!*!*!*!*!*!**!*!*!*!*!*!*!*!*!**!*!*!*!*!*!*!*!*!**!*!*!*!*!*!*!*!*!**!*!*!*!*!*!*!*!*!**!*!*!*!*!*!*!*!*!**!*!*!*!*!*!*!*!*!**!*!*!*!*!*!*!*!*!**!*!*!*!*!*!*!*!*!**!*!*!*!*!*!*!*!*!**!*!*!*!*!*!*!*!*!**!*!*!*!*!*!*!*!*!**!*!*!*!*!*!*!*!*!**!*!*!*!*!*!*!*!*!**!*!*!*!*!*!*!*!*!**!*!*!*!*!*!*!*!*!**!*!*!*!*!*!*!*!*!**!*!*!*!*!*!*!*!*!**!*!*!*!*!*!*!*!*!*

+!+!++!+!+,!,!,,!,!,

-!-!--!-!--!-!--!-!--!-!--!-!--!-!--!-!--!-!--!-!--!-!--!-!--!-!--!-!--!-!--!-!--!-!--!-!--!-!--!-!--!-!--!-!--!-!-

.!.!..!.!..!.!..!.!..!.!..!.!..!.!..!.!..!.!..!.!..!.!..!.!..!.!..!.!..!.!..!.!..!.!..!.!..!.!..!.!..!.!..!.!..!.!./!/!/!/!/!//!/!/!/!/!//!/!/!/!/!/0!0!0!0!0!00!0!0!0!0!00!0!0!0!0!0

1!1!1!1!1!1!1!1!1!11!1!1!1!1!1!1!1!1!11!1!1!1!1!1!1!1!1!11!1!1!1!1!1!1!1!1!11!1!1!1!1!1!1!1!1!11!1!1!1!1!1!1!1!1!11!1!1!1!1!1!1!1!1!1

2!2!2!2!2!2!2!2!2!22!2!2!2!2!2!2!2!2!22!2!2!2!2!2!2!2!2!22!2!2!2!2!2!2!2!2!22!2!2!2!2!2!2!2!2!22!2!2!2!2!2!2!2!2!22!2!2!2!2!2!2!2!2!2

(b) Cell-and-face decom-position.

Fig. 6. Decomposing a polyhedral cell into tetrahedra.

Consistent with face decomposition, Fig. 2, a cell is decomposed by intro-ducing a point in its centroid and building tetrahedra above the triangulardecomposition of a face. The two methods proposed here are the cell decom-position, Fig. 6(a), where additional points are introduced only in cell centres;and cell-and-face decomposition, Fig. 6(b), where points are introduced in bothface and cell centres.

The choice of decomposition is a balance between the convexness requirement,quality of resulting tetrahedra and the computational cost: cell decomposition

13

Page 14: Automatic Mesh Motion for the Unstructured Finite Volume Method

introduces an additional point in all cell centres, whereas cell-and-face decom-position adds a point in all face centres as well, giving a considerable increasein the number of unknowns. The issue of solution cost will be investigatedfurther in Section 4.4.

4.3 Choice of Motion Equation

In the FE mesh motion framework, we can choose several candidate equationsto govern mesh motion. The most obvious choices are the Laplace equationwith constant and variable diffusivity [12] and the small-strain formulation ofthe linear elastic model [16]. The difference between the two is that the for-mer only allows direction-decoupled transfinite mapping, while the latter alsoallows rotation which may be preferable under some circumstances. However,this comes at a relatively high price: the pseudo-solid equation also couplesthe motion vector components (due to rotation), [28]. The choice here is eithera further increase in storage associated with the coupled solution or an itera-tive segregated solution method. Numerical experiments in this direction showthat the substantial increase in cost associated with the pseudo-solid equationis not justified by improved mesh quality; for this reason, the Laplace equationwill be used in the rest of this study.

Some evidence exists that introduction of variable diffusivity in the Laplaciancan give substantial control over mesh quality. However, it is not immediatelyclear how to formulate the variable diffusivity field and this will be furtherinvestigated in numerical studies. As a guidance, increased diffusivity corre-sponds to increased stiffness of the “equivalent spring system”: a choice forgoverning the diffusivity can thus be a measure of mesh quality or distance tosome chosen boundary.

4.4 Efficiency Concerns

A critical requirement in this work is the motion solver which co-exists inthe code with the FVM flow solver and matches it for efficiency of matrixassembly, execution speed and storage requirements.

Unlike the classical face-addressed FV solver [26], where the matrix is assem-bled by looping over all mesh faces for all the operators and calculating thecomplete coefficient, the FEM assembles the matrix by looping over all ele-ments and distributing coefficient contributions into the diagonal, off-diagonaland source vectors. A concern is the fact that the number of tetrahedra in themesh will be considerably higher than the number of cells in the mesh. For ex-ample, in an all-hexahedral mesh of 100 000 CVs, the number of tetrahedra will

14

Page 15: Automatic Mesh Motion for the Unstructured Finite Volume Method

be 1.2 million for the cell decomposition or 2.4 million for the cell-and-face de-composition. Fortunately, the decomposition can be done “on-the-fly”, withoutstoring the actual tetrahedra and, combined with an efficient matrix assemblyalgorithm, poses limited storage and matrix assembly overhead. Furthermore,additional efficiency is obtained by operating on a group of tetrahedra at atime (resulting from a single polyhedral cell) with no storage overhead. Thisis sometimes called the “mini-element” technique.

Taking the efficiency concern a step further, we can compare the size of thepressure matrix in the FV solver (1 equation per cell) with the size of themotion matrix. In spite of the large number of tetrahedra, the number of equa-tions is not excessive: a 100 000 cell mesh in 3-D produces a motion matrix ofapprox. 200 000 (cell decomposition) to 500 000 (cell-and-face decomposition);it remains to be seen whether the solution cost is acceptable.

Looking at the polyhedral decomposition, Fig. 6, it can be seen that the cellcentre point in the decomposition is connected only to the points of the currentcell. We could thus examine the possibility of eliminating the equation for thecentre point before assembling the matrix as point motion is needed only inthe actual points of the mesh. However, it turns out that the elimination ofadditional variables would severely deteriorate the matrix condition numberand preclude the use of iterative solvers. This option would therefore result ina substantial increase in the solution cost and is abandoned.

In terms of storage requirements, one should note that in segregated FVM fluidflow solvers, the memory peak occurs during the pressure-velocity solution(using SIMPLE [29] or PISO [30]). Here, it is necessary to simultaneouslystore the momentum and pressure matrices. The mesh motion solver operateseither before of after the pressure-velocity module and some storage will be re-used (subject to dynamic memory handling within the code). This somewhatdecreases the perceived storage peak of the motion solver relative to the FVMpart of the algorithm.

Simulations involving dynamic (or solution-dependent) mesh motion are typi-cally done in the transient mode – this fact can be used for further optimisationof the motion solver. Apart from the choice of the motion equation, we are freeto choose the motion variable to be either point position or motion velocity.With the use of iterative solvers and in transient simulations one can assumethat the motion velocity field changes slower than point position and thusa better initial guess is available. For stationary meshes the velocity solutionequals to zero everywhere and is less polluted by round-off errors than the (lin-ear) point position field. For constant-velocity deformation the cost of solvingthe motion equation in terms of velocity becomes trivial (a good initial guessis available), which is not the case if point position is chosen as the primitivevariable.

15

Page 16: Automatic Mesh Motion for the Unstructured Finite Volume Method

For better precision, the motion velocity on the boundary is calculated fromthe current and desired point position and the time-step. This approach avoidsthe accumulation of round-off errors associated with solving for motion veloc-ity and using point position.

4.5 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 intotriangles and introducing a point in cell centroid. Consistency in tetra-hedral connectivity is obtained by using identical face decomposition forboth cells sharing an internal face.

(2) The Laplace operator:

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

with constant or variable diffusion field γ is chosen to govern mesh motion.Here, u is the point velocity field used to modify point positions:

xnew = xold + u∆t, (8)

where xold and xnew are the point positions before and after mesh motionand ∆t is the time-step. Eqn. (7) is discretised on the tetrahedral decom-position using standard second-order finite element method and producesa diagonally equal matrix. For efficiency reasons, the matrix coefficientsare calculated in real space using Eqn. (6).

(3) Boundary conditions for the motion equation are enforced from the knownboundary motion; this may include free boundaries, symmetry planes,prescribed motion boundary etc.

(4) The matrix is solved using an iterative linear equation solver; here thechoice falls on the Incomplete Cholesky preconditioned Conjugate Gra-dient (ICCG) solver [31], also used by the FVM solver.

4.6 Implementation of the Mesh Motion Solver

Several code organisation issues need to be examined, dealing with componentinteraction and the actual implementation of the proposed motion solver.

One could consider it an overkill to implement a fully-fledged FEM solver inorder to move the mesh in an existing FVM code. In this study, the motionsolver is implemented in FOAM [32,33], an object-oriented C++ continuum

16

Page 17: Automatic Mesh Motion for the Unstructured Finite Volume Method

mechanics library. The software is constructed to allow extensive code re-use, typically impossible in more traditional designs. FOAM currently imple-ments a second- and fourth-order collocated FVM on arbitrarily unstructuredmeshes. It is written in operator form and has a class hierarchy designed tobe shared between various discretisation practices.

Examining the code structure, it emerges that the classes representing thecomputational mesh, fields and field algebra, boundary conditions, linear equa-tion matrix and solver technology as well as problem setup and post-processingcan be shared. All the components listed above are intrinsically discretisation-independent, totalling over 100 000 lines of code and provide an excellent head-start.

What remains to be implemented are the FEM-specific parts: derived meshhandling adapted for the FE discretisation (and using raw mesh informa-tion from the base class), FE calculus (e.g. divergence and gradient operatorsetc.) and the actual FE discretisation operators (e.g. convection, diffusion,time derivative etc.) with boundary condition handling. This totals just un-der 21 000 lines of code, including both cell decomposition methods, and thehandling of solver parallelisation (to be described in future publications).

The code architecture allows us to keep the FEM implementation on thetetrahedral decomposition separate from the rest of the code, but still relyingon the common components mentioned above. It is encapsulated in its ownlibrary and loaded on demand. The FE solver is also implemented in theoperator form, currently providing the temporal derivative ∂u

∂tand various form

of the div-grad operators:∇•(γ∇u),∇•(γ∇uT ) and∇•[γI(∇•u)]. The solver hasbeen validated in isolation by solving linear elasticity model problems.

The actual motion solver is implemented by using the discretisation operatorsin the FEM library and packed for ease of use in a separate module, togetherwith the necessary mesh checking and setup tools.

5 Examples of Mesh Motion

Numerical experiments show that the cell decomposition is sufficiently ro-bust for 2-D and “trivial” 3-D meshes; for simulations on industrial-standardmeshes with considerable geometrical complexity and cell distortion, the cell-and-face decomposition is preferred. Note that for the mesh motion solver, theoriginal mesh will be decomposed into tetrahedra (as shown in Section 4.2)even if it is already composed exclusively of tetrahedra: in the face-based meshformat, this fact is not immediately obvious.

17

Page 18: Automatic Mesh Motion for the Unstructured Finite Volume Method

We shall now apply the novel motion algorithm on two test problems and ex-amine the mesh quality for various definitions of non-constant diffusion fields.

5.1 Motion of a Cylinder

The first test case consists of a triangular mesh in 2-D and a circle movingwithin it 3 . Constant motion velocity is prescribed for the points on the circle,the left and right boundary are fixed and a slip condition is prescribed at thetop and bottom.

Fig. 7 shows the mesh at several positions. It can be clearly seen that whilethe mesh remains valid, its quality is not satisfactory. The main objection isexcessive mesh density in front of the moving cylinder and the overall reductionin quality due to stretching. It is still encouraging that even for such a largemesh deformation, the final mesh remains valid.

Fig. 7. Motion of a cylinder in a duct.

The simplest way of improving mesh quality is by introducing variable dif-fusivity. The rationale here is that the mesh quality is more important closeto boundaries, whereas the “core” mesh has more freedom to deform. Onecould also postulate various “cell quality” indicators: as a cell becomes more

3 In reality, the mesh is 3-D and consists of prismatic elements, as the software onlyoperates on 3-D meshes. Although this is not strictly necessary, motion equation issolved for all points in the mesh.

18

Page 19: Automatic Mesh Motion for the Unstructured Finite Volume Method

distorted, its further deformation should be avoided. In both cases, the way todiminish local distortion is by increasing local diffusivity in the motion opera-tor. Note that the Laplacian operator remains bounded for arbitrary variationof the positive diffusion coefficient.

Out of a variety of diffusion laws one could devise, the following have beentested in this study:

• Distance-based methods, where a number of boundary patches are se-lected by the user and the diffusion field γ is a function of cell centre distancel to the nearest selected boundary:· Linear (D1): γ = 1

l;

· Quadratic (D2): γ = 1

l2;

· Exponential (D3): γ = e−l.• Quality-based methods, where the diffusion field γ is a function of a cellquality measure:· Mean cell non-orthogonality (Q1);· Mean cell skewness (Q2);· Mixed (Q3) – a combination of Q1 and Q2.

(a) Constant.

(b) Linear distance-based (D1).

(c) Quadratic distance-based (D2).

Fig. 8. Influence of diffusivity on mesh quality.

Fig. 8 shows the mesh comparison for various choices of diffusivity where the

19

Page 20: Automatic Mesh Motion for the Unstructured Finite Volume Method

moving circle has been chosen as the reference boundary. It can be clearlyseen that distance-based diffusivity improves the overall mesh quality andespecially mesh spacing near the circle. The result for quality-based method(Q1) was almost identical to Fig. 8(a), i.e. no significant improvement hasbeen observed.

5.2 Pitching Airfoil

The second test case consists of a pitching airfoil with a 2-D hybrid mesh. Theairfoil moves according to the sinusoidal law, including both translation andpitching.

Fig. 9 shows the mesh around the airfoil during three phases of motion usingthe D2 distance-based diffusivity. Of particular interest is the mesh aroundthe trailing edge. The selected method preserves the mesh quality very well.

Fig. 9. Motion of a NACA airfoil, D2 diffusivity method.

A comparison of mesh quality for four diffusivity methods is shown in Fig.10. In this case, all distance-based methods seem to perform very well, givingnotable improvement over constant diffusivity.

A quantitative confirmation of improved mesh quality is given in Fig. 11.Distance-based methods produce meshes with lowest non-orthogonality andskewness, while the constant diffusivity method considerably deteriorates themesh. However, in all cases the resulting mesh remains valid. It is interesting to

20

Page 21: Automatic Mesh Motion for the Unstructured Finite Volume Method

(a) Constant. (b) Linear distance-based (D1).

(c) Quadratic distance-based(D2).

(d) Quality-based (Q1).

Fig. 10. Mesh quality around the trailing edge.

see how the mesh quality impacts on the computational cost. Fig. 11(c) plotsthe number of iterations in the ICCG solver for the motion equation solved tothe same relative tolerance (1× 10−9). For the methods with adverse effect onmesh quality, the solution cost increases considerably. The D2 solution methodconsistently requires around 130 solver iterations, comparable with the effortof the FV pressure solver for the same case.

In realistic simulations, the transient nature of the flow introduces a time-steplimitation on the FVM solver used for the flow equation, somewhat mitigatingthe cost of the motion solver. Also, in the iterative solution framework, formost cases it is enough to reduce the residual by approximately 2 orders ofmagnitude instead of converging the solution to machine tolerance for everytime step. Partial convergence only becomes an issue on extremely distortedmeshes (which can no longer be used for the FV solution) or in cases whereone boundary comes to close proximity of another, e.g. Fig. 7.

In conjunction with partial convergence, one can resort to an a-priori indica-tor of motion validity. The simplest solution is to manually check the meshbefore executing the motion. However, this is expensive and unnecessary and

21

Page 22: Automatic Mesh Motion for the Unstructured Finite Volume Method

25

30

35

40

45

50

55

60

65

70

75

80

0 0.5 1 1.5 2

Max

imal

non

-ort

hogo

nalit

y

t, s

constantD1D2D3Q1Q2Q3

(a) Mesh non-orthogonality.

20

40

60

80

100

120

140

160

180

200

220

0 0.5 1 1.5 2

Max

imal

ske

wne

ss

t, s

constantD1D2D3Q1Q2Q3

(b) Mesh skewness.

0

100

200

300

400

500

600

700

0 0.5 1 1.5 2

Num

ber

of it

erat

ions

t, s

constantD1D2D3Q1Q2Q3

(c) Number of iterations.

Fig. 11. Mesh quality indicators and computational effort.

a simpler method can be proposed.

Consider two points A and B along an edge e = AB in space. The require-ment of two points “crossing over” reduces to the condition of e•(∇u)•e < 1.If desired, this can be checked for all mesh edges before executing motion. Ex-perience shows that the most robust way of dealing with problematic motionsolutions is to halve the time-step size and/or tighten the solution tolerancebefore recalculating the motion solution for the current time-step.

Comparing the performance of the two polyhedral decomposition methods, acurious fact has been noted. On reasonably complex meshes in 3-D it turns outthat the cost of solution of the cell-and-face decomposition in total executiontime becomes substantially lower than that for the cell decomposition. Thisis counter-intuitive, as the number of unknowns for the cell-and-face decom-position is considerably greater (in both cases, it is only the point positionsthat are used; the solution in cell and face centres is discarded). The cross-over in solution cost is due to an increased number of iterations in the ICCGsolver for the cell decomposition method. It seems that the higher quality ofdecomposition tetrahedra for the cell-and-face decomposition creates a better-

22

Page 23: Automatic Mesh Motion for the Unstructured Finite Volume Method

conditioned matrix which, for the same mesh, sometimes requires only a tenthof the number of iterations used with the cell decomposition.

6 Free Surface Flow Simulations

This study will be concluded by presenting two simulations of free surface flowsusing a surface tracking algorithm. Here, the fluid equations are solved in bothphases and coupled across the free surface. The free surface is represented asa mesh interface whose motion depends on the flow solution. A schematicrepresentation of the free surface condition is given in Fig. 12.

free surface(fs)Liquid

free surface shadow (fss)

(∇p)fss = 0

pfs = pfss − σKfs

(∇u)fs =µgas

µliquid(∇u)fss

Gas

ufss = ufs

Fig. 12. Motion of a NACA airfoil, D2 diffusivity method.

Second-order FVM is used for the fluid flow and the automatic mesh motionsolver described above adjusts the mesh. On the free surface, a double bound-ary condition is imposed: fixed pressure and zero flux condition need to besatisfied simultaneously. The fluid flow equations are solved using a segregatedSIMPLE procedure, taking into account the kinematic and dynamic conditionon the free surface, as well as surface tension. The “no-flux” condition is sat-isfied in an iterative sequence [34,35], providing the boundary condition formesh motion on the free surface.

The solution procedure enforces the fixed pressure boundary condition on thefree surface and consequently a non-zero-flux is obtained. Position of the facesin the free surface patch is adjusted such that the area swept in motion equalsthe flow flux for the face. Clearly, the change in domain shape influences thepressure and flux solution and the procedure is repeated in an iterative mannerfor every time-step until the fixed surface pressure and zero flux condition aresatisfied simultaneously.

23

Page 24: Automatic Mesh Motion for the Unstructured Finite Volume Method

6.1 Hydrofoil Under a Free Surface

The first free surface flow simulation consists of an inclined NACA 0012 hy-drofoil placed 0.203m below a free surface in water at an angle of attack of 5◦

[36]. The Froude number for the flow is Fr = 0.567. In this simulation onlythe water component is modelled. The mesh consists of 14 508 CVs. Fig. 13shows the mesh and pressure distribution for an instant in time.

As a result of the pressure distribution around the profile, waves are inducedon the free surface and convected downstream. Motion of the free surface closeto the inlet on the left is constrained to represent constant inlet depth. Thewave motion only occurs in the vertical direction; in the horizontal directionthe mesh remains undisturbed.

Fig. 13. Hydrofoil under a free surface.

6.2 Free-Rising Air Bubbles in Water

The driving force behind this study is a desire to assemble a tool for Di-rect Numerical Simulation (DNS) of air bubbles in water, with the aim ofproviding lift and drag data needed for two-phase Eulerian modelling. Sim-ilar calculations, using the surface capturing method have been reported byRusche [37], indicating some deficiencies in the handling of surface tension.A surface-tracking approach has the potential of treating surface tension tomuch higher accuracy and, provided the method is reliable and efficient, canbe compared with [37]. Here, we shall report some initial results for free risingair bubbles in water in 2- and 3-D.

The bubble is located in a large box and the flow boundary conditions are

24

Page 25: Automatic Mesh Motion for the Unstructured Finite Volume Method

adjusted such that it remains centred in the domain. The actual bubble tra-jectory and rising velocity transients can be followed through the changes inthe boundary condition. In this simulation, the bubble rises through a quies-cent fluid and the material properties of air and water are used including thesurface tension effects. Note that, unlike in the surface capturing methods,the strength of surface tension or the jump is the density and viscosity do notpose a problem.

Fig. 14 shows the mesh deformation and the pressure field around a 2-D airbubble of 1mm diameter freely rising in water. After the initial transient,the bubble reaches terminal velocity and shape. The mesh in this simulationconsists of 12 840 CVs in two disconnected regions and captures the interfacecoupled through the free surface condition.

Fig. 14. Free-rising air bubble in water in 2-D: pressure iso-lines and surface defor-mation.

A timing breakdown for a single iteration are given in Table 1. The simulationis performed on a Linux computer with a 2GHz Intel Pentium IV processorwith 1GB of memory.

Finally, Fig. 15 shows the flow field around the free rising air bubble of thesame diameter in 3-D. The mesh consists of 561 920 cells with the near-surfaceresolution sufficient to resolve surfactant transport effects. A detailed break-

25

Page 26: Automatic Mesh Motion for the Unstructured Finite Volume Method

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

Operation Time [s] Cumulative [s]

Building momentum matrix 0.12 0.12

Solving momentum equation 0.06 0.18

Building pressure matrix 0.06 0.24

Solving pressure equation 0.33 0.57

Building motion matrix 0.27 0.84

Solving motion equation 0.70 1.54

down of the timing for a single iteration of the simulation is given in Table 2for the same platform as before.

Fig. 15. Free-rising air bubble in water in 3-D: pressure iso-lines and surface pressure.

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

Operation Time [s] Cumulative [s]

Building momentum matrix 6.34 6.34

Solving momentum equation 3.16 9.50

Building pressure matrix 3.09 12.59

Solving pressure equation 29.02 41.61

Building motion matrix 12.80 54.41

Solving motion equation 39.95 94.36

26

Page 27: Automatic Mesh Motion for the Unstructured Finite Volume Method

In both simulations, the cost associated with the mesh motion solver is 50−60% of the complete cost of simulation, which is high but acceptable. It hasbeen noted that the cost balance is more favourable in 3-D and on largemeshes, due to the change in the balance of the number of cells and points.However, the selected mesh motion algorithm is inherently parallel, both interms of selected discretisation and the choice of linear equation solvers. Acombination of a massively parallel FVM flow solver already available inFOAM and a parallel motion solver working on the identical mesh decomposi-tion offers considerable scope in terms of reduced execution time per time-step.Good parallel efficiency seems to be the way to afford the cost of long transientruns needed to accumulate sufficient DNS statistics.

7 Summary and Future Work

In this study we have examined the requirements of deforming mesh simula-tions in a Finite Volume framework, with the objective of developing a ro-bust and reliable automatic mesh motion tool. The purpose of a mesh motionsolver is to determine the point positions for the mesh based on the prescribedboundary motion – this can be prescribed by external events or calculated asa part of the solution. While performing automatic mesh motion, it is crucialto preserve the validity and quality of the mesh.

Having analysed several popular automatic mesh motion approaches and theiradvantages and drawbacks, we have settled on a second-order quasi-tetrahedralFinite Element method and the Laplace operator to govern the motion. Sup-port for polyhedral cells is provided using the “mini-element” technique, whereeach polyhedron is, for the purposes of motion discretisation, split into tetra-hedra and a second-order shape function is used. Analysis shows that it isprecisely those tetrahedra that control the quality and validity of the face-addressed unstructured FV mesh and that the chosen method of discretisa-tion guarantees to preserve their quality. Furthermore, the chosen method ofdiscretisation produces a symmetric positive definite matrix ideal for iterativelinear equation solvers.

The quality of the mesh in motion is preserved by prescribing non-constantdiffusion field in the Laplace operator. Several techniques have been tested,most notably the distance-based diffusion, where the coefficient depends onthe distance between the cell centre and the nearest boundary of interest.

A combination of the above components with a second-order FV flow solvercreates a robust and efficient dynamic mesh motion solver capable of han-dling free surface flows using a surface-tracking algorithm. The solver hasbeen tested on two free surface flows, including a simulation of free rising air

27

Page 28: Automatic Mesh Motion for the Unstructured Finite Volume Method

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 simulations of gas bubbles inliquids, establishing a base for phase interaction modelling in Eulerian multi-phase simulations.

References

[1] F. Harlow, J. Welsh, Numerical computation of time dependent viscous flowswith free surface, Phys. Fluds 8 (1965) 2182–2189.

[2] C. Hirt, B. Nichols, Volume of fluid (VOF) method for the dynamics of freeboundaries, J. Comp. Physics 39 (1981) 201–225.

[3] O. Ubbink, R. Issa, ”a method for capturing sharp fluid interfaces on arbitrarymeshes, J. Comp. Physics 153 (1999) 26–50.

[4] M. Behr, T. Tezduyar, Finite element solution strategies for large-scale flowsimulations, Comput. Methods Appl. Mech. Engrg. 113 (1994) 3–24.

[5] I. Guler, M. Behr, T. Tezduyar, Parallel finite element computation of free-surface flows, Computational Mechanics 23 (1999) 117–123.

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

[7] F. Blm, Considerations on the spring analogy, Int. J. Num. Meth. Fluids 32(2000) 647–668.

[8] B. Perot, R. Nallapati, A moving unstructured staggered mesh method for thesimulation of incompressible free-surface flows, J. Comp. Physics 184 (2003)192–214.

[9] Y. Zhao, J. Tai, F. Ahmed, Simulation of micro flows with moving boundariesusing high-order upwind method on unstructured grids, ComputationalMechanics 28 (2002) 66–75.

[10] C. Farhat, C. Degand, B. Koobus, M. Lesoinne, Torsional springs for two-dimensional dynamic unstructured meshes, Comput. Methods Appl. Mech.Engrg. 163 (1998) 231–245.

[11] C. Degand, C. Farhat, A three-dimensional torsional spring analogy method forunstructured dynamic meshes, Computers and Structures 80 (2002) 305–316.

[12] R. Lohner, C. Yang, Improved ALE mesh velocities for moving bodies,Communications in Numerical Methods in Engineering 12 (1996) 599–608.

[13] D. Littlefield, The use of r-adaptivity with local, intermittent remesh formodeling hypervelocity impact and penetration, Int. J. Impact Engrg. 26 (2001)433–442.

28

Page 29: Automatic Mesh Motion for the Unstructured Finite Volume Method

[14] A. Masud, T. Hughes, A space-time Galerkin/least-squares finite elementformulation of the navier-stokes equations for moving domain problems,Comput. Methods Appl. Mech. Engrg. 146 (1997) 91–126.

[15] I. Robertson, S. Sherwin, Free-surface flow simulation using hp/spectralelements, J. Comp. Physics 155 (1999) 26–53.

[16] M. Behr, F. Abraham, Free-surface flow simulations in the presence of inclinedwalls, Comput. Methods Appl. Mech. Engrg. 191 (2002) 5467–5483.

[17] R. Cairncross, P. Schunk, T. Baer, R. Rao, P. Sackinger, A finite elementmethod for free surface flows of incompressible fluids in three dimensions. PartI. Boundary fitted mesh motion, Int. J. Numer. Meth. Fluids 33 (2000) 375–403.

[18] G. Chiandussi, G. Bugeda, E. Onate, A simple method for automatic updateof finite element meshes, Commun. Numer. meth. Engrg. 16 (2000) 1–19.

[19] A. Johnson, T. Tezduyar, Mesh update strategies in parallel finite elementcomputations of flow problems with moving boundaries and interfaces, Comput.Methods Appl. Mech. Engrg. 119 (1994) 73–94.

[20] P. Sackinger, P. Schunk, R. Rao, A Newton-Raphson pseudo-solid domainmapping technique for free and moving boundary problems: A finite elementimplementation, J. Comp. Physics 125 (1996) 83–103.

[21] M. Souli, J. Zolesion, Arbitrary Lagrangian-Eulerian and free surface methodsin fluid mechanics, Comput. Methods Appl. Mech. Engrg. 191 (2001) 451–466.

[22] H. Zhou, J. Derby, An assessment of a parallel, finite element method forthree-dimensional, moving-boundary flows driven by capillarity for simulationof viscous sintering, Int. J. Numer. Meth. Fluids 36 (2001) 841–865.

[23] B. Helenbrook, Mesh deformation using the biharmonic operator, Int. J. Numer.Meth. Engrg. 56 (2003) 1007–1021.

[24] H. Jasak, A. Gosman, Automatic resolution control for the finite volumemethod. Part 1: A-posteriori error estimates, Numerical Heat Transfer, PartB 38 (3) (2000) 237–256.

[25] I. Demirdzic, M. Peric, Space conservation law in finite volume calculations offluid flow, Int. J. Num. Meth. Fluids 8 (9) (1988) 1037–1050.

[26] H. Jasak, Error analysis and estimation in the finite volume method withapplications to fluid flows, Ph.D. thesis, Imperial College, University of London(1996).

[27] H. Jasak, H. Weller, A. Gosman, High resolution NVD differencing scheme forarbitrarily unstructured meshes, Int. J. Numer. Meth. Fluids 31 (1999) 431–449.

[28] H. Jasak, H. Weller, Application of the finite volume method and unstructuredmeshes to linear elasticity, Int. J. Num. Meth. Engineering 48 (2) (2000) 267–287.

29

Page 30: Automatic Mesh Motion for the Unstructured Finite Volume Method

[29] S. Patankar, Numerical heat transfer and fluid flow, Hemisphere PublishingCorporation, 1981.

[30] R. Issa, Solution of the implicitly discretized fluid flow equations by operator-splitting, J. Comp. Physics 62 (1986) 40–65.

[31] M. Hestens, E. Steifel, Method of conjugate gradients for solving linear systems,Journal of Research 29 (1952) 409–436.

[32] H. Weller, G. Tabor, H. Jasak, C. Fureby, A tensorial approach to computationalcontinuum mechanics using object orientated techniques, Computers in Physics12 (6) (1998) 620 – 631.

[33] H. Jasak, H. Weller, N. Nordin, In-cylinder cfd simulation using a c++ object-oriented toolkit, SAE Technical Paper 2004-01-0110 (2004).

[34] S. Muzaferija, M. Peric, Computation of free surface flows usinginterface-tracking and interface-capturing methods, Computational MechanicsPublications, Southampton, 1998, Ch. 3.

[35] Z. Tukovic, H. Jasak, Unstructured finite volume free surface tracking algorithmwith automatic mesh motion, to be published.

[36] J. Ferziger, M. Peric, Computational methods for fluid dynamics, SpringerVerlag, Berlin-New York, 1995.

[37] H. Rusche, Computational fluid dynamics of dispersed two-phase flows at highphase fractions, Ph.D. thesis, Imperial College, University of London (2003).

30