SlideShare a Scribd company logo
1 of 37
Download to read offline
Basic guide to OpenFOAM tutorials
Disclaimer: OpenFOAM® is a registered trademark of OpenCFD Limited, the producer OpenFOAM
software. All registered trademarks are property of their respective owners. This guide is not approved or
endorsed by OpenCFD Limited, the producer of the OpenFOAM software and owner of the
OPENFOAM® and OpenCFD® trade marks.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 1
1. Introduction
Practically every question on how to learn OpenFOAM is answered by directing the aspiring
student to tutorials provided with the package. They are instructed to “simply” go through the
tutorials, run and play with them and learn through practice.
It is not far from the truth - we learn best by practice and any time you want to learn something
really well you need to practice it to drill the procedures into your memory. Theory is of course
fundamental, but it’s practice that makes the student skillful in any given field.
There are tens of solvers in OpenFOAM and each of them has few tutorials, so there is a lot to
work through. Naturally, at the beginning you will want to work on the field you are most
interested with, or need for your work or study, and thus you will need to choose a relevant
tutorial(s).
What I want to give you in this guide is a short instruction on each of listed tutorials. I will not go
deep into physics, equations and so on – instead I will cover what happens in each of them from
the procedural side. How the case is set up, are there some additional steps taken, ho the mesh
is set up and some general remarks on physics and boundary conditions.
The tutorials, as found in OpenFOAM installation, are divided by solvers names – each solver
has its own set of tutorials (few of them have only one).
Below you will find a list of solvers with descriptions taken from OpenFOAM official
documentation (to be found in UserGuide.pdf in OF installation or here
http://www.openfoam.org/features/standard-solvers.php). For each solver I have listed the
tutorials available (OF release 2.3.0), a short description of what is done and a screenshot of
the results.
Based on this list you can quickly select the one most useful for you at the time and use it to set
up a case you want to simulate.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 2
2. Basic
laplacianFoam - Solves a simple Laplace equation, e.g. for thermal diffusion in a solid
Tutorial name Description
flange Steady state heat transfer on a flange.
Dirichlet boundary conditions used, two
different temperatures. Includes mesh
conversion from Ansys mesh.
potentialFoam - Simple potential flow solver which can be used to generate starting fields for
full Navier-Stokes codes.
cylinder Solves potential (inviscid steady state) flow around a 2D cylinder. Uses
symmetry boundary condition. /system/controlDict shows how to
automatically generate analytical solution.
pitzDaily Potential flow over backward facing step. Potential flow solver can be
used to generate initial conservative velocity fields for any case (using
appropriate geometry). Utility to use: mapFields
ScalarTransportFoam - Solves a transport equation for a passive scalar
Name Description
pitzDaily Convection-diffusion problem with
temperature being convected with
velocity through Pitz- Daily problem
geometry.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 3
3. Incompressible
adjointShapeOptimization - Steady-state solver for incompressible, turbulent flow of non-
Newtonian fluids with optimization of duct shape by applying ”blockage” in regions causing
pressure loss as estimated using an adjoint formulation
Tutorial name Description
pitzDaily Runs optimization of
Pitz – Daily case to
reach Ua, pa
conditions at the exit.
Applies blockage
(alpha) in regions
which need to be
modified to reach the
desired conditions.
boundaryFoam - Steady-state solver for incompressible, 1D turbulent flow, typically to generate
boundary layer conditions at an inlet, for use in a simulation. Specify inlet velocity and get inlet
distributions of model-relevant turbulence variables.
Tutorial name Description
boundaryLaunderSharma Generates velocity distribution using Launder Sharma k-
epsilon turbulence model. Kinematic viscosity applied using .xy
file. Cyclic symmetry applied on front and back sides.
Generates a ./graphs directory with .xy files with velocity and L-
S k-epsilon model variables distribution for each saved time
step.
boundaryWallFunctions Generates velocity and other turbulence variables distributions
using wall functions formulation. In this case inlet velocity = 0.
boundaryWallFunctionsProfile Uses formulation as the above but ./Allrun script is provided
which runs the case for a set of nu values 9different Re),
generates u+ and y+ values and generates plot comparing the
results with Spalding law.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 4
Figure I-1
Comparison of velocity profiles for the three tutorials
Figure I-2
Comparison of OpenFOAM solution to Spalding law
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 5
icoFoam - Transient solver for incompressible, laminar flow of Newtonian fluids
Tutorial name Description
cavity Lid-driven flow in a square shaped
cavity; incompressible and laminar,
basic hex mesh. Widely described in
OpenFOAM user guide.
cavityClipped The above case solved on a geometry with one bottom corner being cut out.
cavityGrade Cavity tutorial using mesh grading
elbow Incompressible laminar flow through
an elbow with side pipe. Imports
mesh from a .msh file.
nonNewtonianIcoFoam - Transient solver for incompressible, laminar flow of non-Newtonian
fluids. Viscosity curve is defined in /constant/transportProperties file.
Tutorial name Description
offsetCylinder Flow of shear-thickening fluid around a
cylinder.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 6
pimpleDyMFoam - Transient solver for incompressible, flow of Newtonian fluids on a moving
mesh using the PIMPLE (merged PISO-SIMPLE) algorithm
Tutorial name Description
mixerVesselAMI2D Solid body motion case (mesh
topology unaltered) with arbitrary
mesh interface. Straight vanes
mixer rotor rotates inside mixer
vessel.
movingCone Simple illustration of mesh
topology technique. A 2D cone is
translated through the domain and
the mesh topology is altered in
line with the movement. Cone
translation induces fluid
movement in the opposite
direction.
oscillatingInletACMI2D Simple illustration of solid body
movement technique +
oscillations set up in
dynamicMeshDict file. Part of the
mesh moves in relation to the rest
but its topology remains
unaltered. Includes also setup of
Arbitrary Mesh Interface.
propeller Propeller rotation simulated as a
solid body movement. Mesh
created with snappyhexmesh.
Refined mesh created by
running ./Allrun.pre which
includes surfaceFeatureExtract.
K-epsilon turbulence model used.
Tutorial also shows how to
calculate forces and moments on
the surface of the propeller.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 7
wingMotion Wing rotation simulated as mesh
deformation. Mesh set up with
snappyHexMesh, initial flow field
(on fixed wing) calculated with
simpleFoam, then mapped onto
initial mesh for pimpleDyMFoam.
K-omega SST turbulence used,
moving mesh set up in
/constant/dynamicMeshDict
Picture to the right shows grid
points displacements.
pimpleFoam - Large time-step transient solver for incompressible, flow using the PIMPLE
(merged PISO-SIMPLE) algorithm
Tutorial name Description
channel395 LES simulation of a flow through a
square shaped channel with
nonuniform initial velocity and
pressure distributions (a vector/value
applied to each node). Cyclic
symmetry boundaries at inlet, outlet
and sides of the channel.
elipsekkLOmega Turbulent flow of air around an
ellipse. kkL Omega (RANS)
turbulence model used. Shows also
how to build mesh automatically from
a smaller block (mirroring and
transformations).
pitzDaily Well known Pitz Daily case solved by
pimple. K-epsilon turbulence used,
uniform inlet velocity and mesh
graded to fit the areas of greatest
velocity gradients.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 8
TJunction Turbulent (k-epsilon) flow of air-like
fluid through T-Junction – a duct with
two outlets. Created to test a case
with two outlets, so mesh is not
refined. Flow induced by pressure
difference.
TJunctionFan As above + fan represented by
baffles introduced in the inlet duct
(createBafflesDict in /system
directory).
pisoFoam - Transient solver for incompressible flow
– les:
Tutorial name Description
motorBike First runs motorBike case using simpleFoam and Spalart-Allmaras RANS
turbulence modeling. The mesh is set up using snappyHexMesh. Next,
clones the calculated flow field and copies LES setup files into case folder,
then runs the case using LES turbulence modeling.
pitzDaily Large Eddy simulation of Pitz-
Daily case. Mesh set up in the
same as for simpleFoam solver.
1-equation eddy SGS model.
k at inlet set as uniform fixed
value.
Does not converge to final
solution within the time specified.
pitzDailyMapped Geometry and overall setup as
above, k at the inlet set as
mapped.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 9
– ras
Tutorial name Description
cavity Flow of air in a cavity, induced by the
movement of the upper wall. Basic mesh not
including boundary layers what is clearly
visible. Turbulence modeled with k-epsilon
model.
cavityCoupledU General setup the same as for the case
above. Coupled PbiCCCG solver for U
vector used. It offers performance benefits if
the number of iterations in each direction is
similar (uniform orthogonal mesh).
shallowWaterFoam - Transient solver for inviscid shallow-water equations with rotation
Tutorial name Description
squareBump Simulates waves propagation on a
square shaped domain excited with a
central force represented as a height
difference. Run setFields before running
the case.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 10
simpleFoam - Steady-state solver for incompressible, turbulent flow
Tutorial name Description
airFoil2D Steady state flow of air around
airfoil, Newtonian fluid model,
Spalart-Allmaras turbulence, C-
type 2D mesh (imported from
external mesher)
mixerVessel2D Air, k-epsilon turbulence, uses
m4 utility to create input file for
blockMesh (allows to use
mathematical formulations to
specify points location). Round
shape container with internal
rotor. Movement of rotor
simulated with the use of
additional, rotating frame of
reference, set up in fvOptions.
motorBike RANS k-omega SST flow model
run on a motorbike + rider
model. Mesh created with
snappyHexMesh tool, initial flow
conditions created with
potentialFoam, forces and
moments calculated through
controlDict defined functions,
streamlines extracted for
external post processing.
pipeCyclic Swirling flow in a pipe. Cyclic
mesh settings shown along with
parametric mesh setup (needs
to have Code Stream
activated), uses realizable k-
epsilon turbulence model.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 11
pitzDaily Steady turbulent (RANS, k-e)
flow over backward facing step.
blockMesh hexagonal 2D mesh
showing advanced edge grading
approach to mesh refinements.
pitzDailyExptInlet Geometry as above, inlet velocity time dependent (from experiment), set
up through type timeVaryingMappedFixedValue utility (needs separate file
with the values defined for U), K-epsilon turbulence model. Streamlines
for post processing generated through additional option in ControlDict.
turbineSiting Calculates wind velocity field
over a hill. Uses k-epsilon
turbulence model (RANS) with
model coefficients adjusted to be
appropriate for atmospheric
boundary layers modeling.
Terrain geometry created from a
STL file using snappyhexMesh.
SRFSimpleFoam - Steady-state solver for incompressible, turbulent flow of non-Newtonian
fluids in a single rotating frame
Tutorial name Description
mixer 3D simulation of a mixer section with
one blade, cyclic boundary
conditions on sides, k-omega SST
turbulence model, in this case
Newtonian fluid used, but possible to
use non-Newtonian fluids.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 12
4. Compressible
rhoCentralFoam - Density-based compressible flow solver based on central-upwind schemes
of Kurganov and Tadmor
Tutorial name Description
biconic25-55Run35 Laminar flow in a double cone duct.
Flow enters from a high velocity free
stream. Already converged solution
imported on blockMesh. Pressure
sampled on walls.
forwardStep Laminar supersonic (Ma=3) flow
through a duct with straight vertical
obstacle. Artificial inviscid gas used,
defined in
constant/thermophysicalProperties to
have the sound of speed = 1m/s.
Development of shock waves can be
observed.
LadenburgJet60psi Cyclic symmetry solution of air laminar
flow field. Initial state loaded from
external source.
obliqueShock Simulation of an oblique shock wave
development. The shock is created
using two different velocities-Mach
numbers at the inlet and top wall of the
domain. Laminar flow and normalized
gas (a = 1m/s) models used.
shockTube Development of a pressure wave in a
simple tube. Wave generated using
setFields to assign pressure and
temperature in specific location
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 13
wedge15Ma5 Normalized inviscid gas flow in a
domain with conical obstacle. Top
and bottom boundaries are set as
symmetry planes, thus the case in
fact models a flow over a cone. Flow
velocity is 5m/s, thus – Ma=5 and
shock wave development is observed.
rhoLTSPimpleFoam – Local time stepping transient solver for laminar or turbulent flow of
compressible fluids.
Tutorial name Description
angledDuct Flow of air through a duct with
porosity. Temperature dependent
(Sutherland's) transport model
used, k-epsilon turbulence. Porosity
added in system/fvOptions file.
Mesh created using m4 utility.
rhoPimplecFoam - Transient solver for laminar or turbulent flow of compressible fluids
Tutorial name Description
angledDuct Set up precisely as other angleDuct
cases. Differences due to solver
and run time can be observed.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 14
rhoPimpleDyMFoam - Transient solver for laminar or turbulent flow of compressible fluids for
HVAC and similar applications with moving mesh capability
Tutorial name Description
annularThermalMixer Simulates a mixing process in a mixer
equipped with static baffles on the
external walls and moving rotor in the
center. Rotor movement treated as
solid body motion. Initial conditions set
through /constant/caseSettings –
imported into 0 folder with appropriate
command in boundary conditions files.
Mesh created with snappyHexMesh.
There are two inlets of gas inner
(colder and faster) and outer (warmer and slower).
rhoPimpleFoam - Transient solver for laminar or turbulent flow of compressible fluids for HVAC
and similar applications
Tutorial name Description
les pitzDaily Simulation of air flow through a
tube with backward step and a
nozzle at the exit. Inflow is set
as a turbulent with 2%
fluctuation in the flow direction
and 1% cross flow. 1 equation
eddy SGS model used.
ras angledDuct Flow of air though a square
shaped duct with a porous
section. Porosity added in
system/fvOptions file. Mesh
created using m4 utility; k-
epsilon turbulence used.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 15
cavity Flow of air inside a square shaped
cavity, induced by the movement of
upper wall. K-omega SST
turbulence model used on a very
coarse mesh, thus the results are
only provisional.
mixerVessel2D Mixing of air in a simple straight
vaned 2D mixer. K-epsilon
turbulence used. Movement of
rotor introduced as additional frame
of reference.
rhoSimplecFoam - Steady-state SIMPLEC solver for laminar or turbulent RANS flow of
compressible fluids.
Tutorial name Description
squareBend Flow of air through a 180deg bend.
k-epsilon turbulence, Sutherland
transport models used. Lack of
boundary layer grid – simple
blockmesh grid used.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 16
rhoSimpleFoam - Steady-state SIMPLE solver for laminar or turbulent RANS flow of
compressible fluids
Tutorial name Description
angledDuctExplicit
FixedCoeff
Air flow through square shaped
angled duct with a porosity section
(explicit porosity source).
sonicFoam - Transient solver for trans-sonic/supersonic, laminar or turbulent flow of a
compressible gas
Tutorial name Description
laminar forwardStep Supersonic (Ma=3) flow over
rectangle forward facing step.
Normalized inviscid gas used for
which sound speed = 1m/s.
schockTube Simulation of air behavior when
half of the tube is set to have 10x
lower pressure. Eventual
equalization of pressure can be
observed. SetFields utility used
to set the initial pressure
distribution and sample tool used
to generate p, T and magU
distributions along the central
line of the tube.
ras nacaAirfoil Launder-Sharma k-epsilon,
imported mesh with techniques
shown how to overcome high
skewness; contains also
technique to calculate the airfoil
force coefficients.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 17
prism Supersonic flow of air around a
prism. Top and bottom
boundaries are free stream. k-
epsilon turbulence model used.
Mesh including prism boundary
layer created using blockMesh.
sonicLiquidFoam - Transient solver for trans-sonic/supersonic, laminar flow of a compressible
liquid
Tutorial name Description
decompressionTank Models what happens when a valve of
pressurized water tank is opened. Includes
modeling of compressible liquid (barotropic
model) and pressure waves propagation.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 18
5. Multiphase
cavitatingFoam - Transient cavitation code based on the homogeneous equilibrium model from
which the compressibility of the liquid/vapour ”mixture” is obtained
Tutorial name Description
LES throttle 2D case of water flow through
a narrow duct (throttle). Flow is
induced by pressure difference
between two chambers;
barotropic compressibility model
used, Newtonian fluid model
used for both water and vapor.
Initially no vapor is present in the flow. Flow acceleration creates
pressure drop and induces cavitation around the flow jet.
throttle3D Essentially 2D case, in terms of
hydraulic setup. The mesh is
refined and 10 cells are used in
the “depth” direction (z) instead
of 1. refineMesh utility used on
topological sets (topoSet).
RAS throttle Flow set up as for les/throttle.
Turbulence modeled with k-
omega SST.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 19
compressibleInterDyMFoam - Solver for 2 compressible, isothermal immiscible fluids using a
VOF (volume of fluid) phase-fraction based interface capturing approach, with optional mesh
motion and mesh topology changes including adaptive re-meshing.
Tutorial name Description
sloshingTank2D Movement of water inside a cyclically heeling sloshing tank.
compressibleInterFoam - Solver for 2 compressible, isothermal immiscible fluids using a VOF
(volume of fluid) phase-fraction based interface capturing approach.
Tutorial name Description
deepCharge2D 2D case of the physical setup described
below. The same utilities and settings
used otherwise.
Picture to the left shows the water
volume fraction (alpha.water) at time
step 50. Picture below shows static
pressure contours at one of the initial
steps.
deepCharge3D Before the start of the calculation, there
is a volume filled with water up to half of
its height. setFields utility is used to
insert a sphere of 10x the pressure and
(T+278) inside the water column of
initially uniform pressure and
temperature. Expansion of the sphere is
simulated on a basic hexagonal mesh
(blockMesh).
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 20
compressibleMultiphaseInterFoam - Solver for more than 2 compressible, isothermal
immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing
approach
Tutorial name Description
damBreak4phase Simulation of 4 immiscible
fluids release. First picture
shows the initial state,
second – end state. The
fluids become sorted by
specific weight. Laminar
case.
interDyMFoam - Solver for 2 incompressible, isothermal immiscible fluids using a VOF (volume
of fluid) phase-fraction based interface capturing approach, with optional mesh motion and
mesh topology changes including adaptive re-meshing.
Tutorial name Description
damBreakWithObstacle 3D dam brake case – a column of
water released against centrally
located obstacle. Mesh dynamically
refining to the front of the wave based
on volumetric fraction of water. Mesh
adaptation set through
constant/dynamicMeshDict.
DTCHull Duisburg Test Case container ship
hull simulation. Mesh created with
snappyHexMesh and refined using
surface STL file. The hull movement
treated as solid body movement with
6 degrees of freedom (no mesh
changes). k-omega SST turbulence
model used.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 21
floatingObject Floating of a cuboid simulated as internal
mesh deformations. Floating object
inserted into a basic hex mesh with
topoSet utility. K-epsilon turbulence
model used.
mixerVesselAMI 3 D simulation of mixing tank. Movement
of the rotor modeled as solid body
motion. Simulates mixing water with air.
Mesh created with snappyHexMesh and
refined with surfaceFeatureExtract utility
and 3 separate STL files for Gas Inlet,
Stirrer and Outlet.
sloshingTank2D Sloshing tank simulated as solid body motion (mesh unaltered).
libsampling tool used to extract walls pressure (ControlDict)
sloshingTank3D 3D case of a solid body motion sloshing
tank water movement simulation.
testTubeMixer Test tube rocking on rotating table.
Modeled as slid body Motion, mesh is
unaltered. Motion described in
dynamicMeshDict.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 22
interFoam - Solver for 2 incompressible, isothermal immiscible fluids using a VOF (volume of
fluid) phase-fraction based interface capturing approach.
Tutorial name Description
laminar capillaryRise Natural wall contact driven rise of
water in a capillary channel.
ConstantAlphaContactAngle =
45deg set in 0/alpha.water file.
damBreak Release of a water column in
air environment against a
vertical obstacle. Laminar flow
model used and basic coarse
hexagonal mesh.
les nozzleFlow2D LES simulation of high
velocity fuel jet with static
air atmosphere. refineMesh
utility used to improve mesh
quality at the fuel-air
interface.
ras damBreak Release of water column in air
environment against a vertical
obstacle. Transient RANS
turbulent flow modeling with k-
epsilon turbulence model, water-
air surface tension has to be set
in constant/transportProperties
file. Initial water column set with
setFields utility.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 23
damBreakPorous
Baffle
Dam break case with additional vertical porous baffle
extending from the mid-length of the center obstacle.
CreateBaffles utility used, along with setFields – for initial
distribution.
waterChannel Gravitational flow of
water through a
narrow channel,
originating in a
slightly higher placed
chamber. The
channel mesh is built
using extrudeMesh
utility. K-omega SST
turbulence model
used. Inlet, outlet and atmosphere fluxes calculated using
additional entries in ControlDict.
weirOverflow Water flowing over weir
barrier. RANS turbulent
flow modeling with k-
epsilon turbulence model.
setFields used for initial
water distribution along
with initial conditions
attached in 0 directory,
which specify water flow
rate.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 24
interMixingFoam - Solver for 3 incompressible fluids, two of which are miscible, using a VOF
method to capture the interface
Tutorial name Description
damBreak Dam break case with 3 phases of
which 'water' and 'other' are miscible.
The miscibility is expressed through
diffusion coefficient to be found in
/constant/transportProperties file.
Initial phases distribution in space set
by setFields utility.
interPhaseChangeDyMFoam - Solver for 2 incompressible, isothermal immiscible fluids with
phase-change (e.g. cavitation). Uses a VOF (volume of fluid) phase-fraction based interface
capturing approach, with optional mesh motion and mesh topology changes including adaptive
re-meshing.
Tutorial name Description
propeller A ship propeller simulation including
cavitation. Propeller mesh is created with
snappyHexMesh including surface
refinements. It is embedded in rotating block
of the domain mesh (solid body rotation).
Mesh is not refined along the simulation.
Initially no vapor is present in the water and
relative propeller water motion is 0. Flow
velocity is then ramped up to 15m/s within
0.01s and propeller rotation – to 628 1/s. Picture to the right shows
propeller velocity with vapor volume overlayed as contours.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 25
interPhaseChangeFoam - Solver for 2 incompressible, isothermal immiscible fluids with phase-
change (e.g. cavitation). Uses a VOF (volume of fluid) phase-fraction based interface capturing
approach
Tutorial name Description
cavitatingBullet Simulation of water cavitation caused by
rapid movement of a bullet. The apparent
bullet speed it 20m/s, flow is laminar and
initially no water vapor is present in the
domain. Mesh created with snappyHexMesh.
LTSInterFoam - Local time stepping (LTS, steady-state) solver for 2 incompressible, isothermal
immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing
approach
Tutorial name Description
DTCHull Set up virtually the same as
InterDyMFoam example for the same
geometry. Lacks information on the hull
movement due to static mesh. Thanks to
local time stepping the speed of
calculation is significantly higher than for
dynamic mesh and global time step.
Options included in ControlDict extract
forces and moments for every saved time
step.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 26
MRFInterFoam - Multiple reference frame (MRF) solver for 2 incompressible, isothermal
immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing
approach
Tutorial name Description
mixerVessel2D Water (0.25 volume) and air being mixed in a simple 2D mixer. Laminar
flow model used; rotor movement introduced as an additional rotating
frame of reference.
MRFMultiphaseInterFoam - Multiple reference frame (MRF) solver for incompressible fluids
which captures the interfaces and includes surface-tension and contact-angle effects for each
phase
Tutorial name Description
mixerVessel2D Mixing of 4 varying density phases. Rotor movement set using additional
rotating frame of reference. Simple multiphase settings: separate transport
properties for each phase and phase-to-phase surface tension set in
/constant/transportproperties.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 27
multiphaseEulerFoam – Solver for n incompressible fluids with one phase dispersed, e.g. gas
bubbles in a liquid.
Tutorial name Description
bubbleColumn Simulation of air bubbles rising up inside a water
columns. Inlet is located at the bottom, where
volumetric ratio of air and water is 0.5 each and the
inflow velocity of air is 0.1 m/s. Flow is laminar and
mesh is created in blockMesh. Initial water column
created with setFields utility.
dambreak4hase Water, oil, mercury and air released from the
left wall against the obstacle in the center.
Laminar flow model used and coarse mesh –
88x142x1. Interfacial interactions, pair by
pair, described in
/constant/transportProperties.
damBreak4phase
Fine
Fine mesh (344x570x1) simulation of the
case described above. Pockets of entrapped
air visible.
Picture for the previous case shows the same
time snapshot – The overall flow structure is
similar, but differences in multiphase structure
is clearly visible.
mixerVessel2D Straight vanes quasi 2D mixer with 4 different
density fluids and spinning rotor at the center.
The rotor spins thanks to the usage of
additional rotating frame of reference
assigned to the rotor mesh cells. Interfacial
interactions (drag, heat transfer...) included in
constant/interfacialProperties and
transportProperties file.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 28
multiphaseInterFoam - Solver for n incompressible fluids which captures the interfaces and
includes surface-tension and contact-angle effects for each phase
Tutorial name Description
damBreak4phase 4 phases present. Phase properties set in
/constant/transportproperties. In this case
each phase has a separate transport model
defined and on phase-phase level only the
interfacial surface tension (sigma) is defined).
dambreak4phase
Fine
Fine mesh case of the simulation described
above. Details of multiphase structure
differences visible, while overall flow shape is
very similar.
settlingFoam - Solver for 2 incompressible fluids for simulating the settling of the dispersed
phase
Tutorial name Description
dahl Sludge settling simulation. Volumetric
fraction Alpha initially is very low, but with
inflow it reaches the maximum packing limit.
Transport properties of the sludge set in
/constant/transportProperties file.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 29
tank3D Settling of sludge in a tank with one inlet (the
ribs), 3 outlets (on top side) and a conveying
belt (bottom, far end). Properties set as for the
previous case.
twoLiquidMixingFoam - Solver for mixing 2 incompressible fluids.
Tutorial name Description
lockExchange Density difference driven mixing of water and 1%
more dense sludge inside an inviscid walls
column. Kelvin-Helmholtz instabilities develop.
twoPhaseEulerFoam - Solver for a system of 2 incompressible fluid phases with one phase
dispersed, e.g. gas bubbles in a liquid
Tutorial name Description
laminar bubbleColumn Laminar case of air being
released from the bottom of
still water column. Air bubbles
diameter kept constant
(constant/phaseProperties)
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 30
bubbleColumnIATE Interfacial Area Transport
Equation used to estimate air
bubbles diameters distribution
(constant/phaseproperties).
The equation calculates the
rate of bubbles break up and
coalescence. Qualitative
difference in the air behavior
clearly visible as the air tends
to form larger voids throughout
the simulation time.
fluidizedbed Laminar case of particles
column being injected with air
stream from the bottom. Even
though the drag model used is
the same as for RAS case
described below, the flow
pattern differs dramatically.
mixerVessel2D Simple straight vanes mixer
where half of the internal
volume is initially filled with
water. Rotor movement
introduced as additional
rotating frame of reference.
m4 script used to create
blockMesh input and rotor
defined using topoSet.
LES bubbleColumn Inflow of air at the bottom with
0.1 m/s and alpha = 0.5.
Separate files for air and water
thermophysical and turbulence
properties.
/constant/phaseProperties file
contains phase properties i.e.:
surface tension, drag,
blending, aspect ratio, heat
transfer, virtual mass and
other.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 31
RAS bubbleColumn Initial boundary conditions set
up exactly as in LES case.
Here, k-epsilon turbulence
model is used and the case
converges within the
simulation time to a stable 2-
phase flow pattern, unlike LES
case.
fluidizedBed Simulation of dispersed
particles column behavior
when hot air is blowed in
from the bottom. Particles
are assumed to be of
spherical shape and
constant radius
(constant/phaseProperties).
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 32
6. Heat transfer
buoyantBoussinesqPimpleFoam - Transient solver for buoyant, turbulent flow of
incompressible fluids
Tutorial name Description
hotRoom Shows how constant
temperature point heat source
influences the behavior of a
static volume of air. Natural
convection occurs. K-epsilon
turbulence model and
Boussinesq Newtonian fluid
model used.
BuoyantBoussinesqSimpleFoam - Steady-state solver for buoyant, turbulent flow of
incompressible fluids
Tutorial name Description
hotRoom Set up exactly as transient
solver case above. For this
simple case, steady state solver
takes half the pseudo-time steps
to converge. Slight difference in
the maximum velocity value can
be observed
iglooWithFridges A half-sphere of cold air with two
warm cubes placed inside.
Simulation shows development
of natural air convection.
Snappyhexmesh used to create
mesh, k-epsilon turbulence used.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 33
buoyantPimpleFoam - Transient solver for buoyant, turbulent flow of compressible fluids for
ventilation and heat-transfer
Tutorial name Description
hotRoom Hot room case, as described
above. Does not use Boussinesq
approximation; equation of state
employed instead.
buoyantSimpleFoam - Steady-state solver for buoyant, turbulent flow of compressible fluids
Tutorial name Description
buoyantCavity Natural convection of air inside a
closed cavity, of which one of the
vertical walls is hot and the other –
cold. Temperature difference of 19.6
deg drives an up-flow of hot and
down-flow of cold air. k-omega SST
turbulence model used and basic
mesh. Tutorial also provides a
technique to obtain values relevant to
be compared with experiment.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 34
circuitBoardCooling Cooling of two high
temperature baffles
representing circuit boards.
Heat is transferred to air flowing
through the domain. One of the
baffles generates heat at
100W/m2.
externalCoupledCavity Buoyant cavity case with
boundary conditions modified
using “external” procedure. For
this case temperatures of the
walls are increase by 1deg
each time step until they
equalize.
hotRadiationRoom Room with a 227deg C cube in
one of the corners, filled with
27degC air. The radiation of the
cube is modeled to show how it
influences the temperature of
the air. Natural convection
develops, driven by the heat of
the cube and cold ceiling and
floor. k-epsilon turbulence
modeling is used.
hotRadiationRoomFvDOM Case set up as above, but
Discrete Ordinates model is
used instead of P1, to simulate
the influence of radiation.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 35
chtMultiRegionFoam - Combination of heatConductionFoam and buoyantFoam for conjugate
heat transfer between a solid region and fluid region
Tutorial name Description
multiRegionHeater “T” shaped solid heater is
surrounded by water in the
bottom section, by two
solids on the sides of the
upper section and by air
over the top. The bottom of
the heater is 500deg warm,
the temperature in the rest
of domain is 300deg initially.
Additionally, there is 0.01m/s
flow in X direction assigned to the air and water. Left solid is isolated
from the heater.
snappyMultiRegionHe
ater
General arrangement as
above, only air used at the
bottom instead of water,
and no thermal isolation
used for left solid. Mesh
created with
snappyHexMesh. Top air is
given initial velocity of
0.1m/s, 10 times more than
the bottom.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 36
chtMultiRegionSimpleFoam - Combination of heatConductionFoam and buoyantFoam for
conjugate heat transfer between a solid region and fluid region, including steady-state turbulent
flow of compressible fluids
Tutorial name Description
heatExchanger Forced flow of air through a
bundle of warm water filled
pipes. There is a straight
vanes rotor at the bottom
(fvOptions->MRF and
createBaffles) and the water
is modeled as a porous
region. There are two
domains – each with
separate blockMesh and
separate set of
thermophysical properties
and boundary conditions.
multiRegionHeaterRa
diation
Initial box divided into 3
solid and 2 fluid zones
(topoSet,
splitMeshRegions). Each
zone has its own fvSolution,
fvSchemes,
thermophysicalProperties
and boundary condition files
generated. The heater is
200deg hotter than the rest
and heat transfer to the
neighboring solids and air
can be observed along with natural convection inside the air domain.
©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 37

More Related Content

What's hot

Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0
Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0
Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0ARPIT SINGHAL
 
OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-
OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-
OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-Fumiya Nozaki
 
OpenFOAMソルバの実行時ベイズ最適化
OpenFOAMソルバの実行時ベイズ最適化OpenFOAMソルバの実行時ベイズ最適化
OpenFOAMソルバの実行時ベイズ最適化Masashi Imano
 
Spatial Interpolation Schemes in OpenFOAM
Spatial Interpolation Schemes in OpenFOAMSpatial Interpolation Schemes in OpenFOAM
Spatial Interpolation Schemes in OpenFOAMFumiya Nozaki
 
Dynamic Mesh in OpenFOAM
Dynamic Mesh in OpenFOAMDynamic Mesh in OpenFOAM
Dynamic Mesh in OpenFOAMFumiya Nozaki
 
OpenFOAM の Function Object 機能について
OpenFOAM の Function Object 機能についてOpenFOAM の Function Object 機能について
OpenFOAM の Function Object 機能についてFumiya Nozaki
 
OpenFOAMにおける相変化解析
OpenFOAMにおける相変化解析OpenFOAMにおける相変化解析
OpenFOAMにおける相変化解析takuyayamamoto1800
 
OpenFOAMにおけるDEM計算の衝突モデルの解読
OpenFOAMにおけるDEM計算の衝突モデルの解読OpenFOAMにおけるDEM計算の衝突モデルの解読
OpenFOAMにおけるDEM計算の衝突モデルの解読takuyayamamoto1800
 
