You are on page 1of 67

ICFD THEORY MANUAL

Incompressible fluid solver


in LS-DYNA
Tested with LS-DYNA
R
R7.0 Revision Beta

Wednesday 8th October, 2014


Disclaimer:
LSTC does not warrant that the material contained herein will meet
the user’s requirements, is error free, or will produce the desired re-
sults.
FURTHERMORE, LSTC MAKES NO WARRANTIES, EITHER EX-
PRESS OR IMPLIED, ORAL OR WRITTEN, WITH RESPECT TO
THE DOCUMENTATION AND SOFTWARE DESCRIBED HEREIN
INCLUDING, BUT NOT LIMITED TO ANY IMPLIED WARRANTIES
(i) OF MERCHANTABILITY, OR (ii) FITNESS FOR A PARTICU-
LAR PURPOSES, OR (iii) ARISING FROM COURSE OF PERFOR-
MANCE OR DEALING, OR FROM USAGE OF TRADE.
From time to time LSTC may at its sole discretion release updates
which may include corrections to erroneous material. LSTC encour-
ages users to periodically check this site for updates and to report any
errors or inconsistencies encountered to bugs@lstc.com.

LSTC-LS-DYNA-ICFD-THE-1.1-1 i
Document Information
Confidentiality external
Document Identifier LSTC-LS-DYNA-ICFD-THE-1.1-1
Prepared by LSTC
R
Iñaki Çaldichoury, LSTC
R
Rodrigo R. Paz
Approved by LSTC
R
Facundo Del Pin, LSTC
R
Rodrigo R. Paz
Number of pages 61
Date created Wednesday 8th October, 2014
Distribution External

ii LSTC-LS-DYNA-ICFD-THE-1.1-1
Contents
1 Introduction 1
1.1 Purpose of this Document . . . . . . . . . . . . . . . . . . . . . . . . 1

2 Document Information 2

3 Notations and physical variables 3

4 The ICFD solver 4


4.1 Fluid Mechanics equations . . . . . . . . . . . . . . . . . . . . . . . . 4
4.1.1 The incompressibility condition . . . . . . . . . . . . . . . . . 4
4.1.2 Governing set of equations . . . . . . . . . . . . . . . . . . . . 4
4.1.3 Boundary conditions . . . . . . . . . . . . . . . . . . . . . . . 5
4.1.4 ALE approach for mesh movement . . . . . . . . . . . . . . . 6
4.2 The Fractional Step method . . . . . . . . . . . . . . . . . . . . . . . 7
4.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.2.2 Splitting the Momentum Equations . . . . . . . . . . . . . . . 7
4.2.3 Equation of Incompressibility . . . . . . . . . . . . . . . . . . 9
4.2.4 Three Step Fractional Method . . . . . . . . . . . . . . . . . . 9
4.3 Spatial discretization by the Finite Element Method . . . . . . . . . . 10
4.3.1 The FEM system . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.3.2 Predictor corrector scheme . . . . . . . . . . . . . . . . . . . . 13
4.4 Integration scheme stabilization . . . . . . . . . . . . . . . . . . . . . 14
4.4.1 Pressure stabilization . . . . . . . . . . . . . . . . . . . . . . . 14
4.4.2 Convection stabilization . . . . . . . . . . . . . . . . . . . . . 15
4.5 Watching and interpreting the analysis . . . . . . . . . . . . . . . . . 16
4.6 Non-Inertial Reference Frame . . . . . . . . . . . . . . . . . . . . . . 17

5 Structure and Thermal coupling 18


5.1 Fluid Structure Interaction (FSI) . . . . . . . . . . . . . . . . . . . . 18
5.1.1 Types of FSI coupling . . . . . . . . . . . . . . . . . . . . . . 18
5.1.2 Partitioned Approximation for Strong FSI Coupling . . . . . . 19
5.1.3 Evaluation of the Laplace Matrix for FSI problems . . . . . . 20
5.1.4 FSI resolution steps . . . . . . . . . . . . . . . . . . . . . . . . 21
5.1.5 Watching and controlling the analysis for FSI cases . . . . . . 24
5.2 Thermal coupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.2.2 The heat equation . . . . . . . . . . . . . . . . . . . . . . . . 25

LSTC-LS-DYNA-ICFD-THE-1.1-1 iii
5.2.3 Spatial discretization . . . . . . . . . . . . . . . . . . . . . . . 25
5.2.4 Coupling with the thermal solver . . . . . . . . . . . . . . . . 26
5.2.5 Watching and controlling the analysis for thermal analysis. . . 27
5.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

6 Free surface and mutliphase handling 28


6.1 The level set method . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
6.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
6.1.2 The level set function . . . . . . . . . . . . . . . . . . . . . . . 28
6.1.3 The convection equation . . . . . . . . . . . . . . . . . . . . . 29
6.1.4 Numerical integration . . . . . . . . . . . . . . . . . . . . . . . 29

7 Anistropic/Isotropic Generalized Flow Through Porous Media 32


7.1 Generalized Porous Media Model: isotropic media . . . . . . . . . . . 32
7.1.1 Model Parameters limits . . . . . . . . . . . . . . . . . . . . . 33
7.2 Anisotropic Generalized Flow Through Porous Media. . . . . . . . . . 33
7.3 Heat Transfer in Porous Media: coupled PM/NS heat transfer. . . . . 33
7.4 Computing porous parameters using the pressure-velocity (p − u) ex-
perimental data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

8 Turbulence models 37
8.1 The RANS model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.1.2 The Reynolds Averaged Equations . . . . . . . . . . . . . . . 37
8.1.3 The k- model . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
8.2 The LES model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8.2.2 LES equations . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8.2.3 The Smagorinsky model . . . . . . . . . . . . . . . . . . . . . 40
8.3 Wall function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
8.4 Turbulence synthesis method for Large Eddy Simulations . . . . . . . 41
8.5 The Random Flow Generator in Python: How Inlet turbulence gen-
erator works (basically) in ICFD/LS-DYNA . . . . . . . . . . . . . . 42
8.6 Smirnov’s algorithm to generate inhomogeneous anisotropic turbu-
lence at inflow boundaries in LES runs . . . . . . . . . . . . . . . . . 43

9 The Volume Mesher 50


9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
9.2 The Delaunay criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

iv LSTC-LS-DYNA-ICFD-THE-1.1-1
9.3 Initial Volume mesh building steps . . . . . . . . . . . . . . . . . . . 50
9.4 Local refinement tools . . . . . . . . . . . . . . . . . . . . . . . . . . 51
9.4.1 Imposing the mesh size on a volume domain . . . . . . . . . . 51
9.4.2 The boundary layer mesh . . . . . . . . . . . . . . . . . . . . 53
9.5 Volume mesh remeshing criteria . . . . . . . . . . . . . . . . . . . . . 53
9.5.1 Mesh deformation criteria . . . . . . . . . . . . . . . . . . . . 53
9.5.2 Using adaptivity . . . . . . . . . . . . . . . . . . . . . . . . . 53
9.6 Watching the mesh quality . . . . . . . . . . . . . . . . . . . . . . . . 55
9.6.1 Mesh quality output file . . . . . . . . . . . . . . . . . . . . . 55
9.6.2 Terminal information . . . . . . . . . . . . . . . . . . . . . . . 56

A Consistent units for ICFD 61

LSTC-LS-DYNA-ICFD-THE-1.1-1 v
1 Introduction
1.1 Purpose of this Document
A detailed description of the analytical equations solved by the incompressible fluid
solver is given as well as the numerical methods used. Additional descriptions of
the equations used for some of the main features of the solver is also provided. The
objective of this document is to offer the reader who wishes to understand and use
the incompressible fluid solver of LS-DYNA a precise and easy way to understand
insight of the formulas, notions and theories employed by the solver.

LSTC-LS-DYNA-ICFD-THE-1.1-1 1
2 Document Information

Test Case Summary

Confidentiality external use


Test Case Name Incompressible fluid solver in LS-DYNA
Test Case ID ICFD-THE-1.1
Test Case Status active
Test Case Classification Theory document
Metadata Theory

Table 1: Test Case Summary

2 LSTC-LS-DYNA-ICFD-THE-1.1-1
3 Notations and physical variables
Table 2 provides the meaning of each symbol and the SI unit of measure while table
3 provides the conventions and operators used :

Symbol : Meaning : Units (SI) :


~u fluid velocity meters per second
p fluid pressure Pascals
ρ fluid density kilograms per cubic meter
µ fluid dynamic viscosity Pascals seconds
ν fluid kinematic viscosity square meters per second
α thermal diffusivity square meters per second

Table 2: Variables and constants

grad, curl, div operators ~ ∇×,


∇, ~ ∇·
vectors in R3 arrow overhead : vec
~
matrices bold : P
vectors in FEM/BEM systems small : ai

Table 3: Operators and conventions

LSTC-LS-DYNA-ICFD-THE-1.1-1 3
4 The ICFD solver
4.1 Fluid Mechanics equations
4.1.1 The incompressibility condition
The present solver aims to solve the incompressible Navier-Stokes equations. Tradi-
tionally, a fluid may be considered incompressible when the Mach number is lower
than 0.3, i.e
V
M = ≤ 0.3, (1)
a
where V is the velocity of the flow relative to a fixed object and a is the speed of
sound in the medium (in air, we thus have v ≤ 370 km/h).
In fluid dynamics, the continuity equation states that, in any steady state process,
the rate at which mass enters a system is equal to the rate at which mass leaves the
system. The continuity equation is analogous to Kirchhoff’s current law in electric
circuits.
The differential form of the continuity equation is
∂ρ
+ ∇ · (ρ~u) = 0. (2)
∂t
If ρ is a constant, as in the case of incompressible flow, the mass continuity equation
simplifies to a volume continuity equation
∇ · ~u = 0. (3)

4.1.2 Governing set of equations


Conservation of momentum and mass for incompressible Newtonian fluids in the
Eulerian conventional form are represented by the Navier-Stokes equations combined
with the continuity equations as follows:
 
dui ∂ui ∂σi,j
ρ + uj = + ρfi in Ω, (4)
dt ∂xj ∂xj
∂ui
= 0 in Ω. (5)
∂xi
The total stress tensor is given by
 
∂ui ∂uj 2 ∂ul
σij = −pδij + µ + − δij . (6)
∂xj ∂xi 3 ∂xl

4 LSTC-LS-DYNA-ICFD-THE-1.1-1
For near incompressible flows we have that
∂ui ∂ui
 , (7)
∂xi ∂xj
and the last term in the brackets may be neglected from Equation (6). Then,
 
∂ui ∂uj
σij ≈ −pδij + µ + . (8)
∂xj ∂xi
In the same way, the term ∂σij /∂xj in the momentum equation may be simplified
for near incompressible flows as
  
∂σij ∂p ∂ ∂ui ∂uj
=− δij + µ +
∂xj ∂xj ∂xj ∂xj ∂xi
   
∂p ∂ ∂ui ∂ ∂uj
=− δij + µ +µ
∂xj ∂xj ∂xj ∂xj ∂xi
    (9)
∂p ∂ ∂ui ∂ ∂uj
=− δij + µ +µ
∂xj ∂xj ∂xj ∂xi ∂xj
 
∂p ∂ ∂ui
≈− δij + µ .
∂xj ∂xj ∂xj
The above expression simplifies the viscous term so that we end up with the following
system
∂ 2 ui
 
