0% found this document useful (0 votes)
50 views34 pages

Twophaseintertrackfoam: An Openfoam Module For Arbitrary Lagrangian/Eulerian Interface Tracking With Surfactants and Subgrid-Scale Modeling

This document describes an OpenFOAM module for simulating two-phase flows with interfaces using the Arbitrary Lagrangian-Eulerian method. It includes interface tracking capabilities and a subgrid-scale modeling framework. The module solves fluid flow equations for each phase with coupling conditions at the interface and can model surface tension and surfactants. Validation cases are presented to demonstrate the model's capabilities.

Uploaded by

tivaga3618
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views34 pages

Twophaseintertrackfoam: An Openfoam Module For Arbitrary Lagrangian/Eulerian Interface Tracking With Surfactants and Subgrid-Scale Modeling

This document describes an OpenFOAM module for simulating two-phase flows with interfaces using the Arbitrary Lagrangian-Eulerian method. It includes interface tracking capabilities and a subgrid-scale modeling framework. The module solves fluid flow equations for each phase with coupling conditions at the interface and can model surface tension and surfactants. Validation cases are presented to demonstrate the model's capabilities.

Uploaded by

tivaga3618
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

twoPhaseInterTrackFoam: an OpenFOAM module for Arbitrary

Lagrangian/Eulerian Interface Tracking with Surfactants and


Subgrid-Scale Modeling

Moritz Schwarzmeiera , Suraj Rajua , Željko Tukovićb , Mathis Frickea , Dieter Bothea ,
arXiv:2403.19523v1 [physics.comp-ph] 28 Mar 2024

Tomislav Marić a,∗


a Mathematical Modeling and Analysis Institute, Mathematics department, TU Darmstadt, Germany
b Faculty of Mechanical Engineering and Naval Architecture, University of Zagreb, Croatia

Abstract
We provide an implementation of the unstructured Finite-Volume Arbitrary Lagrangian / Eule-
rian (ALE) Interface-Tracking method for simulating incompressible, immiscible two-phase flows as
an OpenFOAM module. In addition to interface-tracking capabilities that include tracking of two
fluid phases, an implementation of a Subgrid-Scale (SGS) modeling framework for increased accu-
racy when simulating sharp boundary layers is enclosed. The SGS modeling framework simplifies
embedding subgrid-scale profiles into the unstructured Finite Volume discretization. Our design of
the SGS model library significantly simplifies adding new SGS models and applying SGS modeling
to Partial Differential Equations (PDEs) in OpenFOAM.
Keywords:
finite volume, interface tracking, ALE, unstructured mesh, subgrid-scale

PROGRAM SUMMARY
Program Title: twoPhaseInterTrackFoam
CPC Library link to program files: (to be added by Technical Editor)
Developer’s repository link: https://gitlab.com/interface-tracking/twophaseintertrackfoamrelease
Code Ocean capsule: (to be added by Technical Editor)
Licensing provisions: GPLv3
Programming language: C++
Nature of problem:
Two-phase flow problems involving surface-active agents (surfactants), variable surface tension force and
very sharp boundary layers.
Solution method:
An OpenFOAM implementation of the Arbitrary Lagrangian / Eulerian Interface Tracking method.

∗ Corresponding author
Email addresses: schwarzmeier@mma.tu-darmstadt.de (Moritz Schwarzmeier), raju@mma.tu-darmstadt.de
(Suraj Raju), zeljko.tukovic@fsb.unizg.hr (Željko Tuković), fricke@mma.tu-darmstadt.de (Mathis Fricke),
bothe@mma.tu-darmstadt.de (Dieter Bothe), maric@mma.tu-darmstadt.de (Tomislav Marić )
1. Introduction

The unstructured Finite Volume Arbitrary Lagrangian / Eulerian Interface Tracking method in
OpenFOAM (ALE-IT) [31, 29] is a highly accurate method that tracks fluid phases as deforming
solution domains separated by domain boundaries, making it possible to accurate account for
jump conditions at moving domain boundaries shared by two fluid phases, as well as to solve
Partial Differential Equations (PDEs) on moving domain boundaries. The ALE-IT method has
been successfully applied to challenging two-phase flow problems, involving, e.g., two-phase flows
with soluble surfactant [9, 10, 22] and two-phase flows with interfacial mass transfer [33, 23].
The Subgrid-Scale (SGS) modeling [1, 4, 34] employs an analytical solution to enhance the com-
putation of passive scalar transport in interfacial boundary layers, saving multiple local refinement
levels of Finite Volume mesh. This can accordingly speed up simulations, enable them in the first
place or save (computing) resources, while delivering results with high accuracy.
With this publication, we provide an open-source implementation of our ALE-IT method as an
OpenFOAM module. The version used to generate results from this manuscript is v1.0, available
in the GitLab repository [25] and archived as [30]. Results reported in this paper are archived as
[26]. The following sections cover the details of the mathematical model, equation discretization,
and subgrid-scale modeling implemented in the version 1.0 of our ALE-IT OpenFOAM module, as
well as the results for some showcases.

2. Mathematical model

2.1. Arbitrary Lagrangian/Eulerian (Sharp) Interface (Tracking) Model

Gas phase (g), ρg , µg Mesh G

Sg g Vg

Σ(t) σ
Sl
Interface

Vl

Liquid phase (l), ρl , µl Mesh L

Figure 1: Definition of the solution domain for the ALE-IT method.

We model isothermal flow of two immiscible incompressible fluids, schematically shown in fig. 1,
e.g. as a liquid and a gas phase separated by a sharp interface Σ(t). Appropriate boundary conditions

2
are then enforced at the fluid interface Σ(t), see [31]. We only briefly outline the model, the reader
is additionally referred to [15] for more details.
Isothermal flow of an incompressible Newtonian fluid inside an arbitrary moving control vol-
ume V bounded by a closed surface S := ∂V , i.e. S is the boundary of the finite volume, moving
with the boundary velocity vs is governed by the mass and linear momentum conservation laws:
I
ρn · v dS = 0, (1)
S
Z I I Z

ρv dV + n · ρ(v − vs )v dS = n · τ dS − ∇p dV, (2)
∂t
V S S V

where n is the outward pointing unit normal on S, ρ is the fluid density, v is the fluid velocity, vs is
the velocity of surface S, and τ is the viscous stress tensor which together with the thermodynamic
pressure p′ makes the Cauchy stress tensor T = −p′ I + τ . The dynamic pressure in Eq. (2) is
defined as
p = p′ − ρg · r, (3)
where g is the gravitational acceleration vector and r is the position vector. Furthermore, the
viscous stress tensor of the Newtonian fluid is given by

τ = η(∇v + ∇vT ), (4)

where η is the dynamic viscosity.


The relationship between the rate of change of the volume V and the velocity vs is defined by
the geometric (space) conservation law (GCL, see [27, 8]):
Z I

dV − n · vs dS = 0. (5)
∂t
V S

The formulation of the above mathematical model is a well-known ALE formulation.

2.2. Interface coupling conditions


If fluid phases are immiscible, fluid flow eqs. (1) and (2) can be applied for each phase separately,
while on the interface the proper boundary conditions must be used. The relation between fluid
velocities on the two sides of the interface is determined by the kinematic condition, which states
that the velocity must be continuous across the interface:

vl = vg , (6)

where vl and vg are the fluid velocities at the two sides (e.g. liquid and gas) of the fluid interface.
The dynamic condition follows from the momentum conservation law and states that forces
acting on the fluid at the interface are in equilibrium:

(pg − pl )nΣ − (τ g − τ l ) · nΣ = σκnΣ + ∇s σ − (ρg − ρl ) (g · r) nΣ , (7)

where nΣ is the unit normal vector on the interface, which points from the liquid phase to the gas
phase, κ = −∇s •nΣ is twice the mean curvature of the interface, σ is the surface tension coefficient

3
and ∇s σ is the gradient of the surface tension coefficient, where ∇s = ∇(I − nΣ nΣ ) is the surface
gradient operator. The last term on the right-hand side of eq. (7) appears due to transformation
of the thermodynamic pressure to the dynamic pressure at the interface. The pressure jump across
the interface is obtained by taking the normal component of the force balance (eq. (7)):

pg − pl = σκ − 2 (ηg − ηl ) ∇s · v − (ρg − ρl ) (g · r), (8)

The second term on the right-hand side of eq. (8) represents the jump of the normal viscous force
across the interface, expressed through the surface divergence of the interface velocity. For example,
the normal viscous force at the interface can be expressed as (see [6]):

(nΣ nΣ ) : τ = 2η (nΣ nΣ ) : ∇v = −2η∇s · v, (9)

where the following identity, being valid for an incompressible fluid flow (∇ · v = 0), is used:

∇ · v = ∇s · v + (nΣ nΣ ) : ∇v. (10)

By taking the tangential component of the force balance (eq. (7)) one obtains a relation between
the normal derivative of the tangential velocity on the two sides of the interface:

ηg (nΣ · ∇vt )g − ηl (nΣ · ∇vt )l = −∇s σ − (ηg − ηl ) (∇s vn ) , (11)

where it is taken into account that the tangential component of the viscous force at the interface
can be expressed as follows:

(nΣ · τ ) · (I − nΣ nΣ ) = η (nΣ · ∇vt + ∇s vn ) , (12)

where vt = (I−nΣ nΣ )·v is the tangential velocity component and vn = nΣ ·v is the normal velocity
component at the interface. A non-zero gradient ∇s σ of the surface tension coefficient can occur
for example due to a nonuniform distribution of surfactant at the interface or due to the presence
of a temperature gradient.

2.3. Surfactant transport


If impact of surfactant on the flow field is to be analyzed, it is necessary to extend the math-
ematical model by an equation which governs the transport of surfactant in the liquid bulk and
an equation which governs the transport of surfactant along the interface. The bulk surfactant
transport equation in ALE form read as follows:
Z I I

c dV + n · (v − vs ) c dS − n · (D∇c) dS = 0, (13)
∂t V S S

where c is the volume-averaged bulk surfactant concentration and D is the bulk surfactant diffusion
concentration.
The governing equation for surfactant transport along a surface patch S attached to the fluid
interface (S ⊂ Σ(t)) and bounded by a closed curve ∂S which can move along the interface reads:
Z I I Z

Γ dS + m · (v − b) Γ dL − m · (DΓ ∇s Γ) dL = sΓ dS, (14)
∂t S ∂S ∂S S

4
where Γ is the surfactant concentration at the interface, Γ∞ is the saturated surfactant concentration
under the given thermodynamic conditions, m is the outward pointing unit bi-normal on ∂S, b is
the velocity at which the curve ∂S moves along the interface, L is the arc length measured along
∂S, Ds is the diffusion coefficient of the surfactant along the interface and sΓ is the source/sink of
surfactants per unit area due to adsorption and desorption.
For the sake of simplicity, we focus in this paper on the prominent Langmuir’s kinetics law
[16, 5, 22] for the transfer of surfactant between the bulk and the interface due to adsorption and
desorption:

sΓ = ka [cI (Γ∞ − Γ) − βΓ] , (15)


where ka and β are the parameters of the adsorption and desorption kinetics, respectively, and cI
is the value of the bulk surfactant concentration at the interface. The implementation allows for
a straightforward extension to cope with other sorption models. The normal derivative of bulk
surfactant concentration at the interface is given by following expression:

(n · ∇c)Σ = − . (16)
D
In order to account for the surfactant bulk-interface mass transfer balance (eq. (16)), the normal
derivative of the surfactant concentration at the interface needs to be calculated with sufficient ac-
curacy. Due to convection along the interface and typically small surfactant diffusivities, extremely
thin boundary layers appear and make this calculation a challenging step. At this point, use of
subgrid-scale modeling for improved flux calculation as described in section 4 is beneficial.
The surface tension is related to the surfactant concentration on the interface and given for the
Langmuir sorption model with its adsorption isotherm by the following equation of state
 
Γ
σ = σ0 + RT Γ∞ ln 1 − , (17)
Γ∞
where σ0 is the surface tension of a clean interface, R is the universal gas constant and T is the
temperature [16, 5, 22]. Equation (17) can also be written as
  
Γ
σ = σ0 1 + βs ln 1 − , (18)
Γ∞

where βs = RTσΓ0 ∞ is the elasticity number. For the test case described in section 6.3 we added a
linear equation of state:  
Γ
σ = σ 0 1 + βs . (19)
Γ∞

3. Finite Volume and Finite Area discretisation and equation-system solution

3.1. Discretisation of the computational domain


The cell-centered Finite Volume Method (FVM, [31]) is used to discretise the bulk fluid models
(volumetric transport equations) and the face-centered Finite Area Method (FAM, [31]) is used
to discretise the surfactant transport model, a transport equation on the fluid interface (moving
surface). The finite volume/area discretisation is based on the integral form of the conservation

5
N
nf
Sf df
f

rP
z

y VP

x
Figure 2: Polyhedral control volume (cell) and the notation used (adopted from [31])
.

equation over a fixed or moving control volume/area. The discretisation procedure is divided into
two parts: discretisation of the computational domain and the equation discretisation. Here we
provide a brief description of both discretisation methods together with a description of the interface
tracking method, while more details can be found in [31, 29, 28].
The time interval is split into a finite number of time-steps ∆t and the equations are solved in
a time-marching manner. The computational space is divided into a finite number of polyhedral
control volumes (CV) or cells bounded by polygons. The cells do not overlap and fill the spatial
domain completely. Figure 2 shows a polyhedral control volume VP around the computational
point P located in its centroid, face f with area Sf , face unit normal vector nf and the centroid
N of a neighboring CV sharing the face f . The geometry of the CV is fully determined by the
position of its vertices.
In case the solution domain is changing in time, e.g., when the fluid interface deforms, the finite
volume mesh is adjusted to the time-varying position or shape of the solution domain boundaries
using a deforming mesh approach. The internal CV-vertices are moved based on the prescribed
motion of the boundary vertices, while the topology of the mesh stays unchanged. In the imple-
mented moving mesh interface tracking solver, a finite-volume automatic mesh motion solver is
applied, where the Laplace equation is solved for mesh-point displacements with variable diffusion
coefficient, using the polyhedral unstructured cell-centered FVM.
The polygonal cell-faces which coincide with the interface constitute the finite area mesh on
which the surfactant transport equation is discretised. Figure 3 shows a sample polygonal control
area SP around the computational point P located in its centroid, the edge e, the edge length Le ,
the edge unit bi-normal vector me and the centroid N of the neighbouring control area sharing the
edge e. The bi-normal me is perpendicular to the edge normal ne and to the edge vector e.

6
ne j
nP
e nN
e me
P Le

SP i de N

Figure 3: Polygonal control area.

3.2. Discretisation of volumetric equations


The second-order collocated FV discretisation of an integral conservation equation transforms
the surface integrals into sums of face integrals and approximates them and the volume integrals
to the second order accuracy by using the mid-point rule. The spatially discretised form of the
momentum eq. (2) for the moving control volume VP reads:

∂ (vP VP ) X
+ (V̇f − V̇s,f ) vf
∂t
f
X (20)
= νf [n · (∇v)]f Sf + (∇p)P VP ,
f

where the subscripts P and f represent the cell-center and face-center values. The volume flow
rate due to fluid flow through the cell-face, V̇fn+1 = (n · vS)n+1
f must satisfy the discretised mass
conservation law, where the superscript n+1 represents the new time-step, while the volume flux due
n+1
to grid motion, V̇s,f , must satisfy the discretised GCL, eq. (5). The evaluation of the mesh-face
volume fluxes is described in [11, 29].
The face-center values of all dependent variables are calculated using linear interpolation of the
neighbouring cell-center values. The exception is the face value of the dependent variable in the
convection term [vf in eq. (20)] which must be calculated using some of the bounded convection
discretisation schemes available in OpenFOAM.
The face-normal derivative of the velocity [n · ∇v]f is discretised using the linear scheme with
non-orthogonal and skewness correction (see fig. 2):

vN − vP kN · (∇v)N − kP · (∇v)P
(n · ∇v)f = + , (21)
dn,f dn,f

where dn,f = nf · df , kP = (I − nf nf ) · (rf − rP ) and kN = (I − nf nf ) · (rN − rf ). The first term on


the right-hand side of eq. (21) is treated implicitly, while the correction term is treated explicitly.
The cell-face volumetric fluid flux in the non-linear convection term is treated explicitly after
the discretisation, i.e. its values from the previous iteration are used. The cell-center gradient of
the dependent variables used for the calculation of the explicit source terms and the non-orthogonal

7
correction in eq. (21), is obtained by using the least-squares fit [7]. This method produces a second-
order accurate gradient irrespective of the mesh quality.
The temporal discretisation of all equations is performed by using the second-order accurate
implicit three time level scheme [11] referred to as the backward scheme in OpenFOAM. All terms
of eq. (20) are evaluated at the new time instance tn+1 = tn + ∆t and the temporal derivative is
discretised by using two old-time levels:
 n+1
∂v 3vn+1 − 4vn + vn−1
= , (22)
∂t 2∆t

where vn+1 = v(tn + ∆t), vn = v(tn ) and vn−1 = v(tn − ∆t). One can also use other temporal
discretisation schemes available in OpenFOAM.
When eqs. (21) and (22) are substituted into eq. (20) and the convection discretisation scheme
is applied, the discretised form of the momentum eq. (2) can be written in the form of a linear
algebraic equation, which for cell P reads:
X
n+1 n+1
aP vP + aN vN = rP + (∇p)P , (23)
N

where the diagonal coefficient aP , the off-diagonal coefficients aN and the source term rP can be
found in [29].
The mathematical model of fluid flow is solved using a segregated solution procedure where
the discretised momentum equation is solved decoupled from the discretised pressure equation.
The discretised pressure Poisson equation, obtained by combining the discretised momentum and
continuity equations, reads:
X1 X  
H
(n · ∇p)n+1
f Sf
n+1
= n n+1
f · S n+1 , (24)
a f a f f
f f

where the (1/a)f and (H/a)f terms are calculated by using the temporally consistent Rhie-Chow
interpolation procedure proposed in [29].
The face normal derivative of the pressure at the left hand side of eq. (24) is discretised using
eq. (21) applied on the pressure field. The absolute volume fluid flux V̇fn+1 through the cell face f
is calculated as follows:
"    #
H 1
V̇fn+1 = nfn+1 · − (∇p)n+1
f Sfn+1 . (25)
a f a f

Volume flux calculated in this manner will satisfy the discretised continuity equation if the pressure
field satisfies the pressure eq. (24).

3.3. Discretisation of surface equations


Applying a second-order collocated finite area method, the surfactant transport eq. (14) can be
discretised on the moving control area SP (see fig. 3) as follows:

∂ (ΓP SP ) X X
+ (m · v)e Le Γe = DΓ,e (m · ∇s Γ)e Le + (sΓ )P SP , (26)
∂t e e

8
nN
ne
nP
te N
e tN
tP

tN
lf ≡ P t′e
t′P
Slf

Figure 4: Edge-based local orthogonal coordinate system whose axis are aligned with the orthogonal unit vectors n,
t and t′ , where vector t is tangential to the geodetic line P eN

where the subscripts P and e represent the face-center and edge-center values, and it is assumed
that finite-area points move in normal direction which means that (m · b)e = 0.
The edge-center tangential velocity vt is calculated using following linear interpolation formula:

vt,e = (Te )T · [ex TP · vt,P + (1 − ex )TN · Vt,N ] . (27)

where ex is the interpolation factor which is calculated as the ratio of the geodetic distances eN
and P eN (see fig. 3):
eN
ex = , (28)
P eN
and TP , TN and Te are the tensors of transformation from the global Cartesian coordinate system
to the (t′e , te , ne ) edge-based local coordinate system defined in fig. 3. The convection term in
eq. (26) is discretised using the linear upwind discretisation scheme by taking into account geodetic
distances between the neighbouring control area centers. The diffusion term is discretised using the
central differencing scheme with non-orthogonal correction [14]:
ψN − ψP
(m · ∇s ψ)e = |∆e | + ke · (∇s ψ)e , (29)
LP N ´¹¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¸ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¶
´¹¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¸¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¶ Non-orthogonal correction
Orthogonal contribution

where ke = me − ∆e , ∆e = tet·m e
e
, LP N is the geodetic distance LeP and te is the unit tangential
vector to the geodetic line P eN at the point e (see fig. 4).

3.4. Interface tracking procedure


The numerical modelling of the two-phase fluid flow with a sharp interface is performed using a
moving mesh interface tracking procedure. The computational mesh consists of two separate parts,
where each of the meshes covers only one of the considered two fluid phases, see fig. 1. The two
meshes are in contact over two geometrically equal surfaces, Sl and Sg , at the boundary between
the phases, i.e. the interface. Surface Sl represents the liquid side of the interface, and surface Sg
represent the gas side of the interface. Each surface is defined by a set of boundary faces, see
fig. 5, where each face lf on the surface Sl has a corresponding geometrically equal face gf on the
surface Sg . Matching of the two meshes at the interface is assumed in order to make the explanation
of the interface tracking method clearer, and is not required in general.

9
nf
Phase g

gf
lf

Phase l

Figure 5: Representation of the interface with the mesh boundary faces.

Coupling of flow equations between fluid phases is performed by applying adequate boundary
conditions at the boundary faces which define the side l and g of the interface. At the side l the
pressure pl and normal velocity derivative (n · ∇v)l are specified, while at the side g the velocity vg
is specified and normal derivative of dynamic pressure is set to zero, (n · ∇p)g = 0. The boundary
conditions are calculated using the kinematic and dynamic conditions as follows:
1. The value of dynamic pressure specified on the face lf (see fig. 5) is calculated from the
dynamic pressure at the face gf using eq. (8) as follows:
plf = pgf − (ρl − ρg ) g · rlf
(30)
− (σκ)lf − 2 (ηl − ηg ) (∇s · v)lf ,
where pgf is the dynamic pressure at the face gf calculated by extrapolation from the fluid g,
and rlf is the position vector of the face center lf . The surface divergence of the velocity vec-
tor (∇s · v)lf at lf is calculated using the surface Gauss integral theorem [32]. The procedure
for calculating the surface force (σκ)lf is described later in this section.
2. The normal velocity derivative specified at lf is calculated from the normal velocity gradient
at gf using eq. (11), as follows:
ηg h i
(n · ∇v)lf = (I − nlf nlf ) · nlf · (∇v)gf
ηl
1
+ (∇s σ)lf − nlf (∇s · v)lf (31)
ηl
(ηg − ηl )
+ (∇s vn )lf ,
ηl
where nlf = −ngf is the unit normal of the face lf . Equation (31) is derived using the
identity n · ∇v + n (∇s · v) = (I − nn) · (n · ∇v). The surface gradient of the normal velocity
component (∇s vn )lf at lf is calculated using the surface Gauss integral theorem. Calculating
the tangential surface force (∇s σ)lf is described later in this section.
3. According to the kinematic condition (6), the tangential velocity component specified on gf
is transferred from lf :
(vt )gf = (vt )lf . (32)
The normal velocity component specified on gf is calculated from the condition of zero net
mass flux, (V̇gf − V̇gf ) = 0, i.e.
V̇gf
(vn )gf = − nlf , (33)
Sgf

10
where V̇gf is the volume flux of the face gf . Since the displacement of mesh points on the
side g is equal to the displacement on the side l of the interface, ugi = ułi , the same is valid
for the volume fluxes of the faces lf and gf :

V̇gf = V̇lf . (34)

fli nli
flc nlf
li lc
lf

interface points
control points

Figure 6: Definition of the interface using control points.

The specification of interface boundary conditions using the above procedure is done at the
beginning of each outer iteration. In general, at the end of an outer iteration, the net volume flux
through the boundary side l is different from zero, i.e.

[V̇lfp − (V̇s )plf ] , 0, (35)

where V̇lfp is the fluid volume flux through the face lf and (V̇s )plf is the cell-face volume flux through
the same face, both obtained in the previous outer iteration. In order to correct the net volume
flux, the interface points must be moved to accomplish the following volume flux corrections:

V̇lf′ = [V̇lfp − (V̇s )plf ]. (36)

The displacement of the interface points is calculated based on the procedure proposed by [21],
where a control point lc is attached to the each face lf at the side l of the interface as is shown in
fig. 6. The corrected position of the interface points is calculated using the following procedure:
1. Calculate the volume δVlf′ which face lf sweeps on the way from the current to the corrected
position in order to cancel the net mass flux:
2 ′
δVlf′ = V̇ ∆t, (37)
3 lf
where V̇lf′ is the volume flux correction for face lf , eq. (36).
2. Using the above, the displacement of control points in the direction flc is:

δVlf′
h′lc = p p , (38)
Slf nlf · flc

11
p p
where Slf and nlf are the area and unit normal of the face lf in the previous iteration and flc
is the control point displacement direction. The new corrected positions of the control points
are calculated according to the following expression:
rnlc = rplc + h′lc flc , (39)
where rplc
is the position vector of the control point lc before the correction.
3. The new position of the interface mesh point li is obtained by projection to the plane which
is laid over the corresponding control points using the least square method.

3.5. Calculation of interface curvature and surface tension


Regardless of the approach used for tracking the interface between the phases in a multiphase
fluid flow, the implementation of surface tension is always demanding.
Let us assume the interface is discretised with an unstructured surface mesh consisting of arbi-
trary polygonal control areas. The surface tension force acting on the control area Slf (see fig. 7)
can be expressed by the following equation:
I XZ X
σ
Flf = mσ dL = mσ dL = σe me Le , (40)
e e
∂Slf Le

where σe and me are the surface tension and bi-normal unit vector at the center of the edge e and
Le is the length of the edge e. If the total surface tension force for each control area in the mesh is
calculated using eq. (40), then the total surface tension force for a closed surface will be exactly zero
if the unit bi-normals me for two control areas sharing the edge e are parallel and have opposite
direction.
ni
nlf
ne
i
lf
nj ê

e me
Slf Le
j

Figure 7: Control area Slf at the interface.

It remains to decompose the surface tension force Fσlf into the tangential component (∇s σ)lf
used in eq. (31), and the normal component (κσ)lf nlf used in eq. (30). Using the surface Gauss
integral theorem, the surface tension force acting on the control area Slf can be expressed by the
following equation: Z Z
Fσlf = ∇s σ dS + κσn dS. (41)
Slf Slf

12
When the right hand side of eq. (41) is approximated by the mid-point role and the result of the
discretisation is equalised with the right hand side of eq. (40), the following expression is obtained:
1 X
(∇s σ)lf + (κσ)lf nlf = σe me Le . (42)
Slf e

Hence, the tangential component of the surface tension force acting on the control area Slf is equal
to the tangential component of the right hand side of eq. (42):
1 X
(∇s σ)lf = (I − nlf nlf ) · σe me Le (43)
Slf e

and its normal component is equal to the respective normal component:


1 X
(κσ)lf nlf = (nlf nlf ) · σe me Le . (44)
Slf e

If the surface tension coefficient is constant (σ = const.), eq. (43) will give a tangential component
of the surface tension force equal to zero if the normal unit vector of the control area Slf satisfies
the following equation:
1 X
κlf nlf = me Le (45)
Slf e
or, if κlf , 0: P
me Le
e
nlf = P . (46)
| me Le |
e

With eqs. (43) to (45) we shall formulate a procedure for the calculation of the surface tension
force which ensures that the total surface tension force on a closed surface will be exactly zero.
Unfortunately, the fulfilment of this condition is not sufficient for successful application of surface
tension forces in the calculation. Specifically, unphysical fluid flow near the interface arises due to
local (rather than global) inaccuracy in the calculation of surface tension forces.
From eq. (40) one can see that the accuracy of surface tension force calculation depends on
the accuracy of calculation of the bi-normal unit vector me which is calculated using the following
expression:
ni + nj
me = ê × , (47)
2
where ê is the unit vector parallel with edge e and ni and nj are the interface normal unit vectors
in points i and j (see fig. 7). Using eqs. (45) and (47) one obtains the exact value of curvature of
the control area Slf if the points of the control area lie on the surface of the sphere.

3.6. Solution procedure


Based on the described interface tracking method, one can now define the solution procedure
for the Navier-Stokes system on a moving mesh, which may be used for simulating two-phase fluid
flow using a moving mesh interface tracking method. The procedure consists of the following steps:
1. For the new time instance t = tn+1 , initialize the values of all dependent variables with the
corresponding values from the previous time instance;

13
2. Define the displacement directions for the interface mesh points and the control points;
3. Start of outer iteration loop:
(a) Update pressure and velocity boundary conditions at the interface;
(b) Assemble and solve the discretised momentum equation eq. (20) on the mesh with the
current shape of the interface. The pressure field, face mass fluxes and volume fluxes are
used from the previous (outer) iteration;
(c) The velocity field obtained in the previous step is used for the assembly of the discretised
pressure eq. (24). After the pressure equation is solved, new absolute mass fluxes through
the cell faces are calculated. The net mass flux through an interface is generally different
from zero;
(d) In order to compensate the net mass flux obtained in the previous step, the interface
displacement is calculated using the interface points displacement procedure defined in
the previous section;
(e) The interface points displacement is used as a boundary condition for the solution of
the mesh motion problem. After mesh displacement, the new face volume fluxes are
calculated using the current points positions and the position from the previous time
instance;
(f) Convergence is checked and if the residual levels and the net mass flux through the
interface do not satisfy the prescribed accuracy, the procedure is returned to step (a).
4. If the final time instance is not reached, return to step 1.

4. Subgrid-Scale Model

4.1. Motivation
The simulation of realistic gas-liquid systems is still a huge challenge, e.g. when one would like
to simulate an industrial scale bubble column reactor. The nature of this application is multi-scale.
One of the smallest scales occurring is that of concentration boundary layers of the rising bubbles
at realistic, i.e. high, Schmidt numbers. With conventional FV-methods these scales have to be
resolved, what is still unfeasible for an application as the one mentioned above. This motivated the
first paper to discuss SGS modeling [1]. In SGS modeling, an analytical function is used to describe
the profile of a scalar field inside its boundary layer and to use this SGS information for improved
flux computation.
The method has been developed further since and has been applied in the context of Volume of
Fluid [34, 13, 4] as well as in interface tracking frameworks [22, 23, 33]. An overview on the state of
subgrid-scale modeling was also given by [35]. Recently, the approach was taken up in [12], where
local curvature and tangential convection effects have been included.

4.2. Analytical model


The SGS model we implement is based upon analytical solution of a simplified problem, depicted
for a bubble in fig. 8. The idea behind the SGS modeling is to zoom in on the interface, so that the
curvature gets negligibly small, allowing the analytical model therefore to assume a (locally) flat
boundary. This assumption is adequate for scenarios with a concentration boundary layer thickness
small in comparison to the radius of curvature of the given boundary.
At the interface Σ of the model problem (see fig. 8), a constant and homogeneous concentra-
tion cΣ is prescribed, which can be computed from Henry’s law under the sensible assumption of a
well-mixed gas-side concentration, as is pointed out by [4].

14
Figure 8: The simplified model for species transfer across a bubble surface. [34] adapted from [4]

The velocity in the substitute model problem is parallel to the interface. No velocity gradient
normal to the boundary exists in the model problem (∂v/∂x = 0). There could be a non-zero
gradient in the boundary-parallel direction, in which case the boundary layer thickness δ in eq. (49)
would change accordingly. There is no velocity component normal to the boundary.
In the application within ALE-IT, the boundary geometry and the velocity field have to be
resolved. In a co-moving reference frame, the interface neighbouring cell’s velocity should be nearly
parallel to the interface and with the assumption of zero interface-normal velocity gradient the next
cells velocity should be nearly identical to it. When a thin scalar boundary layer exists, the SGS
can model the scalar fluxes normal to the boundary without resolving the scalar boundary layer
itself.
Further assumptions of the substitute problem are a given, constant value (e.g. zero concen-
tration) upstream (y < 0) of the domain and far away from the boundary (x → ∞) as well as
negligible diffusion in streamwise direction. We also assume quasi-steadiness and the transported
scalar being passively transported.
Applying these assumptions to the advection-diffusion eq. (13) with the sorption term
sΣ + [[j · nΣ ]] = 0 on Σ(t) and Fick’s law j = −D∇c and ν being the boundary-parallel velocity,
lead to the expression

∂c ∂2c
ν =D 2 for x > 0 and y > 0 (48)
∂y ∂x
with the boundary conditions

c(x, y = 0) = c∞ , c(x → ∞, y > 0) = c∞ and c(x = 0, y > 0) = c|Σ .

The analytical solution to this problem is


 
x p
c(x, y) = c|Σ + (c∞ − c|Σ ) · erf with δ(y) = 4Dy/ν. (49)
δ(y)

The boundary layer thickness δ is considered a free parameter, which in IT will be fitted for each
interface attached cell individually as described in section 4.3.2. The fitting selects the locally best
approximation from the family of given error-functions in eq. (49).

15
From the analytical solution for the fitted parameter, we can approximate a more accurate
boundary-normal gradient of the scalar concentration at the interface as well as at the first cell
faces normal to the boundary, xf in fig. 9. These gradients are used to scale the convective and
diffusive scalar fluxes in the Finite Volume discretization, keeping the discretization of convective
and diffusive operators implicit. Scaling is only applied in interface normal direction and described
in detail in sections 4.3.3 and 4.3.4.
Without the SGS, the maximally second-order unstructured Finite Volume convective and dif-
fusive fluxes are underestimated at the interface and overestimated at the first cell faces normal to
the boundary. Figure 9 visualizes the linear gradient calculation in red and the actual gradients at
the interface and the first cell faces normal to the boundary with the dashed blue lines.

Figure 9: The concentration profile and linear/corrected gradient next to a boundary. Adapted from [34].

Note that in the algorithm the concentration in the first cell is not altered by the SGS. Instead the
gradients are used to scale the diffusivities at the respective locations, as described in sections 4.3.3
and 4.3.4.
Details of the SGS model can be found in [4, 34, 23]. It has been applied to VoF by [34], where
the implementation becomes more complicated.