OpenFOAM を用いた Adjoint 形状最適化事例1
OpenFOAM を用いた Adjoint 形状最適化事例1OpenFOAM を用いた Adjoint 形状最適化事例1
OpenFOAM を用いた Adjoint 形状最適化事例1Fumiya Nozaki
 
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』Fumiya Nozaki
 
OpenFOAM -回転領域を含む流体計算 (Rotating Geometry)-
OpenFOAM -回転領域を含む流体計算 (Rotating Geometry)-OpenFOAM -回転領域を含む流体計算 (Rotating Geometry)-
OpenFOAM -回転領域を含む流体計算 (Rotating Geometry)-Fumiya Nozaki
 
Mixer vessel by cfmesh
Mixer vessel by cfmeshMixer vessel by cfmesh
Mixer vessel by cfmeshEtsuji Nomura
 
OpenFOAM の境界条件をまとめよう!
OpenFOAM の境界条件をまとめよう!OpenFOAM の境界条件をまとめよう!
OpenFOAM の境界条件をまとめよう!Fumiya Nozaki
 
OpenFoamの混相流solver interFoamのパラメータによる解の変化
OpenFoamの混相流solver interFoamのパラメータによる解の変化OpenFoamの混相流solver interFoamのパラメータによる解の変化
OpenFoamの混相流solver interFoamのパラメータによる解の変化takuyayamamoto1800
 
OpenFOAMにおけるDEM計算の力モデルの解読
OpenFOAMにおけるDEM計算の力モデルの解読OpenFOAMにおけるDEM計算の力モデルの解読
OpenFOAMにおけるDEM計算の力モデルの解読takuyayamamoto1800
 
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件についてOpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件についてFumiya Nozaki
 
OpenFOAMによる気液2相流解析の基礎と設定例
OpenFOAMによる気液2相流解析の基礎と設定例OpenFOAMによる気液2相流解析の基礎と設定例
OpenFOAMによる気液2相流解析の基礎と設定例takuyayamamoto1800
 
How to chtmultiregionfoam
How to chtmultiregionfoamHow to chtmultiregionfoam
How to chtmultiregionfoamEustache Gokpi
 

What's hot (20)

Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0
Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0
Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0
 
OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-
OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-
OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-
 
OpenFOAMソルバの実行時ベイズ最適化
OpenFOAMソルバの実行時ベイズ最適化OpenFOAMソルバの実行時ベイズ最適化
OpenFOAMソルバの実行時ベイズ最適化
 
Spatial Interpolation Schemes in OpenFOAM
Spatial Interpolation Schemes in OpenFOAMSpatial Interpolation Schemes in OpenFOAM
Spatial Interpolation Schemes in OpenFOAM
 
Dynamic Mesh in OpenFOAM
Dynamic Mesh in OpenFOAMDynamic Mesh in OpenFOAM
Dynamic Mesh in OpenFOAM
 
OpenFOAM の Function Object 機能について
OpenFOAM の Function Object 機能についてOpenFOAM の Function Object 機能について
OpenFOAM の Function Object 機能について
 
OpenFOAMにおける相変化解析
OpenFOAMにおける相変化解析OpenFOAMにおける相変化解析
OpenFOAMにおける相変化解析
 
OpenFOAMにおけるDEM計算の衝突モデルの解読
OpenFOAMにおけるDEM計算の衝突モデルの解読OpenFOAMにおけるDEM計算の衝突モデルの解読
OpenFOAMにおけるDEM計算の衝突モデルの解読
 
OpenFOAM を用いた Adjoint 形状最適化事例1
OpenFOAM を用いた Adjoint 形状最適化事例1OpenFOAM を用いた Adjoint 形状最適化事例1
OpenFOAM を用いた Adjoint 形状最適化事例1
 
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』
 
Of tutorials v1806
Of tutorials v1806Of tutorials v1806
Of tutorials v1806
 
OpenFOAM -回転領域を含む流体計算 (Rotating Geometry)-
OpenFOAM -回転領域を含む流体計算 (Rotating Geometry)-OpenFOAM -回転領域を含む流体計算 (Rotating Geometry)-
OpenFOAM -回転領域を含む流体計算 (Rotating Geometry)-
 
Mixer vessel by cfmesh
Mixer vessel by cfmeshMixer vessel by cfmesh
Mixer vessel by cfmesh
 
OpenFOAM の境界条件をまとめよう!
OpenFOAM の境界条件をまとめよう!OpenFOAM の境界条件をまとめよう!
OpenFOAM の境界条件をまとめよう!
 
OpenFoamの混相流solver interFoamのパラメータによる解の変化
OpenFoamの混相流solver interFoamのパラメータによる解の変化OpenFoamの混相流solver interFoamのパラメータによる解の変化
OpenFoamの混相流solver interFoamのパラメータによる解の変化
 
OpenFOAMにおけるDEM計算の力モデルの解読
OpenFOAMにおけるDEM計算の力モデルの解読OpenFOAMにおけるDEM計算の力モデルの解読
OpenFOAMにおけるDEM計算の力モデルの解読
 
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件についてOpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
 
Baffle meshing
Baffle meshingBaffle meshing
Baffle meshing
 
OpenFOAMによる気液2相流解析の基礎と設定例
OpenFOAMによる気液2相流解析の基礎と設定例OpenFOAMによる気液2相流解析の基礎と設定例
OpenFOAMによる気液2相流解析の基礎と設定例
 
How to chtmultiregionfoam
How to chtmultiregionfoamHow to chtmultiregionfoam
How to chtmultiregionfoam
 

Viewers also liked

buoyantBousinessqSimpleFoam
buoyantBousinessqSimpleFoambuoyantBousinessqSimpleFoam
buoyantBousinessqSimpleFoamMilad Sm
 
OpenFOAM for beginners: Hands-on training
OpenFOAM for beginners: Hands-on trainingOpenFOAM for beginners: Hands-on training
OpenFOAM for beginners: Hands-on trainingJibran Haider
 
ReFRESCO-General-Jan2015
ReFRESCO-General-Jan2015ReFRESCO-General-Jan2015
ReFRESCO-General-Jan2015Guilherme Vaz
 
Customization of LES turbulence model in OpenFOAM
Customization of LES turbulence	 model in OpenFOAMCustomization of LES turbulence	 model in OpenFOAM
Customization of LES turbulence model in OpenFOAMmmer547
 
09 jus 20101123_optimisation_salomeaster
09 jus 20101123_optimisation_salomeaster09 jus 20101123_optimisation_salomeaster
09 jus 20101123_optimisation_salomeasterOpenCascade
 

Viewers also liked (8)

buoyantBousinessqSimpleFoam
buoyantBousinessqSimpleFoambuoyantBousinessqSimpleFoam
buoyantBousinessqSimpleFoam
 
OpenFOAM for beginners: Hands-on training
OpenFOAM for beginners: Hands-on trainingOpenFOAM for beginners: Hands-on training
OpenFOAM for beginners: Hands-on training
 
ReFRESCO-General-Jan2015
ReFRESCO-General-Jan2015ReFRESCO-General-Jan2015
ReFRESCO-General-Jan2015
 
Customization of LES turbulence model in OpenFOAM
Customization of LES turbulence	 model in OpenFOAMCustomization of LES turbulence	 model in OpenFOAM
Customization of LES turbulence model in OpenFOAM
 
CFD - OpenFOAM
CFD - OpenFOAMCFD - OpenFOAM
CFD - OpenFOAM
 
Avinash_PPT
Avinash_PPTAvinash_PPT
Avinash_PPT
 
OpenFOAM Training v5-1-en
OpenFOAM Training v5-1-enOpenFOAM Training v5-1-en
OpenFOAM Training v5-1-en
 
09 jus 20101123_optimisation_salomeaster
09 jus 20101123_optimisation_salomeaster09 jus 20101123_optimisation_salomeaster
09 jus 20101123_optimisation_salomeaster
 

Similar to Basic openfoa mtutorialsguide

FEATool Multiphysics Matlab FEM and CFD Toolbox - v1.6 Quickstart Guide
FEATool Multiphysics Matlab FEM and CFD Toolbox - v1.6 Quickstart GuideFEATool Multiphysics Matlab FEM and CFD Toolbox - v1.6 Quickstart Guide
FEATool Multiphysics Matlab FEM and CFD Toolbox - v1.6 Quickstart GuideFEATool Multiphysics
 
Programming using Open Mp
Programming using Open MpProgramming using Open Mp
Programming using Open MpAnshul Sharma
 
Using MpCCI to model Fluid-Structure-Interactions with ABAQUS and 3rd party C...
Using MpCCI to model Fluid-Structure-Interactions with ABAQUS and 3rd party C...Using MpCCI to model Fluid-Structure-Interactions with ABAQUS and 3rd party C...
Using MpCCI to model Fluid-Structure-Interactions with ABAQUS and 3rd party C...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Hands-on-OpenIPSL.org using OpenModelica!
Hands-on-OpenIPSL.org using OpenModelica!Hands-on-OpenIPSL.org using OpenModelica!
Hands-on-OpenIPSL.org using OpenModelica!Luigi Vanfretti
 
On Applying Or-Parallelism and Tabling to Logic Programs
On Applying Or-Parallelism and Tabling to Logic ProgramsOn Applying Or-Parallelism and Tabling to Logic Programs
On Applying Or-Parallelism and Tabling to Logic ProgramsLino Possamai
 
Gofun2017 particle simulations_slides
Gofun2017 particle simulations_slidesGofun2017 particle simulations_slides
Gofun2017 particle simulations_slidesEd Carlos Alves Rocha
 
Introductory manual for the open source potential solver: NEMOH
Introductory manual for the open source potential solver: NEMOHIntroductory manual for the open source potential solver: NEMOH
Introductory manual for the open source potential solver: NEMOHFilippos Kalofotias
 
Multi layered perceptron (mlp)
Multi layered perceptron (mlp)Multi layered perceptron (mlp)
Multi layered perceptron (mlp)Handson System
 
Tutorial de forms 10g
Tutorial de forms 10gTutorial de forms 10g
Tutorial de forms 10gmiguel
 
manual-pe-2017_compress.pdf
manual-pe-2017_compress.pdfmanual-pe-2017_compress.pdf
manual-pe-2017_compress.pdfAbdo Brahmi
 
Lab3 testbench tutorial (1)
Lab3 testbench tutorial (1)Lab3 testbench tutorial (1)
Lab3 testbench tutorial (1)Abhishek Bose
 
Linux synchronization tools
Linux synchronization toolsLinux synchronization tools
Linux synchronization toolsmukul bhardwaj
 
Introductiontoflowchart 110630082600-phpapp01
Introductiontoflowchart 110630082600-phpapp01Introductiontoflowchart 110630082600-phpapp01
Introductiontoflowchart 110630082600-phpapp01VincentAcapen1
 

Similar to Basic openfoa mtutorialsguide (20)

FEATool Multiphysics Matlab FEM and CFD Toolbox - v1.6 Quickstart Guide
FEATool Multiphysics Matlab FEM and CFD Toolbox - v1.6 Quickstart GuideFEATool Multiphysics Matlab FEM and CFD Toolbox - v1.6 Quickstart Guide
FEATool Multiphysics Matlab FEM and CFD Toolbox - v1.6 Quickstart Guide
 
Programming using Open Mp
Programming using Open MpProgramming using Open Mp
Programming using Open Mp
 
Using MpCCI to model Fluid-Structure-Interactions with ABAQUS and 3rd party C...
Using MpCCI to model Fluid-Structure-Interactions with ABAQUS and 3rd party C...Using MpCCI to model Fluid-Structure-Interactions with ABAQUS and 3rd party C...
Using MpCCI to model Fluid-Structure-Interactions with ABAQUS and 3rd party C...
 
Hands-on-OpenIPSL.org using OpenModelica!
Hands-on-OpenIPSL.org using OpenModelica!Hands-on-OpenIPSL.org using OpenModelica!
Hands-on-OpenIPSL.org using OpenModelica!
 
On Applying Or-Parallelism and Tabling to Logic Programs
On Applying Or-Parallelism and Tabling to Logic ProgramsOn Applying Or-Parallelism and Tabling to Logic Programs
On Applying Or-Parallelism and Tabling to Logic Programs
 
Gofun2017 particle simulations_slides
Gofun2017 particle simulations_slidesGofun2017 particle simulations_slides
Gofun2017 particle simulations_slides
 
Parallel Programming
Parallel ProgrammingParallel Programming
Parallel Programming
 
Introductory manual for the open source potential solver: NEMOH
Introductory manual for the open source potential solver: NEMOHIntroductory manual for the open source potential solver: NEMOH
Introductory manual for the open source potential solver: NEMOH
 
Multi layered perceptron (mlp)
Multi layered perceptron (mlp)Multi layered perceptron (mlp)
Multi layered perceptron (mlp)
 
Turbulence 2020 gt
Turbulence 2020 gtTurbulence 2020 gt
Turbulence 2020 gt
 
Ns2leach
Ns2leachNs2leach
Ns2leach
 
Tutorial de forms 10g
Tutorial de forms 10gTutorial de forms 10g
Tutorial de forms 10g
 
manual-pe-2017_compress.pdf
manual-pe-2017_compress.pdfmanual-pe-2017_compress.pdf
manual-pe-2017_compress.pdf
 
Gene's law
Gene's lawGene's law
Gene's law
 
Lab3 testbench tutorial (1)
Lab3 testbench tutorial (1)Lab3 testbench tutorial (1)
Lab3 testbench tutorial (1)
 
How To Diffuse
How To DiffuseHow To Diffuse
How To Diffuse
 
Linux synchronization tools
Linux synchronization toolsLinux synchronization tools
Linux synchronization tools
 
Introductiontoflowchart 110630082600-phpapp01
Introductiontoflowchart 110630082600-phpapp01Introductiontoflowchart 110630082600-phpapp01
Introductiontoflowchart 110630082600-phpapp01
 
Particle Technology Two Phase Flow Rheology and Powders
Particle Technology Two Phase Flow Rheology and PowdersParticle Technology Two Phase Flow Rheology and Powders
Particle Technology Two Phase Flow Rheology and Powders
 
[ASM]Lab6
[ASM]Lab6[ASM]Lab6
[ASM]Lab6
 

Recently uploaded

IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 

Recently uploaded (20)

IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 

Basic openfoa mtutorialsguide

  • 1. Basic guide to OpenFOAM tutorials Disclaimer: OpenFOAM® is a registered trademark of OpenCFD Limited, the producer OpenFOAM software. All registered trademarks are property of their respective owners. This guide is not approved or endorsed by OpenCFD Limited, the producer of the OpenFOAM software and owner of the OPENFOAM® and OpenCFD® trade marks. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 1
  • 2. 1. Introduction Practically every question on how to learn OpenFOAM is answered by directing the aspiring student to tutorials provided with the package. They are instructed to “simply” go through the tutorials, run and play with them and learn through practice. It is not far from the truth - we learn best by practice and any time you want to learn something really well you need to practice it to drill the procedures into your memory. Theory is of course fundamental, but it’s practice that makes the student skillful in any given field. There are tens of solvers in OpenFOAM and each of them has few tutorials, so there is a lot to work through. Naturally, at the beginning you will want to work on the field you are most interested with, or need for your work or study, and thus you will need to choose a relevant tutorial(s). What I want to give you in this guide is a short instruction on each of listed tutorials. I will not go deep into physics, equations and so on – instead I will cover what happens in each of them from the procedural side. How the case is set up, are there some additional steps taken, ho the mesh is set up and some general remarks on physics and boundary conditions. The tutorials, as found in OpenFOAM installation, are divided by solvers names – each solver has its own set of tutorials (few of them have only one). Below you will find a list of solvers with descriptions taken from OpenFOAM official documentation (to be found in UserGuide.pdf in OF installation or here http://www.openfoam.org/features/standard-solvers.php). For each solver I have listed the tutorials available (OF release 2.3.0), a short description of what is done and a screenshot of the results. Based on this list you can quickly select the one most useful for you at the time and use it to set up a case you want to simulate. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 2
  • 3. 2. Basic laplacianFoam - Solves a simple Laplace equation, e.g. for thermal diffusion in a solid Tutorial name Description flange Steady state heat transfer on a flange. Dirichlet boundary conditions used, two different temperatures. Includes mesh conversion from Ansys mesh. potentialFoam - Simple potential flow solver which can be used to generate starting fields for full Navier-Stokes codes. cylinder Solves potential (inviscid steady state) flow around a 2D cylinder. Uses symmetry boundary condition. /system/controlDict shows how to automatically generate analytical solution. pitzDaily Potential flow over backward facing step. Potential flow solver can be used to generate initial conservative velocity fields for any case (using appropriate geometry). Utility to use: mapFields ScalarTransportFoam - Solves a transport equation for a passive scalar Name Description pitzDaily Convection-diffusion problem with temperature being convected with velocity through Pitz- Daily problem geometry. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 3
  • 4. 3. Incompressible adjointShapeOptimization - Steady-state solver for incompressible, turbulent flow of non- Newtonian fluids with optimization of duct shape by applying ”blockage” in regions causing pressure loss as estimated using an adjoint formulation Tutorial name Description pitzDaily Runs optimization of Pitz – Daily case to reach Ua, pa conditions at the exit. Applies blockage (alpha) in regions which need to be modified to reach the desired conditions. boundaryFoam - Steady-state solver for incompressible, 1D turbulent flow, typically to generate boundary layer conditions at an inlet, for use in a simulation. Specify inlet velocity and get inlet distributions of model-relevant turbulence variables. Tutorial name Description boundaryLaunderSharma Generates velocity distribution using Launder Sharma k- epsilon turbulence model. Kinematic viscosity applied using .xy file. Cyclic symmetry applied on front and back sides. Generates a ./graphs directory with .xy files with velocity and L- S k-epsilon model variables distribution for each saved time step. boundaryWallFunctions Generates velocity and other turbulence variables distributions using wall functions formulation. In this case inlet velocity = 0. boundaryWallFunctionsProfile Uses formulation as the above but ./Allrun script is provided which runs the case for a set of nu values 9different Re), generates u+ and y+ values and generates plot comparing the results with Spalding law. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 4
  • 5. Figure I-1 Comparison of velocity profiles for the three tutorials Figure I-2 Comparison of OpenFOAM solution to Spalding law ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 5
  • 6. icoFoam - Transient solver for incompressible, laminar flow of Newtonian fluids Tutorial name Description cavity Lid-driven flow in a square shaped cavity; incompressible and laminar, basic hex mesh. Widely described in OpenFOAM user guide. cavityClipped The above case solved on a geometry with one bottom corner being cut out. cavityGrade Cavity tutorial using mesh grading elbow Incompressible laminar flow through an elbow with side pipe. Imports mesh from a .msh file. nonNewtonianIcoFoam - Transient solver for incompressible, laminar flow of non-Newtonian fluids. Viscosity curve is defined in /constant/transportProperties file. Tutorial name Description offsetCylinder Flow of shear-thickening fluid around a cylinder. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 6
  • 7. pimpleDyMFoam - Transient solver for incompressible, flow of Newtonian fluids on a moving mesh using the PIMPLE (merged PISO-SIMPLE) algorithm Tutorial name Description mixerVesselAMI2D Solid body motion case (mesh topology unaltered) with arbitrary mesh interface. Straight vanes mixer rotor rotates inside mixer vessel. movingCone Simple illustration of mesh topology technique. A 2D cone is translated through the domain and the mesh topology is altered in line with the movement. Cone translation induces fluid movement in the opposite direction. oscillatingInletACMI2D Simple illustration of solid body movement technique + oscillations set up in dynamicMeshDict file. Part of the mesh moves in relation to the rest but its topology remains unaltered. Includes also setup of Arbitrary Mesh Interface. propeller Propeller rotation simulated as a solid body movement. Mesh created with snappyhexmesh. Refined mesh created by running ./Allrun.pre which includes surfaceFeatureExtract. K-epsilon turbulence model used. Tutorial also shows how to calculate forces and moments on the surface of the propeller. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 7
  • 8. wingMotion Wing rotation simulated as mesh deformation. Mesh set up with snappyHexMesh, initial flow field (on fixed wing) calculated with simpleFoam, then mapped onto initial mesh for pimpleDyMFoam. K-omega SST turbulence used, moving mesh set up in /constant/dynamicMeshDict Picture to the right shows grid points displacements. pimpleFoam - Large time-step transient solver for incompressible, flow using the PIMPLE (merged PISO-SIMPLE) algorithm Tutorial name Description channel395 LES simulation of a flow through a square shaped channel with nonuniform initial velocity and pressure distributions (a vector/value applied to each node). Cyclic symmetry boundaries at inlet, outlet and sides of the channel. elipsekkLOmega Turbulent flow of air around an ellipse. kkL Omega (RANS) turbulence model used. Shows also how to build mesh automatically from a smaller block (mirroring and transformations). pitzDaily Well known Pitz Daily case solved by pimple. K-epsilon turbulence used, uniform inlet velocity and mesh graded to fit the areas of greatest velocity gradients. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 8
  • 9. TJunction Turbulent (k-epsilon) flow of air-like fluid through T-Junction – a duct with two outlets. Created to test a case with two outlets, so mesh is not refined. Flow induced by pressure difference. TJunctionFan As above + fan represented by baffles introduced in the inlet duct (createBafflesDict in /system directory). pisoFoam - Transient solver for incompressible flow – les: Tutorial name Description motorBike First runs motorBike case using simpleFoam and Spalart-Allmaras RANS turbulence modeling. The mesh is set up using snappyHexMesh. Next, clones the calculated flow field and copies LES setup files into case folder, then runs the case using LES turbulence modeling. pitzDaily Large Eddy simulation of Pitz- Daily case. Mesh set up in the same as for simpleFoam solver. 1-equation eddy SGS model. k at inlet set as uniform fixed value. Does not converge to final solution within the time specified. pitzDailyMapped Geometry and overall setup as above, k at the inlet set as mapped. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 9
  • 10. – ras Tutorial name Description cavity Flow of air in a cavity, induced by the movement of the upper wall. Basic mesh not including boundary layers what is clearly visible. Turbulence modeled with k-epsilon model. cavityCoupledU General setup the same as for the case above. Coupled PbiCCCG solver for U vector used. It offers performance benefits if the number of iterations in each direction is similar (uniform orthogonal mesh). shallowWaterFoam - Transient solver for inviscid shallow-water equations with rotation Tutorial name Description squareBump Simulates waves propagation on a square shaped domain excited with a central force represented as a height difference. Run setFields before running the case. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 10
  • 11. simpleFoam - Steady-state solver for incompressible, turbulent flow Tutorial name Description airFoil2D Steady state flow of air around airfoil, Newtonian fluid model, Spalart-Allmaras turbulence, C- type 2D mesh (imported from external mesher) mixerVessel2D Air, k-epsilon turbulence, uses m4 utility to create input file for blockMesh (allows to use mathematical formulations to specify points location). Round shape container with internal rotor. Movement of rotor simulated with the use of additional, rotating frame of reference, set up in fvOptions. motorBike RANS k-omega SST flow model run on a motorbike + rider model. Mesh created with snappyHexMesh tool, initial flow conditions created with potentialFoam, forces and moments calculated through controlDict defined functions, streamlines extracted for external post processing. pipeCyclic Swirling flow in a pipe. Cyclic mesh settings shown along with parametric mesh setup (needs to have Code Stream activated), uses realizable k- epsilon turbulence model. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 11
  • 12. pitzDaily Steady turbulent (RANS, k-e) flow over backward facing step. blockMesh hexagonal 2D mesh showing advanced edge grading approach to mesh refinements. pitzDailyExptInlet Geometry as above, inlet velocity time dependent (from experiment), set up through type timeVaryingMappedFixedValue utility (needs separate file with the values defined for U), K-epsilon turbulence model. Streamlines for post processing generated through additional option in ControlDict. turbineSiting Calculates wind velocity field over a hill. Uses k-epsilon turbulence model (RANS) with model coefficients adjusted to be appropriate for atmospheric boundary layers modeling. Terrain geometry created from a STL file using snappyhexMesh. SRFSimpleFoam - Steady-state solver for incompressible, turbulent flow of non-Newtonian fluids in a single rotating frame Tutorial name Description mixer 3D simulation of a mixer section with one blade, cyclic boundary conditions on sides, k-omega SST turbulence model, in this case Newtonian fluid used, but possible to use non-Newtonian fluids. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 12
  • 13. 4. Compressible rhoCentralFoam - Density-based compressible flow solver based on central-upwind schemes of Kurganov and Tadmor Tutorial name Description biconic25-55Run35 Laminar flow in a double cone duct. Flow enters from a high velocity free stream. Already converged solution imported on blockMesh. Pressure sampled on walls. forwardStep Laminar supersonic (Ma=3) flow through a duct with straight vertical obstacle. Artificial inviscid gas used, defined in constant/thermophysicalProperties to have the sound of speed = 1m/s. Development of shock waves can be observed. LadenburgJet60psi Cyclic symmetry solution of air laminar flow field. Initial state loaded from external source. obliqueShock Simulation of an oblique shock wave development. The shock is created using two different velocities-Mach numbers at the inlet and top wall of the domain. Laminar flow and normalized gas (a = 1m/s) models used. shockTube Development of a pressure wave in a simple tube. Wave generated using setFields to assign pressure and temperature in specific location ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 13
  • 14. wedge15Ma5 Normalized inviscid gas flow in a domain with conical obstacle. Top and bottom boundaries are set as symmetry planes, thus the case in fact models a flow over a cone. Flow velocity is 5m/s, thus – Ma=5 and shock wave development is observed. rhoLTSPimpleFoam – Local time stepping transient solver for laminar or turbulent flow of compressible fluids. Tutorial name Description angledDuct Flow of air through a duct with porosity. Temperature dependent (Sutherland's) transport model used, k-epsilon turbulence. Porosity added in system/fvOptions file. Mesh created using m4 utility. rhoPimplecFoam - Transient solver for laminar or turbulent flow of compressible fluids Tutorial name Description angledDuct Set up precisely as other angleDuct cases. Differences due to solver and run time can be observed. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 14
  • 15. rhoPimpleDyMFoam - Transient solver for laminar or turbulent flow of compressible fluids for HVAC and similar applications with moving mesh capability Tutorial name Description annularThermalMixer Simulates a mixing process in a mixer equipped with static baffles on the external walls and moving rotor in the center. Rotor movement treated as solid body motion. Initial conditions set through /constant/caseSettings – imported into 0 folder with appropriate command in boundary conditions files. Mesh created with snappyHexMesh. There are two inlets of gas inner (colder and faster) and outer (warmer and slower). rhoPimpleFoam - Transient solver for laminar or turbulent flow of compressible fluids for HVAC and similar applications Tutorial name Description les pitzDaily Simulation of air flow through a tube with backward step and a nozzle at the exit. Inflow is set as a turbulent with 2% fluctuation in the flow direction and 1% cross flow. 1 equation eddy SGS model used. ras angledDuct Flow of air though a square shaped duct with a porous section. Porosity added in system/fvOptions file. Mesh created using m4 utility; k- epsilon turbulence used. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 15
  • 16. cavity Flow of air inside a square shaped cavity, induced by the movement of upper wall. K-omega SST turbulence model used on a very coarse mesh, thus the results are only provisional. mixerVessel2D Mixing of air in a simple straight vaned 2D mixer. K-epsilon turbulence used. Movement of rotor introduced as additional frame of reference. rhoSimplecFoam - Steady-state SIMPLEC solver for laminar or turbulent RANS flow of compressible fluids. Tutorial name Description squareBend Flow of air through a 180deg bend. k-epsilon turbulence, Sutherland transport models used. Lack of boundary layer grid – simple blockmesh grid used. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 16
  • 17. rhoSimpleFoam - Steady-state SIMPLE solver for laminar or turbulent RANS flow of compressible fluids Tutorial name Description angledDuctExplicit FixedCoeff Air flow through square shaped angled duct with a porosity section (explicit porosity source). sonicFoam - Transient solver for trans-sonic/supersonic, laminar or turbulent flow of a compressible gas Tutorial name Description laminar forwardStep Supersonic (Ma=3) flow over rectangle forward facing step. Normalized inviscid gas used for which sound speed = 1m/s. schockTube Simulation of air behavior when half of the tube is set to have 10x lower pressure. Eventual equalization of pressure can be observed. SetFields utility used to set the initial pressure distribution and sample tool used to generate p, T and magU distributions along the central line of the tube. ras nacaAirfoil Launder-Sharma k-epsilon, imported mesh with techniques shown how to overcome high skewness; contains also technique to calculate the airfoil force coefficients. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 17
  • 18. prism Supersonic flow of air around a prism. Top and bottom boundaries are free stream. k- epsilon turbulence model used. Mesh including prism boundary layer created using blockMesh. sonicLiquidFoam - Transient solver for trans-sonic/supersonic, laminar flow of a compressible liquid Tutorial name Description decompressionTank Models what happens when a valve of pressurized water tank is opened. Includes modeling of compressible liquid (barotropic model) and pressure waves propagation. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 18
  • 19. 5. Multiphase cavitatingFoam - Transient cavitation code based on the homogeneous equilibrium model from which the compressibility of the liquid/vapour ”mixture” is obtained Tutorial name Description LES throttle 2D case of water flow through a narrow duct (throttle). Flow is induced by pressure difference between two chambers; barotropic compressibility model used, Newtonian fluid model used for both water and vapor. Initially no vapor is present in the flow. Flow acceleration creates pressure drop and induces cavitation around the flow jet. throttle3D Essentially 2D case, in terms of hydraulic setup. The mesh is refined and 10 cells are used in the “depth” direction (z) instead of 1. refineMesh utility used on topological sets (topoSet). RAS throttle Flow set up as for les/throttle. Turbulence modeled with k- omega SST. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 19
  • 20. compressibleInterDyMFoam - Solver for 2 compressible, isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach, with optional mesh motion and mesh topology changes including adaptive re-meshing. Tutorial name Description sloshingTank2D Movement of water inside a cyclically heeling sloshing tank. compressibleInterFoam - Solver for 2 compressible, isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach. Tutorial name Description deepCharge2D 2D case of the physical setup described below. The same utilities and settings used otherwise. Picture to the left shows the water volume fraction (alpha.water) at time step 50. Picture below shows static pressure contours at one of the initial steps. deepCharge3D Before the start of the calculation, there is a volume filled with water up to half of its height. setFields utility is used to insert a sphere of 10x the pressure and (T+278) inside the water column of initially uniform pressure and temperature. Expansion of the sphere is simulated on a basic hexagonal mesh (blockMesh). ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 20
  • 21. compressibleMultiphaseInterFoam - Solver for more than 2 compressible, isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach Tutorial name Description damBreak4phase Simulation of 4 immiscible fluids release. First picture shows the initial state, second – end state. The fluids become sorted by specific weight. Laminar case. interDyMFoam - Solver for 2 incompressible, isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach, with optional mesh motion and mesh topology changes including adaptive re-meshing. Tutorial name Description damBreakWithObstacle 3D dam brake case – a column of water released against centrally located obstacle. Mesh dynamically refining to the front of the wave based on volumetric fraction of water. Mesh adaptation set through constant/dynamicMeshDict. DTCHull Duisburg Test Case container ship hull simulation. Mesh created with snappyHexMesh and refined using surface STL file. The hull movement treated as solid body movement with 6 degrees of freedom (no mesh changes). k-omega SST turbulence model used. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 21
  • 22. floatingObject Floating of a cuboid simulated as internal mesh deformations. Floating object inserted into a basic hex mesh with topoSet utility. K-epsilon turbulence model used. mixerVesselAMI 3 D simulation of mixing tank. Movement of the rotor modeled as solid body motion. Simulates mixing water with air. Mesh created with snappyHexMesh and refined with surfaceFeatureExtract utility and 3 separate STL files for Gas Inlet, Stirrer and Outlet. sloshingTank2D Sloshing tank simulated as solid body motion (mesh unaltered). libsampling tool used to extract walls pressure (ControlDict) sloshingTank3D 3D case of a solid body motion sloshing tank water movement simulation. testTubeMixer Test tube rocking on rotating table. Modeled as slid body Motion, mesh is unaltered. Motion described in dynamicMeshDict. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 22
  • 23. interFoam - Solver for 2 incompressible, isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach. Tutorial name Description laminar capillaryRise Natural wall contact driven rise of water in a capillary channel. ConstantAlphaContactAngle = 45deg set in 0/alpha.water file. damBreak Release of a water column in air environment against a vertical obstacle. Laminar flow model used and basic coarse hexagonal mesh. les nozzleFlow2D LES simulation of high velocity fuel jet with static air atmosphere. refineMesh utility used to improve mesh quality at the fuel-air interface. ras damBreak Release of water column in air environment against a vertical obstacle. Transient RANS turbulent flow modeling with k- epsilon turbulence model, water- air surface tension has to be set in constant/transportProperties file. Initial water column set with setFields utility. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 23
  • 24. damBreakPorous Baffle Dam break case with additional vertical porous baffle extending from the mid-length of the center obstacle. CreateBaffles utility used, along with setFields – for initial distribution. waterChannel Gravitational flow of water through a narrow channel, originating in a slightly higher placed chamber. The channel mesh is built using extrudeMesh utility. K-omega SST turbulence model used. Inlet, outlet and atmosphere fluxes calculated using additional entries in ControlDict. weirOverflow Water flowing over weir barrier. RANS turbulent flow modeling with k- epsilon turbulence model. setFields used for initial water distribution along with initial conditions attached in 0 directory, which specify water flow rate. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 24
  • 25. interMixingFoam - Solver for 3 incompressible fluids, two of which are miscible, using a VOF method to capture the interface Tutorial name Description damBreak Dam break case with 3 phases of which 'water' and 'other' are miscible. The miscibility is expressed through diffusion coefficient to be found in /constant/transportProperties file. Initial phases distribution in space set by setFields utility. interPhaseChangeDyMFoam - Solver for 2 incompressible, isothermal immiscible fluids with phase-change (e.g. cavitation). Uses a VOF (volume of fluid) phase-fraction based interface capturing approach, with optional mesh motion and mesh topology changes including adaptive re-meshing. Tutorial name Description propeller A ship propeller simulation including cavitation. Propeller mesh is created with snappyHexMesh including surface refinements. It is embedded in rotating block of the domain mesh (solid body rotation). Mesh is not refined along the simulation. Initially no vapor is present in the water and relative propeller water motion is 0. Flow velocity is then ramped up to 15m/s within 0.01s and propeller rotation – to 628 1/s. Picture to the right shows propeller velocity with vapor volume overlayed as contours. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 25
  • 26. interPhaseChangeFoam - Solver for 2 incompressible, isothermal immiscible fluids with phase- change (e.g. cavitation). Uses a VOF (volume of fluid) phase-fraction based interface capturing approach Tutorial name Description cavitatingBullet Simulation of water cavitation caused by rapid movement of a bullet. The apparent bullet speed it 20m/s, flow is laminar and initially no water vapor is present in the domain. Mesh created with snappyHexMesh. LTSInterFoam - Local time stepping (LTS, steady-state) solver for 2 incompressible, isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach Tutorial name Description DTCHull Set up virtually the same as InterDyMFoam example for the same geometry. Lacks information on the hull movement due to static mesh. Thanks to local time stepping the speed of calculation is significantly higher than for dynamic mesh and global time step. Options included in ControlDict extract forces and moments for every saved time step. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 26
  • 27. MRFInterFoam - Multiple reference frame (MRF) solver for 2 incompressible, isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach Tutorial name Description mixerVessel2D Water (0.25 volume) and air being mixed in a simple 2D mixer. Laminar flow model used; rotor movement introduced as an additional rotating frame of reference. MRFMultiphaseInterFoam - Multiple reference frame (MRF) solver for incompressible fluids which captures the interfaces and includes surface-tension and contact-angle effects for each phase Tutorial name Description mixerVessel2D Mixing of 4 varying density phases. Rotor movement set using additional rotating frame of reference. Simple multiphase settings: separate transport properties for each phase and phase-to-phase surface tension set in /constant/transportproperties. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 27
  • 28. multiphaseEulerFoam – Solver for n incompressible fluids with one phase dispersed, e.g. gas bubbles in a liquid. Tutorial name Description bubbleColumn Simulation of air bubbles rising up inside a water columns. Inlet is located at the bottom, where volumetric ratio of air and water is 0.5 each and the inflow velocity of air is 0.1 m/s. Flow is laminar and mesh is created in blockMesh. Initial water column created with setFields utility. dambreak4hase Water, oil, mercury and air released from the left wall against the obstacle in the center. Laminar flow model used and coarse mesh – 88x142x1. Interfacial interactions, pair by pair, described in /constant/transportProperties. damBreak4phase Fine Fine mesh (344x570x1) simulation of the case described above. Pockets of entrapped air visible. Picture for the previous case shows the same time snapshot – The overall flow structure is similar, but differences in multiphase structure is clearly visible. mixerVessel2D Straight vanes quasi 2D mixer with 4 different density fluids and spinning rotor at the center. The rotor spins thanks to the usage of additional rotating frame of reference assigned to the rotor mesh cells. Interfacial interactions (drag, heat transfer...) included in constant/interfacialProperties and transportProperties file. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 28
  • 29. multiphaseInterFoam - Solver for n incompressible fluids which captures the interfaces and includes surface-tension and contact-angle effects for each phase Tutorial name Description damBreak4phase 4 phases present. Phase properties set in /constant/transportproperties. In this case each phase has a separate transport model defined and on phase-phase level only the interfacial surface tension (sigma) is defined). dambreak4phase Fine Fine mesh case of the simulation described above. Details of multiphase structure differences visible, while overall flow shape is very similar. settlingFoam - Solver for 2 incompressible fluids for simulating the settling of the dispersed phase Tutorial name Description dahl Sludge settling simulation. Volumetric fraction Alpha initially is very low, but with inflow it reaches the maximum packing limit. Transport properties of the sludge set in /constant/transportProperties file. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 29
  • 30. tank3D Settling of sludge in a tank with one inlet (the ribs), 3 outlets (on top side) and a conveying belt (bottom, far end). Properties set as for the previous case. twoLiquidMixingFoam - Solver for mixing 2 incompressible fluids. Tutorial name Description lockExchange Density difference driven mixing of water and 1% more dense sludge inside an inviscid walls column. Kelvin-Helmholtz instabilities develop. twoPhaseEulerFoam - Solver for a system of 2 incompressible fluid phases with one phase dispersed, e.g. gas bubbles in a liquid Tutorial name Description laminar bubbleColumn Laminar case of air being released from the bottom of still water column. Air bubbles diameter kept constant (constant/phaseProperties) ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 30
  • 31. bubbleColumnIATE Interfacial Area Transport Equation used to estimate air bubbles diameters distribution (constant/phaseproperties). The equation calculates the rate of bubbles break up and coalescence. Qualitative difference in the air behavior clearly visible as the air tends to form larger voids throughout the simulation time. fluidizedbed Laminar case of particles column being injected with air stream from the bottom. Even though the drag model used is the same as for RAS case described below, the flow pattern differs dramatically. mixerVessel2D Simple straight vanes mixer where half of the internal volume is initially filled with water. Rotor movement introduced as additional rotating frame of reference. m4 script used to create blockMesh input and rotor defined using topoSet. LES bubbleColumn Inflow of air at the bottom with 0.1 m/s and alpha = 0.5. Separate files for air and water thermophysical and turbulence properties. /constant/phaseProperties file contains phase properties i.e.: surface tension, drag, blending, aspect ratio, heat transfer, virtual mass and other. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 31
  • 32. RAS bubbleColumn Initial boundary conditions set up exactly as in LES case. Here, k-epsilon turbulence model is used and the case converges within the simulation time to a stable 2- phase flow pattern, unlike LES case. fluidizedBed Simulation of dispersed particles column behavior when hot air is blowed in from the bottom. Particles are assumed to be of spherical shape and constant radius (constant/phaseProperties). ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 32
  • 33. 6. Heat transfer buoyantBoussinesqPimpleFoam - Transient solver for buoyant, turbulent flow of incompressible fluids Tutorial name Description hotRoom Shows how constant temperature point heat source influences the behavior of a static volume of air. Natural convection occurs. K-epsilon turbulence model and Boussinesq Newtonian fluid model used. BuoyantBoussinesqSimpleFoam - Steady-state solver for buoyant, turbulent flow of incompressible fluids Tutorial name Description hotRoom Set up exactly as transient solver case above. For this simple case, steady state solver takes half the pseudo-time steps to converge. Slight difference in the maximum velocity value can be observed iglooWithFridges A half-sphere of cold air with two warm cubes placed inside. Simulation shows development of natural air convection. Snappyhexmesh used to create mesh, k-epsilon turbulence used. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 33
  • 34. buoyantPimpleFoam - Transient solver for buoyant, turbulent flow of compressible fluids for ventilation and heat-transfer Tutorial name Description hotRoom Hot room case, as described above. Does not use Boussinesq approximation; equation of state employed instead. buoyantSimpleFoam - Steady-state solver for buoyant, turbulent flow of compressible fluids Tutorial name Description buoyantCavity Natural convection of air inside a closed cavity, of which one of the vertical walls is hot and the other – cold. Temperature difference of 19.6 deg drives an up-flow of hot and down-flow of cold air. k-omega SST turbulence model used and basic mesh. Tutorial also provides a technique to obtain values relevant to be compared with experiment. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 34
  • 35. circuitBoardCooling Cooling of two high temperature baffles representing circuit boards. Heat is transferred to air flowing through the domain. One of the baffles generates heat at 100W/m2. externalCoupledCavity Buoyant cavity case with boundary conditions modified using “external” procedure. For this case temperatures of the walls are increase by 1deg each time step until they equalize. hotRadiationRoom Room with a 227deg C cube in one of the corners, filled with 27degC air. The radiation of the cube is modeled to show how it influences the temperature of the air. Natural convection develops, driven by the heat of the cube and cold ceiling and floor. k-epsilon turbulence modeling is used. hotRadiationRoomFvDOM Case set up as above, but Discrete Ordinates model is used instead of P1, to simulate the influence of radiation. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 35
  • 36. chtMultiRegionFoam - Combination of heatConductionFoam and buoyantFoam for conjugate heat transfer between a solid region and fluid region Tutorial name Description multiRegionHeater “T” shaped solid heater is surrounded by water in the bottom section, by two solids on the sides of the upper section and by air over the top. The bottom of the heater is 500deg warm, the temperature in the rest of domain is 300deg initially. Additionally, there is 0.01m/s flow in X direction assigned to the air and water. Left solid is isolated from the heater. snappyMultiRegionHe ater General arrangement as above, only air used at the bottom instead of water, and no thermal isolation used for left solid. Mesh created with snappyHexMesh. Top air is given initial velocity of 0.1m/s, 10 times more than the bottom. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 36
  • 37. chtMultiRegionSimpleFoam - Combination of heatConductionFoam and buoyantFoam for conjugate heat transfer between a solid region and fluid region, including steady-state turbulent flow of compressible fluids Tutorial name Description heatExchanger Forced flow of air through a bundle of warm water filled pipes. There is a straight vanes rotor at the bottom (fvOptions->MRF and createBaffles) and the water is modeled as a porous region. There are two domains – each with separate blockMesh and separate set of thermophysical properties and boundary conditions. multiRegionHeaterRa diation Initial box divided into 3 solid and 2 fluid zones (topoSet, splitMeshRegions). Each zone has its own fvSolution, fvSchemes, thermophysicalProperties and boundary condition files generated. The heater is 200deg hotter than the rest and heat transfer to the neighboring solids and air can be observed along with natural convection inside the air domain. ©Rapid OF Blog Basic OpenFOAM Tutorials Guide v1.0 37