∂ui ∂ui ∂p
ρ + uj = − +µ + ρfi in Ω (10)
∂t ∂xj ∂xi ∂xj ∂xj
∂ui
= 0 in Ω (11)
∂xi

4.1.3 Boundary conditions


The set of differential equations presented above is incomplete if the appropriate set
of boundary conditions and initial conditions is not specified. For the continuum
problem conditions specifying velocities and stress have to be imposed.
The components of the velocity vector will be replaced, according to the constraints
related to the boundary, by the proper imposed value. Over a rigid wall the boundary
conditions follow directly from the momentum equations. For a free-slip wall the
normal velocity must vanish; for a non-slip wall the tangential components must, in
addition, vanish. These conditions in general can be defined as
ui = v i on Γv , (12)

LSTC-LS-DYNA-ICFD-THE-1.1-1 5
where v i indicates the function that is imposed on the boundary.
The other type of boundary conditions are imposed on the free surface. These are
the most difficult to identify as the shape of the free surface has to be computed
ahead. The principles that form the basis for the free surface boundary conditions
are stated as follow
• stress tangential to the surface must vanish,
• stress normal to the surface must exactly balance any externally applied normal
stress.
In this case these conditions are expressed as
ti = σij nj = ti on Γf , (13)
where nj is the direction cosine of the outward normal on the boundary with respect
to the xj axis. Both surfaces Γv and Γf are two disjoint non-overlapping subsets of
the boundary Γ.
The set of initial conditions for the Lagrangian Navier-Stokes problem will be given
specifying the velocity and pressure at the initial time
vi (xi , 0) = vi0 (xi ), (14)
p(xi , 0) = p0 (xi ), (15)
where the initial velocity vi0 has to satisfy the incompressibility constrain ∂vi /∂xi = 0.

4.1.4 ALE approach for mesh movement


In a CFD only analysis, the moving reference frame is fixed in space and a full
Eulerian formulation is achieved. However, in cases of Fluid Structure Interaction
(FSI) problems, the boundaries between the solid and the fluid are Lagrangian and
deform with the structure. An ALE formulation is hence retrieved. This approach
allows a strong and exact imposition of the solid boundary conditions on the fluid.
The solid and fluid geometry must match at the interface but not necessarily the
meshes. Rewriting the equations of motion for an ALE formulation, we now have
∂ 2 ui
 
∂ui ∂ui ∂p
ρ + (uj − vj ) = − +µ + ρfi in Ω (16)
∂t ∂xj ∂xi ∂xj ∂xj
∂ui
= 0 in Ω (17)
∂xi
where vj is the velocity of the moving frame.

6 LSTC-LS-DYNA-ICFD-THE-1.1-1
4.2 The Fractional Step method
4.2.1 Introduction
For the time integration of the Navier-Stokes equation a projection method was
adopted ([6], [7], [27]).These methods stand out from classical monolithic schemes
as pressure and velocity are uncoupled. Thus four linear systems of equations are
obtained, namely three for the momentum equation and one to solve the incompress-
ibility constrain.
The present scheme consists of three steps until the final velocity is achieved ([25]).
In the first step, a predictor velocity u∗i is computed. This velocity does not satisfy
the incompressibility constrain given by Equation (5). Thus, in the second step the
velocity ui is projected into a space of divergence free vector field and a Poisson
equation of pressure is obtained. This pressure will correct ui to get a final step
divergence free velocity un+1
i . The final step consists of moving the particles to their
n+1
new time step position x . If this is done iteratively then convergence is achieved
when the particles always move to the same final position. This class of schemes are
now widely used in practice and have been rigously analyzed in ([20], [12], [16], [30],
[32], [10], [8]).

4.2.2 Splitting the Momentum Equations


Let us start with the time derivative that is approximated with backward differences
of second order as

dui 1.5un+1
i − 2uni + 0.5un−1
i
≈ (18)
dt ∆t
However, for clarity purposes, the following demonstrations will use simple forward
differences approximation keeping in mind that the procedure is similar with back-
ward differences approximation

dui un+1 − uni


≈ i (19)
dt ∆t
If we now consider f a generic function of time and f n the value of f at tn = n∆t or
an approximation of it, and let f n+θ = θf n+1 + (1 − θ)f n , we can introduce a new
variable on the left side of Equation (10) and add and subtract a pressure term on
the right hand side as follows

n+θ
un+1 − u?i + u?i − uni
    
i ∂ n+1 n n ∂ ∂ui ∂ui
ρ = −p + γp − γp δij + µ − ρuj + ρfi (20),
∆t ∂xi ∂xj ∂xj ∂xj

LSTC-LS-DYNA-ICFD-THE-1.1-1 7
where u?i are fictitious variables called fractional velocities and γ is a scalar value
that varies from 0 to 1 and that will be explored later. The value of θ = 0 implies
an explicit forward Euler scheme, θ = 1 is an implicit backward Euler scheme and
θ = 0.5 is the Crank-Nicholson second order semi-implicit scheme. In the present
analysis θ = 1 will be adopted. We can see that the pressure term has been taken out
from the implicit-explicit term [·]n+θ and only the implicit part is taken into account.
Rewriting Equation (20), and reordering some terms, we get
 
∆t ∂
un+1
i u?i
− + = u?i −p n+1
+ γp δij + uni −
n
ρ ∂xi
n+θ (21)
∆t ∂pn
  
∆t ∂ ∂ui ∂ui
γ δij + µ + ρfi − ρuj ,
ρ ∂xj ρ ∂xj ∂xj ∂xj
The last three terms of Equation (21) will be related to u?i in such a way that we
may write

∆t ∂pn ∆t ∂ ∂uin+θ ∂un+θ


 
u?i = uni
−γ δij + µ − ∆tujn+θ i + ∆t fi , (22)
ρ ∂xi ρ ∂xj ∂xj ∂xj
 
∆t ∂
un+1
i = u?i + −pn+1 + γpn δij , (23)
ρ ∂xi
in which fi is considered constant in time and pn is the pressure field at time tn but
evaluated at the final position. In the viscous and advection terms, the values of
un+1
i and un+1
j will be estimated using u?i . The term un+1
i will be estimated as ūn+1
i .
n+1
The choice of ūi will be explicited later. This allows to write Equation (22) as

∂ ∂u?i ∂ ūn+1 ∆t ∂pn


 
∆t
u?i
− µθ + ∆tu?j i = uni − γ δij +
ρ ∂xj ∂xj ∂xj ρ ∂xi
(24)
∂ ∂uni ∂un
 
∆t
µ(1 − θ) − ∆t(1 − θ)unj i + ∆t fi ,
ρ ∂xj ∂xj ∂xj
which is the actual expression to compute the predictor velocity. The parameter γ
introduced earlier, determines the amount of pressure splitting. Thus when γ = 1
it means small pressure splitting and γ = 0 implies the largest pressure splitting.
When γ = 0 a first order scheme in time is obtained. On the contrary when γ = 1
a second order scheme is found. A second order scheme gives unstable values of the
pressure field that need to be corrected. The stabilization technique used in this case
will be introduced later.

8 LSTC-LS-DYNA-ICFD-THE-1.1-1
4.2.3 Equation of Incompressibility
The main objective of this phase is to obtain a pressure field that, when replaced in
Equation (23), satisfies the incompressibility constraint. Once the intermediate ve-
locity u?i has been computed from Equation (24), the end of step velocity is obtained
by adding to u?i the dynamical effect of the still unknown pressure pn+1 , which must
be determined such that the incompressibility constraint from Equation (5) remain
satisfied.
Taking Equation (23) and applying the divergence operator on both sides
 
∂ n+1 ? ∆t ∂ ∂ n+1 n
(u − ui ) = −p + γp δij . (25)
∂xi i ρ ∂xi ∂xi

By means of Equation (5) the first term on the left hand side vanishes and we may
write
 
∂ ? ∆t ∂ ∂ n+1 n
(−ui ) = −p + γp δij . (26)
∂xi ρ ∂xi ∂xi
which is a linear elliptic equation of pressure. Solving Equation (26) with the appro-
priate boundary conditions will determine the new time step pressure.

4.2.4 Three Step Fractional Method


Each iteration inside the time interval ∆t will involve to compute three sets of equa-
tions, each of them related to different steps of the time integration scheme, namely
using θ = 1.
u?i :
∆t ∂ ∂u?i ∂ ūn+1 ∆t ∂pn
 
?
ui − µ + ∆tu?j i = uni − γ δij + ∆t fi , (27)
ρ ∂xj ∂xj ∂xj ρ ∂xi
pn+1 :  
∂ ? ∆t ∂ ∂ n+1 n
(−ui ) = −p + γp δij , (28)
∂xi ρ ∂xi ∂xi
un+1
i :  
∆t ∂
un+1
i = u?i + −p n+1 n
+ γp δij . (29)
ρ ∂xj

LSTC-LS-DYNA-ICFD-THE-1.1-1 9
4.3 Spatial discretization by the Finite Element Method
4.3.1 The FEM system
Let us first introduce the weak form of the equations of motion that have been already
decoupled in Equations (27), (28) and (29). We will use indistinctly the letter N to
identify either trial functions or interpolating functions. Multiplying the equations
by the trial function N and integrating over the volume Ω:
u?i :
n+1
µ ∂ ∂u?i
Z Z   Z
? ? ∂ ūi
Ni ui dΩ − ∆t Ni dΩ + ∆tNi uj dΩ =
Ω Ω ρ ∂xj ∂xj Ω ∂xj
(30)
Z Z n Z
Ni ∂p
Ni uni dΩ − γ∆t δij dΩ + ∆t Ni fi dΩ,
Ω Ω ρ ∂xi Ω

pn+1 : Z Z  
∂ N ∂ ∂
N (−u?i )dΩ = ∆t −p n+1 n
+ γp δij dΩ, (31)
Ω ∂xi Ω ρ ∂xi ∂xi
un+1
i :
Z Z Z  
Ni ∂
Ni un+1
i dΩ = Ni u?i dΩ + ∆t −p n+1 n
+ γp δij dΩ. (32)
Ω Ω Ω ρ ∂xi

where the parameters ∆t and γ are considered constant during the integration.
Integrating by parts the stress term in Equation (30) and the pressure term in (31),
use of the divergence theorem and the boundary conditions of Equation (13) and
(Equation 12) let us arrive to the following set of equations:
u?i :
µ ∂Ni ∂u?i ∂ ūn+1
Z Z   Z
?
Ni ui dΩ + ∆t dΩ + ∆tNi u?j i dΩ =
Ω Ω ρ ∂xj ∂xj Ω ∂xj
(33)
n
Z Z Z Z  ? 
N i ∂p ∂u i
Ni uni dΩ − γ∆t δij dΩ + ∆t Ni fi dΩ + Ni nj dΓ,
Ω Ω ρ ∂x i Ω Γ ∂x j Γf

pn+1 :
Z Z  
∂N ? 1 ∂N ∂ n+1 n
ui dΩ = ∆t p dΩ − γp δij +
Ω ∂xi Ω ρ ∂xi ∂xi
Z   (34)
? ∆t ∂ n+1 n
Ni ui + (−p + γp )δij ni dΓ,
Γ ρ ∂xi Γv

10 LSTC-LS-DYNA-ICFD-THE-1.1-1
un+1
i :
Z Z Z  
Ni ∂
Ni un+1
i dΩ = Ni u?i dΩ + ∆t −p n+1 n
+ γp δij dΩ, (35)
Ω Ω Ω ρ ∂xi
where ni is the outward normal vector to the Γv boundary. Comparing the boundary
term in Equation (34) and the end of step velocity (Equation (35)) we may write:
Z   Z
∆t ∂
?
N ui + (−p n+1
+ γp )δij ni dΓ = N [ũn+1
n
i ]Γv ni dΓ. (36)
Γ ρ ∂x i Γv Γ

