Skip to content

Add OpenRadioss tutorial - #947

Open
MakisH wants to merge 29 commits into
developfrom
openradioss
Open

MakisH wants to merge 29 commits into
developfrom
openradioss

Conversation

@MakisH

@MakisH MakisH commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

This PR migrates pulsating-flow-over-flexible-flap-3d-case1 to the tutorials and adds it to the system tests.

The reasons I selected this case are:

  • It is relevant: The case comes from a benchmark, and we simulated the same in the OpenFOAM-preCICE paper,
  • The perpendicular-flap case that would be simpler would be confusing, as it would need a different precice-config.xml (the current one assumes 2D, the one for OpenRadioss would need 3D, unless the adapter is modified to support 2D simulations).
  • The blast cases were meant to be preliminary studies and more application-specific / demanding. They could, however, serve as examples/test cases for rhoPimpleFoam.

In the process, I have made some changes:

  • The tutorial is now called perpendicular-flap-3d, instead of the original name pulsating-flow-over-flexible-flap-3d for two reasons: (a) to better relate with the current perpendicular-flap tutorial, (b) to keep the name shorter. There is another perpendicular-flap-3d case in the original repository, but that is pseudo-2d, since the flap takes the complete third dimension and it only has a few cells per it.
  • I added the setup-openradioss.sh script under tools/. I removed the shopt -s expand_aliases.
  • I commented-out the toVTK at the end of the run.sh, to make the anim_to_vtk tool optional, as it is an additional dependency.
  • I removed the hard-coded export:vtu tags. They are not used, and the system tests add an exporter anyway.
  • I rewrote most of the README.md in the style of a tutorial, and I added images from my local run (with 4 MPI ranks).

Note that this case is quite heavy. With 4 MPI ranks for the fluid, the case took 4h30m on my laptop to complete (max time: 30s). This PR sets the default to 8 MPI ranks and gives related hints in the documentation.

Also note that, while OpenRadioss as we know it does not exist anymore, I kept the name for historical continuity, and since the case was originally developed for OpenRadioss. The system tests use OpenCourant (the main open-source/community fork at the moment), and the README will point to it as well.

The system tests fail at the comparison step, even if I pin the OpenCourant version. This confuses me, but it is already good to know that the tutorial works. Note that the documentation recommends running OpenFOAM in parallel to save time, but the tests run OpenFOAM in serial (no particular reason; I just only realized now; I might change this when I look deeper into the numerical differences).

Checklist

For new tutorials or tutorial cases:

@carme-hp could you please have an overview look and try to run the case?

@elisa-santoro FYI. Please let me know if you spot anything wrong.

I would like to get this merged soon, to have it in the upcoming tutorials release (and @elisa-santoro in the next distribution release). It's already been a while that this project has been completed.

@MakisH MakisH self-assigned this Nov 11, 2026
@MakisH
MakisH marked this pull request as ready for review November 11, 2026 19:10
@MakisH
MakisH requested a review from carme-hp November 11, 2026 19:10
@MakisH MakisH changed the title Add OpenRadioss tutorials Add OpenRadioss tutorial Nov 16, 2026

@uekerman uekerman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this!
I agree with the naming decisions.
I only looked through the README, I did not run the case.

Comment thread perpendicular-flap-3d/README.md Resolved
Comment thread perpendicular-flap-3d/README.md Resolved
Comment thread perpendicular-flap-3d/README.md Resolved

@carme-hp carme-hp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I installed all the software, ran it, and visualized the results.

Disclaimer: I did not review the solver settings, like timestep, boundary conditions, and such.


This tutorial is derived from the "Pulsating flow over flexible flap" test case discussed in the [OpenFOAM-preCICE paper](https://doi.org/10.51560/ofj.v3.88) (comparing to a [benchmark from the literature](https://doi.org/10.1002/nme.6072)),
and it was originally designed to validate OpenRadioss as a solid participant in fluid-structure interaction.
In contrast to the discussed case, this is using an explicit coupling scheme with a smaller coupling time window / solver time step.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we mention that the OpenRadioss' adapter does not support implicit coupling?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I would rather do that in the adapter documentation.


Solid participant:

* OpenRadioss. While [OpenRadioss is no longer maintained](https://en.wikipedia.org/wiki/Radioss), the community fork [OpenCourant](https://opencourant.org/) is actively maintained and works with this tutorial. OpenCourant needs to [be built with preCICE enabled](https://github.com/OpenCourant/OpenCourant/tree/main/engine/source/coupling).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment on how to build the OpenRadioss engine with preCICE. Here we link to OpenCourant documentation, which recommends ./build_script.sh -arch=linux64_gf -mpi=ompi -preCICE. Nevertheless, to build OpenCourant with MPI, we had to specify -mpi-include to locate MPI (even if preCICE is not included!).

I personally built the engine using:
./build_script.sh -arch=linux64_gf -mpi=ompi -mpi-include=/usr/lib/x86_64-linux-gnu/openmpi/include -preCICE -nt 8 . I got warnings (Warning: Nonexistent include directory ‘/usr/include/precice/’ [-Wmissing-include-dirs]), but it works fine.

Should we add information about the need for the -mpi-include flag? Is it worth mentioning that in the setup-openradioss.sh file, we assume the executable is named engine_linux64_gf_ompi_precice.

Instead of adding -mpi-include, I tried building without MPI, resulting in an executable named differently (engine_linux64_gf_precice). I did build this and tried running the case with this executable (after updating setup-openradioss.sh) without success. It crashed with a COUPLING FAILURE - ERROR TERMINATION message.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather do that in the adapter documentation.

The scripts rely on tools found in `../tools/`.

OpenFOAM can be executed in parallel using `run.sh -parallel`.
The default setting uses 8 MPI ranks, but you can increase the number of subdomains in `system/decomposeParDict`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a reference, on my laptop, the simulation took 1h 55min to finish using the default parallel settings.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This is already less than half the time that it took on my (older) laptop with 4 CPUs, so we can clearly do more. I will add this information.


## Post-processing

OpenCourant (same as OpenRadioss) writes `.anim` files, which can be converted to VTK using the [`anim_to_vtk` tool](https://github.com/OpenCourant/Tools/tree/main/output_converters/anim_to_vtk) tool. This tool can be called (commented out by default) at the end of `solid-openradioss/run.sh` using the alias `toVTK`, defined in `tools/setup-openradioss.sh`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setup-openradioss.sh assumes that the anim_to_vtk_linux64_gf executable is found under OpenCourant/exec. Depending on where you install the tooling, you may have to manually copy the executable there.

}

# Run `toCSV modelA` to convert all animation files modelAT* to CSV format
toCSV() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not mentioned in the README.md. Maybe we could remove it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants