The geometricVofExt
package is an unofficial module of the geometric Volume of Fluid (VOF) method for OpenFOAM. This extension has a suite of pre- and post-processing tools alongside various solvers dedicated to two-phase flow dynamics. The pre-processing utilities are methodically assembled to initialize fraction fields of arbitrary shapes with optional dynamic mesh refinement, and to set up scalar, vector or tensor fields that vary based on the fraction values. These utilities are designed to enhance the flexibility and accuracy of multiphase flow simulations.
Moreover, the geometricVofExt
package features solvers that utilize the innovative SimPLIC method, which supports unstructured meshes composed of arbitrary polyhedral cells. The SimPLIC method integrates Piecewise Linear Interface Calculation (PLIC) with Simpson's rule, offering an accurate and efficient approach to solve the VOF equation. These solvers are also designed to simulate the phase change phenomena and floating body dynamics. Additionally, the solvers ensure high adaptability to complex simulation scenarios with optional dynamic mesh refinement.
The geometricVofExt
package is a comprehensive collection that includes libraries, applications, and tutorials. This package is meticulously organized to facilitate easy navigation, allowing users to effortlessly utilize the solvers and utilities included in the package. The package structure is shown below.
It should be noted that the utilities, solvers and tutorials under test
are used to replicate the results presented in this study (Dai, Dezhi, Haomin Yuan, Albert Y. Tong, and Adrian Tentner. "A Geometric VOF Method for Interface Flow Simulations." arXiv preprint arXiv:2402.05247 (2024)), which illustrates the concepts and efficiency of the SimPLIC method.
The SimPLIC
library embodies the implementation of the SimPLIC method.
Key features:
- Employs the PLIC-VOF method for precise interface capturing.
- Delivers efficient interface reconstructions for improved computational performance.
- Ensures accurate interface advections, maintaining the fidelity of the fluid interface over time.
- Implements Adaptive Mesh Refinement (AMR) that dynamically refines the mesh based on the fraction field.
- Accommodates overset meshes, enhancing the flexibility in handling complex geometries and moving boundaries.
- Supports run-time PLIC interface sampling.
The VOF equation solved in the SimPLIC
library is written as:
where
For incompressible two-phase flows without phase change, both Kunz
, Merkle
or SchnerrSauer
cavitation model in the phaseChangeTwoPhaseMixtures
library is adopted to evaluate
Scenario | Solver(s) | Note | ||
---|---|---|---|---|
|
|
|||
|
|
Cavitation models
|
When employing AMR, the geometric interpolation of fraction field during refinement can be achieved by setting the control parameter mapAlphaField
to true
within fvSolution->solvers->"alpha.*"
. This innovative fraction interpolation scheme, initially introduced in VoFLibrary, has been reimplemented in the SimPLIC
library. Its process is presented below, where the reconstructed interface within the parent cell is utilized to divide each of the child cells and compute their respective submerged volumes/fractions.
The CGALVof
library acts as a bridge between OpenFOAM meshes and CGAL geometric algorithms.
Key features:
- Delivers accurate geometric predicates while providing approximate geometric constructions.
- Capable of transforming an OpenFOAM surface mesh (
MeshedSurface<face>
) or an OpenFOAM mesh cell into a CGAL polyhedral surface (CGAL::Surface_mesh<P>
). - Allows for the direct creation of CGAL polyhedral surface meshes for boxes or spheres based on given dictionaries.
- Supports the import of external surface mesh files, compatible formats include
*.stl
,*.vtk
and*.ftl
. - Features a Boolean operation processor for the manipulation of two CGAL surface meshes.
- Enables the assessment of mesh cell locations in comparison to a designated surface mesh, typically denoting the interface between two distinct phases.
The current list of utilities distributed with geometricVofExt
is given below:
Utility | Description |
---|---|
setVofField |
Set the VOF field (alpha.* ) with arbitrary shapes.
|
setShapedFields |
Set field values using arbitrary shapes.
|
writeVtkSeries |
Generate and write a VTK series for a surfaces function object.
|
The following are solvers that utilize the SimPLIC method:
Solver | Description |
---|---|
interPlicFoam |
|
overInterPlicDyMFoam |
|
interPlicPhaseChangeFoam |
|
overInterPlicPhaseChangeDyMFoam |
|
wavePlicFoam |
|
The source code of geometricVofExt
is developed and maintained for OpenFOAM v2312
.
-
Make sure that
OpenFOAM v2312
has been compiled successfully on the target machine. -
Verify that
CGAL
has been successfully compiled/loaded. Otherwise, theCGALVof
library,setVofField
andsetShapedFields
will not be compiled.
- Create a directory named
modules
within$WM_PROJECT_USER_DIR
, then proceed to download thegeometricVofExt
source code into$WM_PROJECT_USER_DIR/modules
, i.e.,
source <installation path>/OpenFOAM-v2312/etc/bashrc
[ -d $WM_PROJECT_USER_DIR ] || mkdir $WM_PROJECT_USER_DIR
cd $WM_PROJECT_USER_DIR
[ -d modules ] || mkdir modules
cd modules
git clone https://github.com/daidezhi/geometricVofExt.git
- Check
CGAL
library:
source <installation path>/OpenFOAM-v2312/etc/bashrc
cd $WM_PROJECT_USER_DIR/modules/geometricVofExt
./checkCGAL
GMP
) and GNU Multiple Precision Floating-Point Reliably (MPFR
) Libraries are highly recommended for use with CGAL
. Otherwise, the setVofField
and setShapedFields
utilities will operate in a low-efficiency mode. If you are using a GCC compiler, one potential solution is:
source <installation path>/OpenFOAM-v2312/etc/bashrc
cd $WM_PROJECT_USER_DIR/modules/geometricVofExt
./compileCGALWithGMPAndMPFRUsingSystemGCC
- (Optional) Enable the utilities and solvers to produce iso-surfaces/plic-surfaces at the initial time (e.g.,
$t = 0$ ):
source <installation path>/OpenFOAM-v2312/etc/bashrc
cd $WM_PROJECT_USER_DIR/modules/geometricVofExt
./enableInitialTimeWriting
- Compile libraries, utilities and solvers of
geometricVofExt
:
source <installation path>/OpenFOAM-v2312/etc/bashrc
cd $WM_PROJECT_USER_DIR/modules/geometricVofExt
./Allwmake -j4
- (Optional) Build
waves2Foam
library andwavePlicFoam
solver (It is important to mention that the Gnu Scientific Library (GSL)2.7.1
is locally compiled for HPC users.):
source <installation path>/OpenFOAM-v2312/etc/bashrc
cd $WM_PROJECT_USER_DIR/modules/geometricVofExt
./compileWaves2FoamInOpenFOAM2312
./Allwmake -j4
- (Optional) Build utilities/solvers in
applications/test
:
source <installation path>/OpenFOAM-v2312/etc/bashrc
cd $WM_PROJECT_USER_DIR/modules/geometricVofExt
./enableReconstructionTimeTrackingInIsoAdvector
./Allwmake.test
3Dwaves.mp4 |
---|
3Dwave |
damBreakWithObstacle.mp4 |
oilDeaeration.mp4 |
---|---|
Dam break | Oil deaeration |
dropletImpact.mp4 |
bubbleRising.mp4 |
---|---|
Droplet impact | Bubble rising |
axisymmetricHemispherical.mp4 |
---|
Cavitation |
./tutorials/utilities/setVofField/
Case | Result |
---|---|
variousShapes |
|
variousShapesAMR1 |
|
variousShapesAMR2 |
./tutorials/utilities/setShapedFields/
Case | Result |
---|---|
variousShapesAMR1 |
./tutorials/solvers/interPlicFoam/
Case | Configuration |
---|---|
bubbleRising |
|
damBreakWithObstacle |
|
dropletImpact |
|
oilDeaeration |
./tutorials/solvers/overInterPlicDyMFoam/
Case | Result |
---|---|
floatingBody floatingBody_overInterDyMFoam |
floatingBody.mp4 |
twoSimpleRotors twoSimpleRotors_overInterDyMFoam |
twoSimpleRotors.mp4 |
twoSquaresOutDomain twoSquaresOutDomain_overInterDyMFoam |
twoSquaresOutDomain.mp4 |
./tutorials/solvers/wavePlicFoam/
Case | Result | Note |
---|---|---|
3Dwavs |
3Dwaves.mp4 |
Modified from waves2Foam. |
./tutorials/solvers/overInterPlicPhaseChangeDyMFoam/
Case | Result |
---|---|
twoSimpleRotors twoSimpleRotors_overInterPhaseChangeDyMFoam |
twoSimpleRotorsCavitation.mp4 |
./tutorials/verificationAndValidation/
Case | Configuration/Result | Note |
---|---|---|
axisymmetricHemispherical |
Mesh independence study is performed by using interPlicPhaseChangeFoam .This case is configured to verify the SimPLIC method for solving cavitating flows and includes the following solver(s):
References: |
./tutorials/test/
Case | Note |
---|---|
createIcosphere |
Create three different icospheres. |
calcSurfaceMeshNonUniformFlow |
Calculate tool meshes at various time instants using different initial surface meshes:
The tool surface meshes used in arXiv:2402.05247 are available at ./tutorials/test/toolSurfaceMesh . |
plicVofOrientationFoam |
Test four orientation schemes in SimPLIC :
|
plicVofAdvectionFoam |
Test SimPLIC-LS method using a hexahedral mesh of |
isoAdvectorAdvectionFoam |
Test isoAdvector-plicLS method using a hexahedral mesh of |
- 06/25/2024. Add support for waves2Foam. The associated solver
wavePlicFoam
is also available. - 05/13/2024. Initial release.
- Dezhi Dai, Nuclear Science & Engineering (NSE) Division, Argonne National Laboratory (ANL), [email protected] (Main developer)
- Haomin Yuan, NSE, ANL (PI of HPC4EI project, SimPLIC development and review)
- Albert Y. Tong, Department of Mechanical and Aerospace Engineering (MAE), University of Texas at Arlington (UTA) (SimPLIC development and review)
- Adrian Tentner, NSE, ANL (SimPLIC development and review)
- Vimalan Adaikalanathan, MAE, UTA (AMR testing)
geometricVofExt
is released as an extension of OpenFOAM: you can
redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.
See the file COPYING in this directory or
http://www.gnu.org/licenses/, for a
description of the GNU General Public License terms under which you
may redistribute files.
This work was initially funded by the U.S. Department of Energy High-Performance Computing for Energy Innovation (HPC4EI) program, support for this program was provided by the U.S. DOE Office of Science, Office of Fossil Energy, Office of Energy Efficiency & Renewable Energy.
This work was conducted at Argonne National Laboratory and was supported by the U.S. Department of Energy, Office of Nuclear Energy, under Contract DE-AC02-06CH11357.