4.3. Algorithm
4.3.1. Equation discretization in finite volume solvers
The species transport eq. (13) is discretised using the unstructured Finite Volume Method, e.g.
using the backward scheme as described above for Navier-Stokes equations,
3cn+1
P VP
n+1
− 4cnP VPn + cn−1 VPn−1 X X
P
+ Φf cn+1
f = Df (∇c)n+1
f · Sf , (50)
∆t
f f

where VP is a control volume/cell, Φf = S f · (v − w)f is the face flux and the superscripts
n+1 n
, and n−1 symbolize the new, current and preceding timestep. The formula is written for a
constant time step size. The subscript P and f represent the value at the cell centers, respectively
the face centers.

16
For the SGS model to take effect in the computation, we will modify the diffusivity coefficient
and the face fluxes in the equation above.

4.3.2. Computation of model parameter boundary layer thickness


The model parameter boundary layer thickness δ is computed by iteratively comparing the
amount of the scalar in the first cell adjacent to the boundary in the simulation, η c , with the
amount that would be contained in said cell for a given δ, ηSGS . In fig. 9 both light brown areas
have to be the same size or the area enclosed by the real concentration profile and the cell centered
FV-value has to be the same. Mathematically this is being expressed in this expression:
c − c|Σ ! 1
Z
ηc = = η(x/δ) dV = ηSGS (51)
c∞ − c|Σ V V

with
c(x, y) − c|Σ
η(x, y) = = erf(x/δ(y)). (52)
c∞ − c|Σ

Using the derivative of ηSGS with respect to δ, as described in [23], we use a Newton-bisection
method until eq. (51) is fulfilled within a given tolerance. For details like the initial value and the
algorithm in detail the reader is referred to the previously cited article.
For both, the advective and diffusive flux, the same idea is utilized: the scaling of the fluxes
according to the boundary layer thickness and therefore the theoretical values given by the SGS.

4.3.3. Computation of diffusive fluxes


With D being the molecular diffusivity, S being the boundary (cell) area and ∂n c being the
surface normal gradient of the scalar c, the diffusive flux F D is given by

F D = −D · S · ∂n c. (53)

In the following, we will use the superscript SGS to indicate the value is obtained from or modified
by the SGS model. The SGS model solves the analytical model for the actual surface normal
gradient of c, which will be (∂n c)SGS . However, to stay implicit and increase numerical stability,
the diffusion coefficient is scaled. Therefore, we state that the flux must be equal if computed with
the actual gradient or a scaled diffusion coefficient, meaning
!
F D = −D · S · (∂n c)SGS = DSGS · S · ∂n c (54a)

which can be easily re-arranged into


∂n c
DSGS = D , (54b)
(∂n c)SGS

where DSGS is a scaled diffusivity value that leads to the same flux, as a calculation with (∂n c)SGS
would. This scaling is applied to the cell faces at the boundary as well as on the first cell faces normal
to the boundary. For both respective locations the diffusivity parameter needs to be modified at
the corresponding position, xΣ and xf in fig. 9. There are exceptions, when the correction is not
employed, the details of this can be found in [23].

17
4.3.4. Computation of advective fluxes
In similar manner to the diffusion, the advective flux is given by

Ffc := cfSGS Ff = cf FfSGS Φ, (55)

where Ffc is the volumetric flux of the concentration c at the face f , and Ff := vf · Sf is the
volumetric flux. Since no convection of the species normal to the interface can take place, the scaling
for advective fluxes is only applied to the first cell faces normal to the boundary. Equation (55)
analogously to our procedure for the diffusive flux, leads to

cSGS
ΦSGS = Φ. (56)
c
Again, an exception handling takes places, of which the details can be found in [23].

5. Software design

5.1. Software design of the SGS model library


The software design is closely related to the model as described in section 4.
The first benefit of our implementation is a strict adherence to the OpenFOAM design principles,
which enable easy library extension with new models alternative to the SGS [23] and their Run-Time
Selection (RTS) [17] using configuration files. The implementation is depicted in fig. 10, already
showing how a new model newSubGridScaleModel would be implemented.
The second benefit of our software design is the possibility to apply SGS models to any Partial
Differential Equation (PDE) discretized in OpenFOAM, without requiring extensive modification
of existing solvers. Our SGS model library can be applied to any part of the domain boundary with
a minimal requirement of a prismatic boundary-adjacent mesh with at least three layers of cells in
the boundary layer.
Our design of the SGS model implements an OpenFOAM library with a class hierarchy and RTS
[17]. A base class which does nothing is present, so an option remains of not using SGS modeling.
The SGS model is implemented in a derived class, with virtual functions implementing the func-
tionality from [23]. All functionality needed by the SGS is either accessed from core OpenFOAM
libraries or is contained within the SGS model implementation, which ensures the modularity of
the SGS model. An alternative SGS model will require similar addressing and geometric mesh
information in the boundary layer and the implementation provided in the original SGS model can
be re-used.
To enable the user of the SGS a good understanding of the effects of the SGS model and to make
accessible insights for further developments of the SGS model, we implemented the possibility to
output various SGS model parameters into OpenFOAM volScalarFields . These include the model
parameter δ or an indication of the exception handling, what represents the reason the SGS model
might not be employed. These can easily be inspected visually, an example is given in fig. 16, where
the diffusion coefficient after the SGS scaling is visualized. One can see, that on the inflow side, the
scaling is strong and of opposite effect for the boundary faces versus the faces between adjacent cell
and the next outer cell layer. On the outflow side in contrast, there is little effect to be seen. The
third layer represents the un-modified diffusion coefficient. Visualizing multiple operating figures of
the SGS enables insights into and deepens the understanding of the simulation case and the effect
of the SGS to it.

18
baseSubGridScaleModel

+ declareRunTimeSelectionTable()

+ baseSubGridScaleModel()

+ ~baseSubGridScaleModel()

+ update()

+ writeDebugData()

+ scaledFlux()

+ scaledDiffCoeff()

subGridScaleModel newSubGridScaleModel

+ subGridScaleModel() + newSubGridScaleModel()

+ ~subGridScaleModel() + ~newSubGridScaleModel()

+ scaledFlux() + ...()

+ scaledDiffCoeff()

+ calcPatchFaceLabels()

+ calcAdjacentCellLabels()

+ ...()

Figure 10: Class diagram of the Subgrid-Scale model, also showing a potential new model

19
An exemplified code for the modification of the PDE in an OpenFOAM solver for applying an
SGS model from our model library is shown in listing 1:
Listing 1: A minimal example of the application of the SGS model to a PDE solver in OpenFOAM.
# include " b a s e S u b G r i d S c a l e M o d e l . H "
int main ( int argc , char * argv [])
{
...

autoPtr < baseSubGridScaleModel > sgsPtr =


b a s e S u b G r i d S c a l e M o d e l :: New ( tr a n s po r t Pr o p er t i es . subDict ( " SGS " ));

while ( simple . loop ())


{
Info < < " Time ␣ = ␣ " << runTime . timeName () << nl << endl ;
while ( simple . c o r r e c t N o n O r t h o g o n a l ())
{
// Compute SGS data needed for scaling .
sgsPtr - > update ( psi );
fvScalarMatrix psiEqn
(
fvm :: ddt ( psi )
+ fvm :: div ( sgsPtr - > scaledFlux ( phi , psi ) , psi )
- fvm :: laplacian ( sgsPtr - > scaledDiffCoeff (D , psi ) , psi )
==
fvOptions ( psi )
);

psiEqn . relax ();


fvOptions . constrain ( psiEqn );
psiEqn . solve ();
fvOptions . correct ( psi );
}
runTime . write ();
}
}
The SGS requires some values as user input, that are read from the configuration file transportProperties
in OpenFOAM, with the relevant SGS sub-dictionary shown in listing 2.

20
Listing 2: transportProperties sub-dictionary for the SGS model
SGS
{
// Choose the SGS model : " SubGridScale " or " inactive "
type SubGridScale ;

// patch to apply SGS to


patchName freeSurface ;

// far - field concentration


cInfinity cInfinity [0 -3 0 0 1 0 0] 0;

// ( optional :) write parameters for visualization


// of SGS parameters
v i su a l iz e P ar a m et e r s true ;

// ( optional :) verbosity level for info statement output (0 -3)


infoLvl 1;
}
The SGS model can be activated with the keyword-pair type SubGridScale for a mesh bound-
ary patch specified by the keyword patchName. Additional required user input is the far-field
concentration, defined with the keyword cInfinity. Optional parameters are, whether to output
additional parameters from the SGS model as an OpenFOAM volScalarField and the level of
verbosity from 0 to 3 to print to the solver log. 0 corresponds to a quiet mode and 3 prints very
extensive information of almost all processes and results within the SGS algorithm and calculations.
As these settings affect simulation performance and disk consumption, the first defaults to false
while the later affects log readability and defaults to 1, which gives limited log-output. These visu-
alizing capabilities as well the rapid info statement level enable insights to the user, but they also
help with future model development.

