The OpenFOAM solver sediDriftFoam2 is an extension of sediDriftFoam, adding bed level changes due to erosion and deposition of sediments. The current page gives more information for the article Adaptive grid algorithms for computing local scour with OpenFOAM . The page contains input files used in this article together with the source code for sediDriftFoam2.
SediDriftFoam2 contains algorithms to predict bed elevation changes due to sediment deposition and erosion. This is done in an adaptive grid, similar to SSIIM. Both OpenFOAM and SSIIM 2 uses unstructured grids and the finite volume method for discretization of the equations. The two programs are also both written in C and C++.
The solver sediDriftFoam2 can also compute spatial variations in the water surface location, with pressure-based algorithms and an adaptive grid, similar to SSIIM 2. This not described in the submitted journal paper, but the source code includes these algorithms. The case presented in the journal paper has so low water velocity that the water surface is horizontal when computed with the free water surface algorithms. The free surface algorithms were therefore not described in the article. However, for some other test cases with higher water velocity, the water level in front of the pier formed a wave. Some of the graphics below illustrates this.
There are many versions of OpenFOAM. The results produced in the current study are compiled with OpenFOAM 20.09 for Windows. This has been made by and downloaded from the CFD Support company. For Linux, the ESI OpenFOAM 24.06 precompiled was used for a while, which gave the same results as the CFD Support version 20.09. However, after a power outage at our university, the Linux computer crashed and a new harddisk had to be installed. The ESI OpenFOAM 24.06 precompiled was then not longer available on the web, so version 24.12 was tested instead. This did not give the same results as the previous versions, actually the results were not as good. Therefore, version 20.09 from CFD Support is recommended if you want to reproduce the results from the current study.
The input files for SSIIM 2 for making the OpenFOAM polyMesh files are given in the link below. Copy all the files to a directory on your Windows computer. Depending on if you want to make a coarse or a fine mesh, you need to remove the extension of the koosurf and control files. Then start SSIIM 2, go to the Grid Editor and read the koosurf file. Then generate the grid and write the unstruc file. End the program after you are sure that the whole unstruc file is written. This may take some time. Then exit SSIIM 2 and restart the program. Read the unstruc file. After you are sure the whole file is read, then use the File menu to write OpenFOAM files. Several files will be written, but you only need five files for your polyMesh directory: boundary, neighbour, owner, points and faces. These five files can also be downloaded form the links below.
If you make new OpenFOAM files (boundary, neighbour, owner, points, faces) from SSIIM 2, you may get an error message running checkMesh: "faces not in upper triangular order". To solve this problem the function renumberMesh has to be used before OpenFOAM is run. If you get error messages running renumberMesh, you can rename the /0/ directory to something else before running renumberMesh and rename the directory back to /0/ afterwards.
Note that the algorithms in SSIIM that produces the OpenFOAM input files are not general. They will only work for a domain with one structured block, where all the cells are hexahedrals. Only one outblocked region can be used, and it must cover the whole vertical water column. The water/sediment inflow must cover the whole "west" side of the domain, and the outflow must cover the whole "east" side.
Input files for the coarse grid
Input files for the fine grid
Input files for SSIIM 2
OpenFOAM and sediDriftFoam2 are distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
The GNU General Public License is distributed with OpenFOAM. It is
also located at: http://www.gnu.org/licenses/ .
Source code for sediDriftFoam2
Inside the domain looking downstream. The colours show the sediment concentrations.
Reference for the article describing the current project:
Olsen, N. R. B. (2025) Adaptive grid algorithms for computing local scour with OpenFOAM . Journal of Hydroinformatics, jh2025059. doi:10.2166/hydro.2025.059.
Previous local scour publications with SSIIM:
Olsen, N. R. B. and Melaaen, M. C. (1993), Three-dimensional numerical modeling of scour around cylinders, Journal of Hydraulic Engineering, Vol. 119, No. 9, September, doi:10.1061/(ASCE)0733-9429(1993)119:9(1048).
Olsen, N. R. B. and Kjellesvig, H. M. (1998), Three-dimensional numerical flow modelling for estimation of maximum local scour depth, Journal of Hydraulic Research, No. 4, pp. 579-590, DOI:10.1080/00221689809498610.
Bihs, H. and Olsen, N. R. B. (2011), Numerical Modeling of Abutment Scour with the Focus on the Incipient Motion on Sloping Beds, Journal of Hydraulic Engineering, No. 10, pp. 1287-1292. doi:10.1061/(ASCE)HY.1943-7900.0000401
Baranya, S., Olsen, N. R. B., Stoesser, T. and Sturm, T. (2014), A nested grid based computational fluid dynamics model to predict bridge pier scour, Water Management, Vol. 167, Issue 5, pp 259-268, DOI: 10.1680/wama.12.00104.
Last updated: 22. November 2025.