To complete this set of equations we need to specify the essential and natural bound-
ary conditions for Equation (33) and Equation (34). In the first case the derivative
of the velocity normal to the free surface will vanish resulting in the following natural
boundary condition
 ? 
∂ui
nj = 0. (37)
∂xj Γf

Also free-slip or no-slip velocity conditions over the walls may be imposed. In the
second case there will be two sets of boundary conditions namely essentials over Γf
and Γv , we have

p=0 on Γf , (38)
ũn+1
i
n+1
= ui on Γv , (39)

which means that the value of pressure will be imposed over the free surface and the
normal velocity of the fluid over particles with a given known velocity will take the
known normal velocity of the particles.
The full version of the discrete problem takes place when the unknown fields are
approximated over the finite elements. Then within an element, the velocity and
pressure will be represented by

ui = Nl uli , (40)
p = Nl pl , (41)

where l represents a node of the element. Replacing Equation (40) and Equation
(41) in Equation (33) and (35) a final set of equations in a more compact form is
obtained

LSTC-LS-DYNA-ICFD-THE-1.1-1 11
ρMu?i + ∆tK(µ)u?i + S(ρūn+1
i )u?j = ρMuni − γ∆tGpn + ∆tF, (42)
   
1 n+1 ? 1 n
∆tL p = Dui + γ∆tL p − Ũ, (43)
ρ ρ
ρM̄un+1
i = ρM̄u?i − ∆tG(pn+1 − γpn ), (44)

where the matrices are defined by:

Z
M= Nqn+1 Nln+1 dΩ, (45)

∂Nqn+1 ∂Nln+1
Z  
K(µ) = µ dΩ, (46)
Ω ∂xi ∂xi

∂Nqn+1 n+1
Z  
D= Nl dΩ, (47)
Ω ∂xi
Z  n+1 
n+1 ∂Nl
G= Nq dΩ, (48)
Ω ∂xi

1 ∂Nqn+1 ∂Nln+1
Z  
1
L= dΩ, (49)
ρ Ω ρ ∂xi ∂xi
Z
F= Nqn+1 fi dΩ, (50)

Z  
n+1 ∂Nl
S(ρui ) = ρNq ūi dΩ, (51)
Ω ∂xi
Z
Ũ = Nqn+1 un+1
i ni dΓ. (52)
Γ

The indices (q, l) denote the nodes of an element and n + 1 implies that the interpo-
lating functions have been computed at time step tn+1 . The matrix M̄ in Equation
(44) is actually the lumped mass matrix M of Equation (45) obtained by adding the
elements of M over a row and placing the result on the diagonal of the matrix.
Equations (42),(43) and (44) form the system that needs to be solved.

12 LSTC-LS-DYNA-ICFD-THE-1.1-1
4.3.2 Predictor corrector scheme
In the previously defined system of equations it can be observed that in order to be
able to solve Equation (42), an estimation of ūn+1
i needs to be given. The choice of
n+1
ūi can be the object of discussions as it needs to be the closest possible to the
actual value of un+1
i . An estimated average value of : ūn+1
i = 2uni − uin−1 is being
used by default for the first solve of the system. However, the solver also provides an
option to trigger an iterative procedure on the system. Once u∗ and pn+1 have been
determined using Equation (42) and (43), they can be re-injected in the system in
order to form an iterative loop

ρMu?k + ∆tK(µ)u?k + S(ρu?k−1 )u?k = ρMun − γ∆tGpn+1


k−1 + ∆tF, (53)
   
1 n+1 1 n
∆tL pk = Du?k + γ∆tL p − Ũ, (54)
ρ ρ

where k is the number of iterations (the vector indices do not show for clarity pur-
poses).
This procedure aims to bring more precision to the final pressure and velocity values
but is often very time consuming. It must be therefore used with caution in specific
cases. For stability purposes, this method is authomatically used for the first ICFD
time step where iterations are conducted. Otherwise, it can be accessed through the
ICFD CONTROL SPLIT card (see Keyword manual).

LSTC-LS-DYNA-ICFD-THE-1.1-1 13
4.4 Integration scheme stabilization
4.4.1 Pressure stabilization
The system formed by Equations (42), (43) and (44) can be solved as such but it
can be shown that stability issues arise [8] depending on the time step size. It can be
anticipated that if ∆t is very small, stability problems may occur, especially for the
second order scheme γ = 1 used by the solver. The orthogonal subscale stabilization
presently used has been studied by [9].
Let’s start by observing that the DM−1 G represents the Laplacian operator at the
continuous level. When using discrete elements, this leads to the approximation

DM−1 G ' L, (55)

and let us now introduce the auxiliary variable Π such as

Π = M−1 Gp. (56)


This will allow us to introduce a diffusion term in order to stabilize the pressure term
that will not lower the order of the scheme,

ρMu?i + K(µ)u?i + S(ρūn+1 )u?j = ρMuni − γ∆tGpn + ∆tF, (57)


 i  
1 n+1 1 n
∆tL p = Du?i + γ∆tL p − Ũ − τ (Lpn+1 − Dπ n ),
ρ ρ
(58)
ρM̄un+1
i = ρM̄u?i − ∆tG(pn+1 − γpn ), (59)
−1
Π = M Gp, (60)

where τ is a stabilization parameter which depends on the local element sizes and
behaves as

h2
τ ≤C , (61)
ν
where C is a constant.
This stabilization term is consistent with the approximation introduced by Equation
(55) which means that the stabilization term will get smaller when using a finer mesh
i.e when getting closer to the hypothetical continuous level.

14 LSTC-LS-DYNA-ICFD-THE-1.1-1
4.4.2 Convection stabilization
The idea behind the stabilization of the convection term is similar to the pressure
stabilization and has been developed in [9]. It consists of adding a low order stabi-
lization term and recover the higher order of the advection operator by subtracting
a higher order term. This term is built by projecting the velocity orthogonal to the
finite element space. We will only give the final system here that will consist of

ρMu?i + ∆tK(µ)u?i + S(ρūn+1


i )u?j = τ (Sy (uni )yjn − Su (uni )un+1
j ) + ρMuni − γ∆tGpn + ∆tF,
(62)
Myin− C(u?i )u?j
= 0, (63)
   
1 n+1 1 n
∆tL p = Du?i + γ∆tL p − Ũ − τ (Lpn − Dπ n ),
ρ ρ
(64)
ρM̄un+1
i = ρM̄u?i − ∆tG(pn+1 − γpn ), (65)
Π = M−1 GP, (66)

with

Z  
∂Nq n ∂Nl n
Su = u u dΩ, (67)
Ω ∂xi i ∂xi i
Z  
∂Nq n
Sy = u Nl dΩ, (68)
Ω ∂xi i
Z  
n ∂Nl
C= Nq ui dΩ, (69)
Ω ∂xi

LSTC-LS-DYNA-ICFD-THE-1.1-1 15
4.5 Watching and interpreting the analysis
We have seen in the previous sections that the fractional step method consists in
segregating the velocity and pressure terms thus resulting in Equation (42) and (43)
that must be solved implicitly before finally updating the velocity using Equation
(44). When running a CFD only analysis, it is possible for the user to track the
solving of these systems through the terminal window. Assuming that the maximum
level of output information defined in the ICFD CONTROL OUTPUT card has been
triggered, this kind of information extracted from a 2D case, will appear:

21 t 4.6000E-01 dt 2.00E-02 ICFD time step


ICFD::Fluid → Solving...
PFEM:: It 2
PFEM:: It 2
ICFD:: Sub-step Res: 0.000203344 0.000001065
PFEM:: It 5
Frac Step Pres Residual = 0.016417
PFEM:: It 2
PFEM:: It 2
ICFD:: Sub-step Res: 0.000079993 0.000000419
ICFD::Saving Results → Saving...
22 t 4.8000E-01 dt 2.00E-02 ICFD time step

After each ICFD time step, the solver will give the number of iteration that were
needed in order to solve Equation (42) in the three directions of velocity (two in
2D cases) as well as the associated residual. The solver will then proceed to solve
Equation (43) and will also output the number of iterations as well as the associated
residual. Finally, the solver will give the number of iterations needed in order to
solve Equation (44) in the three directions (two in 2D cases) as well as the associated
residual. The solver will then proceed to the next ICFD time step. This way, the
user can make sure that the residuals stay low at each time step and that the analysis
is not diverging.

16 LSTC-LS-DYNA-ICFD-THE-1.1-1
4.6 Non-Inertial Reference Frame
The Navier-Stokes equation for incompressible flows may be modified to allow the
simulation in a moving reference frame. The reference frame considered here is
rotating at a constant speed and thus it is undergoing acceleration with respect
to the stationary frame. The rotating frame is then called a non-inertial reference
frame. This feature is useful in application such as wind turbines, turbomachinery
and every other rotating problem that admits a steady state solution.
To account for the rotating velocity the fluid velocity is transformed

va = vr + vΩ ,

with
vΩ = Ω × r
where va is the absolute fluid velocity (the velocity viewed from the stationary frame),
vr is the relative velocity (the velocity viewed from the rotating frame) and vΩ is the
velocity of the rotating frame, Ω is the angular velocity (considered constant in this
analysis) and r is the vector from the axis of rotation.
Apart from the velocity transformations a rotating frame induce forces due to the
Coriolis and centrifugal accelerations which are given by −2Ω × v and −Ω × Ω × r
respectively.
Depending where the observer is placed the Navier-Stokes equations may be written
in a relative form or in absolute form.
For the absolute form:
∂v ∂v ∂p ∂v
ρ( + (v − vΩ ) )=− + µ 2 − ρ(Ωi × v) + Fi
∂t ∂xj ∂xi ∂xj
In the relative reference frame the equations are re-written in terms of vr
∂vr ∂vr ∂p ∂v
ρ( + vr )=− + µ 2 − ρ(2Ωi × vr + Ωi × Ωi × ri ) + Fi
∂t ∂xj ∂xi ∂xj
The equations above are valid for steady state solutions within the rotating frame.
Nevertheless these equations can also be applied to unsteady problems with rea-
sonable results. The equation expressed in absolute reference frame is of particular
interest since it allows the definition of rotating sub-domains.

