basic open foam tutorials guide

Upload: grzegorz-budzisz

Post on 02-Nov-2015

445 views

Category:

Documents


34 download

DESCRIPTION

Contains info on what a given tutorial does and what utilities it uses.

TRANSCRIPT

  • 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 its 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 Descriptionflange 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 DescriptionpitzDaily 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-1Comparison of velocity profiles for the three tutorials

    Figure I-2Comparison 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 Descriptioncavity 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 gradingelbow 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/dynamicMeshDictPicture 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 DescriptionairFoil2D 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 fluidsTutorial 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

    angledDuctExplicitFixedCoeff

    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 DescriptiondecompressionTank 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 Descriptionlaminar 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

  • damBreakPorousBaffle

    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.

    damBreak4phaseFine

    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).

    dambreak4phaseFine

    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 Descriptionlaminar 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.

    snappyMultiRegionHeater

    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.

    multiRegionHeaterRadiation

    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

    Basic guide to OpenFOAM tutorials1. Introduction2. Basic3. Incompressible4. Compressible5. Multiphase6. Heat transfer