5.2. Automatic testing


We have set up our test cases in a Continuous Integration (CI) pipeline. The pipeline is depicted
in figs. 11 and 12. In our approach we follow the practices presented in [18, 19]. This means the
tests are run and evaluated automatically in the CI with Jupyter Notebooks. They also produce the
results and graphs included in this work. A job in a succeeding stage to the downstream pipeline
has been omitted from fig. 12 for the sake of readability. Said job collects and bundles all those
artifacts from the two previous stages.
In [18, 19] CI is focused on tests and their automatic evaluation. We have added tests to the CI
pipeline, that check certain additional aspects of the repository, like e.g. formatting and the formal
correctness of the CITATION.cff -file. We also build an image within the CI with OpenFOAM
and other needed packages. This job can not be seen in fig. 11, since it is only run once a new
OpenFAOM version is available. It is located before the trigger job for the downstream pipelines.
We further expanded the CI to be able to test the code for multiple OpenFOAM versions, which
at the moment is being done for the latest three versions OpenFOAM v2312, v2306 and v2212. In
feature-branches only the latest version is tested to save resources.

21
Figure 11: Upstream CI pipeline

Figure 12: Downstream CI pipeline

Another feature of the CI pipeline is the addition of a test, that checks the OpenFOAM log-files
for warnings and errors, where tutorials added to the repository are automatically detected and run
for a single timestep. This almost ensures, that there are no errors in the set-up of test cases and
would also uncover some of errors in the code, that can only be detected, when OpenFOAM is run.
The automatisation of this test in finding and running all simulation cases is especially valuable.
Since running all of the simulations for only one timestep needs a very limited amount of time it
can be checked, that changes in the code don’t corrupt any case before commiting and pushing to
the central repository. The automated finding of cases also prevents forgetting to add a simulation
case to the CI (to this testing method) and the automated execution and error finding gently forces
all participants of the repository to set up their cases to run flawlessly and fully automatised, e.g.
they need to include everything needed to run a case in the Allrun script. This ensures all the cases
provided with the code can be run without debugging.
Another topic not covered in the previously mentioned references is that for repetitive tasks, like
reading dictionary entries, reading files or calculating error norms needed for the evaluation a set
of python functions is provided. This set of functions is also tested automatically with the testing
framework pytest as part of the CI pipeline and precedes the more computationally expensive
OpenFOAM-specific jobs, as can be seen in fig. 11.

6. Results

6.1. Flat plate test case


The smallest test for model development and code verification is what we call the flat plate test
case. It implements the assumptions made in section 4.2 and was already implemented by e.g. [23].
The test consists of a flat plate with a prescribed constant concentration of 1 mol/m3 . Parallel
to this plate a flow is prescribed, that has no interaction with the wall, i.e. there is no velocity

22
boundary layer or velocity gradient. Initially and in the inflow, the concentration is set to zero, the
length of the plate is 0.005 m and the fluid velocity is 0.1 m/s. The timestep of 0.0002 s is used for
a physical duration of 0.1 s, which is double the time the fluid needs to be transported through the
domain. Figure 13 visualizes the setting.

Figure 13: Set-up of the flat plate test. Figure taken from [23].

With the possibilities described in section 5.1, it can be verified that fundamental parts of the
algorithm as described in section 4.3 are implemented correctly, like the boundary layer thickness δ
and the diffusion correction. Beneficially, there is an analytical solution to this model for compar-
ison. For these reasons the test enables insights into the capabilities of the SGS model and the
implementation thereof. This simple test case does circumvent most of the error-handling and also
convective flux correction must not have an effect on the outcome.
In fig. 14 the local Sherwood numbers of a parameter study along the boundary surface are
displayed. The parameter study has four levels of mesh refinement, where the cell size halves
between each execution from 40 µm to 5 µm, four different diffusivity levels spanning four orders of
magnitude from 5 × 10−8 m2 /s to 5 × 10−11 m2 /s and every of these setups is run with and without
active SGS model. Taking the length of the plate as reference length L, the Peclet number is within
the interval [104 , 107 ].
It is apparent, how without the SGS model, the Sherwood number cannot be computed in cases
with a boundary layer that is small in comparison to the cell size, i.e. when the cell size is big and
the diffusivity is small. In contrast to the linear interpolation with the SGS model the Sherwood
number is captured reasonably well in all cases. Note in fig. 14, that at some locations the Sherwood
number with the application of the SGS model is actually smaller than without it.

6.2. Satapathy-Smith axisymmetric bubble or droplet


The second test case for the SGS model mimics a moving droplet or bubble. It uses the axisym-
metric solution of velocity field from Satapathy and Smith in [24] for low Reynolds numbers. The
computational domain is a wedge with prescribed velocity. This test case was also implemented by
and we take the reference solution from [23]. This test case introduces additional complexity com-
pared to section 6.1, since there is flow non-parallel to the interface, therefore violating some of the
assumptions made when deriving the SGS mathematical model, as described in section 4.2. From
the visualization capabilities we can see in the rear part of the ”bubble” the exception handling
partially taking place, as there the concentration rises, not conforming to the assumption of a thin
boundary layer (with parallel flow) made in the derivation of the SGS. As in section 6.1 the inflow

23
Figure 14: Results for the parameter study over of the flat plate test case

24
and initial concentration is set to 0 mol/m3 and the interface is set to have a constant concentration
of 1 mol/m3 . The simulated physical duration is 0.6 s and the results shown here represent the final
state.
To see the best results with the SGS, it is important to set the interpolation schemes to
limitedLinear phi 1.0 for the concentration c and to linear for the interpolation of the scaled
diffusion coefficient as well as for the flux of U in the fvSchemes-file.
We run a parameter study consisting of four different diffusivities from
1 × 10−8 m2 /s to 1 × 10−11 m2 /s, four different mesh resolutions with the meshing parame-
ter N = [62, 124, 248, 496] as the number of faces along the half-circled interface. Every study is
run with and without employing the SGS and with a constant timestep of 0.0002 s. The bubble
diameter of 2 mm serves as reference length for the Sherwood number. It can be observed from
fig. 15 that without deploying the SGS, the local Sherwood number is almost constant and except
for the rear part of the bubble too low in case of small diffusivities and coarse meshes. When the
mesh resolution is fine and the diffusivity is high, the boundary layer is not as thin (in comparison
to the mesh cell size), and therefore the results of linear modeling and SGS modeling are similar.
In fig. 16 the diffusion coefficient after scaling with the SGS is displayed. In the cell layer
adjacent to the interface, the diffusion coefficient at the interface is visible, whilst in the next outer
cell layer the scaled diffusion coefficient at the faces between interface-adjacent cells and that same
cell is visualized. The third row of cells represents the uncorrected diffusion coefficient for reference.
The biggest correction is applied in the front part of the bubble, where the flow impinges
onto the interface and the boundary layer is very thin, therefore the derivative in surface normal
direction of the concentration is very big. In the rear part of the bubble the boundary layer has
grown and the main direction of the flow is no longer parallel to the surface, making the surface
concentration gradient in interface-normal direction much smaller and reasonable good represented
by linear interpolation. Therefore less correction is needed. To understand what is happening, we
would like to point the reader to fig. 9 again.

6.3. Marangoni migration of an air bubble in silicone oil


The velocity of a bubble/droplet within an unbounded fluid subjected to uniform temperature
gradient (∂T /∂z) and zero gravity field (g = 0) is defined by following expression [36]:

T 2 R ∂σ ∂T
vb,YBG =   , (57)
λi µi µo ∂T ∂z
2+ 2+3
λo µo

where R is the radius of the bubble, T is the fluid temperature, σ is the surface tension coefficient,
µi is the dynamic viscosity of the internal fluid, µo is the dynamic viscosity of the outside fluid and
λ is the thermal conductivity of the fluid.
In the case the Marangoni convection is caused by a specified fixed gradient of surfactant con-
centration along the interface, the bubble migration velocity can be expressed based on eq. (57) as
follows, see [20]:
Γ 2 R ∂σ ∂Γ
vb,YBG =   , (58)
µi µo ∂Γ ∂z
3 2+3
µo
where Γ is the concentration of surfactants at the interface.

25
Figure 15: Local Sherwodd numbers of a parameter study for Schmidt-numbers from 1 × 104 to 1 × 107

Figure 16: Visualization of corrected diffusion coefficients for the coarsest mesh with a diffusivity of 1 × 10−9 m2 /s

26
ρ, kg/m3 µ, Pas σ, N/m
Air 1.8 × 10−5 1.2 0.02
Oil 955 0.191 0.02

