Dam break through an elastic rubber gate: OpenFOAM and code_aster coupled with preCICE on cloudHPC

TL;DR
- We coupled OpenFOAM v2506 (interFoam) and code_aster 17.3.17 with preCICE 3.3.1, using our open-source connector precice_aster 0.1.4, on the classic dam-break-through-an-elastic-gate benchmark (Antoci et al., 2007).
- The rubber gate opens to a maximum of 40.6 mm at t = 0.12 s. The experiment peaks at about 40–43 mm around t ≈ 0.15 s: the peak opening is within −6 % to +2 % of the measured range, but it comes about 0.03 s early.
- The rubber is almost as dense as water (ratio 1.1), the hardest regime for partitioned FSI. With implicit coupling and IQN-ILS the run needed 2.8 coupling iterations per time window on average over 1,600 windows, with no failed window.
- The coupled run took 48 minutes (56 minutes billed) on a 4 vCPU spot machine on cloudHPC and cost €0.19. The whole campaign, including three runs that taught us something, cost €0.35.
- Case files, mesh generator and post-processing scripts are below so you can run it yourself.

Why this case
In October we released precice_aster, a GPL-3.0 connector that couples code_aster to OpenFOAM, CalculiX and any other preCICE participant, for both fluid–structure interaction (FSI) and conjugate heat transfer. We presented it in a webinar with AsterLab and validated it on the preCICE tutorials: the perpendicular flap, the heated plate and the 3D elastic tube.
Those tutorials prove the plumbing works. They do not prove much else: the flap is single-phase, moves a few centimetres in seconds, and has no experiment behind it. So we picked a case that most FSI demos avoid, because everything in it is hard at the same time:
- Free surface. The fluid is water and air, solved with the volume-of-fluid method (interFoam), not a single-phase flow.
- Large deformation. The free end of the gate moves about half its length in a tenth of a second, so the solid needs finite-strain kinematics and the fluid mesh has to follow.
- Added mass. Rubber (1100 kg/m³) is barely denser than water (1000 kg/m³). With a density ratio close to 1, explicit or under-relaxed partitioned coupling diverges; you need a proper quasi-Newton scheme.
- An experiment. Antoci, Gallati and Sibilla filmed the gate opening in 2007, and the test has become the standard check for SPH, PFEM and FEM–FVM FSI codes.
Results at a glance
| Quantity | OpenFOAM + code_aster (this work) | Experiment (Antoci et al. 2007) |
|---|---|---|
| Maximum horizontal opening of the free end | 40.6 mm | ≈ 40–43 mm |
| Time of maximum opening | 0.12 s | ≈ 0.15 s |
| Maximum vertical lift of the free end | 13.3 mm at 0.122 s | published as a plot only |
| Horizontal opening at t = 0.4 s | 27.5 mm | published as a plot only |
| Coupling windows / mean iterations per window | 1,600 / 2.81 (max 9, first window) | – |
| Coupled run time / cost on cloudHPC | 48 min on 4 vCPU spot (56 min billed) / €0.19 | – |
The experimental curves are only published as figures. We compare the peak as read from those figures and from the later studies that reproduce them (hence a range, not a single number); we have not digitised the full curve.
How the case was set up