LSTC-LS-DYNA-ICFD-THE-1.1-1 17
5 Structure and Thermal coupling
5.1 Fluid Structure Interaction (FSI)
5.1.1 Types of FSI coupling
Fluid-structure interaction problems involving an incompressible viscous flow and
elastic non linear-structure have been solved in the past using different methods.
The monolithic approach considers the fluid and the solid as a single domain with
the fluid and solid equations solved together in a coupled way. However, solving the
pressure together with the rest of the unknowns (typically velocities or displacements)
is too expensive from the computational point of view : the non-linear system to be
solved is large and ill-conditioned with always non-defined positive matrices.
A second approach would be to segregate the pressure from the velocity in the mono-
lithic scheme. This would still imply that the fluid and solid equations are solved in
a coupled way in the same system and would therefore require an implementation
of the solid equations directly in the ICFD solver. This would not be a practical
solution and would contradict the objective of the present solver which is to make
fully use of LS-DYNA’s mechanical solver capabilities in order to solve complex fluid
structure interaction problems.
A third approach would be by using a partitioned (or staggered) method ([15], [13],
[26], [22]) where the fluid and solid equations are uncoupled and that therefore allows
using specifically designed codes on the different domains and offer significant benefits
in terms of efficiency: smaller and better conditioned subsystems are solved instead
of a single problem. It is the method adopted by the present solver in order to solve
FSI problems.
In the partitioned approach, two schemes are distinguished : loosely (or weakly) ([21])
coupled scheme or strongly coupled scheme ([28], [29], [31], [33], [14], [35], [11]). Both
are available when using the ICFD solver in LS-DYNA. Loosely coupled schemes
require only one solution of either field per time step in a sequentially staggered
manner and are thus particularly appealing in terms of efficiency. However, they
tend to become unstable when the “added-mass effect” is significant([5], [3]).
In fluid mechanics, added mass or virtual mass is the inertia added to a system
because an accelerating or decelerating body must move some volume of surrounding
fluid as it moves through it, since the object and fluid cannot occupy the same
physical space simultaneously. However the name “added-mass effect” has been
used in the literature to indicate the numerical instabilities that typically occur in
the internal flow of an incompressible fluid whose density is close to the structure
density. Other causes for instabilities include the elasticity coefficients or a time

18 LSTC-LS-DYNA-ICFD-THE-1.1-1
step too small. The added mass effect therefore does usually not occur in aero-
elasticity problems as the solid’s density is a lot higher than the fluid’s density, but
it becomes very important in several other applications such as bio-mechanics where
the materials are normally muscles and arteries and the fluid is blood.
Strongly coupled schemes require the convergence of the fluid and solid variables at
the interface and give, after an iterative process, the same results as non-partitioned
schemes. However, they are also subject to the added mass effect resulting in a
non convergence of the solution. Special stabilization techniques must therefore be
developed in order to diminish its influence and aim for a wider range of applications
for fluid structure interactions. This stabilization method will be developed in the
next section. Figure (1) gives a summary of the different FSI couplings possible,
those implemented in the ICFD solver and the influence of the added mass effect.

Figure 1: Summary of the different FSI couplings and the numerical troubles induced
by the added-mass effect.

5.1.2 Partitioned Approximation for Strong FSI Coupling


The approach implemented in LS-DYNA to obtain a stronger FSI coupling can be
found in [17]. It relays on finding an approximation of the tangent operator at the
FSI interface without having to do a monolithic assembly. The contribution of the
solid elements on the interface is added to the fluid elements when the pressure

LSTC-LS-DYNA-ICFD-THE-1.1-1 19
Laplace equation is built. It can be shown that this procedure greatly improves the
convergence of the FSI coupling. It should be noted that this is still a partitioned
approach and convergence may still be challenging for some kind of problems.

5.1.3 Evaluation of the Laplace Matrix for FSI problems


A brief introduction to the work in [17] will be presented with some details on the
construction of the interface Laplace matrix.
Lets assume that the Laplace matrix may be split into two parts, one for the fluid
domain and one for the fluid-solid interface as follows:

Lτ ≈ Lτf + L̄τs , (70)


where Lτf is the Laplace matrix defined in the fluid domain including the interfaces
X
L τf = (τf Le ), (71)
with Le being the Laplace matrix for the element and
 −1
ρ µ kV k
τf = + + , (72)
∆t h2 h
L̄τs is a Laplace matrix corresponding only to the fluid solid interface
e
X
L̄τs = (τs L̄ ), (73)
where for a hyper-elastic solids the value of τs may be defined as

 −1
ρsolid ∆tλ ∆tG
τs = + + , (74)
∆t Jh2 Jh2
Z 
e ∂Nsf ∂Nsf
L̄ = dΩ (75)
Ω ∂xj ∂xj s
e
where λ and G are Lame parameters, J the Jacobian matrix and L̄ is the Laplace
matrix of the solid elements evaluated only with the shape function Nsf that are
different from zero on the fluid-structure interface.
Equation (70) may also be written as

Lτ ≈ Lτf + β L̄τf , (76)


with

20 LSTC-LS-DYNA-ICFD-THE-1.1-1
τs
β= , (77)
τf
and
e
X
L̄τf = (τf L̄ ), (78)
This means that the Laplace interface matrix L̄τf may be neglected for small values
of the β parameter. This is for instance the case when ρs >> ρf and the added-mass
effect is not present. However, for other physical properties, the β parameter may
not be negligible and the Laplace interface matrix must be evaluated in order to
obtain good results. It has been shown ([17]) that the β L̄tauf term improves the
convergence when ρf ≈ ρs , small time steps and when using soft materials.

5.1.4 FSI resolution steps


In section 5.1.1, we have classified the fluid structure interaction types and seen
that the ICFD solver allows loosely or strongly coupled schemes. Section 5.1.3 has
showed the stabilization steps adopted in order to achieve better convergence when
the added-mass effect is important thus allowing the solving of a wider range of FSI
applications. It is now time to sum up and present in Figure (3) and (2) the resolution
steps adopted by the ICFD solver when solving FSI problems for the strong and loose
couplings.

LSTC-LS-DYNA-ICFD-THE-1.1-1 21
Loose FSI coupling

Figure 2: Loose FSI interaction resolution scheme.

22 LSTC-LS-DYNA-ICFD-THE-1.1-1
Figure 3: Strong FSI interaction resolution scheme.

LSTC-LS-DYNA-ICFD-THE-1.1-1 23
5.1.5 Watching and controlling the analysis for FSI cases
We have seen in the previous sections that two FSI couplings were available for
the user. In cases of strong FSI coupling and assuming that the maximum level of
output information defined in the ICFD CONTROL OUTPUT card has been trig-
gered, some information about the Newton loop and the convergence of the coupled
structural and fluid systems can be extracted

T Force: 0.485925E+01 0.332282E-01 -.658934E+00 0.150875E+00


PFEM:: It 4
PFEM:: FSI Newton Sub-step Dp 2 0.054780387
PFEM:: It 4
PFEM:: FSI Newton Sub-step Dp 2 0.003279931
PFEM:: It 3
PFEM:: FSI Newton Sub-step Dp 2 0.000939913
T Force: 0.532562E+01 0.359637E-01 -.845310E+00 0.931377E-01
PFEM:: It 3
PFEM:: FSI Newton Sub-step Dp 3 0.000497924
PFEM:: It 3
PFEM:: FSI Newton Sub-step Dp 3 0.000088205
PFEM:: It 2
PFEM:: FSI Newton Sub-step Dp 3 0.000018324
T Force: 0.532361E+01 0.359398E-01 -.844209E+00 0.425614E-03
Mechanics Converged
Equilibrium established after 2 iterations

As described in Figure (3), after the first time step, the solver will first solve the
fluid equations. The forces computed will then be communicated to the solid me-
chanics solver. The three averaged components appear next to T Force along with a
residual value. The solid mechanics solver will then return the node displacements
as boundary conditions for the fluid solver and the procedure will be repeated until
convergence has been reached ([17]).

24 LSTC-LS-DYNA-ICFD-THE-1.1-1
5.2 Thermal coupling
5.2.1 Introduction
Heat transfer is a discipline of thermal engineering that concerns the generation, use,
conversion, and exchange of thermal energy and heat between physical systems. The
ICFD solver offers the possibility to solve and study the behavior of temperature
flow in fluids. Potential applications are numerous and include refrigeration, air
conditioning, building heating, motor coolants, defrost or even heat transfer in the
human body. Furthermore, the ICFD thermal solver is fully coupled with the thermal
solver using a monolithic approach which allows to solve complex problems where
both heated structures and flows are present and interact together.

5.2.2 The heat equation


The distribution of heat in a given region over time is described by a convection-
diffusion equation also called heat equation

∂T ∂T ∂ 2T
+ uj −α =f in Ω (79)
∂t ∂xj ∂xj xj
where α is a positive constant called thermal diffusivity and f is a potential source
of heat.
This formulation is incomplete if the appropriate set of boundary conditions and
initial conditions is not specified. The user can specify the temperature on the
boundaries resulting in Dirichlet conditions

T (~x, t) = T (~x) on Γ (80)


Furthermore, if no boundary condition is applied, the solver will automatically apply
a Neumann condition

~ (x, t) = 0 on Γ
~n(~x).∇T (81)
where ~n(~x) is the normalized normal vector at the ~x point.

5.2.3 Spatial discretization


The time derivative will be approximated with a backward differences of second order
as

LSTC-LS-DYNA-ICFD-THE-1.1-1 25
1.5T n+1 − 2T n + 0.5T n−1 ∂T n+1 ∂ 2 T n+1
+ un+1
j − α = f n+1 (82)
∆t ∂xj ∂xj xj
The Galerkin method will now be applied to Equation (82) in order to find a weak
form that will be integrated over the prescribed domain

∂T n+1
Z   Z
n+1 n n−1
Ni 1.5T − 2T + 0.5T dΩ + ∆tNi uj dΩ−
Ω Ω ∂xj
(83)
∂ ∂T n+1
Z   Z
− ∆t Ni α dΩ = ∆t Ni f n+1 dΩ,
Ω ∂x j ∂x j Ω

Resulting in the matrix form

 
n+1 n n−1
M 1.5T − 2T + 0.5T + ∆tS(uni )T n+1 − ∆tK(α)T n+1 = ∆tF, (84)

As in Section (4.4.2), a similar convection term stabilization process has to be per-


formed in order to get to the final system

M(1.5T n+1 − 2T n + 0.5T n−1 ) + ∆tS(uni )T n+1 − ∆tK(α)T n+1 − τ (Sy (uni )Tproj
n − Su (uni )T n+1 ) = 0,
(85)
n
MTproj − C(uni )T n = ∆tF, (86)

5.2.4 Coupling with the thermal solver


In Section (5.1.1), the different types of fluid structure couplings were presented.
The same vocabulary can be employed to describe the different couplings between
the heat equations solved in the fluid by the ICFD solver and the heat equations
solved by the thermal solver in the structure. For the thermal coupling, a monolithic
approach has been adopted. The coupling between the structure and the fluid is
therefore very tight and strong at the fluid-structure interface. The resulting full
system includes both the structural and the fluid temperature unknowns (See Figure
(4)) and is solved using a direct solver which may in some cases be computer-time
consuming.

26 LSTC-LS-DYNA-ICFD-THE-1.1-1
Figure 4: Vector of temperature unknowns when the fluid thermal solver and struc-
ture thermal solvers are coupled using a monolithic approach.

5.2.5 Watching and controlling the analysis for thermal analysis.

5.3 Summary
Figure (5) offers a simplified view of the interactions and couplings of the mechanical,
thermal and ICFD solvers.

Figure 5: Summary of the different possible interactions between solvers

LSTC-LS-DYNA-ICFD-THE-1.1-1 27
6 Free surface and mutliphase handling
6.1 The level set method
6.1.1 Introduction

A large collection of fluid problems involves moving interfaces. Applications include


air-water dynamics, breaking surface waves and solid bodies penetrating in fluids.
In many such applications, the interplay between the interface dynamics and the
surrounding fluid motion is subtle, with factors such as density ratios and tempera-
ture jumps across the interface, surface-tension effects, topological connectivity, and
boundary conditions playing significant roles in the dynamics. The solver uses a level
set method based on [24], a fast and reliable technique in order to track and correctly
represent moving interfaces.

6.1.2 The level set function