Table 1: Properties of air and silicone oil.

A numerical simulation is performed for an air bubble of radius rb = 1 mm moving through


the silicone oil. Relevant properties of both phases are listed in table 1. The bubble is assumed
to be of spherical shape and rigid and is fixed during the simulation. The spatial computational
domain consist of a volume of the spherical bubble filled with air and volume around the bubble
bounded by the spherical surface of radius r = 20rb and filled with silicone oil. The spatial domain
is discretised by the unstructured mesh consisting of 979′ 520 hexahedral cells.
The flow inside and outside of the bubble is driven by Marangoni forces due to the nonuniform
distribution of surfactant concentration along the interface, which is fixed during the simulation.
The distribution of surfactant along the bubble surface is defined by following linear function:
Γ z + 2rb
= , (59)
Γ∞ L
where Γ∞ is the saturated surfactant concentration and L is the length scale, whose value is set to
525 mm. The equation of state is also linear and reads as follows:
 
Γ
σ = σ s 1 − βs , (60)
Γ∞
where βs = RTσΓs ∞ is the elasticity number which amounts to 2 in this study.
The unsteady computation is performed with time-step size ∆t = 0.01 s using the first order
accurate Euler temporal discretisation scheme, until steady state is reached. The gradient of the
surface tension coefficient as well as the gradients of volume fields is calculated using the least square
method. The diffusion terms in the momentum and pressure equations are discretised using the
skew-corrected central differencing scheme, while the convective term in the momentum equation
is discretised using the linear-upwind scheme. At the outer side of the spatial domain the velocity
and normal derivative of pressure are set to zero and at the interface corresponding kinematic and
dynamics conditions are enforced.
The bubble rise velocity is calculated based on numerically determined volume flow rates through
the faces at the interface as follows:
P
f pos(ϕi,f )ϕi,f
vb = P , (61)
f pos(k · Si,f )(k · Si,f )

where ϕi,f is the volume flow rate of the fluid through the face f at the interface, Si,f is the area
vector of the face f at the interface and k is the unit direction vector of bubble motion. The bubble
velocity calculated using eq. (61) based on simulation results amounts to vb = 0.001 325 m/s, while
Γ
the corresponding analytical (eq. (58)) gives the migration velocity as vb,YBG = 0.001 329 5 m/s.
The velocity field inside and around the bubble along the plane y = 0 is shown in fig. 17.

6.4. Transport with the interface


We test the framework’s ability of adequate transport of a species along an interface with a
rotating droplet with a prescribed concentration. The droplet is represented in 2-D. The test setup

27
Figure 17: Velocity field inside and around the bubble along the plane y = 0 for the bubble marangoni migration
case.

28
follows the test done by [3, 2]. We prescribe the initial concentration distribution and the velocity.
For the evaluation we compute one rotation, what equals one second with our prescribed velocity
referring to an angular velocity ω = 1/s.
The initial distribution is given by
cos θ + 1
Γ(θ, τ = 0) = Γ0 , (62)
2
where Γ is the surface concentration, τ is the time, θ is the angle and Γ0 is the maximum initial
concentration. After a time τ the expected distribution from an analytical approach is given by
e−DI τ cos(θ − ωτ ) + 1
Γ(θ, τ ) = Γ0 , (63)
2
where DI is the diffusion in interface tangential direction.

Local surface concentration along the interface at solution time: 1


1e 7 Diffusivity = 0 m²/s
1.0

0.8

0.6

0.4

0.2 N: 10
Concentration

N: 20
N: 30
0.0 reference solution for Diffusivity: 0

1e 8 Diffusivity = 0.1 m²/s

2 N: 10
N: 20
N: 30
reference solution for Diffusivity: 0.1

0 45 90 135 180 225 270 315 360


Position on interface [°]
Figure 18: Results from the rotating droplet parameter study

For proper evaluation a mesh refinement study with a parameter variation of the diffusivity is
conducted. The results are visualized in fig. 18. We use a meshing parameter N = [10, 20, 30],
which correspond to 40, 80 and 160 surface cells along the interface. The timestep is set to 0.0005 s
regardless of the mesh size. The surface diffusivity is varied between 0 m2 /s and 0.1 m2 /s.
Visually it is hard to see a difference between the discretizations in fig. 18. In fig. 19 the error
norms and their rate of convergence are shown. The infinity norm and L1-norm are close to 1

29
Error norms Rate of convergence
1.5

1.4

Rate of convergence
10 10 1.3 L1, Diffusivity: 0
L2, Diffusivity: 0
L_inf, Diffusivity: 0
Error

1.2 L1, Diffusivity: 0.1


L2, Diffusivity: 0.1
L1, Diffusivity: 0 L_inf, Diffusivity: 0.1
L2, Diffusivity: 0 1.1
L_inf, Diffusivity: 0
10 11 L1, Diffusivity: 0.1 1.0
L2, Diffusivity: 0.1
L_inf, Diffusivity: 0.1
0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10 0.05 0.06 0.07 0.08 0.09 0.10
Relative cell size Relative cell size
(a) Error norms (b) Rate of convergences

Figure 19: Errors of the rotating droplet parameter study

and the L2-norm is around 1.5 for the resolutions analyzed. With the low error norms and their
respective rate of convergence we deduct, that our framework is well able to handle transport along
an interface.

6.5. Expanding fluid interface area


To test the frameworks conservation of surfactant mass for an expanding fluid interface area,
we implement a test case, that mimics an expanding droplet like it was done by [3, 2]. The initial
distribution of species is described and there is no diffusion happening. The initial distribution is
the same as in eq. (62). The droplet is represented by a wedge that is inflated with a prescribed
velocity and thereby the surface is stretched. The analytical solution to this setup is given by

cos θ + 1 r2
Γ(θ, r(τ )) = Γ0 0 2 , (64)
2 r(τ )
p
where r(τ ) = 3 3V0 (τ + τ0 ), where τ0 = 1/3s and r is the radius, respectively r0 is the initial
radius.
Figure 20 shows, how the species concentration per area at the interface has decreased after
2.5 s of bubble growth. The concentration precisely matches the expected result for all mesh res-
olutions tested. We conclude, that our framework is fit to simulate phenomena involving surface
expansion/shrinking.

7. Conclusions

We provide a thoroughly automatically tested implementation of the unstructured Finite-Volume


Arbitrary Lagrangian / Eulerian (ALE) Interface-Tracking (IT) method for simulating incompress-
ible, immiscible two-phase flows as an OpenFOAM module.
In conclusion, we have successfully developed a Subgrid-Scale (SGS) model hierarchy within an
Arbitrary Lagrangian-Eulerian (ALE) Interface Tracking OpenFOAM module, with configurable

30
1e 8 Surface concentration at time 2.5 [s]
2.5 N=40
N=60
N=80
reference solution from N=80

Surface concentration [mol/m²]


2.0

1.5

1.0

0.5

0.0
0 20 40 60 80 100 120 140 160 180
Position on interface [°]

Figure 20: Surface concentration after 0.5 s for different mesh resolutions

output parameters for in-depth analysis. The SGS model’s ability to accurately capture thin bound-
ary layers and steep gradients was demonstrated, alongside the critical need for flux correction not
only at the interfaces but also across adjacent cell boundaries. Furthermore, the Interface Tracking
module’s proficiency in accurately simulating surfactants on moving fluid interfaces interfaces and
their impact on surface tension and Marangoni flow was demonstrated.

8. Acknowledgments
Moritz Schwarzmeier and Tomislav Marić would like to thank the Federal Government and the
Heads of Government of the Länder, as well as the Joint Science Conference (GWK), for their
funding and support within the framework of the NFDI4Ing consortium. Funded by the German
Research Foundation (DFG) - project number 442146713.
Funded by the German Research Foundation (DFG) – Project-ID 265191195 – SFB 1194.
Part of this work was funded by the Hessian Ministry of Higher Education, Research, Science
and the Arts - cluster project Clean Circles.

References
[1] A. Alke, D. Bothe, M. Kröger, B. Weigand, Dominik Weirich, and H. Weking. Direct numerical
simulation of high schmidt number mass transfer from air bubbles rising in liquids using the
volume-of-fluid-method. Ercoftac Bulletin, 82:5–10, 2010.
[2] T. Antritter, T. Josyula, T. Marić, D. Bothe, P. Hachmann, B. Buck, T. Gambaryan-Roisman,
and P. Stephan. A two-field formulation for surfactant transport within the algebraic volume
of fluid method. Computers & Fluids, page 106231, March 2024. ISSN 0045-7930. doi:
10.1016/j.compfluid.2024.106231.
[3] Thomas Antritter. Numerical Simulation of Coupled Wetting and Transport Phenomena
in Inkjet Printing. PhD thesis, Technische Universität Darmstadt, Darmstadt, 2022. doi:
10.26083/tuprints-00021326.

