REEF3D UserGuide Compressed
REEF3D UserGuide Compressed
REEF3D 24.12
Contact
Hans Bihs
Professor
Marine Civil Engineering
NTNU Trondheim
ii
Contents
1 Introduction 1
2 Model Overview 3
2.1 CFD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 NHFLOW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 FNPF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.4 SFLOW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 Functions 7
3.1.1 SFLOW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.1.2 FNPF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.1.3 NHFLOW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.3 C :: Concentration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.4 D :: Discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.7 I :: Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
3.8 M :: MPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
3.10 P :: Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3.11 S :: Sediment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
3.12 T :: Turbulence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
3.14 X :: 6DOF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
3.15 Z :: FSI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
iii
4 Compiling the Code 99
4.4.3 Additional step for Windows for visualization using Paraview . . . . . 105
6 Post-Processing 111
iv
9 Tutorial | REEF3D::FNPF 125
v
1. Introduction
Todays ever increasing computational resources make it possible to compute incredible large
flow problems. Every company and research institution interested in performing serious CFD
(computational fluid dynamics) simulations has now the real option to buy and maintain
supercomputers at reasonable costs. The limiting factor of such simulations becomes less the
problem size but rather the time it takes for the engineer to generate grids, start simulations
and post-process the results. With the increasing speed of high-performance computer
clusters, the amount of grid points is growing. As Peric Peric [2004] writes, in the future
the "computational points in a mesh will be counted in billions", the issue of grid quality will
become less relevant because the mesh will be very fine in any case.
With these observations in mind, the numerical model REEF3D was designed under the
following premises:
• immersed boundary
• STL file input
• easy natural bathymetry handling
3. increasing computer performance enables larger computations, but can only be exploited
in parallel
• C++ Programming
• object oriented code
• MPI, an industry standard for high-performance computing
1
The source code of REEF3D is available at www.reef3d.com and is published under the GPL
license, version 3. Open-source CFD software has several advantages. All code developments
have the potential to benefit a large audience, including students, researchers and engineers
working on academic or commercial problems. The usage of open-source CFD programs
comes at no cost. It gives the people who work with the software the opportunity to gain
insights into how the numerical model works and build up valuable competence and experience
in this field. This makes contributions to open-source software a sustainable investment in
a lot of ways. Open-source also means that REEF3D is more flexible and more open to
innovation.
2
2. Model Overview
2.1 CFD
REEF3D::CFD is a three-dimensional Navier-Stokes solver. From the start, the focus of this
model was to solve complex free surface dynamics through two-phase flow interface capturing.
In order to ensure high levels of accuracy while maintaining robustness, REEF3D::CFD is
designed on a staggered rectilinear grid. This results in tight pressure-velocity coupling,
crucial for stable two-phase flow modeling with its significant density and pressure jumps
across the interface.This aspect comes especially into play when modeling waves, where
REEF3D’s implementation avoids any form of spurious air flow over the wave free surface.
The rectilinear mesh enables the use of high-order conservative finite differences for the
discretization of the governing equations. As a result, a relatively coarse mesh can be used
when using REEF3D::CFD as a numerical wave tank. A potential loss of flexibility due to
the mesh arrangement is avoided through the immersed boundary treatment for complex
solid geometries. Mesh generation is performed in the accompanying open-source software
DIVEMesh. This pre-processing tool handles solid geometries from STL files, bed interpolation
from measured data points, domain decomposition and hydrodynamics coupling. The source
code is written in modular C++, enabling straightforward expansion and maintenance of the
model. The unique characteristics of REEF3D::CFD are:
The flow solver can be used together with the following multiphysics solvers:
• Sediment transport
• Pollutant transport
• Heat transfer
3
• Turbulence modeling: RANS & LES
• Non-Newtownian Rheology
2.2 NHFLOW
• High-order discretization in space (5th-order WENO) for the free surface boundary
conditions
2.3 FNPF
REEF3D::FNPF is a fully nonlinear potential flow model. The starting point for this model
are the unique characteristics of the Norwegian coast: The water depth changes rapidly from
deep to shallow water, the coastline is highly irregular and an immense number of small islands
complicate meshing. REEF3D::FNPF is tailor-made to incorporate solutions to the Norwegian
coastal features, and consequently the model can be used for wave propagation from deep
to shallow water while taking care of complex coastlines in an easy to use way. In addition,
REEF3D::FNPF has proved to serve as an highly accurate and efficient tool to generate
4
typical 3-hour sea states used for designing offshore and coastal structures. Here, the selected
numerical approach has shown to be so robust that extreme sea states with steep nonlinear
waves including breaking wave kinematics can be handled. Up to now, REEF3D::FNPF has
been used for a range of coastal and offshore industry projects. The unique characteristics of
REEF3D::FNPF are:
• High-order discretization in space (5th-order WENO) for the free surface boundary
conditions
2.4 SFLOW
• Full Parallelization with domain decomposition and MPI, delivering very good scalability
• Quadratic dynamic pressure assumption, leading to correct phase velocities for shallow
and intermediate wave conditions
5
3. Functions
A file called “ctrl.txt” is used to give the necessary data to the program. The structure of this
file is as follows: a capital letter and a number are used to enable different algorithms followed
by the corresponding variables. The “ctrl.txt” file needs to be stored in the same location as
the executable REEF3D. In front of the variables in the definition of the algorithms you find
either an “int” or a “float”. For “int” an integer needs to be given, for “float” a floating-point
number is expected by the program. It is possible to enter comments in the “ctrl.txt” by
entering the followed by the comment, but take care not to include capital letters as that
will cause the program to look for a valid command option.
Most of the options in this section (A) will determine the discretization and other parameters
for the first three models listed above. The validity of the functions for the particular models
is denoted by the filled circle beside the function under the columns S (SFLOW), F (FNPF),
N (NHFLOW) and C (CFD) in all the sections for functions in this manual.
Commands with an asterix (∗) can be issued multiple times to create multiple instances of
the call.
The commands in this section are used to select the hydrodynamic model that is to be
activated for the simulation. This will determine the governing equations that will be used for
the simulations. The different models available in REEF3D are:
• S : SFLOW: A depth-averaged shallow water equations model, that solves the non-
hydrostatic pressure.
7
Valid for:
S F N C
3.1.1 SFLOW
# # #
A 210 int Time scheme for SFLOW momentum equations
2 2nd-order Runge-Kutta
3 3rd-order Runge-Kutta
default: 3
# # #
A 211 int Convection scheme for SFLOW momentum equations
1 FOU
2 CDS2
4 WENO FLUX
5 WENO HJ
6 High Resolution TVD scheme with Minmod limiter
7 High Resolution TVD scheme with van Leer limiter
8 High Resolution scheme with Smart limiter
default: 4
# # #
A 212 int Turn on diffusion for SFLOW velocities
0 OFF
1 explicit
2 implicit
default: 0
8
# # #
0 OFF
1 ON
default: 1
# # #
1 slip
2 no-slip
default: 2
# # #
0 OFF
1 ON
default: 0
# # #
0 hydrostatic
1 linear non-hydrostatic pressure
2 quadratic non-hydrostatic pressure
default: 2
# # #
0 OFF
1 standard
2 bounded
default: 1
# # #
9
A 223 double Blending of previous and current pressure for gradient calculation
default: 0.5
# # #
0 OFF
1 ON
default: 1
# # #
1 FOU
2 CDS2
4 WENO FLUX
default: 1
# # #
0 OFF
1 ON
default: 0
# # #
0 OFF
1 ON
default: 1
# # #
default: 0.00005
# # #
10
A 245 double Use relative wetting-drying threshold value (dx multiplier)
default: 0.001
# # #
A 246 int Turn on breaking wave algorithm (turns off dynamics pressure for breaking waves)
0 OFF
1 ON
default: 1
# # #
default: 0.6
# # #
A 248 int Turn on breaking wave persistance algorithm (turns off dynamics pressure for
breaking waves)
0 OFF
1 ON
default: 1
# # #
default: 0.3
# # #
0 OFF
1 k-ϵ model
3 Prandtl length scale model
4 Parabolic eddy-viscosity model
default: 0
# # #
11
A 261 double Length scale factor for length scale turbulence model
default: 0.267
# # #
default: 0.0667
3.1.2 FNPF
# # #
# # #
0 OFF
1 CDS2
2 CDS4
4 WENO5
5 WENO5 with wetting-and-drying
6 CDS6
7 WENO7
default: 5
# # #
2 CDS2
3 CDS4
default: 2
# # #
12
A 320 int Order of spatial discretization for Laplace equation
The 4th-order discretization requires the HYPRE AI solvers and preconditioners.
1 CDS2
2 CDS4
default: 1
# # #
1 2nd-order
2 4th-order
default: 1
# # #
A 329 int Order of Dirichlet wave generation and active wave absorption velocity potential
extrapolation
1 1st-order
2 2nd-order
default: 1
# # #
default: 0.0
# # #
default: 0.0
# # #
0 OFF
1 ON
default: 1
13
# # #
default: 0.001
# # #
default: 0.01
# # #
A 346 double Damping viscosity within the coastline, modulated by the coastline relaxation
zone.
default: 1.86
# # #
1 eta and Fi
2 eta
3 Fi
default: 2
# # #
1 eta and Fi
2 eta
3 Fi
default: 2
# # #
0 OFF
1 viscosity based
2 filter based
default: 0
14
# # #
0 OFF
1 shallow water
2 deep water
3 shallow and deep water
default: 0
# # #
A 352 int Added filtering for breaking when viscosity breaking algorithm is used for additional
robustness, for breaking in:
0 OFF
1 shallow water
2 deep water
3 shallow and deep water
default: 1
# # #
default: 0.6
# # #
default: 1.25
# # #
1 eta and Fi
2 eta
3 Fi
default: 1
# # #
15
A 361 int Breaking wave filter algorithm: outer iterations
default: 5
# # #
default: 2
# # #
default: 1.86
# # #
A 368 int Breaking wave viscosity based algorithm inside numerical beach relaxation zone
0 OFF
1 ON
default: 0
3.1.3 NHFLOW
# # #
2 2nd-order Runge-Kutta
3 3rd-order Runge-Kutta
default: 2
# # #
1 HLL
2 HLLC
default: 1
# # #
16
A 514 int Reconstruction scheme for NHFLOW momentum equations
# # #
1 slip
2 no-slip
default: 2
# # #
0 OFF
1 ON
default: 1
# # #
0 hydrostatic
1 PJM for non-hydrostatic pressure
2 Pressure correction for non-hydrostatic pressure
default: 2
# # #
default: 3.0
# # #
default: 0.001
17
# # #
0 OFF
2 k-ω model
default: 0
# # #
0 OFF
2 Wu
default: 0
# # #
0 OFF
2 k-ω model
default: 0
# # #
Valid for:
S F N C
# #
0 OFF
1 ON
default: 1
18
# #
1 slip
2 no-slip
default: 2
# #
1 extrapolation
2 reflection
default: 1
# # #
0 OFF
1 fixed location (see B 32)
2 moves with free surface location at inlet
3 atmospheric pressure at lid
4 map zero-pressure contour to free surface
default: 0
default: 0.0
B 32 double x-, y-, and z-location for fixed pressure reference value location
If not given when used together with B 30 1, the inlet location with the smallest x- and
y-coordinates are used.
# # #
19
B 33 int Type of pressure reference gage normalization For certain configurations, inline
pressure normalization causes instabilities.
1 virtual
2 inline
default: 1
default: 0.001
# # #
default: nan
# # #
default: nan
# # #
default: nan
# # #
default: nan
# # #
default: nan
# # #
20
B 56 double Wall 6 roughness
default: nan
0 OFF
1 constant inflow
2 hydrograph inflow
3 hydrograph outflow
4 hydrograph inflow and outflow
default: 0
# # #
1 constant velocity
2 logarithmic profile bed
3 constant velocity only for phase 1
4 logarithmic profile only for phase 1, bed
5 logarithmic profile only for phase 1, sidewalls and bed
default: 2
# # #
B 71 * double value, double distance, double line angle, double line x-origin, double line
y-origin; for use of relaxation method for fixed water level for initialization only
default: na
# # #
21
B 75 int Outflow boundary condition
1 zero gradient
2 convection condition
default: 1
# #
0 hydrostatic pressure
1 zero gradient pressure
default: 1
# #
# # #
B 81 double x-location for focus, y-location for focus, time of wave focusing
(For a 2D simulation set y-location to 0.0)
1 NewWave
2 Spectrum
3 Constant wave steepness spectrum
4 Constant wave amplitude
default: 1
22
B 83 double Gain factor per wave component for constant wave steepness spectrum focused
waves. The amplitudes of the wave components Ai are calculated using Ai = B83
ki . The
frequency distribution is calculated as defined in B 84.
default: 0.0025
B 85 int Wave spectrum for irregular waves In case of the spectrum file, provide a ”spectrum-
file.dat”, with the two columns ”ω” and ”S”.
1 Pierson-Moskowitz
2 JONSWAP
3 Torsethaugen
4 Wavepackets
5 Wavepackets for steep waves
6 Gaussian Wavepackets
10 spectrum file
21 Goda JONSWAP
22 TMA
default: 1
default: 10
B 87 double ωs and ωe for irregular wave generation When not given, the model will calculate
the values automatically.
23
B 88 double γ for irregular wave generation with JONSWAP spectrum
default: 3.3
B 89 int Turn on wave generation optimization through space-time decomposition for relax-
ation method. Currently supported for the following wave theory options:
B 92 5, B 92 31, B 92 41, B 92 51
0 OFF
1 ON
default: 0
B 90 int Enable ioWave for numerical wave tank This parameter turns on the numerical
wave tank. It is the counterpart to B60 for wave simulations. Different options for
generating and dissipating waves exist.
0 OFF
1 ON
default: 0
B 92 int Wave type Different wave theories can be used as input for the numerical wave tank.
It is important, to check beforehand whether the selected theory fits the given wave
conditions consisting of wave height, wave length/wave period and still water level.
For the piston wavemaker theory with η timeseries input, provide a “wavemaker_eta.dat”
input file with two columns “t” and “η”
For the piston and flap wavemaker theories, provide a ”wavemaker.dat” input file with
two columns “t” and “X” or “t” and “β”, depending on input from B 116.
24
For the double-hinged flap wavemaker, two “X” or two “β” columns are expected. For
giving two “X” columns, this will be the total exitation at the end of each flap. For
giving two “β” columns, the second angle is the additional exitation of the second flap.
For the wave reconstruction, provide a “waverecon.dat” input file with three columns
giving “A” and “ω” and phase “φ” for each of the harmonic wave components.
Wave theories which prescribe the potential directly are marked with a ∗ and are suitable
for relaxation zone wave generation in FNPF. Those wave theories without ∗ require
either B 98 3 or B 98 4 for FNPF.
25
Wave Generation Compatibility
B 92 Wave Type SFLOW FNPF NHFLOW CFD
1 Shallow Water Waves D+R D D+R D+R
2 Linear Waves D+R D+R D+R D+R
3 Deep Water Waves D+R D+R D+R D+R
4 2nd-order Stokes Waves D+R D+R D+R D+R
5 5th-order Stokes Waves (Fenton) D+R D+R D+R D+R
6 Shallow Water Cnoidal Waves D+R D D+R D+R
7 1st-order Cnoidal Waves D+R D D+R D+R
8 5th-order Cnoidal Waves D+R D D+R D+R
9 1st-order Solitary Wave D+R D D+R D+R
10 3r d-order Solitary Wave D+R D D+R D+R
11 5th-order Stokes Waves (Skjelbreia) D + R D D+R D+R
20 Piston Wavemaker, η timeseries D D D D
21 Piston Wavemaker D D D D
22 Flap Wavemaker D D D D
23 Double-hinged Flap Wavemaker D D D D
31 1st-order Irregular Waves D+R D+R D+R D+R
32 2nd-order Irregular Waves (Longuet- D + R D+R D+R D+R
Higgins)
33 2nd-order Irregular Waves (Schäf- D + R D+R D+R D+R
fer)
41 1st-order Focused Waves D+R D+R D+R D+R
42 2nd-order Focused Waves (Longuet- D + R D+R D+R D+R
Higgins)
43 2nd-order Focused Waves (Schäf- D + R D+R D+R D+R
fer)
51 Wave Reconstruction with 1st-order D + R D+R D+R D+R
Irregular Waves
52 Wave Reconstruction with 2nd- D + R D+R D+R D+R
order Irregular Waves (Longuet-
Higgins)
53 Wave Reconstruction with 2nd- D + R D+R D+R D+R
order Irregular Waves (Schäffer)
61 Hydrodynamic Coupling HDC D+R D+R D+R D+R
70 Steady Surface Gravity Wave SSGW R
Table 3.1: Wave generation compatibility for B 92, D = Dirichlet/Neuman generation; R = Relaxation
generation.
26
B 93 double wave height, wave period
The main wave parameters are given here. For regular waves the first values is H,
whereas for irregular waves, the first value is the significant wave height. Alternatively
B91 can be used, when the wavelength is known.
default: na
B 98 int Wave Generation Method Relaxation Method 2 ramps up the values for the input
wave within one zone following the function by Jacobsen et al. [2012]. Relaxation
Method 1 uses two zones to generate the waves Afshar [2010]. For the Dirichlet type,
waves are generated by assigning the values for the free surface and the velocity in the
inflow boundary only.
0 OFF
2 Relaxation Method 2
3 Dirichlet
4 Dirichlet with Active Absorption, based on shallow water theory
default: 0
B 99 int Numerical Beach Method Both relaxation methods dissipate the wave energy by
ramping the free surface down to the still water level, the velocity to the zero and the
pressure to its hydrostatic distribution for still water conditions. Typically the length of
the dissipating relaxation zone should be two wavelengths. The Active Wave Absorption
avoids reflections by generating a wave opposite of the reflected wave, thus canceling
it out. The method is more efficient in computational terms, as it does not require
additional space.
In order to use the Active Wave Absorption beach, keep in mind to use the active beach
boundary condition in the C data set in DIVEMesh.
27
0 OFF
1 Relaxation Method 1
2 Relaxation Method 2
3 Active Wave Absorption, based on shallow water theory
4 Active Wave Absorption, based on intermediate water theory
5 Active Wave Absorption, using a flap wavemaker (see B 123)
default: 0
0 OFF
1 On, based on wave period
2 On, based on simulation time
default: 0
B 102 double Ramp function for duration in wave periods or simulation time (see B 101)
default: 1.0
B 105 double angle β, x and y coordinates for the distance origin for the generated wave
B 106 * double angle β, x and y coordinates for the distance origin of wave generation
relaxation zone
B 107 * double xstar t , xend , ystar t , yend and acting distance d of numerical beach relaxation
zones.
As default, without any user input for B 107, a relaxation zone for the numerical
beach is created at the end of the domain, i.e. at the maximum x-coordinates of the
domain, with an orientation perpendicular to the x-axis and with infinite length using
28
the relaxation distance from B 96. If user input is provided for B 107, the default
relaxation zone will not be created and the input from B 96 will not be used. Instead
the start, end and acting distance of the relaxation zone of the numerical beach are
provided through B 107. Multiple numerical beach generation zones are possible.
B 108 double xstar t , xend , ystar t , yend and acting distance d of wave generation relaxation
zones.
As default, without any user input for B 108, a relaxation zone for the wave generation
is created at the beginning of the domain, i.e. at the minimu x-coordinates of the
domain, with an orientation perpendicular to the x-axis and with infinite length using
the relaxation distance from B 96. If user input is provided for B 108, the default
relaxation zone will not be created and the input from B 96 will not be used. Instead
the start, end and acting distance of the relaxation zone of the wave generation are
provided through B 108.
B 112 double zstar t zhinge2 , zend for the double-hinged flap wavemaker
default: 0.0 ; 0.0 : 0.0
# # #
B 115 int Vertical velocity component for flap wavemaker kinematics
0 OFF
1 ON
default: 0
29
B 116 int Flap wavemaker kinematics input as paddle motion or angle
1 X(t)[m]
2 β(t)[r ad]
default: 1
default: 0.0
default: -90◦
# # #
default: 0.0
# # #
B 125 double y-coordinate for hydrodynamic coupling slice selection for HDC input
default: na
# # #
0 OFF
1 ON
default: 0
0 OFF
30
1 Cosine squared
2 Mitsuyasu
default: 0
default: 0.0◦
default: 1
B 138 int Seed number 1 and int Seed number 2 for the random phase generation of
multi-directional irregular waves
If not given, the random numbers are based on the computer clock.
default: na
31
B 139 int Seed number for the random phase generation of irregular waves
IMPORTANT: seed numbers are not machine transferable. In order to reliably repeat a
given wave spectrum, the wave component file (see REEF3D_Log-Wave folder) needs
to be re-used and renamed to ’waverecon.dat’.
# # #
B 160 int Number of vertical layers for obtaining depth-averaged velocities in the wave
generation for REEF3D::SFLOW
default: 5
# # #
B 170 int Number of Fourier modes for calculating the steady surface gravity wave (B 92
70)
default: 1024
# # #
B 181 double x-motion amplitude, frequency, phase change
default: 0.0 ; 0.0 ; 0.0
# # #
B 182 double y-motion amplitude, frequency, phase change
default: 0.0 ; 0.0 ; 0.0
# # #
B 183 double z-motion amplitude, frequency, phase change
default: 0.0 ; 0.0 ; 0.0
# # #
B 191 double angle for rotation around x-axis, rotation frequency, y-coordinate, z-coordinate
default: 0.0 ; 0.0 ; 0.0 ; 0.0
32
# # #
B 192 double angle for rotation around y-axis, rotation frequency, x-coordinate, z-coordinate
# # #
# # #
1 inflow
2 outflow
default: 2
# # #
B 240 * double Darcy porous media as rectangular box: C, D, xstar t , xend , ystar t , yend , zstar t , zend
# # #
0 OFF
1 ON
default: 1
# # #
0 OFF
1 ON
default: 1
33
# # #
0 OFF
1 ON
default: 1
# # #
default: 0.0
# # #
B 264 double KC number VRANS porous media force source terms for the momentum
equations
# # #
B 270 * double VRANS porous media as rectangular box xstar t , xend , ystar t , yend , zstar t , zend ,
n, d50 , α, β
default: 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ;
# # #
B 274 * double VRANS porous media as vertical cylinder: xcenter , ycenter , zstar t , zend , r adi us,
n, d50 , α, β
default: 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ;
# # #
B 281 * double VRANS porous media as wedge in x-direction: xstar t , xend , ystar t , yend , zstar t ,
zend , n, d50 , α, β
default: 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ;
# # #
B 282 * double VRANS porous media as wedge in y-direction: xstar t , xend , ystar t , yend , zstar t ,
zend , n, d50 , α, β
34
default: 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ;
# # #
B 291 * double VRANS porous media as plate in x-direction: xstar t , xend , ystar t , yend , zstar t ,
zend , dthickness , n, d50 , α, β
default: 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ;
# # #
0 OFF
1 VRANS source terms
2 turn off turbulence inside porous media
default: 1
# # #
0 OFF
1 ON
default: 1
# # #
default: 2.0
# # #
B 310 * double VRANS vegetation as rectangular box. N is the number of cylinders per unit
area, D the diameter of the cylinders and Cd the drag coefficient.
xstar t , xend , ystar t , yend , zstar t , zend , N, D, Cd
default: 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ;
# # #
B 321 * double VRANS vegetation as wedge in x-direction. N is the number of cylinders per
unit area, D the diameter of the cylinders and Cd the drag coefficient.
xstar t , xend , ystar t , yend , zstar t , zend , N, D, Cd
35
default: 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ;
# # #
B 322 * double VRANS vegetation as wedge in y-direction. N is the number of cylinders per
unit area, D the diameter of the cylinders and Cd the drag coefficient.
xstar t , xend , ystar t , yend , zstar t , zend , N, D, Cd
default: 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ;
# #
default: na
# #
default: na
# #
default: na
# #
default: na
# #
default: na ; na ; na
# #
default: na
36
# #
0 OFF
1 ON
default: 0
# #
0 OFF
1 ON
default: 0
# #
0 OFF
1 ON
default: 0
# #
# # #
37
B 441 * patchBC as rectangular box:
int ID, f ace, double xstar t , xend , ystar t , yend , zstar t , zend
The patch boundary condition will convert solid boundaries to inflow or outflow conditions.
Patches are addressed with the ID, with which it is possible to prescribe different flow
conditions (see B 411 - B 417).
# # #
3.3 C :: Concentration
Valid for:
S F N C
# # #
default: 10.0
# # #
default: 0.0
# # #
default: 10.0
# # #
38
default: 0.0
# # #
default: 0.0
# # #
0 OFF
1 2nd-order Adams-Bashfort
2 2rd-order TVD Runge-Kutta
3 3rd-order TVD Runge-Kutta
default: 0
# # #
1 FOU
2 CDS2
3 QUICK
4 WENO FLUX
5 WENO HJ
6 CDS4
10 High Resolution TVD scheme with Minmod limiter
11 High Resolution TVD scheme with van Leer limiter
12 High Resolution TVD scheme with Umist limiter
13 High Resolution TVD scheme with Sweby limiter
14 High Resolution TVD scheme with Superbee limiter
15 High Resolution scheme with Smart limiter
16 High Resolution TVD scheme with Limo3 limiter
42 High Resolution TVD scheme with Weller limiter
default: 0
# # #
39
0 OFF
1 explicit
2 implicit (automatic for implicit convection discretization)
default: 0
# # #
# # #
default: 0.0 m
# # #
default: 0.0 m
# # #
default: 0.0 m
# # #
# # #
# # #
40
default: 1.0 · 107 m
# # #
# # #
3.4 D :: Discretization
Here the discretization of the convection terms in the momentum equations is chosen. All
methods are implemented in terms of conservative finite differences. The exception is WENO
HJ, which is the non-conservative form of the WENO scheme.
Valid for:
S F N C
# #
0 OFF
1 FOU
2 CDS2
3 QUICK
4 WENO5 FLUX
5 WENO5 HJ
6 CDS4
7 WENO3 FLUX
8 WENO3 HJ
10 High Resolution TVD scheme with Minmod limiter
11 High Resolution TVD scheme with van Leer limiter
12 High Resolution TVD scheme with Umist limiter
13 High Resolution TVD scheme with Sweby limiter
14 High Resolution TVD scheme with Superbee limiter
15 High Resolution scheme with Smart limiter
16 High Resolution TVD scheme with Limo3 limiter
41
42 High Resolution TVD scheme with Weller limiter
default: 4
# #
0 OFF
1 FOU
2 CDS2
default: 2
# #
0 OFF
1 explicit
2 implicit
default: 2
# #
D 21 int print out diffusion solver time and iteration for implicit diffusion and explicit
convection discretization
0 OFF
1 ON
default: 0
# # #
D 30 int pressure algorithm The projection method (PJM) works only together with ex-
plicit time advancement schemes, while all SIMPLE type methods work with implicit
timestepping.
0 OFF
42
1 PJM CORR
default: 1
Valid for:
S F N C
# # #
1 One-Phase
2 Two-Phase
default: 2
# # #
0 OFF
1 2nd-order Adams-Bashfort
2 2rd-order TVD Runge-Kutta
3 3rd-order TVD Runge-Kutta
default: 3
# # #
0 OFF
1 PLS with tri-linear interpolation
2 PLS with tri-cubic interpolation
default: 0
# # #
default: 64
# # #
43
F 33 double factor for particle array allocation
default: 0.4
# # #
default: 1000
# # #
1 FOU
2 CDS2
3 QUICK
4 WENO5 FLUX
5 WENO5 HJ
6 CDS4
7 WENO3 FLUX
8 WENO3 HJ
10 High Resolution TVD scheme with Minmod limiter
11 High Resolution TVD scheme with van Leer limiter
12 High Resolution TVD scheme with Umist limiter
13 High Resolution TVD scheme with Sweby limiter
14 High Resolution TVD scheme with Superbee limiter
15 High Resolution scheme with Smart limiter
16 High Resolution TVD scheme with Limo3 limiter
42 High Resolution TVD scheme with Weller limiter
default: 5
# # #
default: 0.5
# # #
0 OFF
44
3 3rd-order TVD Runge-Kutta
11 Geometric reinitialization with 3rd-order TVD Runge-Kutta
default: 3
# # #
F 42 double length for level set initial reinitialization, overrides maximum domain length
default: -1.0
# # #
default: 0.55
# # #
default: 3
# # #
default: 2.1
# # #
0 OFF
1 Volume correction for reinitialization step using volume from previous time step
2 Volume correction for level set and reinitialization step using volume from previous
time step
3 Volume correction for level set and reinitialization step using total volume balance
default: 0
# # #
default: 0
45
# # #
0 OFF
1 ON
default: 1
# # #
1 Inflow fixed
2 Outflow fixed
3 Fix Both
4 Fix None
default: 2
# # #
default: 0.0 m
# # #
default: 0.0 m
# # #
default: 0.0 m
# # #
# # #
46
default: 1.0 · 107 m
# # #
# # #
# # #
# # #
# # #
# # #
47
# # #
# # #
F 70 double* Phase 1 ini as rectangular box: xstar t , xend , ystar t , yend , zstar t , zend
# # #
F 71 double* Phase 2 ini as rectangular box: xstar t , xend , ystar t , yend , zstar t , zend
# # #
F 72 double* Regions for free surface elevation xstar t , xend , ystar t , yend , hw ater lev el
# # #
F 80 int time scheme VOF Currently, the VOF implementation is in beta and for testing
purposes only. The algorithms for open channel flow and wave generation only work for
the level set method.
1 2nd-order Adams-Bashfort
3 3rd-order TVD Runge-Kutta
default: 0
# # #
default: 1.0
# # #
F 85 int convection discretization VOF Recommended scheme for VOF convection is HRIC
modified.
1 FOU
48
2 CDS2
3 QUICK
4 WENO FLUX
5 WENO HJ
6 CDS4
10 High Resolution TVD scheme with Minmod limiter
11 High Resolution TVD scheme with van Leer limiter
12 High Resolution TVD scheme with Umist limiter
13 High Resolution TVD scheme with Sweby limiter
14 High Resolution TVD scheme with Superbee limiter
15 High Resolution scheme with Smart limiter
16 High Resolution TVD scheme with Limo3 limiter
42 High Resolution TVD scheme with Weller limiter
51 HRIC
52 HRIC modified
53 CICSAM
default: 0
# # #
F 150 int Benchmarks This will initialize the level set funciton and the velocity field according
to the benchmark cases
0 OFF
1 Vortex
2 Slotted disc
3 3D Deformation
4 3D Taylor-Green vortex
default: 0
Valid for:
S F N C
# # #
49
# # #
# # #
# # #
# # #
H 9 int Switch Temperature 1 and temperature 2 fluid for the two phases
1 1: water 2: air
2 1: air 2: water
default: 1
# # #
0 OFF
1 2nd-order Adams-Bashfort
2 2nd-order TVD Runge-Kutta
3 3rd-order TVD Runge-Kutta
default: 0
# #
0 OFF
1 FOU
2 CDS2
50
3 QUICK
4 WENO5 FLUX
5 WENO5 HJ
6 CDS4
7 WENO3 FLUX
8 WENO3 HJ
10 High Resolution TVD scheme with Minmod limiter
11 High Resolution TVD scheme with van Leer limiter
12 High Resolution TVD scheme with Umist limiter
13 High Resolution TVD scheme with Sweby limiter
14 High Resolution TVD scheme with Superbee limiter
15 High Resolution scheme with Smart limiter
16 High Resolution TVD scheme with Limo3 limiter
42 High Resolution TVD scheme with Weller limiter
default: 5
# # #
# # #
default: 0.0 m
# # #
default: 0.0 m
# # #
default: 0.0 m
# # #
51
default: 1.0 · 107 m
# # #
# # #
# # #
# # #
# # #
default: na C ◦
# # #
default: na C ◦
# # #
default: na C ◦
# # #
52
H 64 double Temperature boundary condition on surface 4
default: na C ◦
# # #
default: na C ◦
# # #
default: na C ◦
3.7 I :: Initialization
Valid for:
S F N C
# # #
I 10 int Initialize Everything Turning this parameter on will invoke I11, I12 and I13.
0 OFF
1 ON
2 ON (include free surface for potential flow ini)
default: 0
# # #
0 OFF
1 ON
2 ON (include free surface)
default: 0
# # #
0 OFF
53
1 Hydrostatic based on vertical coordinate
2 Hydrostatic based on level set values
default: 0
# # #
0 OFF
1 ON
default: 0
# # #
0 OFF
1 ON
default: 0
# # #
I 40 int Full initialization from state file (hotstart) See option P 40 for state file print out.
0 OFF
1 ON
default: 0
# # #
default: 0
# # #
54
I 44 int Read FNPF state file with 3D velocity potential
0 OFF
1 ON
default: 0
# # #
I 56 int pressure above F56 set to zero
default: 0
# # #
I 58 double Initialize Vertical Velocity around Sphere from F 58, double radius for initialization
default: 0.0 ; 0.0
# # #
I 230 int Read FlowFiles for inflow boundary condition. The number gives the ID of the
FlowFile gage. For iowave activated, B 98 should be set to 0.
default: 0
# # #
I 231 double Vertical offset of FlowFile inflow.
default: 0.0
# # #
I 232 double Time offset of FlowFile inflow.
default: 0.0
# # #
I 241 double Delta t for FlowFile inflow and hydrodynamic coupling.
default: 0.0
55
3.8 M :: MPI
Valid for:
S F N C
M 10 int Number of processors for parallel computations This value needs to be consistent
with the grid generation and the console input for starting REEF3D through the mpirun
command.
default: 0
Valid for:
S F N C
#
N 10 int Iterative solver for the Poisson equation The default BiCGStab solver uses Jacobi
Scaling as the default preconditioner, which is implemented in the compressed diagonal
storage format (CDS). Jacobi Scaling is currently the most effective preconditioner
for the Poissson equation with a jump in the matrix coefficients, as is the case for
multiphase flow. SIP is an optimized implementation of ILU.
The fastest combination of HYPRE solvers is the BiCGSTAB struct solver with PFMG
preconditioning. From the HYPER AIJ solvers, the combination PCG + BoomerAMG
is fastest. For more information on the HYPRE solvers and preconditioners, have a
look at the HYPRE user manual Cen [2015].
56
23 LGMRES (HYPRE AIJ)
24 BiCGStab (HYPRE AIJ)
25 AMG (HYPRE AIJ, BoomerAMG)
N 11 int Preconditioner for the Poisson Equations Keep in mind to use only options, that
are compatible with N 10.
0 OFF
11 PFMG (for HYPRE Struct Krylov solvers)
12 SMG ( for HYPRE Struct Krylov solvers)
# # #
1 2nd-order Adams-Bashforth
2 2rd-order TVD Runge-Kutta
3 3rd-order TVD Runge-Kutta
4 3rd-order TVD Runge-Kutta low storage
22 2rd-order momentum-free surface coupled TVD Runge-Kutta
23 3rd-order momentum-free surface coupled TVD Runge-Kutta
57
default: 3
N 41 double Maximum modeled time Out of N41 and N45, whichever criterion is fulfilled
first will finalize the simulations.
N 45 int Maximum number of outer iterations Out of N41 and N45, whichever criterion is
fulfilled first will finalize the simulations
default: 1 · 108
default: 250
N 47 double Relaxation factor for time step size This factor is used when determining the
time step size based on the CFL criterion for adaptive timestepping.
default: 0.3
0 OFF
1 ON
2 ON, using velocity around the interface
default: 1
58
N 49 double Timestep size for fixed timestepping
1 standard
2 component wise (less conservative)
default: 1
N 61 double Stopping criterion for critical velocities. The code will exit and write a final .vtu
paraview file
default: 500.0
3.10 P :: Printer
Valid for:
S F N C
0 OFF
1 ON
default: 1
# # #
default: 10
default: 1
59
P 15 int Print out file numbering
# # #
1 Standard
2 Node Fill
default: 2
P 20 int Print results every ith iteration Choose between either P20, P30, P34 or P35.
default: -10
# # #
P 21 int Print time averaged velocity, pressure and temperature (in case of heat transfer)
0 OFF
1 ON
default: 0
# # #
default: 0.0
0 OFF
1 ON
default: 0
60
# # #
0 OFF
1 ON
default: 0
# #
0 OFF
1 ON
default: 0
# # #
0 OFF
1 ON
default: 0
# # #
0 OFF
1 ON
default: 0
# #
0 OFF
1 ON
default: 0
# # #
0 OFF
61
1 ON
default: 0
# # #
P 30 double Print Paraview results every ith second Choose between either P20, P30, P34
or P35.
default: -1.0
# # #
P 34 double Print Paraview results every ith second based on sediment transport time
Choose between either P20, P30, P34 or P35.
default: -1.0
P 35 * double Start print t, double End t, double results every ith second
Choose between either P20, P30, P34 or P35.
P 40 int Print state file for hotstart, hydrodynamic coupling (SFLOW to CFD and FNPF to
CFD) or grid nesting.
For hotstart functionality, see I 40 for full initialization from state file.
For hydrodynamic coupling, see
The CFD state file contains the velocities, pressure, level set function, k, eddy viscosity,
ϵ or ω, topo, cbed and conc.
0 OFF
1 print into one file
2 print into consecutive file
default: 0
# #
default: 1
62
# #
default: na
# # #
P 43 Define print out area for FNPF state files (optional); double xstar t , double xend , double
ystar t , double yend
default: na ; na ; na ; na
# # #
0 OFF
1 ON
default: 0
# # #
P 46 double Start print t, int End t, double state files every ith iteration
default: 0 ; 0
P 47 double Start print t, double End t, double state files every ith second
63
P 50 * double x-location and double y-location of height gauges for wave theory
default: na ; na
default: na ; na
default: na
0 OFF
1 ON
default: 0
default: 10
default: -1.0
default: na
64
# # #
P 58 * double x-location, double y-location and double duration in sec for wave timeries
# # #
0 OFF
1 ON
default: 0
# # #
default: na
# # #
default: na
# # #
default: na
# # #
default: na
default: na
65
#
P 66 * double x-location, double y-location and double z-location of velocity probes from
wave theory
default: na
# # #
0 OFF
1 ON
default: 0
# # #
0 OFF
1 ON
default: 0
# # #
0 OFF
1 ON
default: 0
# # #
0 OFF
1 ON
default: 0
# # #
0 OFF
1 ON
66
default: 0
# # #
P 78 int print out sediment parameters to vtu file: dh, bedchange, reduce, threshold, slideflag
0 OFF
1 ON
default: 0
# # #
0 OFF
1 bed shear stress
2 shear velocity
3 shields paramters
default: 0
# # #
default: 1
# # #
P 81 double force calculation box: xstar t , xend , ystar t , yend , zstar t , zend
# #
P 85 * double Morison force calculation using ALE : xcentr e , ycentr e , r adi us, Cd , Cm
# # #
67
# # #
# # #
0 OFF
1 ON
default: 0
# # #
0 OFF
1 ON
default: 0
# # #
P 111 double Start averaging after transients for significant wave height calculation
default: 0.0
default: 1
# #
default: na
# # #
68
0 OFF
1 ON
default: 0
# #
default: na
# #
default: na
# # #
P 125 double x-location and double y-location of bed shear stress gauges
default: na
# # #
0 OFF
1 ON
default: 0
# # #
0 OFF
1 ON
default: 0
# # #
default: na
69
# # #
0 OFF
1 ON
default: 0
# # #
1 scalar
2 signed distance function
default: 1
# # #
1 x-velocity
2 y-velocity
3 z-velocity
4 scalar with Neuman boundary conditions
default: 1
# # #
0 OFF
1 ON
default: 0
# # #
default: na
# # #
P 168 * double x-location, zstar t and zend of discharge window in cross section
default: na ; na ; na
70
# # #
0 OFF
1 ON
default: 0
# # #
default: 10
# # #
default: -1.0
# # #
P 184 * int Start iteration, int End iteration, int fsf print results every ith iteration
Choose between either P181, P182, P184 or P185.
default: 0 ; 0 ; 0
# # #
P 185 * double Start t, double End t, double fsf print results every ith second
Choose between either P181, P182, P184 or P185.
# # #
0 OFF
1 ON
default: 0
# # #
71
default: 10
# # #
default: -1.0
# # #
P 194 * int Start iteration, int End iteration, int topo print results every ith iteration
Choose between either P191, P192, P194 or P195.
default: 0 ; 0 ; 0
# # #
P 195 * double Start t, double End t, double topo print results every ith second
Choose between either P191, P192, P194 or P195.
# # #
default: 0
# # #
default: 0
3.11 S :: Sediment
Valid for:
S F N C
# #
0 OFF
72
1 ON (impermeable sediments)
2 ON (porous sediment)
default: 0
# # #
0 OFF
1 van Rijn
2 Meyer-Peter Müller
3 Engelund and Fredsøe
default: 0
# # #
0 OFF
1 van Rijn
default: 0
# # #
# # #
S 14 double Relaxation factor for time step size sediment transport The timestep for the
morphodyanmic calculations is by default decoupled from the hydrodynamics timestep
(see S15), which typically is determined through adaptive timestepping (N48). The
morphodynamic timestep is determined by the Courant criterion by analyzing the rate
of bed elevation change.
default: 0.3
# # #
73
2 fixed from S13
default: 0
# # #
# # #
# # #
default: 0.001 m
# # #
default: 3.0
# # #
default: 2650.0 kg
# # #
74
# # #
default: 0.5
# # #
default: 0.047
# # #
1 v1
2 v2
default: 1
# #
1 FOU
2 CDS2
4 WENO5 FLUX
5 WENO5 HJ
default: 4
# # #
# # #
S 37 int Number of topo reinitialization time steps The mobile sediment bed is represented
by a level set method. After erosion or deposition has taken place, it needs to be
reinitialized in order keep its signed distance properties.
default: 2
75
# # #
1 iterations
2 flow simulation time
3 t/T
default: 1
# # #
1 iterations
2 flow simulation time
3 t/T
default: 1
# # #
default: 1000
# # #
default: 10
# # #
default: 1.0
# # #
default: 1.0
# # #
76
default: 1.0
# # #
default: 1.0
# # #
1 Inflow fixed
2 Outflow fixed
3 Fix Both
4 Fix None
default: 3
# # #
# # #
# # #
default: -1.0e20
# # #
default: 1.0e20
77
# # #
S 73 * double value, double distance, double line angle, double line x-origin, double line
y-origin; for use of relaxation method for inhibiting sediment transport in the relaxation
zone and smoothly transitions to the active bed.
This method is preferred over S 71 and S72 because of the smooth moderation of the
sediment bed. It gives also more flexibility as multiple relaxation lines with variable
orientation can be chosen.
default: na
# # #
S 77 double Active sediment transport algorithm region in x-direction: xstar t and xend
# # #
0 off
1 Parker and Kovacs
2 Dey empirical
3 Dey analytical
4 Fredsøe
default: 0
# # #
default: 35.0
# # #
default: 5.0
# # #
2 CDS
78
5 WENO
default: 2
# # #
1 Fredsøe
2 function based
default: 1
# # #
S 85 int Bed load direction correction using the method proposed by Koch and Flokstra
(1980)
0 OFF
1 ON
default: 1
# # #
0 off
1 Burkow geometrisch
2 Burkow geometrisch mod
3 Wu
4 Burkow PDE
default: 0
# # #
default: 1
# # #
default: 0.0◦
79
# # #
S 100 int Number of outer spatial filter iterations for the sediment bed for the predictor step
(larger numbers increase the filter effect, recommended value: 1)
default: 0
# # #
S 101 int Number of inner spatial filter iterations for the sediment bed for the corrector step
(larger numbers move the bed closer to the uncorrected values, recommended value:
between 1 and 5)
default: 0
3.12 T :: Turbulence
Valid for:
S F N C
# # #
0 OFF
1 k-ϵ model
2 k-ω model
12 EARSM based on k-ω model
21 URANS with k-ϵ model
22 URANS with k-ω model
31 LES with Smagorinsky SGS model
33 LES with WALE model
default: 0
# # #
0 OFF
1 FOU
5 WENO HJ
default: 5
80
# # #
0 box
1 f1
2 f2
default: 0
# # #
default: 0.816
# # #
default: 0.816
# # #
default: 0.212
# # #
0 OFF
1 ON
2 ON, including distance from the nearest wall
default: 0
# # #
default: 0.07
# # #
81
default: 1.6
# # #
0 OFF
1 ON
default: 0
# # #
0 OFF
1 ON
default: 0
Valid for:
S F N C
# # #
# # #
82
default: 1.41 · 10−5 m2 /s
# # #
W 10 double Discharge
default: 0.0 m3 /s
# # #
# # #
# # #
# # #
83
# # #
# # #
# # #
W 29 double Additional constant pressure gradient for periodic boundary conditions in x-,y-
and z-direction
# # #
W 30 int Compressibility for phase 2, using ideal gas theory for constant temperature
0 OFF
1 ON
default: 0
84
# # #
default: 20.0 C o
# # #
W 41* double Velocity vertical line source phase 1: xcenter , ycenter , zstar t , zend , v eloci ty , β
Here, β ist the direction of the flow.
# #
0 OFF
1 Herschel-Bulkley
# #
W 95 double ν0
default: 1.0
# #
W 96 double τ0
default: 1.0
# #
default: 0.00001
# # #
default: 1.0
# #
85
W 101 int Use Mohr-Coulomb
0 OFF
1 ON
default: 0
# # #
W 102 double φ0 , c
# # #
default: 1.0
# # #
# # #
1 hydrostatic
2 hydrostatic and dynamic pressure
3 hydrostatic pressure away from the interface and dynamic pressure closer to the
interface (see W 112)
default: 1
# # #
default: 2.1
86
3.14 X :: 6DOF
Valid for:
S F N C
#
0 OFF
1 Two-Way Coupling (CFD and NHFLOW)
2 One-Way Coupling (SFLOW, NHFLOW, CFD)
3 External pressure term (SFLOW and NHFLOW, requires X 400)
default: 0
# #
X 11 int Turn the individual degrees of freedom of the floating body, the linear and the
angular velocities: u, v , w , p, q, r
When degrees of freedom are chosen to be prescribed, then they can be prescribed with
either fixed external linear or angular velocities or different kinds of motion files.
0 OFF
1 solver 6DOF equation
2 prescribed
default: 1 ; 1 ; 1 ; 1 ; 1 ; 1
# # #
1 standard
2 reduced forcing
default: 1
default: 1
# #
87
default: 900.0
# #
default: 0.0
# #
# #
# #
X 25 double Damping coefficient for rotational motion around the three axes
# #
X 26 double Damping coefficient for translational motion along the three axes
# # #
1 slip
2 no-slip
3 floating body velocities
4 2nd-order extrapolation
default: 4
88
# # #
1 Neumann
2 Extend
default: 1
# # #
0 OFF
1 ON
default: 0
# # #
default: 0.6
# # #
X 45 int type of free surface level set convection discretization inside the floating body
# # #
0 OFF
1 ON
default: 0
# #
89
X 50 int Type of print out format for 6DOF structure
Since the VTP print out is binary, it is significantly faster than the STL print out. This
becomes runtime relevant for STL files with a large amount of triangles.
1 VTP
2 STL
default: 1
# #
1 STL
2 LSM
default: 0
# #
# #
# #
X 110 double Rectangular box floating body: xstar t , xend , ystar t , yend , zstar t , zend
# #
X 131 double Cylinder in x-direction floating body: r adi us, hei ght, xcenter , ycenter , zcenter
90
default: 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ;
# #
X 132 double Cylinder in y-direction floating body: r adi us, hei ght, xcenter , ycenter , zcenter
X 133 double Cylinder in z-direction floating body: r adi us, hei ght, xcenter , ycenter , zcenter
# #
X 153 double Two-sided wedge in z-direction floating body: xstar t , xend , ystar t , yend , zstar t , zend
# #
X 163* double wedge floating body, each of the 6 points is given by the coordinates x1 , y1 , z1 ,
x2 , y 2 , z 2 , x3 , y 3 , z 3 , x4 , y 4 , z 4 , x5 , y 5 , z 5 , x6 , y 6 , z 6
4
5
1 2
# #
X 164 * double hexahedron floating body, each of the 8 points is given by the coordinates
x 1 , y 1 , z 1 , x 2 , y 2 , z 2 , x 3 , y3 , z 3 , x 4 , y 4 , z 4 , x 5 , y 5 , z 5 , x 6 , y 6 , z 6 , x7 , y 7 , z 7 , x 8 , y 8 , z 8
91
default: [8x] 0.0 ; 0.0 ; 0.0
8
7
5
6
4
3
1 2
# #
X 180 int Read STL file “floating.stl” for floating body geometry
0 OFF
1 ON
default: 1
# #
# #
# #
# #
92
X 185 int Type of geometry refinement for triangulated surface mesh
1 based on averaged dx
2 based on global minimum dx
3 based on local minimum dx
default: 1
# #
default: 0.7
# #
1 linear
2 sine
default: 1
# #
X 206 double External motion ramp up start time and end time (sec)
# #
X 207 double Draft ramp up start time and end time (sec)
# #
# #
93
#
X 240 int Read motion file for 6DOF motions. CoG = course over ground / yaw angle in
degrees
0 OFF
11 Format: t, x, y , CoG
default: 0
# #
0 OFF
1 Static catenary
2 Quasi-Static FEM
3 Dynamic FDM
4 Spring (using X 312)
default: 0
# #
X 311 * double Specify mooring line configuration xstar t , xend , ystar t , yend , zstar t , zend ,
w , ρc , EA, d, l, H, P, Q .
Each mooring line of length l[m] and diameter d[m] has to be specified separately using
this option. ⃗
xstar t is the mounting point at the bottom, ⃗
xend the mounting point at
the body. The weight of the line is calculated from the specific weight in air w [kg/m],
its density ρc [kg/m3 ] and its elasticity times area EA. H represents the number of
elements for the numerical approaches, P is the polynomial order for the dynamic
approach. A relaxation technique can be included for this approach using the time
factor Q.
default: 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0.0 ; 0 ; 0 ; 0.0
# #
X 312 * double Specify spring configuration xstar t , xend , ystar t , yend , zstar t , zend , k, T0 .
Each spring with stiffness k[N/m] has to be specified separately using this option. ⃗
xstar t
is the mounting point at the bottom, ⃗ xend the mounting point at the body. T0 is the
pre-tension.
94
# #
X 313 int Initial rotation of mooring end points with the floating body (specified with X 101).
0 off
1 on
default: 0
# #
X 314 * double Maximum tension force at which each mooring line breaks. If specified, it
needs a value for each line. Disable breaking for individiual line by setting the tension
force to zero.
default: na
# #
X 315 * double Maximum time at which each mooring line breaks. If specified, it needs a
value for each line. Disable breaking for individiual line by setting the time to zero.
default: na
# # #
X 320 int Turn on net modelling. Each net has to be specified separately using this option.
0 off
2 Static net cylinder
3 Static net wall
4 Static sheets following floating body
12 Dynamic net cylinder
13 Dynamic net wall
default: 0
# # #
95
# # #
# # #
X 323 * double mass in air, double diameter and double length of sinker for dynamic net
models.
# # #
X 324 * double x-location, double y-location and double z-location of knot probes.
The dynamic net model searches for the nearest knot to track.
default: na
# # #
X 325 * double time step, double relaxation in x-direction double relaxation in y-direction
double relaxation in z-direction for dynamic net models. Set time step to zero to use
the fluid domain time stepping.
# # #
X 400 int External moving pressure field for SFLOW (requires X 401)
0 off
2 Box (defined with X 23 and X 110)
10 STL (automatic xg and yg )
default: 0
# # #
X 401 * double p0 , double cl , double cb double a Coefficients for the definition of the
external moving pressure field.
96
default: na na na na
3.15 Z :: FSI
Valid for:
S F N C
# # #
0 Off
1 Strips
default: 0
# # #
default: na na na na na na na na na na na na na
# # #
Z 12 * double cd,X , double cd,Y , double cd,Z , double ck,X , double ck,Y , double ck,Z
Adding velocity-related viscous damping in local X, Y, Z direction of the beam. c⃗d for
translational motions, c⃗k for rotational motions.
97
4. Compiling the Code
REEF3D depends on gcc compilers, OpenMPI, HYPRE and Eigen. If the system has included
all prerequisites, section 4.1 can be skipped. Users with Windows 10 systems can follow the
instructions in section 4.4.
For a usage only compilation, see section 4.2; for developers see section 4.3.
• On macOS, open the terminal and install the command line tools, which include gcc
and g++ using:
xcode-select --install
• IMPORTANT: If any problem in the compilation procedure occurs while the command
line tools are already installed, a possible solution appears to be to first remove the
command line tools and then reinstall them. The problem appears to be related to a
version mismatch between the command line tools and the gfortran installation. The
command to remove the command line tools is:
sudo rm -rf /Library/Developer/CommandLineTools
• Confirm working C, C++ and fortran compilers (in a new terminal, using the commands
individually):
gcc -v
g++ -v
gfortran -v
The output of each of these commands is a path. If you do not get any output or an error
message, that particular compiler is not installed or has had problems. This needs to be fixed
before you proceed to the next step.
99
4.1.2 Installing OpenMPI
REEF3D depends on the third-party library MPI for the parallelization of the code. MPI is very
portable and the de-facto standard for the parallelization of high performance computations.
Several interesting documents can be found on the offical MPI homepage: http://www.mpi-
forum.org/. Depending on the operation system, several MPI distributions exist. We
recommend OpenMPI for macOS and Linux.
• Open ‘Terminal’ and navigate to the location of the archive and type:
./configure --prefix=/usr/local/openmpi
• Next compile:
make -j n all (with n being the number of available cores on your computer)
Option Linux:
echo ‘export PATH=/usr/local/openmpi/bin/:/usr/local/openmpi/lib/:$PATH’
>>∼/.bashrc
Remember that the file .bashrc is a hidden file in your home folder. If you obtain an
error message that tells you the file does not exist, you can use the file .bash_profile.
One of these two files will be available on your system. You can find this by typing the
command:
ls -a
when you are in your home folder.
Option 1 Mac/Linux:
sudo pico /etc/paths
Option 2 Mac/Linux:
sudo vi /etc/paths
Make sure to save the path file when exiting pico or vi.
• Close the terminal and open a new terminal to check if the addition to the path has
been successful using:
echo $PATH (should return several paths, amongst which the ones you just added are
the first to be listed). This should be in order before you proceed to the next step.
100
4.1.3 Installing hypre
hypre Cen [2015], Falgout et al. [2006] is a library for high-performance linear solvers and
precondioners and can be downloaded from hypre’s github repository:
https://github.com/hypre-space/hypre/releases
• Open ‘Terminal’ and navigate to the “src” folder inside the HYPRE archive and type:
• Next compile:
The command is the same as that given above for the MPI installation, but with the
paths listed above.
For users who are interested in running the code only, the easiest way is the compilation of
REEF3D and DIVEMesh with the Makefiles given in the code repository. After installing MPI
and HYPRE, open the terminal and go to the main directories of the code.
The code will compile in the /build directory and the executable is placed in the /bin directory.
In case of errors during the compilation, check the Makefile for correct paths to the external
libraries.
101
4.3 Developer Compilation & Installation: CodeLite
REEF3D is written in highly modular C++ in order to provide efficient code development
and maintenance. REEF3D is designed with cross-platform usage in mind. The source code
can be compiled under macOS, Windows and Linux. Since the user experience should be the
same on all platforms when developing the code, CodeLite was chosen for the Integrated
Development Environment (IDE). The reasons for this are:
CodeLite can be downloaded here. When the REEF3D source is downloaded, a CodeLite
project file is included, so all header and source files are sorted in a tree structure. This
should make the orientation and navigation in the source code easier.
The following path settings are to be set in Codelite to compile REEF3D. First, go to settings
> build settings and add a new compiler named mpicxx. Rest of the settings are as shown in
the following screenshots: (PS: check the location of your gcc, g++ and mpicxx using ‘which
gcc’, ‘which g++’ and ‘which mpicxx’ to enter the appropriate paths for the compiler settings
in Codelite)
102
Figure 4.2: Compiler options for mpicxx.
Figure 4.4: Add the Include and Libraries Paths in the advanced tab of the mpicxx compiler. Adapt the path
to Eigen according to file structure of the computer.
Afterwards, the code can be compiled by clicking Build > Build Project or pressing F7.
103
4.4 Installing REEF3D on Windows 10
Windows 10 offers the feature to run a Unix bash terminal, given that you have kept your
Windows up-to-date.
• Look for Ubuntu App in the Microsoft App Store. Ensure that all prerequisites are
fulfilled and update the system if necessary.
• Search for ’Ubuntu’ in the Start menu and open the bash terminal. You will be prompted
to enter a username and password. This can be different from your Windows credentials
and has nothing to do with the Windows credentials.
• The Ubuntu terminal starts up at your Ubuntu home folder. To access your Windows
C:\Users location, use the command:
cd /mnt/c/Users/
• Your Unix home directory is unfortunately a hidden folder. You will have to activate
the option to View hidden and system files in order to access this using the Windows
explorer. To do this:
- Open your Windows explorer.
- Click on the View tab at the top of the window
- Click on the last icon on the toolbar that says Options
- In the pop-up window, click on the View tab
- Under the title Hidden Files and Folders, Click on the radio button for “Show hidden
files, folders and drives”
• Your Ubuntu home folder can now be accessed at C:\Users\<Windows user name>\AppData\Local
\Packages \CanonicalGroupLimitedUbuntuonWindows\LocalState \rootfs \home \<your
ubuntu username> .
• Open the bash terminal and update the apt package (package manager) using:
sudo apt update
104
• To install the necessary GCC and fortran compilers, type:
sudo apt install gcc g++ gfortran cmake libtool libglu1-mesa
• Use the following commands to find the path to the compilers and note down for later
use:
which gcc
which g++
which gfortran
Ubuntu on Windows does not support graphics and the Windows OS treats the Ubuntu
system as hidden directory. In order to overcome this hurdle in Windows and visualise the
results using Paraview, the following additional steps are necessary.
• Download the same version of Paraview for both Windows and Linux from paraview.org
• Move the Linux version, the .tar.gz archive, to the Ubuntu home folder by opening an
Ubuntu terminal and using:
cp /mnt/c/Users/<windows username>/Downloads/<ParaviewLinuxArchiveName> ./
• Install Paraview on Windows as well, using the installer that you downloaded. Make
sure that you are indeed installing the SAME version of Paraview on both Ubuntu and
Windows.
Another alternative route for REEF3D and DIVEMesh compilation and installation irrespective
of the underlying OS. In those cases, where the Ubuntu on Windows approach does not work,
this may be a viable option. The installation steps are as follows:
105
Figure 4.5: Docker resources
• Save the dockerfile (inside the REEF3D folder) in a folder and open the terminal in the
folder.
• Create a folder with the name ’simulations’ and copy the address.
• Start the docker container in the terminal (detached or attached) and adjust the path
for the ’simulations’ folder within <>. For the attached approach, the container does
not run in the background whereas for detached the container continues to run in the
background.
106
use the folder ’simulations’ as an interface between the container and the local machine
and OS. With the exception of this folder, everything else is stored in the container.
• In the detached mode, the terminal is directly opened for the container.
start container:
docker start reef3d
stop container:
docker stop reef3d
restart container:
docker restart reef3d
107
5. Running the Code
5.1 DIVEMesh
After compilation, copy the DIVEMesh executable into the simulation folder. The simulation
folder should be covered by the PATH variable. Make sure that the ”control.txt” file is inside
the simulation folder, which gives the input for DIVEMesh (see also DIVEMesh User’s Guide
for more information). Run DIVEMesh by double-clicking the executable or typing in the
terminal while being in the path of the folder:
./DiveMESH
This will generate the grid files. If the program does not execute properly, please make
sure that all input commands comply with the definitions in the User’s Guide.
5.2 REEF3D
After compilation, copy the REEF3D executable into the simulation folder. The simulation
folder should be covered by the PATH variable, otherwise the program will not find the
MPI libraries. If the program does not execute properly, please make sure that all input
commands comply with the definitions in the User’s Guide. If a command does not have
the required number of input variables, REEF3D will stop at ”read ctrl” in the terminal print out.
All REEF3D cases are started with the following terminal command:
mpirun -n number of processes reef3d
109
6. Post-Processing
6.1 Paraview
In order to access the results files created in the Ubuntu system and open them in the
Wondows system, the following additonal steps are essential.
• Open a Ubuntu terminal and navigate to the location of the Paraview installation. If
you have followed the instructions exactly, then it is:
cd <ParaviewFolderName>/bin
• You will get an output in the terminal that will show you a URL of the form:
cs://ABCD789: 111111 (This is an example. The actual name will be different, use
what you are shown on your screen)
The first part- ABCD789 is the host name, the second part after the colon (:) is the
port number. Make a note of this.
• Open Paraview on your Windows system. Click on the “Connect to server” button (two
white towers with a green dot, third icon from the left on the topmost toolbar).
• In the pop-up dialog box, click on Add server. In the dialog box that opens now, enter
your host name in the box for Host, and the port number in the box for Port. Use any
name you would like in the topmost box for Name.
• Click on configure. And then on save. Click on the saved configuration you are shown
on the list and click on Connect.
REEF3D can write out a range of different result files, depending on the hydrodynamics
module used. In this section, the procedure is presented how to visualize the free surface
obtained from two-phase flow simulations through the CFD module. For these type of
calculations, the level set method is employed which defines the free surface implicitly. The
free surface is the zero-contour of the level set function (the variable phi in the paraview
111
dropdown menu). In the following, the procedure is presented on how to extract the zero
level set contour from the .vtu files printed out by the CFD module.
Open the .pvtu fileset in paraview through File> open and selecting the .pvtu file in the popup
window. Click on outline in the paraview tool bar as shown in Fig.6.1 to obtain the outline of
the wave tank. Click on the Slice filter on the toolbar (circled in Fig.6.1) and select “y-normal”
in the properties sidebar to generate a 2D slice along the length of the numerical wave tank as
shown in Fig.6.2. The slice can be colored according to the various variables available in the
dropdown menu. To obtain the free surface, select the slice in the pipeline browser and click
on the Contour filter on the tool bar and select Contour by: phi in the properties sidebar with
value range 0 as shown in Fig.6.3. The geometry of the structure used in the wave tank is
included by adding the .vtp file generated by DiveMesh to obtain the result shown in Fig.6.4.
To obtain a 3D visualization of the free surface, open the .pvtu file in Paraview and directly
use the Contour filter on as shown in Fig.10.56.
Use File> Save Screenshot from the drop down menu, input the desired resolution, click OK
and select the file type in the next window to save a screenshot from Paraview.
To generate an animation, use File>Save Animation from the dropdown menu. Enter the
desired frame rate (recommended value: 1/P30) and the range of time steps to be included
in the animation in Frame range. Select the desired file type in the next window.
112
Figure 6.2: Creating a 2D slice
113
Figure 6.4: Including the geometry of the structure
114
7. Running the Code
In this chapter some examples are given, the raw input files can be downloaded from the
REEF3D website. The focus is on helping the user to understand the workflow of REEF3D.
The control files are not necessarily optimized, when it comes to grid convergence and
resolution. Rather, the mesh size are kept to reasonable sizes in order to be able to run the
cases on laptop or desktop machines.
All REEF3D cases are started with the following terminal command:
mpirun -n number of processes reef3d
For a computer with four processors, this command then becomes:
mpirun -n 4 reef3d
Alternatively this command can be used:
mpiexec -n 4 reef3d
The ’ctrl.txt’ file contains the input for REEF3D. The idea of the input structure is to
use a capital letter for the type of functionality it describes, e.g. ’T’ for turbulence. The
letter is followed by a number for the individual option. All available options are listed in the
previous sections of this document together with the required input, i.e. number of specified
values, type of value (int or double) and the default value which will be used by REEF3D in
case no input is given by the user.
The ’control.txt’ files describe the mesh and are read by DIVEMesh, a separate open-source
mesh editor. The structure is the same as in REEF3D and the overview over all available
functions is available in the separate DIVEMesh User Guide. Upon executing DIVEMesh, grid
files for each of the parallel subprocesses will be generated. The source code for DIVEMesh
can also be downloaded from the REEF3D website.
115
8. Tutorial | REEF3D::SFLOW
For visualization, open the REEF3D_SFLOW_VTP and REEF3D_SFLOW_VTP_BED
folders.
M 10 8 // number of processors
M 20 2 // decomposition method
A 10 2 // turn on sflow
B 90 1 // turn on iowave
B 92 4 // 2nd-order stokes wave
B 91 0.05 4.0 // wave amplitude and wavelength
B 96 4.0 8.0 // wave generation and absorption relaxation zone lengths
B 98 2 // use relaxation wave generation
B 99 1 // use relaxation wave absorption
M 10 8 // number of processors
117
P 50 4.0 0.01 // wave gauge location for theory
P 51 4.0 0.01 // wave gauge location
W 22 -9.81 // gravity
8.1.3 Results
0.04 0.04
REEF3D:SFLOW theory REEF3D theory
0.02 0.02
η (m)
η (m)
0.00 0.00
−0.02 −0.02
50 52 54 56 58 60 0 5 10 15 20 25
t (s) x (m)
(a) Free surface elevation evolution over time at wave (b) Free surface elevation in space at t =60 s
gauge 2 (x =14.5 m)
Figure 8.1: Free surface elevations in the simulation of 2nd-order Stokes wave in intermediate water depth.
M 10 8 // number of processors
M 20 2 // decomposition method
118
8.2.2 REEF3D: ctrl.txt
A 10 2 // turn on sflow
B 90 1 // turn on iowave
B 92 8 // cnoidal wave
B 91 0.21 4.0 // wave amplitude and wavelength
B 96 4.0 8.0 // wave generation and absorption relaxation zone lengths
B 98 2 // use relaxation wave generation
B 99 1 // use relaxation wave absorption
M 10 8 // number of processors
W 22 -9.81 // gravity
8.2.3 Results
0.2 0.2
REEF3D:SFLOW theory REEF3D theory
0.1 0.1
η (m)
η (m)
0.0 0.0
−0.1 −0.1
50 52 54 56 58 60 0 5 10 15 20 25
t (s) x (m)
(a) Free surface elevation evolution over time at wave (b) Free surface elevation in space at t =60 s
gauge 2 (x =14.5 m)
Figure 8.2: Free surface elevations in the simulation of cnoidal wave in intermediate water depth.
119
8.3 Solitary wave over constant water depth
A 10 2 // turn on sflow
B 90 1 // turn on iowave
B 92 9 // solitary wave
B 91 0.05 4.0 // wave amplitude and wavelength
B 96 4.0 0.0 // wave generation and absorption relaxation zone lengths
B 98 2 // use relaxation wave generation
B 99 1 // use relaxation wave absorption
F 60 0.5 // water depth
N 41 20.0 // simulation time
N 47 0.2 // adaptive time stepping cfl number
M 10 8 // number of processors
P 10 1 // simulation time print out .vtp files
P 30 0.1 // print out .vtp files interval based on simulation time
P 50 14.5 0.01 // wave gauge location for theory
P 51 14.5 0.01 // wave gauge location
P 54 100 // print out wave profile in space every 100 iterations
W 22 -9.81 // gravity
8.3.3 Results
120
0.30 REEF3D theory
0.06 REEF3D:SFLOW theory
0.04 0.28
η (m)
η (m)
0.02
0.00 0.26
−0.02
0.0 2.5 5.0 7.5 10.0 12.5 15.0 17.5 20.0 0 5 10 15 20 25
t (s) x (m)
(a) Free surface elevation evolution over time at wave (b) Free surface elevation in space at t =8.4155 s
gauge 2 (x =14.5 m)
Figure 8.3: Free surface elevations in the simulation of solitary wave in intermediate water depth.
1 2 3 4 5 6 7 8
0.4 m
0.3 m
z 1:20 1:10
x
5m 6m 6m 2m 3m 9.5m
38m
A 10 2 // turn on sflow
121
B 90 1 // wave input
B 92 4 // 2nd-order stokes wave
B 93 0.021 2.525 // wave height and wave period
B 96 5.0 10.0 // wave generation zone length and numerical beach length
B 98 2 // relaxation method 2 for wave generation
B 99 1 // relaxation method 1 for numerical beach
M 10 8 // number of processors
W 22 -9.81 // gravity
8.4.3 Results
Note that the high-frequency bounded waves emerging after the top of submerged bar are
in deep water condition, thus the discrepancies with the experiment at wave gauges 6 and
onwards. Be ware about the water depth condition when applying the depth-averaged models.
122
0.03 REEF3D exp 0.03 REEF3D exp
0.02 0.02
0.01 0.01
η (m)
η (m)
0.00 0.00
−0.01 −0.01
−0.02 −0.02
20 25 30 35 40 45 50 20 25 30 35 40 45 50
t (s) t (s)
η (m)
0.00 0.00
−0.01 −0.01
−0.02 −0.02
20 25 30 35 40 45 50 20 25 30 35 40 45 50
t (s) t (s)
η (m)
0.00 0.00
−0.01 −0.01
−0.02 −0.02
20 25 30 35 40 45 50 20 25 30 35 40 45 50
t (s) t (s)
η (m)
0.00 0.00
−0.01 −0.01
−0.02 −0.02
20 25 30 35 40 45 50 20 25 30 35 40 45 50
t (s) t (s)
Figure 8.5: Free surface elevations in the simulation of wave propagation over a submerged bar.
123
9. Tutorial | REEF3D::FNPF
9.1 2nd-order Stokes wave in intermediate water depth
125
P 50 15.0 0.005 // x and y coordinate of wave gauge 1 for theory
P 50 20.0 0.005 // x and y coordinate of wave gauge 2 for theory
P 50 25.0 0.005 // x and y coordinate of wave gauge 3 for theory
P 51 15.0 0.005 // x and y coordinate of wave gauge 1 for simulations
P 51 20.0 0.005 // x and y coordinate of wave gauge 2 for simulations
P 51 25.0 0.005 // x and y coordinate of wave gauge 3 for simulations
P 54 100 // print out wsfline files interval based on iteration
W 22 -9.81 // gravity
9.1.3 Results
η (m)
0.00 0.00
−0.02 −0.02
30 32 34 36 38 40 0 5 10 15 20 25 30 35 40
t (s) x (m)
(a) Free surface elevation evolution over time at wave (b) Free surface elevation in space at t =40 s
gauge 2 (x =20 m)
Figure 9.1: Free surface elevations in the simulation of 2nd-order Stokes wave in intermediate water depth.
1 2 3 4 5 6 7 8
0.4 m
0.3 m
z 1:20 1:10
x
5m 6m 6m 2m 3m 9.5m
38m
126
C 15 21 // bottom: wall boundary
C 16 3 // top: symmetry plane
B 1 0.04 // horizontal mesh size dx
B 2 1000 1 10 // number of cells in x, y and z directions
B 10 0.0 40.0 0.0 0.04 0.0 1.0 // rectangular domain size
S 61 11.0 17.0 0.0 0.04 0.0 0.3 // solid wedge object
S 10 17.0 19.0 0.0 0.04 0.0 0.3 // solid rectangular object
S 61 19.0 22.0 0.0 0.04 0.3 0.0 // solid wedge object
B 103 5 // vertical grid clustering
B 113 3.0 // the stretching factor for the vertical grid clustering
B 116 1.0 // the focal point for the vertical grid clustering, which is water depth here
M 10 8 // number of processors
M 20 2 // decomposition method 2
9.2.3 Results
127
0.03 REEF3D theory 0.03 REEF3D theory
0.02 0.02
0.01 0.01
η (m)
η (m)
0.00 0.00
−0.01 −0.01
−0.02 −0.02
50 60 70 80 90 100 50 60 70 80 90 100
t (s) t (s)
η (m)
0.00 0.00
−0.01 −0.01
−0.02 −0.02
50 60 70 80 90 100 50 60 70 80 90 100
t (s) t (s)
η (m)
0.00 0.00
−0.01 −0.01
−0.02 −0.02
50 60 70 80 90 100 50 60 70 80 90 100
t (s) t (s)
η (m)
0.00 0.00
−0.01 −0.01
−0.02 −0.02
50 60 70 80 90 100 50 60 70 80 90 100
t (s) t (s)
Figure 9.3: Free surface elevations in the simulation of wave propagation over a submerged bar.
128
9.3 Wave breaking over a mild slope
M 10 8 // number of processors
M 20 2 // decomposition method 2
B 90 1 // wave input
B 92 8 // 2nd-order stokes wave
B 93 0.128 5.0 // wave height and wave length
B 96 9.5 9.0 // wave generation zone length and numerical beach length
B 98 3 // neumann boundary for wave generation
B 99 1 // relaxation method 1 for numerical beach
129
M 10 8 // number of processors
P 10 1 // turn on .vtu printout
P 30 0.05 // print out .vtu files interval based on simulation time
P 51 11.8 0.0025 // x and y coordinate of wave gauge 1 for simulations
P 51 12.8 0.0025 // x and y coordinate of wave gauge 2 for simulations
P 51 13.8 0.0025 // x and y coordinate of wave gauge 3 for simulations
P 51 14.1 0.0025 // x and y coordinate of wave gauge 4 for simulations
W 22 -9.81 // gravity
9.3.3 Results
0.20 0.20
REEF3D theory REEF3D theory
0.15 0.15
0.10 0.10
η (m)
η (m)
0.05 0.05
0.00 0.00
−0.05 −0.05
14 16 18 20 22 14 16 18 20 22
t (s) t (s)
0.20 0.20
REEF3D theory REEF3D theory
0.15 0.15
0.10 0.10
η (m)
η (m)
0.05 0.05
0.00 0.00
−0.05 −0.05
14 16 18 20 22 14 16 18 20 22
t (s) t (s)
Figure 9.4: Free surface elevations in the simulation of breaking wave over a mild slope.
130
B 103 5 // vertical grid clustering
B 113 3.0 // the stretching factor for the vertical grid clustering
B 116 2.0 // the focal point for the vertical grid clustering, which is water depth here
M 10 8 // number of processors
M 20 2 // decomposition method 2
M 10 8 // number of processors
W 22 -9.81 // gravity
9.4.3 Results
131
REEF3D theory
50
40
S(f) (m 2/Hz)
30
20
10
0
0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35
f (Hz)
Figure 9.5: wave spectrum in the simulation of a 3-hour irregular sea state at wave gauge 2.
M 10 12 // number of processors
M 20 2 // decomposition method 2
132
9.5.2 REEF3D: ctrl.txt
9.5.3 Results
133
(a) bathymetry (b) Free surface elevation
Figure 9.6: Free surface elevations in the simulation of wave propagation over natural bathymetry
M 10 8 // number of processors
M 20 2 // decomposition method 2
134
A 351 2 // deep water wave breaking detection
A 352 0 // no additional filtering for viscous damping breaking model
A 365 1.86 // artificial viscosity for wave breaking algorithm
I 30 1 // full tank initialisation for quick check, turn it off for real simulations
M 10 8 // number of processors
W 22 -9.81 // gravity
9.6.3 Results
135
(a) Free surface elevation
Directional Spectrum
90
0.8
Level curves at:
120 60
1
2 0.6
3
4
1505 0.4 30
6
0.2
180 0
210 330
240 300
270
Figure 9.7: Free surface elevations and directional spectrum in the simulation of short-crested irregular sea.
136
10. Tutorial | REEF3D::CFD
10.1 2D Dam Break
This a 2D dam break case. Comments to the control files are marked by blue fonts.
10.1.3 Results
137
(a) Initial Condition with level set function (b) after t = 0.2 sec with velocity magnitude
(c) after t = 0.4 sec with velocity magnitude (d) after t = 0.7 sec with velocity magnitude
(e) after t = 1.0 sec with velocity magnitude (f) after t = 1.5 sec with velocity magnitude
138
10.2 3D Dam Break with Obstacle
This case is optimized for fast processing. In order to get a more detailed free surface result,
just change B 1 to e.g. 0.0125.
10.2.3 Results
139
(a) Initial Condition (b)
(c) (d)
(e) (f)
140
10.3 2D Vortex Shedding
141
10.3.3 Results
For the flow through a narrow contraction the open channel flow capabilities in ioFlow are
used. Just for information: the grid is rather coarse for this flow situation. The grid can be
easily refined by changing the B1 parameter in the DIVEMesh ’control.txt’ file, depending on
the performance of your computer.
C 11 1 // inflow boundary
C 12 21 // wall boundary
C 13 21 // wall boundary
C 14 2 // outflow boundary
C 15 21 // bottom: wall boundary
C 16 3 // top: symmetry plane
B 1 0.025 // mesh size dx
B 10 0.0 2.5 0.0 0.6 0.0 0.5
S 83 0.8 0.0 0.0 1.1 0.0 0.0 1.1 0.2 0.0 0.8 0.0 0.5 1.1 0.0 0.5 1.1 0.2 0.5 S 10 1.1 1.4 0.0
0.2 0.0 0.5
S 83 1.4 0.0 0.0 1.7 0.0 0.0 1.4 0.2 0.0 1.4 0.0 0.5 1.7 0.0 0.5 1.4 0.2 0.5
S 83 0.8 0.6 0.0 1.1 0.6 0.0 1.1 0.4 0.0 0.8 0.6 0.5 1.1 0.6 0.5 1.1 0.4 0.5
S 10 1.1 1.4 0.4 0.6 0.0 0.5
S 83 1.4 0.6 0.0 1.7 0.6 0.0 1.4 0.4 0.0 1.4 0.6 0.5 1.7 0.6 0.5 1.4 0.4 0.5
// Solid: contraction geometry based on wedges (S 83) and boxes (S 10)
M 10 4
142
10.4.2 REEF3D: ctrl.txt
B 60 1 // turn on ioFlow
F 42 0.5 // length for level set initialization, instead of maximum length in domain
T 10 2 // k − ω turbulence model
W 22 -9.81 // gravity
10.4.3 Results
143
(a) Mesh (b) Initial velocity with potential (c) U
flow solver
C 11 1 // inflow boundary
C 12 21 // wall boundary
C 13 21 // wall boundary
C 14 2 // outflow boundary
144
10.5.2 REEF3D: ctrl.txt
B 60 1 // turn on ioFlow
T 10 2 // k − ω turbulence model
W 22 -9.81 // gravity
10.5.3 Results
145
(a) Mesh (b) Initial velocity with potential (c) U
flow solver
For the case of a simple rectangular wave tank without obstacles, the simulation can be
run in 2D. Linear waves are generated, and the propagating waves are compared with the
theoretical solution throughout the wave tank. The idea is, that if the wave propagation is
represented well by the numerical model, the numerical results will match the theoretical free
surface profile in the tank. In this example, the wave has a relatively low steepness, and good
convergence can be reached for dx = 0.05m already, which improves further on finer grids.
For steeper waves, finer grids may be required.
146
10.6.2 REEF3D: ctrl.txt
F 42 1.0 // length for level set initialization, instead of maximum length of domain
W 22 -9.81 // gravity
P 52 0.025 // y-coordinate and print out water surface line (wfsline) in x-direction
10.6.3 Results
147
Figure 10.6: Wave tank with free surface and U
0.51
0.50
0.49
0 5 10 15 20 25 30
Figure 10.8: Free surface along the tank, numerical result (black line) vs theory (red line)
Similar to the previous chapter, a two-dimensional rectangular wave tank is used. Now,
different wave generation and absorption methods are used, namely Dirichlet wave generation
(DWG) and active wave absorption (AWA). With DWG, the values for the horizontal and
vertical velocities are prescribed at the inlet boundary without further modulation. The level
set function is allowed to move freely, but due to the correct flow momentum it will follow
the prescribed wave theory. AWA generates a wave opposite to the reflected one at the
outlet boundary, thus cancelling out the unwanted reflections. AWA is based on shallow water
theory, which also has consequences for type of applications it should be used for, i.e. shallow
to intermediate water with preferably longer waves. Overall, the AWA-DWG combination
requires smaller tank or basin compared to the relaxation methods (RM). AWA, DWG and
RM can be used for generation and absorption in any combination.
148
10.7.1 DIVEMesh: control.txt
149
N 47 0.25 // factor for CFL criterion
M 10 4 // number of parallel processes
P 10 1 // turn on .vtu printout
P 30 0.1 // print out .vtu files interval based on simulation time
P 40 1 // turn state file print out for hot-start
P 42 1.0 // state file print out interval
T 10 0 // no turbulence model
W 22 -9.81 // gravity
P 52 0.0125 // y-coordinate and print out water surface line (wfsline) in x-direction
P 53 1 // add theoretical wsfline to file
P 55 0.50 // print out wsfline files interval based on simulation time
P 51 2.50 0.0125 // wave gage with x- and y-coordinates
P 51 5.00 0.0125 // wave gage with x- and y-coordinates
P 51 15.0 0.0125 // wave gage with x- and y-coordinates
P 51 20.0 0.0125 // wave gage with x- and y-coordinates
10.7.3 Results
Following the NWT examples in the previous examples, now the waves are generated with
wavemaker kinematics input, see e.g. Aggarwal et al. [2018a] for more information.
150
10.8.1 DIVEMesh: control.txt
151
N 40 3 // 3rd-order Runge-Kutta Scheme for velocity time treatment
T 10 0 // no turbulence model
W 22 -9.81 // gravity
P 52 0.0125 // y-coordinate and print out water surface line (wfsline) in x-direction
The ’wavemaker.dat’ file contains the time dependent kinematics of the wavemaker.
10.8.4 Results
152
Figure 10.13: 5th-order Stokes Waves setup
This verification case shows the propagation of 5th-order Stokes waves in a 200 m long tank
and highlights the use of velocity probes both from the model and the wave theory.
153
D 20 2 // Implicit diffusion for velocities
D 30 2 // Projection Correction Method for the pressure
F 30 3 // 3rd-order Runge-Kutta scheme for Level Set time treatment
F 40 3 // 3rd-order Runge-Kutta scheme for Reinitialization time treatment
F 42 0.8 // length for level set initialization, instead of maximum length of domain
F 60 4.01 // still water level
I 12 1 // hydrostatic pressure initialization
N 40 3 // 3rd-order Runge-Kutta scheme for velocity time treatment
N 41 120.0 // Maximum simulation time
N 47 0.3 // factor for CFD criterion
M 10 12 // number of parallel processes
P 10 1 // turn on .vtu printout
P 30 0.25 // print out interval for .vtu files based on simulation time
W 22 -9.81 // gravity
P 52 0.005 // y-coordinate and print out water surface line wsfline in x-direction
P 53 1 // add theoretical wsfline to file
P 54 10 // print out interval for wsflines based on iterations
P 50 15.0 0.005 // Wave gage 1 for wave theory
P 50 50.0 0.005 // Wave gage 2 for wave theory
P 50 75.0 0.005 // Wave gage 3 for wave theory
P 50 100.0 0.005 // Wave gage 4 for wave theory
P 50 125.0 0.005 // Wave gage 5 for wave theory
P 51 15.0 0.005 // Wave gage 1
P 51 50.0 0.005 // Wave gage 2
P 51 75.0 0.005 // Wave gage 3
P 51 100.0 0.005 // Wave gage 4
P 51 125.0 0.005 // Wave gage 5
P 65 25.0 0.025 3.0 // Velocity probe 1
P 65 75.0 0.025 3.0 // Velocity probe 2
P 65 125.0 0.025 3.0 // Velocity probe 3
P 66 125.0 0.025 3.0 // Velocity probe 1 for wave theory
P 66 25.0 0.025 3.0 // Velocity probe 2 for wave theory
P 66 75.0 0.025 3.0 // Velocity probe 3 for wave theory
154
Figure 10.14: Wave gage 1, x = 25m
155
10.9.4 Velocity Results
156
Figure 10.23: Vertical Velocity, x = 75m, z=3m
4.8 m 2 m 1m1m1.2m1.6m
1 2 3 4 5 6 7
Still Water Level
0.75 m
1:25
0.40 m 1:20 1:10
Beach
6m 6m 2m 3m 1.95m 18.75 m
The well-know benchmark case for wave propagation over a submerged bar is presented here.
The description of the experimental setup can be found in the original paper by Beji and
Battjes [1993]. The simulations are run in 2D with wave gages at several locations along the
wave tank.
157
C 13 3 // side: symmetry plane
C 14 7 // numerical relaxation beach
C 15 21 // bottom: wall boundary
C 16 3 // top symmetry plane
B 1 0.01 // mesh size dx
B 10 0.0 24.0 0.0 0.01 0.0 0.8 // rectangular domain size
S 61 6.0 12.0 0.0 0.01 0.0 0.3 // front wedge of the bar
S 10 12.0 14.0 0.0 0.01 0.0 0.3 // middle section of the bar
S 61 14.0 17.0 0.0 0.01 0.3 0.0 // back wedge of the bar
M 10 4 // number of parallel processes
158
M 10 4 // number of parallel processes
P 30 0.5 // print out interval for .vtu files based on simulation time
W 22 -9.81 // gravity
P 52 0.005 // y-coordinate and print out water surface line wsfline in x-direction
P 51 2.0 0.005 // Wave gage 1 location, will printed in the order given here
10.10.3 Results
0.01
−0.01
0 5 10 15 20 25 30
0.01
−0.01
4 6 8 10 12 14 16 18 20 22 24 26 28 30 32
159
Gauge 3, x = 12.5m Experiment
0.03
REEF3D
0.02
0.01
−0.01
6 8 10 12 14 16 18 20 22 24 26 28 30 32 34
0.02
0.01
−0.01
6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36
0.02
0.01
−0.01
8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38
0.01
−0.01
8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38
160
Gauge 7, x = 17.3m Experiment
REEF3D
0.02
0.01
−0.01
10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40
161
10.11 Plunging Breaking Waves over Slope
The well know benchmark case for plunging breaking waves over a submerged bar by Ting and
Kirby [1995] is shown here. The breaking waves require a relatively finer grid, thus 128 cores
on NOTUR’s supercomputer facilities were used to simulate the case. For more information
on this case and breaking waves over slopes in general, please have a look at theses in-depth
studies: Alagan Chella et al. [2015b], Alagan Chella et al. [2015c] and Alagan Chella et al.
[2015a].
M. Alagan Chella et al. / Ocean Modelling 103 (2016) 53–72 55
Breaker type Deep water wave height, H0 (m) Wave period, T (s) Experimental data Numerical results
C 14 7 // numerical relaxation beach xb (m) Hb (m) H /d xb (m) Hb (m) H /d
C 15 21Spilling
// bottom:
Plunging
0.127
0.089
wall boundary 2.0
5.0
6.40
7.795
0.165
0.191
0.78
1.24
6.28
7.84
0.172
0.205
0.775
1.164
B 99 2 // no beach
F 42 1.0 // length for level set initialization, instead of maximum length of domain
W 22 -9.81 // gravity
163
P 51 20.8 0.0025 // wave gage
164
10.11.3 Results
Alagan Chella, M. et al., 2016
(a)
(b)
(c)
Figure 10.34: Variation of horizontal velocity, U (m/s) under the plunging breaker at t= 10.85s (a), 10.95s (b)
Figure 17: Variation of horizontal velocity, Vx (m/s) under the plunging breaker at t= 10.85s
and 11.05s (c)
(a), 10.95s (b) and 11.05s (c)
Figs. 18 and 19 show the comparison of the computed vertical velocity near the free surface
with the experimental data at three di↵erent horizontal locations: before breaking (a), during
breaking (b) and after breaking (c). The computed vertical velocity agrees well with the
measurements, though it is slightly higher than the experimental data in the outer region of
the surf zone for the spilling breaker. A slight increase in the vertical particle velocity can be
expected during the formation of small (spilling) and large (plunging) overturning water jets
at the wave crest and the splash-up for both the breakers. For the spilling breaker, a slight
Figure 10.35: Wave gage 1, black experiment Ting and Kirby [1995], red REEF3D
22
Figure 10.36: Wave gage 2, black experiment Ting and Kirby [1995], red REEF3D
165
Figure 10.37: Wave gage 3, black experiment Ting and Kirby [1995], red REEF3D
Figure 10.38: Wave gage 4, black experiment Ting and Kirby [1995], red REEF3D
The simulation of plunging breaking waves over a slope from the previous section by Ting
and Kirby [1995] is shown here with a non-uniform grid (NUG) setup. The ctrl.txt is identical
to the one above, with the exception of the M10 parameter.
166
and the irregular bed.
Time series of the water surface elevations are obtained using wave gauges which is
sampled at 20 Hz, from this the wave information is obtained. LDVs was also used
to measure the velocities in three directions with a sampling frequency of 100 Hz.
10.13 Shoaling over Irregular Topography
3.3.2 Numerical set-up
In this case, waves propagation irregular topography is calculated using phase accurate irregular
A 2D model is used to simulate the Boers experiment since the bed irregularities are
waves based on Boers’ experiment Boers [1996]. Here, the bed topography is generated using
only in the cross-shore direction. The numerical domain is 36.3 m length and 1 m
a ’geo.dat’ file with xyz-point data. These coordinates are interpolated using a local inverse
height, algorithm
distance the still water level is kept
in DIVEMesh. Theatwaves
0.75 m.
areREEF3D
generatedallows
using for irregular
wave geometryare
reconstruction,
to be
very simulated,
convenient waytherefore
to createthe sameaccurate
phase beach profile from
irregular the based
waves experiment was input
on a single in
wave gage
the model.
Aggarwal et al. [2018b].
Figure 10.39: Experimtental setup plunging breaking waves over slope Elakel [2018]
Figure 3.19: Numerical wave tank of Boers case: grid size = 0.005 m, water depth =
0.75 m
10.13.1 DIVEMesh: control.txt
Two wave conditions from the experiment will be simulated numerically in this report.
CThe
11 6first
// left
oneside: wave relaxation
is a relatively steep zone
wave with a significant wave height Hs = 0.157 m
and a peak period of Tp = 2.05 s. The second is relatively less steep with Hs = 0.103
C 12 3 // side: symmetry plane
m significant wave height and Tp = 3.33 s peak period. To allow for the comparison
Cof
13time
3 //series,
side: symmetry
the wave plane
reconstruction method which uses a time series that belong
to measurements close to the wave generator is imposed (Section 2.8.3), instead of
C 14 7 // numerical relaxation beach
simply inputting the spectral parameters above.The right boundary is an active ab-
Csorption
15 21 //beach
bottom: wallprevents
which boundaryreflection of incoming waves by imposing a wave in
Cthe
16 3opposite direction. plane
// top symmetry
BTo
1 0.01 // mesh
capture size dx characteristics accurately, two grid sizes were tested, 0.01 m
the breaking
Band 0.005
10 0.0 m 0.0
36.3 and0.01
the 0.0
di↵erence
1.00 //is rectangular
highlighted.domain size
In the ’geo.dat’ file all bathymetry coordinates are given in ASCII format and are then used
to interpolate into the bed by DIVEMesh. The bed can be visualized with the zero contour of
’topo’ in the vtu files read by ParaView.
167
10.13.3 REEF3D: ctrl.txt
168
10.13.4 REEF3D: waverecon.dat
The ’waverecon.dat’ files contains the individual wave components including amplitude,
frequency and phase shift in order to generate phase accurate irregular waves.
10.13.5 Results
Figure 10.40: Shoaling of irregular waves for the Boers case Elakel [2018]
Figure 10.41: Breaking waves on the bar for the Boers case Elakel [2018]
Figure 10.42: Breaking waves on the foreshore for the Boers case Elakel [2018]
(b) xxWave
(b)
Figure 10.44: == 2m
2mgage 2
(b) x
(b) x== 2m
2m
(b) x = 2m
(c) xxWave
(c)
Figure 10.45: == 4m
4mgage 3
(c) x
(c) x== 4m
4m
(c) x = 4m
(d) x = 6m
(d) xWave
Figure 10.46: = 6m
gage 4
(d) x
(d) x== 6m
6m
(d) x = 6m
(e) xx =
(e) = 17.5m
17.5m
(e)
Figure(e)
x=
x
10.47:
=Wave
17.5m
17.5m
gage 5
(e) x = 17.5m
(f) xx =
(f) = 21.85
21.85
(f) xx = 21.85
21.85
Figure(f)
10.48: =
Figure 3.23:
Figure 3.23: Time
Time series
series of
of thethefree
free surface
surface elevation
Wave gage 6
elevation comparison for
comparison for the
the less
less steep
steep
(f) x = 21.85
Figure
Figure
waves 3.23:(H
waves case
case
3.23: Time
(HTime series of
= 0.103m
series
ss = 0.103m
of the
,, TTthe =free
pp =free
surface
3.33s) at six
surface
3.33s) at elevation
sixelevation comparison
di↵erentcomparison
di↵erent for the
locations along
locations along
for the less
theless
the steep
irregular
steep
irregular
170
waves
Figure
waves
slope case
slope case (HTime
3.23:(H = 0.103m ,, T
series of
ss = 0.103m
Tthe
p =
p
=free
3.33s) at six
surface
3.33s) at sixelevation
di↵erentcomparison
di↵erent locations along
locations along theless
for the
the irregular
steep
irregular
43
43
slope
waves case (Hs = 0.103m , Tp = 3.33s) at six di↵erent locations along the irregular
slope 43
43
slope
43
Figure 10.49: Non-breaking wave forces
In many scenarios, wave forces need to be computed. Based on the experiments by Chen et al.
[2014], numerical benchmark results were produced, see Bihs et al. [2016a] for more detail. In
addition to previous NWT examples, the use of the force box is shown in this example. The
forces on a solid within the force box is calculated and printed out. It is important to give
some margin around the solid in order capture all surface facets in the pressure integration
algorithm. More REEF3D related literature on non-breaking wave forces can be found here:
Kamath et al. [2015b], Kamath et al. [2016b] and Kamath et al. [2015a].
171
10.14.2 REEF3D: ctrl.txt
172
10.14.3 Results
Figure 10.50: Free surface comparison between REEF3D and the experimental data Chen et al. [2014]
Figure 10.51: Wave Force comparison between REEF3D and the experimental data Chen et al. [2014]
Extending the previous scenario, breaking wave forces are simulated by using the case from
Kamath et al. [2016a] based on an experimental study in the GWK in Hannover Irschik et al.
[2002]. The waves are shoaling on a 1:10 slope and are breaking directly at the vertical
cylinder. The slamming forces a calculated using the force box approach. REEF3D has been
extensively validated and applied for breaking wave forces: Bihs et al. [2016b], Alagan Chella
et al. [2019c], Alagan Chella et al. [2019b], Alagan Chella et al. [2019a]
173
A. Kamath et al. Ocean Engineering 128 (2016) 105–115
Fig. 1. Dimensions of the two-dimensional numerical wave tank to determine breaking wave characteristics.
Figure 10.52: Breaking wave forces setup
maintain the numerical stability of the simulation. 2.3 m placed at 180 m from the wavemaker. A flat bed extends from the
The model uses a Cartesian grid for spatial discretization and high- end of slope with a height of 2.3 m. A vertical cylinder of diameter
C 13 21 // side: wall boundary
order finite difference schemes can be implemented in a straight D=0.7 m is placed with its central axis at the top of the slope and
forward manner. A ghost cell immersed boundary method (GCIBM) incident waves with heights H between 1.15–1.60 m and periods T
C 14 8 // numerical AWA beach
(Berthelsen and Faltinsen, 2008) is used to account for the complex between 4.0 and 9.0 s are generated. In the current study, the case with
geometric solid-fluid
C 15boundaries. The code
21 // bottom: is fully
wall parallelised using
boundary incident wave period T=4.0 s, wave height H=1.30 m and water depth
the MPI library and the numerical model can be executed on high d=3.8 m presented in Choi et al. (2015) is chosen for comparison with
performance computing
C 16 3systems
// topwith very goodplane
symmetry scaling. the numerical results. The three-dimensional numerical wave tank is
54 m long, 5 m wide and 7 m high with a grid size of dx=0.05 m
2.1. Level set method B 1 0.05 // mesh size dx resulting a total of 15.12 million cells. In order to study the wave
breaking process for the different cases simulated in the study, a two-
The level set Bmethod 10 0.0(Osher
54.0 and
0.0 Sethian,
5.0 0.0 1988)
7.0 //is rectangular
an interface domain size wave tank with the same length and height is used as
dimensional
capturing method in which the zero level set of a signed distance illustrated in Fig. 1. Waves with incident wave steepnesses
function, ϕ (→ x , t) S 61 21.0the
represents 44.0 0.0 5.0
interface 0.0 2.30
between // solid
two phases. Forslope
the H0 / L 0 = 0.075, 0.070, 0.063, 0.059, 0.055, corresponding to wave heights
rest of the domain, ϕ (→ x , t ) gives the closest distance of each point in of H1=1.54 m, H2=1.44 m, H3=1.30 m, H4=1.23 m and H5=1.13 m are
the domain fromS the 10 44.0
interface54.0and0.0the5.0 0.0distinguishes
sign 2.30 // solidthe flat
two generated to study the breaking wave forces on a vertical cylinder for
phases across the interface. The level set function is continuous across different wave impact scenarios.
the interface andO 33 44.0as:2.50 0.35 // vertical cylinder
is defined
⎧>0 if → 3.2. Validation of the numerical model for breaking wave force
⎪
xMis 10 8 //1number of parallel processes
in phase calculation
ϕ (→
x , t ) ⎨ = 0 if →x is at the interface
⎪ →M 20 2 // advanced domain decomposition
⎩<0 if x is in phase 2 (7) The numerical results for breaking wave forces and the free surface
elevation along the frontline of the cylinder (x=43.65 m) near the tank
The level set function provides a sharp representation of the interface. wall for H3=1.30 m are compared to the experimental data to validate
A partial differential equation based reinitialisation procedure pre- the numerical model. The cylinder is placed with its axis at the top of
10.15.2 REEF3D: ctrl.txt
sented by Peng et al. (1999) is used to maintain the signed distance the slope (x=44.00 m), such that the front surface of the cylinder is
property of the function, which can be lost on convecting the function directly at the breaking point and the vertical breaking wave crest
under an external velocity field.
B 10 1 // use wall functions for the velocities impacts the cylinder front surface. A grid size of dx=0.05 m is used. The
filtered and Empirical Mode Decomposition (EMD)-treated experi-
2.2. Numerical wave tank mental data from the experiments carried out at GWK, Hannover
B 10 1 // use wall functions for the turbulence model
(Irschik et al., 2002), presented by Choi et al. (2015) is used for the
The two-dimensional numerical wave tank
B 50 0.0001 // wall roughness ks has symmetry condi- comparison with the numerical results for the wave force. Fig. 2a shows
tions on the side walls and the top of the tank. The bottom wall of the that the numerical model provides a good prediction of the breaking
tank and boundaries B 90of objects
1 // turnplacedoninthe
the tank are treated
numerical withtank
wave a no- wave force and the calculated wave force is consistent over several wave
slip or wall boundary condition. In a three-dimensional wave tank, the periods. Since the wave impact is very sensitive to the wave breaking
side walls are also B 92subjected
5 // use to 5th-order
wall boundaryStokes waves Wave
conditions.
generation is handled using the relaxation method (Larsen and
Dancy, 1983), with B 93 the1.3 4.0 // function
relaxation wave height, wavebyperiod
presented Jacobsen
et al. (2012):
B 96 21.0 0.0 // wavegen relaxation length, numerical beach length
3.5
e(1− x ) − 1
Γ (x ) = 1 −
e −B198 (8)
2 // use relaxation method 2 for wave generation
where Γ (x ) is the relaxation function and x ∈ [0, 1] is the length scale
B 99
along the relaxation 3 //
zone andAWA beach
ensures a smooth transition of the still
water to a wave. The relaxation function also absorbs any waves
reflected from theDobjects
10 4 // Conservative
placed WENO
in the wave tank, for velocity
travelling towardsconvection
the wave generation zone. This prevents the reflected waves from
affecting the wave D generation
20 2 // Implicit diffusion
and simulates for velocities
a wave generator with
active absorption. The numerical beach is implemented using the active
absorbing beach D 30 1 //byProjection
formulated Schäffer andMethod
Klopmanfor the pressure
(2000).
175
10.15.3 Results
176
numerical experimental
1.0
0.5
η[m]
−0.5
10 15 20 25 30
t [s]
Figure 10.55: Wave Force comparison between REEF3D and the experimental data Irschik et al. [2002]
numerical experimental
15000
10000
F [N]
5000
0
10 15 20 25 30
t [s]
Figure 10.56: Free surface comparison between REEF3D and the experimental data Irschik et al. [2002]
Setup for simulations including floating bodies using the continuous direct forcing approach.
As an example, the heave decay of a sphere can be simulated using the following input files
together with the STL-file provided in the tutorial folder. It is recommended to use the
cell-based stretching shown in this example to define a box with uniform cell sizes around the
floating body.
177
C 16 3 // top: symmetry plane
B 1 0.05 // This value should the first number in the cell-based stretching option
B 10 0.0 6.0 0.0 6.0 0.0 4.0 // rectangular domain size
B 101 11 // cell-based stretching function in x-direction
B 127 0.05 0.3 3.0 1.5 1.1 // options for cell-based stretching function in x-direction
B 102 11 // cell-based stretching function in y-direction
B 128 0.05 0.3 3.0 1.5 1.1 // options for cell-based stretching function in x-direction
B 103 11 // cell-based stretching function in z-direction
B 129 0.05 0.3 2.0 1.5 1.1 // options for cell-based stretching function in x-direction
M 10 4 // number of parallel processes
M 20 2 // advanced domain decomposition
178
N 47 0.3 // factor for CFL criterion
179
Bibliography
M. A. Afshar. Numerical wave generation in OpenFOAM. Master’s thesis, Chalmers University
of Technology, 2010.
M. Alagan Chella, H. Bihs, and D. Myrhaug. Characteristics and profile asymmetry properties
of waves breaking over an impermeable submerged reef. Coastal Engineering, 100:26–36,
2015a.
M. Alagan Chella, Hans Bihs, Dag Myrhaug, and Michael Muskulus. Hydrodynamic charac-
teristics and geometric properties of plunging and spilling breakers over impermeable slopes.
Ocean Modelling, Virtual Special Issue: Ocean Surface Waves, pages 1–20, 2015c.
M. Alagan Chella, H. Bihs, and Myrhau D. Numerical modeling of breaking wave kinematics
and wave impact pressures on a vertical slender cylinder,. Journal of Fluids and Structures,
86:94–123, 2019a.
M. Alagan Chella, H. Bihs, Myrhau D., and Ø. A Arntsen. Numerical modeling of breaking
wave kinematics and wave impact pressures on a vertical slender cylinder,. Journal of
Offshore Mechanics and Arctic Engineering, 141(5):1–10, 2019b.
M. Alagan Chella, H. Bihs, A. Kamath, Myrhau D., and Ø. A Arntsen. Breaking wave
interaction with a group of four vertical slender cylinders in two square arrangements.
Journal of Offshore Mechanics and Arctic Engineering, 141(6):1–10, 2019c.
S. Beji and J. A. Battjes. Experimental investigation of wave propagation over a bar. Coastal
Engineering, 19:151–162, 1993.
H. Bihs, A. Kamath, M. Alagan Chella, A. Aggarwal, and Ø. A. Arntsen. A new level set
numerical wave tank with improved density interpolation for complex wave hydrodynamics.
Computers & Fluids, 140:191–208, 2016a.
M. Boers. Simulation of a surf zone with a barred beach. Report 1. Wave heights and wave
breaking. PhD thesis, Report, Department of Civil Engineering, Delft Technical University,
1996.
181
hyper high performance preconditioners - User’s Manual. Center for Applied Scientific
Computing, Lawrence Livermore National Laboratory, 2015.
M. Elakel. Investigation of wave transformation and breaking processes in the coastal zone
using REEF3D. PhD thesis, Master Thesis, Marine Civil Engineering, NTNU Trondheim,
2018.
K. Irschik, U. Sparboom, and H. Oumeraci. Breaking wave characteristics for the loading
of a slender pile. In Proc. 28th International Conference on Coastal Engineering, Cardiff,
Wales, 2002.
N. G. Jacobsen, D. R. Fuhrman, and J. Fredsøe. A wave generation toolbox for the open-
source CFD library: OpenFOAM. International Journal for Numerical Methods in Fluids,
70(9):1073–1088, 2012.
A. Kamath, M. Alagan Chella, H. Bihs, and Ø. A. Arntsen. Evaluating wave forces on groups
of three and nine cylinders using a 3D numerical wave tank. Engineering Applications of
Computational Fluid Mechanics, 2015a.
A. Kamath, M. Alagan Chella, H. Bihs, and Ø. A Arntsen. Breaking wave interaction with
a vertical cylinder and the effect of breaker location. Ocean Engineering, 128:105–115,
2016a.
M. Peric. Why STAR-CCM+ is the next step for cfd. dynamics, 23:3–4, 2004.
182