# Dam Break - CFD Simulation

Source: https://help.sim-flow.com/tutorials/dam-break
Last updated: 2026-10-14

[Video](https://help.sim-flow.com/tutorials/images/dam-break.mp4)

## 1. Introduction

In this tutorial, we will demonstrate a common free-surface flow with a Volume of Fluid approach. We will examine the multiphase, immiscible flow of water and air. Increasing the water level will lead to water flowing through the dam. Using ParaView, we will be able to visualize the resulting flow and its effects.

## 2. Download SimFlow

SimFlow is a general-purpose [CFD Software](https://sim-flow.com/download/cfd-simulation-software/)

To follow this tutorial, you will need the SimFlow free version. You may download it via the following link:
[Download SimFlow](https://sim-flow.com/download-simflow/)

## 3. Create Case

Open SimFlow and create a new case named *dam break*

1. Click **New**
2. Provide name `dam break`
3. Click **Create** to open a new case

![simflow-launcher](https://help.sim-flow.com/tutorials/images/launcher-dam_break.png)

## 4. Import Geometry

Firstly, we need to [Download GeometryDam](https://help.sim-flow.com/tutorials/downloads/dam-break/dam.stl)

1. Click **Import Geometry**
2. Select geometry file *dam.stl*
3. Click **Open**

![db 2 import geometry](https://help.sim-flow.com/tutorials/images/dam-break/db-2-import-geometry.png)

## 5. Imported Geometry Units

The STL geometry format does not store the unit in which the geometry was created. *Geometry size* shows the overall size of the model in each direction, which is helpful for unit selection. In our case, the default unit meter is correct.

1. To confirm default unit *meter*, press **OK**

![db 2 unit](https://help.sim-flow.com/tutorials/images/dam-break/db-2-unit.png)

## 6. Geometry - Dam

After importing geometry, it will appear in the 3D panel.

1. Click **Fit View** to zoom the geometry

![db 3 geometry 1](https://help.sim-flow.com/tutorials/images/dam-break/db-3-geometry-1.png)

## 7. Enable Geometry Meshing

Now we need to enable meshing for the newly imported geometry.

1. Go to *Hex Meshing* panel
2. Enable meshing on the *dam* geometry

![db 4 geometry meshing](https://help.sim-flow.com/tutorials/images/dam-break/db-4-geometry-meshing.png)

## 8. Base Mesh

Now we are going to define the computational domain in the Base Mesh panel.

1. Go to *Base* tab
2. Define initial mesh extents
   *Min \({\sf [m]}\)*`-20``0``0`
   *Max \({\sf [m]}\)*`30``30``20`
3. Define mesh division
   *Division*`70``45``30`

![db 5 base mesh](https://help.sim-flow.com/tutorials/images/dam-break/db-5-base-mesh.png)

## 9. Base Mesh Boundaries

To define different boundary conditions on each side of the domain, you need to assign a unique name to each face of the base mesh. This will allow you to apply appropriate conditions later in the simulation setup.

1. Assign boundary names from the dropdown list
   *X-* *inlet*
   *X+* *outlet*
2. Manually type a custom name for the Y− face
   *Y-* *sides*
3. Select boundary names for the remaining faces from the dropdown list
   *Y+* *sides*
   *Z-* *bottom*
   *Z+* *top*
4. Change the boundary type
   *Z-* *wall*

![db 6 base mesh boundaries](https://help.sim-flow.com/tutorials/images/dam-break/db-6-base-mesh-boundaries.png)

## 10. Material Point

We need to tell the meshing algorithm where the mesh should be retained.

1. Go to *Point* tab
2. Set coordinates of the material point
   *Material Point*`10``15``5`

![db 7 material point](https://help.sim-flow.com/tutorials/images/dam-break/db-7-material-point.png)

## 11. Start Meshing

Everything is now set up for meshing.

1. Go to *Mesh* tab
2. Press **Mesh** button to start the meshing process

![db 8 start meshing](https://help.sim-flow.com/tutorials/images/dam-break/db-8-start-meshing.png)

## 12. Mesh

After the meshing process is finished, the mesh will be loaded and displayed. To show what is inside the mesh, we can zoom in, or hide other meshes.

1. Click *Graphic Object List*
2. Select *Mesh* to show meshes list

![db 9 mesh 1](https://help.sim-flow.com/tutorials/images/dam-break/db-9-mesh-1.png)

## 13. Mesh - Toggle Visibility

You can toggle the visibility of different objects to examine desired ones.

1. Hide *top* boundary to look inside the mesh

![db 10 hide mesh](https://help.sim-flow.com/tutorials/images/dam-break/db-10-hide-mesh.png)

## 14. Simulation Type

We want to analyze water flow over a dam. For this purpose, we will use a transient simulation of two immiscible fluids (water and air) using the free-surface method.

![Simulation Panel](https://help.sim-flow.com/assets/images/go-to-simulation-panel@2x.png)

![Step 1](https://help.sim-flow.com/assets/images/solvers-selection/interFoam/01_multiphase@2x.png)

![Step 2](https://help.sim-flow.com/assets/images/solvers-selection/interFoam/02_free_surface@2x.png)

![Step 3](https://help.sim-flow.com/assets/images/solvers-selection/interFoam/03_immiscible@2x.png)

![Step 4](https://help.sim-flow.com/assets/images/solvers-selection/interFoam/04_2_fluids@2x.png)

![Step 5](https://help.sim-flow.com/assets/images/solvers-selection/interFoam/05_apply@2x.png)

## 15. Boundary Conditions - Inlet (Flow)

At the inlet, we will apply a constant water flow rate in order to simulate water supplied by a river.

1. Go to *Boundary Conditions* panel
2. Select *inlet* boundary
3. Set the *Mass Flow Inlet* character
4. Set the mass flow rate
   *U Flow Rate \({\sf [m^3/s]}\)*`250`

![db 12 boundary conditions inlet flow](https://help.sim-flow.com/tutorials/images/dam-break/db-12-boundary-conditions-inlet-flow.png)

## 16. Boundary Conditions - Inlet (Phases)

We will modify the default phase fraction boundary condition to properly interact with the velocity boundary condition.

1. Go to *Phases* tab
2. Select the following boundary condition accordingly
   *\(\alpha_{phase1}\) Type*`Zero Gradient`

![db 13 boundary conditions inlet phases](https://help.sim-flow.com/tutorials/images/dam-break/db-13-boundary-conditions-inlet-phases.png)

## 17. Boundary Conditions - Outlet (Flow)

At the outlet, we want the water to freely flow out of the domain.

1. Select *outlet* boundary
2. Go to *Flow* tab
3. 4 Set the following boundary conditions accordingly
   *\(p- \rho gh\) Type*`Fixed Flux Pressure`
   *\(U\) Type*`Inlet-Outlet`

![db 14 boundary conditions outlet flow](https://help.sim-flow.com/tutorials/images/dam-break/db-14-boundary-conditions-outlet-flow.png)

## 18. Boundary Conditions - Sides (Flow)

We want sides to be impermeable but not to provide any friction.

1. Select *sides* boundary
2. 3 Set the following boundary conditions accordingly
   *\(p- \rho gh\) Type*`Zero Gradient`
   *\(U\) Type*`Slip`

![db 15 boundary conditions sides flow](https://help.sim-flow.com/tutorials/images/dam-break/db-15-boundary-conditions-sides-flow.png)

## 19. Boundary Conditions - Sides (Phases)

1. Go to *Phases* tab
2. Set the following boundary condition accordingly
   *\(\alpha_{phase1}\) Type*`Zero Gradient`

![db 16 boundary conditions sides phases](https://help.sim-flow.com/tutorials/images/dam-break/db-16-boundary-conditions-sides-phases.png)

## 20. Geometry for Initialization

As an initial state, we want some water to already be behind the dam. For this purpose, we need to create geometry defining the initial location of water.

1. Go to *Geometry* panel
2. Create *Box* geometry
3. Change name to *water_init*
4. Define parameters accordingly
   *Origin \({\sf [m]}\)*`-20``0``0`
   *Dimensions \({\sf [m]}\)*`20``30``9`

![db 18 geometry for initialization 1](https://help.sim-flow.com/tutorials/images/dam-break/db-18-geometry-for-initialization-1.png)

## 21. Geometry - Water Initialization

The gray box behind the broken dam geometry indicates the water we have created for the initialization part.

1. *Exit edit mode* and *Deselect* the geometry using buttons or by clicking `Esc` to have a proper view of the geometry

![db 19 geometry water init](https://help.sim-flow.com/tutorials/images/dam-break/db-19-geometry-water-init.png)

## 22. Initialization

We will use the *water_init* geometry to select the region where the water phase fraction should be applied.

1. Go to *Initial Conditions* panel
2. Switch to *Patch* tab
3. Enable initialization on *water_init*
4. Expand *Fields* list
5. Select *\(\alpha_{phase1}\)* fraction for initialization
6. Set initial value of *\(\alpha_{phase1}\)* to `1`

![db 20 initialization](https://help.sim-flow.com/tutorials/images/dam-break/db-20-initialization.png)

## 23. Slice Monitor (I)

Usually, we do data postprocessing when the computation is finished. However, it is handy to be able to see a preview of the results during the calculation. To do this, we need to use the *Monitors* panel where we might sample data at a specified point or section plane. In this tutorial, we will add a section plane, going through the center of our mesh.

1. Go to *Monitors panel*
2. Select *Sampling* tab
3. Click on *Create Slice* button to enable sampling data on a section plane
4. Set slice parameters accordingly
   *Normal \({\sf [-]}\)*`0``-1``0`
   *Point \({\sf [m]}\)*`8``15``15.5`

![db 21 slice](https://help.sim-flow.com/tutorials/images/dam-break/db-21-slice.png)

## 24. Slice Monitor (II)

Finally, we need to choose which data should be sampled on the section plane.

1. Expand available *Fields* list
2. Select *\(U\)*, *\(\alpha_{phase1}\)* and *\(\rho\)*

![db 22 slice add fields](https://help.sim-flow.com/tutorials/images/dam-break/db-22-slice-add-fields.png)

## 25. Run - Time Control

For multiphase simulations, we usually want the solver to automatically determine the proper time step. This should lead to good stability and reduce simulation time.

1. Go to *Run* panel
2. Specify simulation duration to `60` seconds
3. Change *Time Stepping* to *Automatic*
4. Set initial time step *Initial \(\Delta t [s]\)* to `1e-02`
   (solver will start computation with this value and adjust it in the next iterations)

In some situations, it might be necessary to use smaller time step values than the one provided by the default configuration. To force the solver to reduce it, you need to change the *Max Co [-]* (Courant Number). This property is used by the solver to automatically estimate the desired time step value.

![db 24 time controls](https://help.sim-flow.com/tutorials/images/dam-break/db-24-time-controls.png)

## 26. Run - Write Control

Before we start computations, we will specify intervals for writing data.

1. Go to *Output* tab
2. Set *Write Control* *Interval [s]* to `0.5` seconds
   (The results will be written to the hard drive every 0.5 seconds of simulation time)

![db 23 run output](https://help.sim-flow.com/tutorials/images/dam-break/db-23-run-output.png)

## 27. Run - CPU

To speed up the calculation process, take advantage of parallel computing and increase the number of CPUs based on your PC’s capability. The free version allows you to use only one processor (serial mode). To get the full version, you can use the contact form to [Request 30-day Trial](https://license.sim-flow.com/trial)

Estimated computation time for serial mode: 35 minutes

1. Switch to *CPU* tab
2. Click **Run Simulation** button

![run cpu serial](https://help.sim-flow.com/tutorials/images/run-cpu-serial.png)

## 28. Residuals

When the calculation is finished, we should see a similar residual plot.

![db 25 residuals](https://help.sim-flow.com/tutorials/images/dam-break/db-25-residuals.png)

## 29. Preview Results on Slice

When the calculation is started, SimFlow will automatically open the *Residuals* plots tab. When data is written to the disk for the first time, a new tab *Slices* will appear next to *Residuals*. Under this tab, we can preview results on the defined slice plane.

1. Go to *Slices* tab
2. Set the XZ orientation **View XZ**
3. Click **Fit View**
4. Select *alpha.phase1* to display the location of the water phase
   *alpha.phase1* equal to *1* indicates water phase
   *alpha.phase1* equal to *0* indicates air phase
5. Click *Adjust range to data*
6. Play with animation buttons to view the results of the analysis

![db 26 preview results slice](https://help.sim-flow.com/tutorials/images/dam-break/db-26-preview-results-slice.png)

## 30. Postprocessing - ParaView

When the computations are finished, start the ParaView software.

1. Go to *Postprocessing* panel
2. Start *ParaView*

You might also start ParaView when the simulation is still in progress to observe intermediate results.

![db 27 postprocessing paraview](https://help.sim-flow.com/tutorials/images/dam-break/db-27-postprocessing-paraview.png)

## 31. ParaView - Load Results

After opening ParaView, we have to load the results of the simulation from SimFlow.

1. Select your case
2. Click **Apply** button to load results into ParaView

![db 28 paraview load results](https://help.sim-flow.com/tutorials/images/dam-break/db-28-paraview-load-results.png)

## 32. ParaView - Create Clip

We want to show what the water surface looks like. Additionally, we want the water surface to be colored based on the local velocity to better understand the flow behavior.

1. Make sure your case is selected *dam_break*
2. Create *Clip*
3. Set *Clip Type* to *Scalar*
4. Set *Scalars* to *alpha.phase1*
5. Define water surface threshold *Value* to `0.2`
6. Make sure that *Invert* option is unchecked
7. **Apply** changes

![db 29 paraview create clip 1](https://help.sim-flow.com/tutorials/images/dam-break/db-29-paraview-create-clip-1.png)

## 33. ParaView - Coloring

After the clip is created, we can color the water surface with velocity and choose a color scale preset while still in the Properties panel.

1. Select *U* (velocity) field
2. Click *Choose Preset* button. A new window will appear (next step)

![db 31 paraview coloring](https://help.sim-flow.com/tutorials/images/dam-break/db-31-paraview-coloring.png)

## 34. ParaView - Choose Preset

We can now select a Color Preset of your choosing.

1. Choose the *jet* preset.
2. **Apply** changes
3. **Close** Choose Preset window

![db 32 paraview choose preset](https://help.sim-flow.com/tutorials/images/dam-break/db-32-paraview-choose-preset.png)

## 35. ParaView - Adjust Data Range and Play

1. Change visible time step to *Last Frame*
2. Fit color range by clicking *Rescale to Data Range*
3. Move to the *First Frame*
4. Click *Play* to show simulation results

![db 33 paraview adjust data range](https://help.sim-flow.com/tutorials/images/dam-break/db-33-paraview-adjust-data-range.png)

## 36. ParaView - Results

After correctly defining the configuration, you should be able to see similar results in the graphics 3D view.

![db 34 paraview results](https://help.sim-flow.com/tutorials/images/dam-break/db-34-paraview-results.png)

## 37. ParaView - Add Opacity

We can also add an opacity attribute to surface colors.

1. Select *Clip*
2. Click *Edit* if you do not see the *Color Map Editor* panel
3. Check *Enable opacity mapping for surfaces*
4. Check *Use log scale when mapping data to opacity*

![db 35 paraview opacity](https://help.sim-flow.com/tutorials/images/dam-break/db-35-paraview-opacity.png)

## 38. ParaView - Results with Opacity

![db 36 paraview results opacity](https://help.sim-flow.com/tutorials/images/dam-break/db-36-paraview-results-opacity.png)

## 39. Advanced Postprocessing with ParaView

This concludes the tutorial, covering all the aspects we intended to showcase. For a finely tuned presentation of the results, you may take advantage of the more advanced features.

In ParaView, you can display streamlines, contour plots, vector fields, line or time plots, calculate volume or surface integrals and create animations.

To familiarize yourself with the ParaView capabilities, it’s worth checking out our video tutorial, *Paraview CFD Tutorial - Advanced Postprocessing in ParaView*, in which we demonstrate some of the most commonly used postprocessing techniques.

[Paraview CFD Tutorial - Advanced Postprocessing in ParaView](https://www.youtube.com/watch?v=5M6VgXyHB60&list=PLy7xPqn9xXckoD2gZgPpv8mrxillJ9PWU&index=21)