Let us first start by introducing the implicit function φ whose zero isocontour, φ = 0
represents the interface. The implicit function φ is defined throughout the whole
computational domain while the isocontour defining the interface is one dimension
lower. As a convention the fluid domain where the Navier-Stokes equations will be
solved (see Section (4.1)) is defined by φ > 0 while the vacuum is defined by φ < 0.
Additionally, φ will be described as a distance function resulting in the level set
function

φ(~x) = min(|~x − ~xI |) on Ω+ , for all ~xI ∈ ∂Ω, (87)


φ(~x) = 0 on ∂Ω, for all ~xI ∈ ∂Ω, (88)
φ(~x) = − min(|~x − ~xI |) on ∂Ω− , for all ~xI ∈ ∂Ω. (89)

Furthermore, since φ is Euclidean distance:

~ = 1,
|∇φ| (90)

This is shown in Figure (6) with the classical dam example where the fluid (φ > 0)
and the vacuum (φ < 0) are divided by the interface φ = 0. In the case of two phase
fluids, the problem is similar except that the Navier-Stokes equations are solved in
the two domains with a smoothing of the density and viscosity values at the interface.

28 LSTC-LS-DYNA-ICFD-THE-1.1-1
6.1.3 The convection equation

Now, let us suppose that the velocity of each points on the implicit surface is given
as V~ (~x) i.e V~ (~x) is known for every point ~x with φ(~x) = 0. The simplest way to move
all the points on the surface with this velocity would be to move the nodes located on
the interface by their velocity V through the grid (see Figure (6)). This Lagrangian
formulation would not be too hard to accomplish ([24]) if the connectivity does not
change and the surface elements are not distorted too much. However, even small
velocity fields could cause large distortion of the interface elements and the accuracy
of the method can deteriorate quickly if a frequent and regular re-meshing of the
domain is not applied. This need for frequent re-meshing implies higher computer
costs and less scalability when running with multiple processors.
In order to avoid these problems, the implicit function φ will be used both to represent
the interface and to evolve the interface (see Figure (6)). In order to define the
evolution of the implicit function φ, the simple convection equation will be used

∂φ ~ ~
+ V .∇φ = 0, (91)
∂t
Equation (91) defines the motion of the interface where φ(~x) = 0. It is an Eulerian
formulation of the interface evolution ([24]) since the interface is captured by the
implicit function φ as opposed to being tracked by the displacement of the interface
nodes as was done in the Lagrangian formulation.

6.1.4 Numerical integration

As in Section (4.3), the Galerkin method will be applied to Equation (91) in order
to find a weak form that will be integrated over the prescribed domain

∂φn+1
Z   Z
i
Ni 1.5φn+1
i − 2φni + 0.5φn−1
i dΩ + ∆tNi unj dΩ = 0, (92)
Ω Ω ∂xj
resulting in the matrix form
 
n+1 n−1
n
M 1.5φi − 2φi + 0.5φi + ∆tS(uni )φn+1
j = 0, (93)

As in Section (4.4.2), a similar convection term stabilization process has to be per-


formed in order to get to the final system

LSTC-LS-DYNA-ICFD-THE-1.1-1 29
Dam problem : Initial state

Lagrangian formulation : Grid node Eulerian formulation : Level set


displacements method

Not used by the ICFD


ICFD solver method
solver

Figure 6: Free surface dam breaking problem : description of the different interface
tracking methods

30 LSTC-LS-DYNA-ICFD-THE-1.1-1
   
n+1 n n−1 n n+1 n n n n+1
M 1.5φi − 2φi + 0.5φi + ∆tS(ui )φj − τ Sy (ui )ψj − Su (ui )φj = 0,
(94)

Mψin − C(uni )φnj = 0, (95)

LSTC-LS-DYNA-ICFD-THE-1.1-1 31
7 Anistropic/Isotropic Generalized Flow Through
Porous Media
7.1 Generalized Porous Media Model: isotropic media
A generalization of the Navier-Stokes equations (see [23]) that will allow the definition
of sub-domains with different permeability/porosity by means of the *ICFD PART
LSDYNA keyword was developed. The OSS|SUPG stabilizing Finite Element Method
for the spatial approximation and the second order Fractional Step Method for the
time integration was adopted.
Being , κ the porosity and the permeability of the porous media respectively, we can
define:
 = void volume/total volume, (96)

and being ui the volume averaged velocity field defined in terms of the fluid velocity
field (uif ) as
ui = uif , (97)

the generalized flow equations of momentum and mass conservation can be stressed
as follow (Einstein sum convention is used for i = 1, 2, 3),

∂ui
= 0, (98)
∂xi
   2 
ρ ∂ui ∂  ui uj  1 ∂(p) µ ∂ ui
+ =− + + ρgi − Di , (99)
 ∂t ∂xj   ∂xi  ∂xj ∂xj

where Di are the forces exerted to the fluid by the porous matrix. For the isotropic
model the porous forces are a function of the matrix porosity and its permeability.
For the isotropic model two well-known models are available:

µui 1.75ρ|u|
- Model 1: Ergun correlation Di = +√ √ ui , (100)
κ 150 κ3/2
µui F ρ|u|
- Model 2: Darcy-Forchheimer Di = + √ ui . (101)
κ κ

where F is the Forchhmeimer inertia parameter. Porous forces Di can be treated as


an anistropic tensor (see section 7.2).

32 LSTC-LS-DYNA-ICFD-THE-1.1-1
7.1.1 Model Parameters limits
• If the porous media is highly permeable (very high porosity):  → 1, κ →
∞ ⇒ Di = 0,
∂ 2 ui
 
∂ui ∂ ∂p
Navier-Stokes is recovered ρ + (ui uj ) = − +µ + ρgi ,
∂t ∂xj ∂xi ∂xj ∂xj

• If the porous media has a very low porosity:  → 0, κ → 0 ⇒ ui →


small, ui uj → even smaller and Di becomes an important term,
∂p µui
Darcy law is recovered =− + ρgi
∂xi κ

7.2 Anisotropic Generalized Flow Through Porous Media.


The anisotropic version of the Darcy-Forchheimer term in eq. (99) can be written as

Di = µBij uj + F ρ|u|Cij uj , (102)


being
Bij = (Kij )−1 , (103)
Cij = (Kij )−1/2 , (104)
where Kij is the anisotropic permeability tensor, and F is the Forchhmeimer inertia
parameter.

7.3 Heat Transfer in Porous Media: coupled PM/NS heat


transfer.
Being T the temperature field and ui the fluid velocity field, the heat transport
equation in the porous media can be written as
∂T ∂T ∂ 2 ui
ρcpeff + ui = keff , (105)
∂t ∂xi ∂xj ∂xj
where
cpeff = [(ρfl cpfl ) + (1 − )(ρs cps )], (106)
keff = [kfl + (1 − )ks ]. (107)

LSTC-LS-DYNA-ICFD-THE-1.1-1 33
cpeff is the porous media effective specific heat capacity, cpfl the fluid specific heat
capacity, cps the solid (or porous matrix) specific heat capacity, ρfl the fluid density,
and ρs the solid (or porous matrix) density. keff is the porous media effective thermal
conductivity, kfl the fluid thermal conductivity, and ks the solid (or porous matrix)
thermal conductivity. For adiabatic porous media problems cpeff = ρfl cpfl and keff =
kfl .

7.4 Computing porous parameters using the pressure-velocity


(p − u) experimental data
We assume that the pressure-velocity experimental curve was obtained applying a
pressure difference (or pressure drop, ∆p = pb − pa ) on both ends of a porous slab
(thickness ∆x) with porous properties κ and  (the permeability and porosity re-
spectively), see Figure (7).

pb pa

Δx
Figure 7: Experimental Porous Slab

For instance, the P–V experimental data are defined as in Table 4 (see also Fig-
ure (8)).
So that, we can fit that experimental curve with a quadratic polynomial of the form
∆p(u) = αu2x + βux , being ux the velocity along the x-axis. For the example above,
the fitting curve has the following expression:

∆p = 2u2x + 0.75ux (108)

From the governing equations (98), we can write an expression for the dynamics
of this experiment where pressure gradient is in equilibrium with Darcy and Forch-

34 LSTC-LS-DYNA-ICFD-THE-1.1-1
Table 4: Pressure – Velocity experimental data
u[m/sec] ∆p[N/m2 ]
0 0.0
2. 9.5
8. 134.0
12. 297.0
26. 1371.5
30. 1822.5
34. 2337.5
38. 2916.5

Figure 8: Pressure-Velocity experimental curve.

heimer terms (we also neglected the effect of gravity forces). So that,

∂p µ F ρ|u|
= −Di = − ui − √ ui (109)
∂xi κ κ

with i = 1, 2, 3 for general 3D problems.


We assume that for the experiment the flow is along the x direction, so that equa-
tion (109) becomes:
dp µ F ρ
= − ux − √ u2x . (110)
dx κ κ
Now, we can simply integrate equation (110) along x direction, inside the porous

LSTC-LS-DYNA-ICFD-THE-1.1-1 35
slab probe of ∆x thickness obtaining an expression for ∆p across the probe:
µ F ρ
∆p = −Di ∆x = − ux ∆x − √ u2x ∆x. (111)
κ κ
We recall that for this test along x-axis the ∆p (or the pressure drop) decreases as
∆x increases, so using the experimental data in equation (108) and the theoretical
model in equation (111) we can write (∆p)experimental = (−∆p)theory , so that:
µ F ρ
2u2x + 0.75ux = ux ∆x + √ u2x ∆x (112)
κ κ
From the last equation (eq. (112)) we obtain the following relationships:
µ
0.75ux = ux ∆x (113)
κ
F ρ
2u2x = √ u2x ∆x (114)
κ
that is
µ
0.75 = ∆x (115)
κ
F ρ
2 = √ ∆x (116)
κ
From the first relationship (eq. (113) or eq. (115)) we can solve for the permeability
κ (please note those relationships are independent of the velocity ux ):
µ
κ= ∆x (117)
0.75
being the fluid viscosity µ and the probe thickness ∆x known from the experiment.
From the second relationship (eq. (114) or eq. (116)) we can solve for the Forchheimer
factor F : √
2 κ
F = (118)
ρ∆x
being the fluid density ρ known from the experiment (κ was already computed using
the previous relationship). We recall that the porosity parameter  is also known from
the experiment and it is just a geometrical quantity ( = void volume/total volume).
In summary: users can provide the P–V curves from experiments and they will be
used to compute the permeability κ and the Forchheimer factor F . For this purposes,
we will allow the setting of the P–V data using a LOAD_CURVE. So, we will introduce
in LS-DYNA a new porous model to put in the 4th card of the ICFD_MAT keyword
pointing to the load curve in which the experimental data (P–V curve) is defined.

36 LSTC-LS-DYNA-ICFD-THE-1.1-1
8 Turbulence models
8.1 The RANS model
8.1.1 Introduction
Reynolds-averaged Navier-Stokes (RANS) equations are the most classic approach to
turbulence modeling. An time averaged version of the governing equations is solved,
which introduces new apparent stresses known as Reynolds stresses. This adds a
second order tensor of unknowns for which various models can provide different
levels of closure. The incompressible solver provides a k- model which is one of
the most widely used turbulence models in CFD. This model adds two additional
variables, the turbulent kinetic energy k, and the turbulent dissipation  and provides
two additional equations that close the model and account for history effects like
convection and diffusion of turbulent energy. Since RANS models consider a time
averaged version of the governing equations, such models will be more adequate
where transient effects are not important and a stationary solution can be reached.

8.1.2 The Reynolds Averaged Equations


When solving Equation (10) and (11), instantaneous quantities are being considered.
In order to define the RANS model, the flow will be divided in two parts, a mean(or
average) component and a fluctuating component. Thus the instantaneous velocity
and pressure can be written as,

ui = ūi + u0i (119)


p = P̄ + p0 . (120)

This technique for decomposing the instantaneous motion is referred to as the Reynolds
decomposition. Substitution of Equations (119) and (120) in (10) and (11) yields

∂ ūi + u0i ∂(ūi + u0i ) ∂(P̄ + p0 ) ∂ 2 (ūi + u0i )


ρ( + (ūj + u0j ) ) = − +µ in Ω,(121)
∂t ∂xj ∂xi ∂xj ∂xj
0
∂(ūi + ui )
= 0 in Ω. (122)
∂xi

Equations (121) and (122) can now be averaged to yield an equation expressing
momentum conservation for the average motion. By noting that the average of a

LSTC-LS-DYNA-ICFD-THE-1.1-1 37
derivative is the same as the derivative of the average and that the time average of
the fluctuating quantity is zero, resulting in the following Reynolds-averaged Navier
Stokes equations (or RANS equations)

 
∂ ūi ∂(ūi ) ∂(P̄ ) ∂ ∂ ūi 0 0
ρ( + (ūj ) ) = − + µ − ρui uj in Ω, (123)
∂t ∂xj ∂xi ∂xj ∂xj
∂(ūi )
= 0 in Ω. (124)
∂xi
As can be seen from Equations (123) and (124), the time averaged equations are
very similar to the instantaneous equations but for the apparition of a new apparent
viscous stress term, ρu0i u0j owing to the fluctuating velocity field generally referred to
as the Reynolds stresses. The aim of the different RANS models will be, under given
hypotheses, to provide additional equations that allow the solving of the system.

8.1.3 The k- model


For the moment, the standard k −  model is implemented, but more models may
be implemented in the future. The k −  model is two equation model based on the
Boussinesq hypothesis that stipulates that the momentum transfer caused by turbu-
lent eddies can be modeled with an eddy viscosity allowing to model the Reynolds
stresses as,

2
ρu0i u0j = 2µt Si,j − ρkδi,j (125)
3
2
k
µt = ρCµ (126)

1 ∂ ūi 1 ∂ ūk
Si,j = − δi,j (127)
2 ∂xj 3 ∂xk
where µt is the eddy viscosity, Si,j is the mean strain rate, k the mean turbulent
kinetic energy and  the turbulent dissipation. The k −  model then provides the
two mandatory transport equations in order to close the model

 
∂ρk ∂(ρkūi ) ∂ µt ∂k
+ = (µ + ) + µt S 2 − ρ, (128)
∂t ∂xi ∂xj σk ∂xj
2
 
∂ρ ∂(ρūi ) ∂ µt ∂ 
+ = (µ + ) + C1 µt S 2 − C2 ρ , (129)
∂t ∂xi ∂xj σ ∂xj k k

38 LSTC-LS-DYNA-ICFD-THE-1.1-1
with the following default constants that can be changed by the user through the
ICFD CONTROL TURBULENCE card:

C1 = 1.44 (130)


C2 = 1.92 (131)
σ = 1.3 (132)
σk = 1.3 (133)
Cµ = 0.09 (134)
(135)

8.2 The LES model


8.2.1 Introduction
As the power of computer increases Large Eddy Simulation (LES) models have be-
come a popular technique in order to simulate turbulence. Those models are based
on the assumption that large eddies contain most of the kinetic energy of the flow
and depend on the geometry while the smaller ones are considered more universal
and independent of the flow’s geometry. Therefore, instead of using time averaged
quantities as in RANS models, LES models divide each flow variable into a large-
scale (resolved) component and into a subgrid (estimated) component. The resolved
components are still time-dependent allowing the analysis of instantaneous quanti-
ties even in flows that are stationary in the average, The filtering is usually mesh
size dependent and the model used by the ICFD solver is the classical Smagorinsky
model.

8.2.2 LES equations


The quantities will be divided in a resolvable scale part Ui and in a subgrid scale
part usub
i

ui = Uei + usgs (136)


i
sgs
p = Pe + p (137)

Applying this decomposition to Equation (10) yields after filtering the resulting
equation

LSTC-LS-DYNA-ICFD-THE-1.1-1 39
 e 
∂Uei ∂(U
ei ) ∂ Pe ∂ ∂ Ui
ρ( + (Uj )
e )=− + µ + ρτi,j in Ω (138)
∂t ∂xj ∂xi ∂xj ∂xj
with the extra stress term due to the sub grid scales (SGS)

τi,j = U ej − U
ei U ]i Uj (139)
Subgrid-scale turbulence models usually employ the Boussinesq hypothesis in order
to express the SGS stress as a turbulent viscosity µsgs
 e ei 
∂Uei ∂(Uei ) ∂ P
e ∂ ∂ Ui ∂ U
ρ( + (U
ej ) )=− + µ + µsgs in Ω (140)
∂t ∂xj ∂xi ∂xj ∂xj ∂xj

8.2.3 The Smagorinsky model


The Smagorinsky model describes the turbulent viscosity as

µsgs = ρ(Cs ∆)2 |S|


e (141)
where the filter width is usually taken as
1
∆ = (Volume) 3 (142)
and p
Se = 2Si,j Si,j (143)
Cs is a constant named Smagorinsky constant. Its default value in the solver is 0.1
and can be changed in the ICFD CONTROL TURBULENCE card.

8.3 Wall function


By default, the turbulent viscosity is applied on the whole fluid domain. However,
there physically exists a zone in the boundary layer of the fluid very close to the
solid boundary or wall where the fluid is laminar. This may heavily influence on
the calculated friction drag. In order to have a chance to capture this laminar sub-
boundary layer, a near wall damping factor proposed by Van Driest ([34]) will be
introduced in the turbulent viscosity term
y+
fν = 1 − e− A+ (144)

40 LSTC-LS-DYNA-ICFD-THE-1.1-1
where A+ is a constant and y + a non-dimensional wall distance for a wall-bounded
flow defined as
u∗ y
y+ = (145)
ν
q
τw
where u∗ = ρ
the friction velocity and τw = µ( ∂u
∂y
) is the shear wall stress.

8.4 Turbulence synthesis method for Large Eddy Simula-


tions
A well known synthetic turbulence generator [4] that employs Fourier techniques is
the random flow generation (RFG) method proposed by Smirnov et al. [2]. Devel-
oped on the basis of the work of Kraichnan [19], this methodology involves scal-
ing and orthogonal transformations where a transient flow field is generated in a
three-dimensional domain as a superposition of harmonic functions with random
coefficients. The method can generate an isotropic divergence-free fluctuating veloc-
ity field satisfying the Gaussian’s spectral model as well as an inhomogeneous and
anisotropic turbulence flow, provided that an anisotropic velocity correlation tensor
is given. Smirnov et al. [2] used their approach to set inlet boundary conditions to
LES methods in the simulation of turbulent fluctuations in a ship wake as well as
initial boundary conditions in the simulation of turbulent flow around a ship-hull.
Another application successfully tested by the authors was the particle dynamics
modeling (see [1]).
The procedure of generating turbulent condition at inlet walls is:
1. For a turbulent flow field {ũi (xj , t)}i,j=1..3 characterized by its symmetric anistropic
velocity correlation tensor rij = ũi ũj , look for an orthogonal transformation aij
that diagonalize rij and where the following relationships hold,
ami anj rij = δmn c2(n) , (146)
aik akj = δij . (147)
As we will see ci coefficients are related to the velocity fluctuations field (u0 , v 0 , w0 )
in the space generated by the transformation aij .
2. Generate a turbulent velocity field {vi (xj , t)}i,j=1..3 using a modification of the
Kraichnan method,
r N
2 X n
vi (x, t) = [pi cos(k̃jn x̃j + ωn t̃) + qin sin(k̃jn x̃j + ωn t̃)], (148)
N n=1

LSTC-LS-DYNA-ICFD-THE-1.1-1 41
where
x t c l
x̃ = , t̃ = , k̃jn = kjn , c= , (149)
l τ c(j) τ
n
pni = ijm ζjn km n
, qin = ijm ξjn km (150)
ζin , ξin , ωn ∈ N (0, 1); kin ∈ N (0, 1/2), (151)
where l, τ are the length and time scales of turbulence, ijm is the permutation
tensor and N (M, σ) is a normal distribution with mean M and standar devia-
tion σ. kin and ωn represent a sample of n wavenumber vectors and frequencies
of the modeled turbulence spectrum
 1/2
2
E(k) = 16 k 4 exp(−2k 2 ). (152)
π

3. Scale and transform vi generated in the previous step to obtain the turbulent
flow field ui
wi = ci vi , (153)
ui = aik wk . (154)

The input of this procedure are the turbulent intensities Iu , Iv , Iw (i.e. rij = uavg ·
diag{Iu , Iv , Iw } in the transformed principal axes) and the turbulence lenght scale l.
These are introduced in the LS-DYNA model using ICFD CONTROL TURB SYNTHESIS
keyword in combination to VAD=4 in the card ICFD BOUNDARY PRESCRIBED VEL.

8.5 The Random Flow Generator in Python: How Inlet tur-


bulence generator works (basically) in ICFD/LS-DYNA
Import of some python modules and vector normal random generator.

In [57]: import numpy as np


import time
import sys
import math
from pylab import *
import random
from oct2py import Oct2Py, octave
from IPython.core.display import display, Math

42 LSTC-LS-DYNA-ICFD-THE-1.1-1
Figure 9: Flow around Ahmed body with synthetic turbulent inlet boundary condi-
tions.

In [58]: def normalrandomvec(mean,sigma):


x=random.gauss(mean,sigma)
y=random.gauss(mean,sigma)
z=random.gauss(mean,sigma)
return np.array([x,y,z]) # 1x3

8.6 Smirnov’s algorithm to generate inhomogeneous


anisotropic turbulence at inflow boundaries in LES
runs
i). For
h a given mean velocity at inlet i uavg and given turbulence intensity
I = Iu = uurms
avg
, Iv = uvrms
avg
, Iw = wuavg
rms

In [59]: # u_avg -> mean longitudinal (y axis) wind speed, per node, [m/s]:
u_avg = 23.6

#turbulence intensity Iu != Iv != Iw
Iu = 0.1

LSTC-LS-DYNA-ICFD-THE-1.1-1 43
Iv = 0.1
Iw = 0.1
urms = u_avg*Iu
vrms = u_avg*Iv
wrms = u_avg*Iw

ii). Given an anisotropic velocity correlation tensor

rij = ũi ũj

of a turbulent flow field ũi (xj , t):


find an orthogonal transformation tensor aij that diagonalize rij

ami anj rij = c2(n) δmn


ami anj = δij
c(n) and aij are function of space. c(n) are the fluctuating velocities in the transformed
system (principal axes).

In [60]: #anisotropic velocity correlation tensor:


rij = np.array([[urms**2, 0, 0],[0, vrms**2, 0],[0, 0, wrms**2]])

#find an orthogonal transformation tensor aij that would


#diagonalize rij:
aij, c2 = np.linalg.eig(rij)
cn = np.sqrt([aij[0], aij[1], aij[2]]) # 1x3

#L -> turbulence length scale [m]


Lu = Lv = Lw = 0.1
Ls = math.sqrt(Lu**2 + Lv**2 + Lw**2)
#Ls = 0.13

In [61]: #N -> sampling number for each wavenumber kn


N = 1000

# x -> nodal coordinates


x = np.array([[0.0],[0.0],[0.0]]) # 3x1
timev = np.arange(0,3.,0.0001) # 4000,

44 LSTC-LS-DYNA-ICFD-THE-1.1-1
In [62]: print "begin simulation..."

#modified Kraichnan’s method


uxt = np.zeros([3,timev.size]) # 3x4000
pni = np.zeros([3,1]) # 3x1
qni = np.zeros([3,1]) # 3x1
knjtil = np.zeros([3,1]) # 3x1

#time-scale of turbulence [sec]


tau = Ls/u_avg
timetil = timev/tau # 4000,
xtil = x/Ls # 3x1
c = Ls/tau

un = np.zeros([3,timev.size]) # 3x4000
# initialize seed:
random.seed()
for n in range(0,N):
omegamn = random.gauss(0,1)
knj = normalrandomvec(0,0.5) # 1x3
Zetan = normalrandomvec(0,1) # 1x3
Xin = normalrandomvec(0,1) # 1x3
pni = np.cross(Zetan.transpose(),knj.transpose()) # 1x3
qni = np.cross(Xin.transpose(),knj.transpose()) # 1x3

knjtil[0,0] = knj[0]*c/cn[0]
knjtil[1,0] = knj[1]*c/cn[1]
knjtil[2,0] = knj[2]*c/cn[2]

un[0,:] = un[0,:] +
+ pni[0]*cos(np.inner(knjtil.T,xtil.T) + omegamn*timetil[:]) +
+ qni[0]*sin(np.inner(knjtil.T,xtil.T) + omegamn*timetil[:])
un[1,:] = un[1,:] +
+ pni[1]*cos(np.inner(knjtil.T,xtil.T) + omegamn*timetil[:]) +
+ qni[1]*sin(np.inner(knjtil.T,xtil.T) + omegamn*timetil[:])
un[2,:] = un[2,:] +
+ pni[2]*cos(np.inner(knjtil.T,xtil.T) + omegamn*timetil[:]) +
+ qni[2]*sin(np.inner(knjtil.T,xtil.T) + omegamn*timetil[:])

LSTC-LS-DYNA-ICFD-THE-1.1-1 45
#print(n)

uxt[0,:] = cn[0]*math.sqrt(2./N)*un[0,:]
uxt[1,:] = cn[1]*math.sqrt(2./N)*un[1,:]
uxt[2,:] = cn[2]*math.sqrt(2./N)*un[2,:]

print "end simulation..."

begin simulation...
end simulation...

In [63]: um = max(uxt[0,:])
vm = max(uxt[1,:])
wm = max(uxt[2,:])

subplot(311)
plot(timev,uxt[0,:]/u_avg,color="red",linewidth=1)
axis([0, 3, -um/u_avg, um/u_avg])
title(’Turbulence Syntheis’)
xlabel(’time [secs]’)
ylabel(’$u_x$’,fontsize=20)
grid(True)

subplot(312)
plot(timev,uxt[1,:]/u_avg,color="blue",linewidth=1)
axis([0, 3, -vm/u_avg, vm/u_avg])
xlabel(’time [secs]’)
ylabel(’$u_y$’,fontsize=20)
grid(True)

subplot(313)
plot(timev,uxt[2,:]/u_avg,color="green",linewidth=1)
axis([0, 3, -wm/u_avg, wm/u_avg])
xlabel(’time [secs]’)
ylabel(’$u_z$’, fontsize=20)
grid(True)

# simulated fluctuations
oc = Oct2Py()

46 LSTC-LS-DYNA-ICFD-THE-1.1-1
octave.addpath(’/shang2_2/rpaz/LS-DYNA/DOCUMENTS/IMPLEMENT/SINTESIS/gen_spectru
fff,pf = oc.gen_spectrum(uxt,timev)

# theoretical fluctuations
kmax = 100
k = np.arange(0.1,kmax,0.5) # 400,
#k = f/u_avg
Ek = 16.*math.sqrt(2./math.pi)*(k/u_avg)**4.*(np.exp(-2.*(k/u_avg)**2.))

fig,ax = subplots()
ax.loglog(fff[0,:],pf[0,:],"b",linewidth=1)
ax.loglog(k,Ek,"r",linewidth=1)
ax.axis([1, 1000, 1.e-10, 100])
ax.set_xlabel(’$k$ [1/hz]’,fontsize=20)
ax.set_ylabel(’$E(k)$’, fontsize=20)
ax.set_title(’Spectra’, fontsize=20)
ax.legend(["Simulated Spectrum","Theoretical Spectrum"]);
ax.grid(True)

LSTC-LS-DYNA-ICFD-THE-1.1-1 47
In [64]: subplot(311)
plot(timev,u_avg+uxt[0,:],color="red",linewidth=1)
axis([0, 3, u_avg-um, u_avg+um])
title(’Turbulence Syntheis’)
xlabel(’time [secs]’)
ylabel(’$U_x$ [m/s]’,fontsize=12)
grid(True)

subplot(312)
plot(timev,uxt[1,:],color="blue",linewidth=1)
axis([0, 3, -vm, vm])
xlabel(’time [secs]’)
ylabel(’$U_y$ [m/s]’,fontsize=12)
grid(True)

subplot(313)
plot(timev,uxt[2,:],color="green",linewidth=1)
axis([0, 3, -wm, wm])
xlabel(’time [secs]’)
ylabel(’$U_z$ [m/s]’, fontsize=12)
grid(True)

48 LSTC-LS-DYNA-ICFD-THE-1.1-1
LSTC-LS-DYNA-ICFD-THE-1.1-1 49
9 The Volume Mesher
9.1 Introduction
The ICFD solver uses an automatic volume mesher for the fluid domains. This
greatly simplifies the pre-processing stage. For this feature a good quality body-
fitted surface mesh has to be provided. For FSI simulations, the solver uses an
ALE approach for mesh movement. In the cases where FSI simulations result in
large displacements the solver can automatically re-mesh to keep an acceptable mesh
quality. This section will focus on giving the basic steps of how the volume mesh is
built as well as describe some local refinement and re-meshing tools. The meshing
technique adopted by the solver is inspired by ([18]).

9.2 The Delaunay criteria


Before describing the steps leading to the construction of the volume mesh, let us
introduce the so-called Delaunay criterion as its application will be fundamental in
the construction of the volume mesh. In mathematics and computational geometry,
a Delaunay triangulation for a set of nodes P in a plane is a triangulation DT(P)
such that no node is inside the circumcircle of any triangle DT(P). For instance,
in Figure (10), the Delaunay criterion is violated since the node P4 is inside the
circumcircle of the triangle composed of P1 , P2 and P3 .

P2

P1
P3
P4

Figure 10: Violation of the Delaunay criterion, the point P4 is inside the circumcircle
of the triangle P1 P2 P3

9.3 Initial Volume mesh building steps


• Step one : The solver reads the surface nodes and elements given by the
user. The list of surfaces have to be non-overlapping and should not leave

50 LSTC-LS-DYNA-ICFD-THE-1.1-1
any gaps or open spaces between the surface boundaries. The nodes on the
boundary of two neighbor surfaces have to be uniquely defined (no duplicate
nodes) and should match exactly on the interface. Each surface element has
to be orientable i.e a normal vector defining the interior/exterior faces of the
surface element can be associated to it. If one of those conditions is not met,
the solver will return an error.

• Step two : Using the initial surface nodes, the solver will then join the surface
nodes in order to build an initial volume mesh. The tetrahedras or triangles
in 2D thus created all need to respect the Delaunay criteria.

• Step three : The solver will progressively add nodes to the volume mesh.
Every time a new node is added, its ”host” tetrahedra or triangle will be
divided in smaller tetrahedras or triangles respecting the Delaunay criteria.
This procedure will be repeated until the volume elements have reached their
desired size based on a linear interpolation of the surface sizes that define the
volume enclosure. Figure (11) shows an example of the different steps leading
to the construction of the initial volume mesh.

9.4 Local refinement tools


9.4.1 Imposing the mesh size on a volume domain
During the geometry set up, the user can define surfaces that will be used by the
mesher to specify a local mesh size inside the volume. Two cards and methods are
available:
• For the MESH SIZE card, a surface with the specified element size must be
defined in the input deck and will be read along with the other initial surfaces
(Step one). This surface must be entirely defined in the volume mesh but
does not need to be necessarily closed. The nodes of this specific surface
will directly be used when building the initial volume mesh (Step two). A
linear interpolation will then be used to define the element sizes between this
specifically added surface and the classic surfaces defining the volume enclosure.

• For the MESH SIZE SHAPE card, a local element size can be defined by the
user in specific zones corresponding to given geometrical shapes (box, sphere,

LSTC-LS-DYNA-ICFD-THE-1.1-1 51
Step 1

Step 2

Step 3

Figure 11: Initial Volume mesh building steps

52 LSTC-LS-DYNA-ICFD-THE-1.1-1
cylinder). This element size will be used as reference in the specified zone when
progressively adding nodes and building the final volume mesh (Step three).
This zone does not necessarily need to be entirely defined in the volume mesh.
However, in cases where a boundary surface mesh is defined in this zone, it
is advised to use a similar element size for the shape zone and the boundary
surface mesh in order to keep a good quality mesh.

Figure (12) shows an example of the two methods and the resulting volume mesh
using the same rectangular shape and element size in both cases.

9.4.2 The boundary layer mesh


It is also possible to specify several anisotropic elements to be added to the boundary
layer in order to better represent close-to-the-wall effects. The solver will extrude the
specified surface mesh in the normal direction of the surface elements by a certain
distance proportional to their size. The desired number of boundary layer elements
will then be added to this thickness by always dividing the element closest to the
surface thus resulting in a boundary layer mesh that gets finer when approaching the
wall.

9.5 Volume mesh remeshing criteria


9.5.1 Mesh deformation criteria
For FSI simulations, the solver uses an ALE approach for mesh movement which
means that large deformations of the fluid mesh can occur. By default, the solver,
only rebuilds the mesh if elements get inverted. Inversion of elements usually occur
in rotational problems such as wind turbine analyzes. However, it is also possible
through the ICFD CONTROL ADAPT SIZE card to trigger a re-meshing of ele-
ments that have been distorted by the mesh movement algorithm and that no longer
respect the initial mesh size. This frequently occurs if problems involving bodies
moving in translation.

9.5.2 Using adaptivity


Using the keyword ICFD CONTROL ADAPT, the user can also trigger an automatic
remeshing where the solver will use an a-posteriori error estimator to compute a new
mesh size bounded by the user to satisfy a maximum perceptual error. The error
estimator and adaptive remeshing procedure is based on the work by [36]. The
relative percentage error will be defined as

LSTC-LS-DYNA-ICFD-THE-1.1-1 53
Using the MESH SIZE SHAPE card Using the MESH SIZE card
Step 1 Step 1

Step 2 Step 2

Step 3 Step 3

Figure 12: Locally imposing the mesh size : comparison between the MESH SIZE
card and the MESH SIZE BOX card

54 LSTC-LS-DYNA-ICFD-THE-1.1-1
||e||
η= (155)
||φ||
where φ can be pressure, velocity, temperature or even the level set function and e
can be written as

e = φ − φ̂ (156)
where e is the difference between the exact solution φ and the approximate finite
element solution φ̂. In order to estimate the exact solution, an L2 projection method
will be employed.
For every nodal value, it is therefore possible to associate an error value. As a result,
if too many nodes reach the critical value set by the user, the solver will apply a
remeshing and refine in the zones where the error was high.

9.6 Watching the mesh quality


9.6.1 Mesh quality output file
Once the initial volume mesh has been built, it is often important to check its
quality. Assuming that the minimum file output level has been defined in the
ICFD CONTROL OUTPUT card, an mstats file will be generated. In this file,
the user can check the total number of nodes and elements generated, their overall
quality as well as the amount of distorted elements. Each time a remeshing is made,
a new mstats file will be generated.
Nodes: 310
Tris : 572
Total Area : 104.00000000
******* Element Quality *******
Angles:
Min. Angle = 21.81625125
Max. Angle = 129.73094855
Avg. Min. Angle = 46.46269865
Avg. Max. Angle = 77.06048470
minang< 5 = 0 0.000000%
George Quality(L*S/V) (Q = big => sliver, Q = 1 => nice Tet):
Min. Q = 0.69308732
Max. Q = 1.80546082
Avg. Q = 0.87247972
Q>10= 0 0.000000%

LSTC-LS-DYNA-ICFD-THE-1.1-1 55
9.6.2 Terminal information
During the analysis, several additional information is also displayed on the terminal
window in cases of moving mesh or adaptivity if the maximum level of output infor-
mation has been triggered in the ICFD CONTROL OUTPUT card. The following
figure shows the maximum outputs that can appear during the run. Most of this
information is mainly for debugging purposes but it can give some hints on the mesh
quality to users.

Minimum Jacobian(x): 0.908503476738054


Minimum Jacobian(u): 0.989910731457378
Maximum Derivative: 42.9609250334868
Adapt ratios(rat(1), rat(2), reno): 0.102040816326531 0.176038288090357 0.000000000000000E+000
Adapt ratios(rat(1), rat(2), reno): 0.000000000000000E+000 0.000000000000000E+000 0
Adapt ratios(E/tlm, E1/tlm, Total): 0.533582507931422 5.374310168412143E-002 0.587325609615544

The Minimum Jacobian(x) gives some indication on the mesh distortion compared
to its initial position. The Minimum Jacobian(u) should always stay positive as a
negative value means an inversion of an element. The Maximum Derivative gives also
some indication on the mesh distortion, a very large value could mean a very deformed
element that may lead to a non-convergence. The following two Adapt ratios(rat(1),
rat(2), reno) lines only appear in cases where the ICFD CONTROL ADAPT SIZE
or ICFD CONTROL ADAPT cards are being used and give some information on
the nodal and element deformation respectfully. rat(1) symbolizes the percentage of
nodes that need remeshing, rat(2) the fluid volume percentage of these nodes and
a positive value of reno indicated a heavily distorted element. If one of those three
values reach a certain criteria, a remeshing will be applied. The Adapt ratios(E/tlm,
E1/tlm, Total) only appears in cases where the ICFD CONTROL ADAPT card is
used. It gives some information on the volume percentage of the fluid domain that
needs to be refined (E/tlm), the volume percentage of the fluid domain that can be
coarsened (E1/tlm) as well as the sum of the two values T otal. If the T otal value
reaches a certain criteria, a remeshing will be applied.

56 LSTC-LS-DYNA-ICFD-THE-1.1-1
References
[1] I. C. A. Smirnov and S. Shi, Les of bubble dynamics in wake flows, Com-
puters & Fluids, 34 (2005), pp. 351–373.

[2] S. S. A. Smirnov and I. Celik, Random flow generation technique for large
eddy simulations and particle-dynamics modeling, Journal of Fluids Engineering,
123 (2001), pp. 359–371.

[3] S. Badia, A. Quaini, and A. Quarteroni, Modular vs. non-modular pre-


conditioners for fluid-structure systems with large added-mass effect., Available
online in Comp. Meth. Appl. Mech. Engrg., (2008).

[4] H. G. Castro and R. R. Paz, A time and space correlated turbulence syn-
thesis method for large eddy simulations, Journal of Computational Physics, 235
(2013), pp. 742–763.

[5] P. Causin, J.-F. Gerbeau, and F. Nobile, Added-mass effect in the design
of partitioned algorithms for fluid-structure problems., Comp. Meth. Appl. Mech.
Engrg.,, 194 (2005), pp. 4506–4527.

[6] A. Chorin, Numerical solution of the navier-stokes equations, Math Comput,


22 (1968), pp. 377–385.

[7] , Numerical study of slightly viscous flow, Math Comput, 57 (1973), p. 785.

[8] R. Codina, Pressure stability in fractional step finite element method for in-
compressible flows,, Journal of computational physics, 170 (2001), pp. 112–140.

[9] R. Codina and S. Soto, Pressure stability in fractional step finite element
method for incompressible flows,, Journal of computational physics, 170 (2001),
pp. 112–140.

[10] R. Codina and O. C. Zienkiewicz, Cbs versus gls stabilization of the incom-
pressible navier-stokes equations and the role of the time step as stabilization
parameter,, Communications in numerical methods in engineering, 18 (2002),
pp. 99–112.

[11] W. Dettmer and D. Peric, A computational framework for fluid-structure


interaction: Finite element formulation and applications., Comp. Meth. Appl.
Mech. Engrg.,, 195 (2006), pp. 5754–5779.

LSTC-LS-DYNA-ICFD-THE-1.1-1 57
[12] W. E and J. Liu, Projection method i: Convergence and numerical boundary
layers,, SIAM J. Numer. Anal., 32 (1995), pp. 1017–1057.

[13] C. Farhat, M. Lesoinne, and P. L. Tallec, Load and motion transfer


algo- rithms for fluid/structure interaction problems with non-matching discrete
interfaces: Momentum and energy conservation, optimal discretization and ap-
plication to aeroelasticity., Comp. Meth Appl. Mech. Eng., 157 (1998), p. 95:114.

[14] C. Felippa, K.C., and C. Farhat., Partitioned analysis of coupled me-


chanical systems., Comp. Meth. Appl. Mech. Engrg., 190 (2001), pp. 3247–3270.

[15] C. Felippa and K. Park, Staggered transient analysis procedures for coupled-
field mechanical systems: formulation., Comp. Meth Appl. Mech. Eng., 24
(1980), pp. 61–111.

[16] J. L. Guermond, Un resultat de convergence d’ordre deux en temps pour


l’approximation des equations de navier-stokes par une technique de projection
incrementale,, M2AN Math. Model. Numer. Anal, 33 (1999), pp. 169–189.

[17] S. Idelsohn, F. D. Pin, R. Rossi, and E. Onate, Avoiding the instabilities


caused by added mass effects in fluid structure interaction problems for pres-
sure segregation and staggered approaches, Int. J. Numer. Meth. Engng (2009),
(2009).

[18] P. Jean-Frey and P. George, Mesh Generation, application to finite ele-


ments, Hermes Science, 2000.

[19] R. Kraichnan, Diffusion by a random velocity field, The Physics of Fluids, 13


(1970), pp. 22–31.

[20] B. D. L., C. R, and M. M. L, Accurate projection methods for the incom-


pressible navier-stokes equations,, J. Comput. Phys., 168 (1979), pp. 464–499.

[21] R. Lohner, C. Yang, J. Cebral, J. Baum, H. Luo, D. Pelessone, and


C. C., Fluid-structure interaction using a loose coupling algorithm and adaptive
unstructured grids., AIAA, 95 (1995).

[22] M. Neumann, S. Tiyyagura, W. Wall, and E. Ramm, Robustness and


efficiency aspects for computational fluid structure interaction., Computational
Science and High Performance Computing II, (2006), p. 99:114.

58 LSTC-LS-DYNA-ICFD-THE-1.1-1
[23] P. N. O.C. Zienkiewicz, R.L. Taylor, The Finite Element Method for
Fluid Dynamics,, Elsevier, 2005.

[24] S. Osher and R. Fedkiw, Level Set Methods and Dynamic Implicit Surfaces,,
Springer, 2003.

[25] F. D. Pin, The Meshless Finite Element Method Applied to a Lagrangian Par-
ticle Formulation of Fluid Flows, PhD thesis, Facultad de Ingenieria y Ciencias
Hidricas (FICH) Instituto de Desarrollo Tecnologico para la Industria Quimica
(INTEC) Universidad Nacional del Litoral, 2003.

[26] S. Piperno and C. Farhat, Partitioned procedures for the transient solution
of coupled aeroelastic problems- part ii, Comp. Meth Appl. Mech. Eng., 190
(2001), p. 3147:3170.

[27] T. R, Sur l’aproximation de la solution des equations de navier-stokes par la


methode des pas fractionnaires ii., Arch Rat Mech Anal, 33 (1969), pp. 377–385.

[28] S. Rugonyi and K. Bathe., On the analysis of fully-coupled fluid flows with
structural interactions-a coupling and condensation procedure., nt. J. Comput.
Civil Struct. Engrg., 1 (2000), pp. 29–41.

[29] S. Rugonyi and K. Bathe, On finite element analysis of fluid flows fully
coupled with structural interactions., Comp. Model. Simulat. Engrg., 2 (2001),
pp. 195–212.

[30] J. Shen, On error estimates of projection methods for the navier-stokes equa-
tions: second-order schemes,, Math. Comp., 65 (1996), pp. 1039–1065.

[31] M. Souli, A. Ouahsine, , and L. Lewin., Arbitrary lagrangian-eulerian


formu- lation for fluid-structure interaction problems, Comp. Meth. Appl. Mech.
Engrg., 190 (2000), pp. 695–675.

[32] J. C. Strikwerda and Y. S. Lee, The accuracy of the fractional step


method,, SIAM J. Numer. Anal, 37 (1999), pp. 37–47.

[33] P. L. Tallec and J. Mouro., Fluid structure interaction with large structural
displacements., Comp. Meth. Appl. Mech. Engrg., 190 (2001), p. 3039.

[34] E. Van Driest, On turbulent flow near a wall, Journal of Aero. sci., 23 (1952),
pp. 1007–1011.

LSTC-LS-DYNA-ICFD-THE-1.1-1 59
[35] E. Walhorn, A. Kolke, B. Hubner, and D. Dinkler, Fluid-structure
coupling within a monolithic model involving free surface flows, Computers and
Structures, 83 (2005), pp. 2100–2111.

[36] O. Zienkiewicz and J. Zhu, A simple error estimator and adaptive procedure
for practical engineering analysis, International Journal for Numerical Methods
in Engineering, 24 (1987), pp. 337–357.

60 LSTC-LS-DYNA-ICFD-THE-1.1-1
A Consistent units for ICFD

USI Equivalence ([kg]α ∗ [m]β ∗ [s]γ ) ex 1 ex 2


Mass kg [kg]α [m]β [s]γ g g
Length m mm mm
Time s s ms
Energy J 1 2 -2 1e−9 1e−3
Force N 1 1 -2 1e−6 1
Stress/Pressure Pa 1 -1 -2 1 1e6
Velocity m
s
0 1 -1 1e−3 1
kg
Density m3
1 -3 0 1e6 1e6
Dynamic Viscosity Pa s 1 -1 -1 1 1e3
m2
Thermal Diffu. s
0 2 -1 1e−6 1e−3
Heat capacity J
kgK
0 2 -2 1e−6 1
Thermal Cond. J
ms
1 1 -3 1e−6 1e3

Table 5: Consistent units for the ICFD solver

LSTC-LS-DYNA-ICFD-THE-1.1-1 61

You might also like