Geometry. A water column 0.100 m wide and 0.140 m high is held back by a rubber gate 0.079 m long and 5 mm thick. The gate is clamped at its top edge to a rigid tank wall and hangs freely, 1 mm above the floor. Downstream there is 0.200 m of open floor; the top and the right side are open to the atmosphere.
Fluid: OpenFOAM v2506, interFoam.
- 2D, 48,005 hexahedral cells of 1 mm, built with blockMesh from a short Python generator (
gen_block.py). The mesh is 1 m deep in the third direction (see “What didn’t work” for why that matters). - Water ρ = 1000 kg/m³, ν = 1e-6 m²/s; air ρ = 1 kg/m³; laminar flow.
- Moving mesh:
displacementLaplacianwith quadratic inverse-distance diffusivity from the gate, so the cells next to the gate move almost rigidly. Mesh points may slide along the floor and the top, which lets the cells under the free end follow it. - Fixed time step Δt = 2.5e-4 s, equal to the coupling window. The jet under the gate reaches almost 3 m/s, so the Courant number peaks around 0.7–0.9 there; interFoam stayed stable, but a smaller step is the first refinement we would try.
- Pressure solver with
relTol 0on the final corrector: noisy forces stop an implicit coupling from converging.
Solid: code_aster 17.3.17.
- 2D plane strain (
D_PLAN), 252 eight-node quadrilaterals (QUAD8), 4 across the thickness and 63 along the gate. - Linear elastic rubber: E = 10 MPa, ν = 0.4, ρ = 1100 kg/m³, inside the range used for this gate in the literature (E from 7.8 to 12 MPa).
DYNA_NON_LINEwithGREEN_LAGRANGEfinite strain and the trapezoidal Newmark scheme (β = 0.25, γ = 0.5), so no numerical damping.
Coupling: preCICE 3.3.1.
- OpenFOAM writes forces and reads displacements on the three wetted faces of the gate; code_aster does the opposite on the same faces.
- Parallel implicit coupling, window 2.5e-4 s, 1,600 windows to t = 0.4 s.
- IQN-ILS quasi-Newton acceleration (initial relaxation 0.1, QR2 filter, 15 windows reused), convergence at 5e-3 relative change on both forces and displacements.
- Radial-basis-function mapping with a 6 mm support, which spans both faces of the 5 mm gate.
Instance. cloudHPC preCICE-v3.3.1 app on 4 vCPU highcore, spot: 2 cores for OpenFOAM (2 MPI processes) and 2 for code_aster (1 process, 2 threads).
What the simulation shows

The gate starts to bend almost immediately. Water squeezes through the opening along the floor as a thin, fast jet (almost 3 m/s), while the tank drains slowly. By t = 0.12 s the free end has swung 40.6 mm downstream and lifted 13.3 mm: the gate curves like a cantilever, not a hinge. As the water level drops the load falls, the gate springs back to about 25.6 mm at t ≈ 0.29 s, and then settles near 27.5 mm under the water that is still in the tank.

The pressure field stays close to hydrostatic in the tank (0 to 1.4 kPa) and drops sharply where the water accelerates under the gate. That pressure difference across the gate is what bends it.

Free-end displacement

| t [s] | 0.04 | 0.08 | 0.12 | 0.20 | 0.30 | 0.40 |
|---|---|---|---|---|---|---|
| Horizontal dx [mm] | 14.2 | 34.8 | 40.6 | 32.4 | 25.7 | 27.5 |
| Vertical dy [mm] | 1.5 | 9.5 | 13.3 | 8.2 | 5.0 | 5.8 |
What we learned. The size of the opening is right: 40.6 mm against about 40–43 mm. The timing is about 0.03 s early, and we see four reasons that are worth stating rather than tuning away:
- 2D versus the real tank. In the experiment water leaks between the gate and the tank walls (later studies point to splashes from about t = 0.08 s); a 2D model has no such leak.
- The rubber is not well defined. Later papers model the same gate with E between 7.8 and 12 MPa and ν from 0.4 to 0.47. A softer gate opens later and further; we picked E = 10 MPa, ν = 0.4 and did not calibrate.
- The 1 mm gap and the jet. The gap under the gate is a single 1 mm cell at the start, and the jet stays only a few cells thick, so the flow rate leaving the tank, and with it the load history, is resolved coarsely. The jet also runs at a Courant number close to 1.
- No damping. The trapezoidal Newmark scheme and an elastic rubber have no dissipation, so the gate swings back more freely than real rubber would.
Coupling cost

All 1,600 windows converged. The first window needed 9 iterations, while IQN-ILS built up its history. After that the run settled at 3–4 iterations while the gate opened fastest, and 2–3 iterations for the rest of the run: 2.81 on average, 4,490 in total. For a density ratio of 1.1 that is cheap. The connector restarts DYNA_NON_LINE at every coupling step, so a code_aster step is not free, but here each call took a fraction of a second on 252 elements, and OpenFOAM dominated the 48 minutes.
A free sanity check from a wrong run
Our first complete run had a bug (see the next section): code_aster received forces 1,000 times too small. The gate barely moved, but the result was still useful, because a nearly unloaded gate is just a cantilever vibrating in vacuum, and that has a textbook answer.

- Period. The free end oscillated with a period of 0.0750 s. The first bending mode of a clamped–free plate in plane strain (Euler–Bernoulli, E′ = E/(1−ν²), 5 mm thick, 79 mm long, 1100 kg/m³) gives 0.0743 s, a difference of 1 %.
- Amplitude. The peak was 0.089 mm. The hydrostatic load on the gate, 0.077 N/m once divided by 1,000, deflects the cantilever tip by 0.045 mm statically; applied suddenly, it doubles to 0.091 mm, within 2 % of the run.
- Almost no damping. The peaks drop by only 2.5 % over four periods, as expected with the trapezoidal rule and an elastic material.
That check cost €0.11 and confirms the force transfer, the units and the solid dynamics independently of the fluid.
What didn’t work (and what it cost)
We show the failed runs as they happened on cloudHPC, because each one is a trap you can avoid.
| Run | What happened | Fix | Cost |
|---|---|---|---|
| 92336 | code_aster stopped at the first DYNA_NON_LINE call with error COMPOR5_22: GROT_GDEP is not available on 2D plane-strain QUAD8 elements. | Use DEFORMATION='GREEN_LAGRANGE', which code_aster suggests in the message. | €0.023 |
| 92342 | interFoam stopped before the first step: Entry 'maxAlphaCo' not found. We had removed the Courant limits when we fixed the time step. | interFoam reads maxCo and maxAlphaCo even with adjustTimeStep no: keep them. | €0.023 |
| 92354 | Ran to the end, all windows converged, but the gate moved 0.09 mm instead of 40 mm. The 2D fluid mesh was 1 mm deep, so the OpenFOAM adapter sent forces for a 1 mm slice while code_aster D_PLAN expects forces per metre of depth. | Make the 2D OpenFOAM mesh 1 m deep, as the preCICE flap tutorial does. | €0.112 |
| 92363 | Final run. | – | €0.188 |
One more change came from the logs rather than an error. In the first setup the coupling window was 5e-4 s and interFoam adjusted its own time step, so the OpenFOAM adapter sub-cycled inside each window and warned that FSI sub-cycling “may be unstable”. We set a fixed fluid time step of 2.5e-4 s and made the coupling window the same size, which removed the warning at the price of 1,600 windows instead of 800.
Run times and costs
| Run | Instance | Coupled run time | Billed CPU-hours | Cost |
|---|---|---|---|---|
| 92336 (stopped at start) | 4 vCPU highcore spot | – | 0.46 | €0.023 |
| 92342 (stopped at start) | 4 vCPU highcore spot | – | 0.46 | €0.023 |
| 92354 (1 mm depth) | 4 vCPU highcore spot | 24 min | 2.24 | €0.112 |
| 92363 (final) | 4 vCPU highcore spot | 48 min | 3.75 | €0.188 |
| Total | 6.91 | €0.346 |
Billed time includes machine start-up, end-of-run detection and the upload of the results, so it is longer than the coupled run time.
How to run this case on cloudHPC
- Download the case (
cases/elastic-gate) and upload the content of the folder to a storage folder. The layout is the one of the preCICE tutorials:precice-config.xmlat the root,fluid-openfoam/andsolid-codeaster/next to it. - Launch the
preCICE-v3.3.1app on 4 vCPU highcore. The app recognises the OpenFOAM and code_aster participants, builds the mesh with blockMesh, runs setFields, splits the cores (here 2 + 2), decomposes the fluid and makes the preCICE exchange directory absolute for code_aster. Spot instances are fine for a run under an hour; coupled runs cannot be resumed, so use a regular instance for long ones. - Follow
solid-codeaster/precice-Solid-watchpoint-Gate-Tip.logfor the free-end displacement andfluid-openfoam/precice-Fluid-iterations.logfor the coupling iterations.
Settings that matter for any OpenFOAM + code_aster FSI case:
- 2D means 1 m deep. code_aster
D_PLANworks per metre of depth, the OpenFOAM adapter sends the force on the real patch area. - Finite strain in 2D:
GREEN_LAGRANGE, notGROT_GDEP, on QUAD8 plane-strain elements. - interFoam forces: set
solverType compressible;in the FSI section ofpreciceDict, so the adapter uses the pressure in pascal (p, not p/ρ) together with the mixture density. - Tight final pressure solve (
relTol 0onp_rghFinal), otherwise the forces carry noise and the implicit coupling never converges. - Fluid Δt = coupling window, to avoid FSI sub-cycling in the adapter; keep
maxCoandmaxAlphaCoincontrolDictanyway. - Mapping radius larger than the solid thickness when the interface wraps a thin plate.
FAQ
Can code_aster be coupled with OpenFOAM for fluid–structure interaction?
Yes. preCICE couples them as two separate programs. The official code_aster adapter covers heat transfer only; precice_aster (GPL-3.0, GitHub and AsterLab GitLab) adds FSI with DYNA_NON_LINE and works with code_aster 17.
Does the preCICE OpenFOAM adapter work with interFoam?
Yes, for FSI. Set solverType compressible in preciceDict: interFoam solves the pressure in pascal and has a density field, and the adapter then computes the pressure force as p·S and the viscous force with the mixture viscosity.
Why does my 2D FSI case barely move when coupled with code_aster?
Check the depth of the 2D fluid mesh. code_aster plane-strain models take forces per metre; if the OpenFOAM mesh is 1 mm deep, the structure receives a thousandth of the load. Make the mesh 1 m deep.
How many coupling iterations does a dam break with an elastic gate need?
With parallel implicit coupling and IQN-ILS, 2.8 per time window on average in our run (1,600 windows of 2.5e-4 s, tolerance 5e-3). Without quasi-Newton acceleration a density ratio of 1.1 typically does not converge.
How much does an OpenFOAM + code_aster FSI run cost on cloudHPC?
This 2D benchmark (48,005 fluid cells, 252 solid elements, 0.4 s of physical time) ran in 48 minutes on 4 vCPU spot (56 minutes billed) for €0.19.
References
- C. Antoci, M. Gallati, S. Sibilla, Numerical simulation of fluid–structure interaction by SPH, Computers & Structures 85 (11–14), 879–890, 2007. doi:10.1016/j.compstruc.2007.01.002
- G. Chourdakis et al., preCICE v2: A sustainable and user-friendly coupling library, Open Research Europe 2:51, 2022. doi:10.12688/openreseurope.14445.2
- G. Chourdakis, D. Schneider, B. Uekermann, OpenFOAM-preCICE: Coupling OpenFOAM with External Solvers for Multi-Physics Simulations, OpenFOAM® Journal 3, 1–25, 2023. doi:10.51560/ofj.v3.88
- J. Degroote, K.-J. Bathe, J. Vierendeels, Performance of a new partitioned procedure versus a monolithic procedure in fluid–structure interaction, Computers & Structures 87 (11–12), 793–801, 2009 (IQN-ILS). doi:10.1016/j.compstruc.2008.11.013
- C. Zhang, M. Rezavand, X. Hu, A multi-resolution SPH method for fluid–structure interactions, arXiv:1911.13255 (elastic gate with E = 7.8 MPa, ν = 0.47). arxiv.org/abs/1911.13255
- M. R. I. Islam, SPH-based framework for modelling fluid–structure interaction problems with finite deformation and fracturing, arXiv:2310.03122 (elastic gate with E = 12 MPa, ν = 0.45). arxiv.org/abs/2310.03122
- precice_aster, preCICE connector for code_aster (FSI and CHT), GPL-3.0: github.com/CFD-FEA-SERVICE/codeaster-precice-adapter, mirror at gitlab.com/asterlab1/toolbox/codeaster-precice-adapter
- preCICE OpenFOAM adapter: github.com/precice/openfoam-adapter; code_aster: code-aster.org
CloudHPC is a HPC provider to run engineering simulations on the cloud. CloudHPC provides from 1 to 224 vCPUs for each process in several configuration of HPC infrastructure - both multi-thread and multi-core. Current software ranges includes several CAE, CFD, FEA, FEM software among which OpenFOAM, FDS, Blender and several others.
New users benefit of a FREE trial of 300 vCPU/Hours to be used on the platform in order to test the platform, all each features and verify if it is suitable for their needs