31
[4] Dieter Bothe and Stefan Fleckenstein. A volume-of-fluid-based method for mass transfer pro-
cesses at fluid particles. Chemical Engineering Science, 101:283–302, 2013. ISSN 0009-2509.
doi: 10.1016/j.ces.2013.05.029.
[5] H. Brenner. Interfacial Transport Processes and Rheology. Butterworth-Heinemann series in
chemical engineering. Elsevier Science, 2013. ISBN 9781483292274.

[6] K. P. Chen, W. Saric, and H. A. Stone. On the deviatoric normal stress on a slip surface.
Physics of fluids A, 12(12):3280–3281, 2000.
[7] I. Demirdžić and S. Muzaferija. Numerical method for coupled fluid flow, heat transfer and
stress analysis using unstructured moving meshes with cells of arbitrary topology. Computer
methods in applied mechanics and engineering, 125:235–255, 1995.
[8] I. Demirdžić and M. Perić. Space conservation law in finite volume calculations of fluid flow.
International journal for numerical methods in fluids, 8:1037–1050, 1988.
[9] Kathrin Dieter-Kissling, Mohsen Karbaschi, Holger Marschaldenl, Aliyar Javadi, Reinhard
Miller, and Dieter Bothe. On the applicability of drop profile analysis tensiometry at high
flow rates using an interface tracking method. Colloids and Surfaces A: Physicochemical and
Engineering Aspects, 441:837–845, 2014. doi: 10.1016/j.colsurfa.2012.10.047.
[10] Kathrin Dieter-Kissling, Holger Marschall, and Dieter Bothe. Direct numerical simulation of
droplet formation processes under the influence of soluble surfactant mixtures. Computers &
Fluids, 113:93–105, 2015. doi: 10.1016/j.compfluid.2015.01.017.

[11] J. H. Ferziger and M. Perić. Computational methods for fluid dynamics. Springer Verlag,
Berlin-New York, 1995.
[12] Mathis Grosso, Guillaume Bois, and Adrien Toutant. Thermal boundary layer modelling
for heat flux prediction of bubbles at saturation: A priori analysis based on fully-resolved
simulations. International Journal of Heat and Mass Transfer, 222:124980, May 2024. ISSN
00179310. doi: 10.1016/j.ijheatmasstransfer.2023.124980.
[13] Dirk Gründing, Stefan Fleckenstein, and Dieter Bothe. A subgrid-scale model for reactive con-
centration boundary layers for 3D mass transfer simulations with deformable fluid interfaces.
International Journal of Heat and Mass Transfer, 101:476–487, October 2016. ISSN 0017-9310.
doi: 10.1016/j.ijheatmasstransfer.2016.04.119.

[14] H. Jasak. Error analysis and estimation for finite volume method with applications to fluid
flows. PhD thesis, Imperial College, University of London, 1996.
[15] John C. Slattery, Leonard Sagis, and Eun-Suok Oh. Interfacial Transport Phenomena. Springer
US, Boston, MA, 2007. ISBN 978-0-387-38438-2. doi: 10.1007/978-0-387-38442-9.

[16] Peter A. Kralchevsky, Krassimir D. Danov, and Nikolai D. Denkov. Chemical Physics of Colloid
Systems and Interfaces. In K. S. Birdi, editor, Handbook of Surface and Colloid Chemistry,
page 208. CRC Press, New York, second expanded and updated edition edition, 2002. ISBN
978-0-429-12509-6.

32
[17] Tomislav Marić, Jens Höpken, and Kyle G. Mooney. The OpenFOAM technology primer.
March 2021. doi: 10.5281/zenodo.4630596. Version OpenFOAM-v2012.1.
[18] Tomislav Marić, Dennis Gläser, Jan-Patrick Lehr, Ioannis Papagiannidis, Benjamin Lambie,
Christian Bischof, and Dieter Bothe. A Research Software Engineering Workflow for Compu-
tational Science and Engineering. August 2022. doi: 10.48550/arXiv.2208.07460.

[19] Tomislav Marić, Dennis Gläser, Jan-Patrick Lehr, Ioannis Papagiannidis, Benjamin Lambie,
Christian Bischof, and Dieter Bothe. A pragmatic workflow for research software engineering
in computational science. 2023. doi: 10.48550/ARXIV.2310.00960.
[20] Metin Muradoglu and Gretar Tryggvason. A front-tracking method for computation of in-
terfacial flows with soluble surfactants. Journal of Computational Physics, 227(4):2238–2262,
February 2008. doi: 10.1016/j.jcp.2007.10.003.
[21] S. Muzaferija and M. Perić. Computation of free-surface flows using the finite-volume method
and moving grids. Numerical heat transfer, Part B, 32:369–384, 1997.
[22] Chiara Pesci, Holger Marschall, Talmira Kairaliyeva, Vamseekrishna Ulaganathan, Reinhard
Miller, and Dieter Bothe. Experimental and Computational Analysis of Fluid Interfaces Influ-
enced by Soluble Surfactant. In Dieter Bothe and Arnold Reusken, editors, Transport Processes
at Fluidic Interfaces, pages 395–444. Springer International Publishing, Cham, 2017. ISBN
978-3-319-56602-3. doi: 10.1007/978-3-319-56602-3 15.
[23] Chiara Pesci, Andre Weiner, Holger Marschall, and Dieter Bothe. Computational analysis of
single rising bubbles influenced by soluble surfactant. Journal of Fluid Mechanics, 856:709–763,
2018. ISSN 0022-1120, 1469-7645. doi: 10.1017/jfm.2018.723.
[24] R. Satapathy and W. Smith. The motion of single immiscible drops through a liquid.
Journal of Fluid Mechanics, 10(4):561, 1961. ISSN 0022-1120, 1469-7645. doi: 10.1017/
S0022112061000366.

[25] M. Schwarzmeier, S. Raju, Z. Tuković, and T. Marić. Twophaseintertrackfoam source


code repository. GitLab, 2024. URL https://gitlab.com/interface-tracking/
twophaseintertrackfoamrelease/-/tree/v1.0?ref_type=tags. Accessed: 2024-03-24.
[26] Moritz Schwarzmeier, Suraj Raju, Zeljko Tuković, and Tomislav Marić. twophaseintertrack-
foam - data & results v1.0, 2024-03-24.

[27] P. D. Thomas and C. K. Lombard. Geometric conservation law and its application to flow
computations on movining grids. AIAA Journal, 17:1030–1037, 1979.
[28] Željko Tuković and Hrvoje Jasak. Simulation of free-rising bubble with soluble surfactant using
moving mesh finite volume/area method. In Proceedings of 6th International Conference on
CFD in Oil & Gas, Metallurgical and Process Industries, no. CFD08-072, 2008.

[29] Željko Tuković, Milovan Perić, and Hrvoje Jasak. Consistent second-order time-accurate
non-iterative PISO-algorithm. Computers & Fluids, 166:78–85, April 2018. doi: 10.1016/j.
compfluid.2018.01.041.

33
[30] Zeljko Tuković, Moritz Schwarzmeier, Suraj Raju, and Tomislav Marić. twophaseintertrack-
foam - code, 2024-03-24. doi: 10.48328/tudatalib-1395.
[31] Željko Tuković and Hrvoje Jasak. A moving mesh finite volume interface tracking method for
surface tension dominated interfacial fluid flow. Computers & Fluids, 55:70–84, February 2012.
doi: 10.1016/j.compfluid.2011.11.003.

[32] C. E. Weatherburn. Differential geometry in three dimension. Cambridge University Press,


London, 1972.
[33] Paul S Weber, Holger Marschall, and Dieter Bothe. Highly accurate two-phase species transfer
based on ale interface tracking. International Journal of Heat and Mass Transfer, 104:759–773,
2017.

[34] Andre Weiner and Dieter Bothe. Advanced subgrid-scale modeling for convection-dominated
species transport at fluid interfaces with application to mass transfer from rising bubbles.
Journal of Computational Physics, 347:261–289, 2017. ISSN 00219991. doi: 10.1016/j.jcp.
2017.06.040.

[35] Andre Weiner, Dirk Gründing, and Dieter Bothe. Computing Mass Transfer at Deformable
Bubbles for High Schmidt Numbers. Chemie Ingenieur Technik, 93(1-2):81–90, 2021. ISSN
1522-2640. doi: 10.1002/cite.202000214.
[36] N. O. Young, J. S. Goldstein, and M. J. Block. The motion of bubbles in a verti-
cal temperature gradient. Journal of Fluid Mechanics, 6(03):350, October 1959. doi:
10.1017/s0022112059000684.

34

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy