Draft. This manual is new and still growing. If something here does not match what you see in the software, the software is right — tell us and we will fix the page.
Dam break, free surface
At the end of this you will have a transient two-phase run of a column of water collapsing under its own weight, with a tracked interface you can watch move, and an understanding of why a free-surface case has three time-step controls instead of one.
Runs on the free tier. Multiphase (VoF) is not a licensed analysis type — free is limited by scale, not by physics — and a tank meshed as a plain block sits comfortably inside the 250,000-cell cap.
Before you start
Read Flow over a cylinder for the transient workflow. This tutorial adds the second phase and the interface.
You need no geometry at all. The tank is the mesh block, and the block can be typed in: turning Auto wind tunnel off under Mesh detaches the domain and puts six coordinate fields in its place. Step 3 does that. If you would rather draw it, a named box under Geometry primitives can be pointed at instead, with Domain from on the same pane.
Commands are on the ribbon. On the Model tab, Generate mesh and Quality are in the MESH group and Start run is in RUN; selecting a Post-processing row switches the ribbon to the Results tab, whose CAPTURE group holds Screenshot and Record.
Why gravity is not optional
Skip this and the rest will not make sense.
A volume-of-fluid case does not model two fluids. It models one fluid whose
density and viscosity vary in space, and a scalar field — the phase fraction,
alpha — that says which fluid each cell is. The interface is wherever that
scalar passes through 0.5.
Nothing in that formulation makes water sink. The two phases would sit wherever you put them and slowly diffuse into each other. Buoyancy is the entire mechanism that separates them, and buoyancy is gravity acting on a density difference. Without gravity there is no interface, only a smearing.
The application will not let you make that mistake. A VoF case with gravity off raises an error on the Problems tab against Models:
A two-phase case needs gravity. Without it there is nothing to separate the phases and the interface will not settle.
Gravity opposes the up axis, and the up axis is derived from Flow direction under Mesh rather than pinned to −Y. Get the flow direction wrong on a tank and gravity points sideways.
1. Create the case
Press New case. In the Create Simulation dialog choose Multiphase, then Free Surface, then one of:
- Compression (MULES) — classic interface compression. The right-hand panel
lists dam break as its first application, and its tags say why: robust and very
widely validated. Derives
interFoam. - Geometric (isoAdvector) — geometric interface advection, much sharper,
with no smearing from the compression term. Derives
interIsoFoam.
Take MULES for a first dam break and switch later. The collapse is violent, the mesh is coarse, and MULES is the more forgiving of the two on both counts.
The review page inserts an extra line into SET UP NEXT for this family: Initial conditions, described as "where each phase starts - a VoF case with no filled region is a case with one phase". That is the step people skip.
2. Geometry
Select Geometry — the row at the top of the tree, above the simulation heading. There is nothing to import: the tank is the mesh block and is set in the next step.
Import a body here only if something is standing in the tank — a weir, an obstacle, a structure the water hits. Then check Units and Size in the Geometry info block, because a body imported in millimetres and left as one sits in the tank a thousand times too big.
3. Mesh — making the block the tank
Select Mesh.
Set Mesher to blockMesh only (no body). There is no body here; the fluid is the inside of the tank, and the hint for that option says exactly that — a duct, a room, a manifold.
Set Flow direction. On a tank there is no flow direction in the aerodynamic sense, so what you are really choosing is which axis is up: the up axis is the one perpendicular to the flow axis, and gravity acts down it. While Auto wind tunnel is still on each pad label carries its signed axis in brackets, so you can read off which axis is which before you turn them off.
Turn the domain into the tank. Switch Auto wind tunnel off. The pads disappear and six fields take their place — Min X, Min Y, Min Z, Max X, Max Y, Max Z, in metres — which are the two opposite corners of the tank. Type them in. There is also a Place in view button, which hands the same box to the viewport as a cube you can drag.
The block underneath confirms what you asked for:
→ … x … x … m
blockMesh … x … x … = … M cells
The alternative, if the tank is one of several things you want positioned together, is Domain from at the top of the pane: it points the domain at a named box under Geometry primitives and overrides both the tunnel and the manual box, so the domain moves when the primitive moves.
Set the base cell size honestly. A VoF interface is resolved by cells, not by the scheme, and a coarse mesh gives a thick smeared surface however good the capture scheme is. The reference here is the depth of the water column: you want enough cells across it to see the collapse.
Press Generate mesh — on the pane, or in the ribbon's MESH group — and check Quality, which is under Mesh in the tree. A plain block should pass everything.
4. Refinements and Boundary layers
Both are effectively unused on a blockMesh-only case — there is no surface to refine towards or to grow prisms off. Leave them.
5. Models
Select Models.
Time dependency offers only Transient, and the hint says why: "This analysis has no steady form - the solver integrates in time." There is no steady dam break.
Under Physics, confirm Gravity / buoyancy is on. It is set on by default for this family, and the section above explains what happens if you turn it off.
For turbulence, Laminar is a defensible choice for a first dam break — the collapse is inertia-dominated and a turbulence model adds a viscosity you then have to argue about. Switch to k-omega SST once the case runs.
6. The two phases
Stay on Models for most of this. The phases are not one section on one pane: they are split three ways, and each piece is where the thing it describes belongs.
Each phase has its own page under Materials. The tree carries Phase 1 (water) and Phase 2 (air) under Materials, and each holds that fluid's Name, Density and Kinematic ν. Nothing else does.
The number in the name is the point. alpha.water counts the first phase,
so which fluid is Phase 1 decides what a phase fraction of 1 means, and every
initial and boundary condition in the case is written against it. Leave the
names alone unless you have a reason: every field name in the case is built from
them, and alpha.water is what you will be contouring later.
Surface tension is on Models, beside gravity, because it is a property of the pair rather than of either fluid. Its hint gives the scale: 0.07 N/m is water against air at 20 °C.
There is a section literally headed Phases, and it is not this. It is a table for the three-or-more-phase analysis types, and it does not appear on an ordinary dam break.
The interface
Also on Models. The Interface section is where the capture behaviour lives:
- Capture scheme — isoAdvector or MULES, and the hint tells you what each one does and which executable it runs. Changing this changes the solver.
- Compression — only shown for MULES. This is
cAlpha; 1 is the usual value, 0 turns compression off entirely. - Interface correctors — how many times
alphais corrected within a step. - Alpha sub-cycles — how many sub-steps
alphatakes per flow step. - Interface Courant limit —
maxAlphaCo, and it is tighter than the flow limit because the interface is the thing the time step has to resolve.
Leave all five at their defaults for a first run. They are the knobs for when the interface is smearing or the run is unstable, not the knobs for setting a case up.
Filling the tank
Fill to is a height on the up axis, in metres, in case coordinates. It is a shortcut rather than a setting of its own: pressing Make it a box and a subdomain beneath it writes a box from the domain floor up to that height, and a subdomain that starts the first phase inside it. Then it gets out of the way — what you are left with is an ordinary subdomain you can edit.
For a dam break that is the right mechanism and the wrong shape. A dam break starts with a column of water against one wall, not a flat layer. So either take the box Fill to just made and edit its corners, or skip it and add a subdomain directly, which is the next step.
Do neither and the domain starts entirely air, and there is nothing in it to move.
7. Initial conditions — the water column
The tree nests these by field: Initial conditions → (alpha.water) Phase fraction (water) → Subdomains. Select the Subdomains row under the phase fraction and you get that field's subdomains and nothing else; the Initial conditions row itself lists all of them.
The pane explains the mechanism: "A patch of the domain given a different initial value. setFields applies these after meshing and before the solver starts."
Press + Add subdomain of alpha.water. On the card:
- Shape —
box. - Field — the phase fraction. It appears in the list under the name the phases gave it.
- Value —
1for all water. The hint on the boundary-condition version of this field says it plainly: 1 is all of the first phase, 0 is all of the second. - Min X, Min Y, Min Z, Max X, Max Y, Max Z — the corners of the column, in metres, in case coordinates.
Set the box to a column standing against one wall of the tank, reaching part way up. Those are the coordinates of the dam.
The card has enable / disable and ✕, so you can keep alternative columns around and switch between them.
8. Boundary conditions
Select Boundary conditions.
For a closed tank, every patch is a Wall. If the pane reports the patches do not match the mesh, press Use the mesh's patches first, then set each one.
If the top of the tank is open, that patch wants a Pressure outlet at 0 Pa gauge so displaced air can leave. A sealed box with an incompressible pressure solver and nowhere for the air to go is a case that will fight you.
For any patch that lets fluid in or out, a water fraction field appears asking whether that opening is above or below the waterline. It is asked per patch rather than guessed from the geometry, because which it is decides whether the case fills or drains.
9. Simulation control — the transient controls
Select Simulation control. This is the pane that decides whether a VoF run finishes or crawls.
End time is how long the physics runs for, in seconds. A dam break is over quickly — the column falls, hits the far wall, and runs back. Pick an end time that covers the collapse and the first return, not one that covers a minute of sloshing you will not look at.
Time step is the starting Δt only.
Adjust time step to Courant number is on by default and should stay on. A free-surface run is limited twice: once on the flow, by Max Courant, and once on the interface, by the Interface Courant limit you saw under Models. Both default to 0.5 on a two-phase case, against 1 elsewhere, and the step the solver takes is whichever of the two binds first. The interface limit is measured only in the cells the interface passes through, which is why the pane calls it the tighter of the two.
Max time step caps it regardless. This matters because at the moment the column is released the velocities are small and the Courant limit will happily grant a huge step, which then takes an enormous first jump before the physics has started.
The block underneath tells you how many steps that is at the starting Δt and how many times it will write. Read it. A transient VoF case writing every step is thousands of files and a run that spends its time on disc.
Write every and Keep last control that. For an animation you want several writes per shedding or sloshing event; Keep last at a small number throws away the intermediate ones and keeps the disc under control.
10. Result control
Select Result control.
Force coefficients are not the answer here. What you want is:
- + Field minimum and maximum — the extremes of each field, which for a dam break includes the peak velocity and pressure at impact.
- + Patch data with Operation set to areaAverage on
pfor the wall the water hits, if the impact pressure is what you are after. - + Cutting plane if you want the interface sampled to VTK for an external viewer as the run goes.
11. Run
Select Simulation runs — that is the node's name — and press Start run.
Watch the Log rather than the residuals. A transient VoF run reports the Courant number and the interface Courant number every step, and those are the numbers that tell you whether the run is healthy. Steps getting shorter and shorter is the interface tightening its limit; that is the solver protecting itself, not a fault, but a run that has slowed to a crawl will not finish.
Under Diagnostics on the run's own pane there is Trap floating-point exceptions. Leaving it on while a case is being set up is the right default: a run that produces a NaN stops at once, rather than running on and filling the case with nonsense.
12. Post-processing
Post-processing hangs under the run rather than beside the setup steps:
Simulation runs → <your run> → Post-processing, and it appears only once that
run has finished. Selecting it switches the ribbon to the Results tab.
Press Show results.
Under Ready-made views, press Free surface. It builds a contour of the phase fraction at 0.5 — which is the interface — with a section through it. The pane's own description is the reason to use it rather than assembling one yourself: "The shape of the surface is what a two-phase run is for."
Step through the written times. To write the sequence out, press Record in the Results ribbon's CAPTURE group; it is enabled once the result has more than one write. (Export in the RESULT group is something else: it writes the pipeline's data out as CSV.)
What you should see
A column that collapses under its own weight, runs along the floor as a front, climbs the far wall, and comes back. A sharp interface — a cell or two thick with isoAdvector, a few cells with MULES — that stays sharp as it moves.
Things that mean it is wrong:
- The water sits still. Gravity is off, or it is pointing along an axis you did not intend. Check Gravity / buoyancy under Models, then check Flow direction under Mesh, because that is what sets the up axis.
- The interface smears into a grey band and never recovers. Too few cells across the water, or the alpha sub-cycles and correctors are not keeping up. Refine before you touch the scheme settings.
- The tank is empty. No fill level and no subdomain, so the domain starts entirely air and there is nothing in it to move.
- The whole domain is water. The phase order is inverted, or the subdomain's
value is on the wrong field. Check which fluid is Phase 1 under
Materials:
alphacounts that one.
What to try next
- Run the same case again with Capture scheme set to isoAdvector and compare the interface thickness. Add it as a second simulation so the Comparison node can put them side by side.
- Mesh independence study — an interface is more mesh-sensitive than a pressure field, so this matters more here, not less.
- The Marine & Waves analysis type is the same VoF machinery with waves generated at the inlet, if what you actually want is a structure in a sea state.