preCICE Distribution v202404 (preCICE v3 is now fully out)

While preCICE v3.0.0 was finally released a few months ago, we still had to update all adapters, tutorials, documentation, the demo VM, and more. But there is nothing more to wait for: the preCICE Distribution v2404 is out! This not only a list of versions of components working together, but also something you can cite, both for reproducibility and for giving credit to contributors of the state of preCICE you actually use.

The distribution comprises now 23 components that are mature enough to be included in it, and 31 tutorials (several of which with multiple solver options). A lot of work goes into each of these components, and into making all of these components work together, but most of this work is never easy to include in announcements like this. While the release notes in many of the components are the longest we have seen so far, let’s try to make an executive summary of what’s new, what’s updated, and which tutorials you shouldn’t miss.

The new and shiny tools

Couple your FMI models using the FMI Runner

Many have asked us in different contexts whether we know of or support the Functional Mock-up Interface, an industry standard for dynamic simulations. The answer now is a confident “yes, with the new preCICE FMI Runner”. Whether your system is a spring or a complex industrial system, chances are you now already have everything you need to start coupling it via preCICE to your own grid-based solver, or to one of the many already coupled codes. This is part of the Master’s Thesis of Leonard Willeke at the Univ. Stuttgart (and a related publication). Leonard talked about the FMI Runner at the preCICE Workshop 2023.

This now bumps the number of preCICE-related packages on PyPI to seven (six maintained by us, one by the community).

See examples of the FMI Runner in the following tutorials:

Manage many micro simulations and couple them to a macro simulation via preCICE

How would you simulate a complex multi-scale system, such as a composite material, or your own liver? You would probably not only simulate a simplified approximation of the macroscopic model, but you would also focus on different “active” regions as the simulation evolved. Doing this with preCICE is possible, but it does need special care and raises many questions. This is why, in the context of his PhD at the Univ. Stuttgart, @IshaanDesai is developing the preCICE Micro Manager. No, it is not meant to micro-manage your coupling project, but to manage the many micro simulations you constantly need to start and stop as different parts of the domain become interesting.

A working setup is now available as part of the two-scale heat conduction tutorial. Ishaan also talked about the Micro Manager at the preCICE Workshop 2023.

Couple your DuMux simulations

You already saw the DUNE adapter in the preCICE Distribution v2211. Now, you can also couple DuMux! The DuMux adapter was first made by @ajaust, who talked about it last in the preCICE Workshop 2021. This adapter has now been picked up by @Fujikawas and Mathis Kelm (Univ. Stuttgart), who continue working on porous media.

For now, find an example in the two-scale heat conduction tutorial, with more following.

Couple your Rust-based codes

According to the Stack Overflow Developer Survey 2023, “Rust is the most admired language, more than 80% of developers that use it want to use it again next year.”. A similar admiration led @fsimonis create the preCICE Rust bindings as a side project (@ajaust had also started a similar project). Find examples in the solver dummies and the elastic tube 1D tutorial. Do you use any Rust-based simulation codes? Let us know which! And the same applies for all other languages we support.

Visualize your preCICE config directly from a GUI

You probably already know of the preCICE Config Visualizer, for example via one of the preCICE training courses. While it previously only had a command-line interface, @fsimonis recently created a GUI, which enables toggling various details and highlighting parts of a config, making understanding preCICE configurations much easier and more interactive. Try it out on any of your configs today!

The talk-of-the-town updates

preCICE v3

preCICE v3.0.0 was released already in February, introducing many simplifications in the API and configuration, as well as several new features. This is “only” the core library, which you use directly if you are coupling your own C++ codes from scratch, or indirectly if you use any of the language bindings or ready-to-use adapters.

The preCICE Distribution v2404 includes preCICE v3.1.1. The previous v3.1.0 allowed more valid combinations of mapping directions and constraints when running in serial, dropped the boost.filesystem dependency for std::filesystem, and improved the accuracy of the time handling (“what time is it in this time window?”). Both releases fix a few bugs as well.

Couple flows and complete volumes in OpenFOAM

The OpenFOAM-preCICE adapter v1.3.0 brings several important updates. Most importantly, coupling flows with flows is now more robust and better understood, as part of the Master’s Thesis of Markus Mühlhäußer (TUM) and a related publication. Find examples in several new or updated tutorials:

Another new feature is the ability to couple internal fields over complete subdomains (not only boundaries). Based on previous work by @Alphaoo1 and their Uni Luxembourg team, the Interdisciplinary Project of Tina Vladimirova (TUM) integrated volume coupling into the mainstream OpenFOAM adapter. This feature is now demonstrated in two tutorials:

  • Channel transport (we already had this for Nutils-Nutils, now OpenFOAM is an option for the Fluid participant as well, writing data over the full domain)
  • Volume-coupled flow (OpenFOAM reads data on a set of cells)

Don’t try too hard to find physical meaning in all these tutorials. Our job is to provide the means, you find the applications!

Rewritten SU2 adapter

In the past few versions of the distribution, the SU2 adapter always had the note “same state as last time” next to it. Well, this is no more! This is one of these lighthouse community contributions that sometimes appear out of the blue, they are almost ready to merge, and the contributor follows-up on our review suggestions (even if we only manage to provide feedback much later). With a lot of work from Joseph Signorelli (UIUC), the SU2 adapter is now much simpler, based on the SU2 Python Wrapper, updated for SU2 7.5.1, and supports both FSI and CHT applications.

Experience the new adapter in the following tutorials:

Usability improvements in the tutorials

We don’t only bring new big features in every release of each component, but we also try to constantly improve the usability in all the small things that we use everyday. One components we would like to highlight today is the tutorials.

Discovering tutorials is now a little bit easier, as we started to group together related scenarios. Each tutorial now includes a visualization of its preCICE configuration, allowing to quickly understand which fields are exchanged, and which mapping and coupling algorithms are used. We also changed the documentation of the Quickstart tutorial, to refer to fixed releases instead of repositories, while we changed the default branch of all repositories to develop. This should avoid incompatibility situations like the one some of you experienced over the past couple of months, and should help us keep the repositories focused on development.

When running tutorials, you will notice that many cases will automatically build the respective solvers or install some easy dependencies (such as Nutils). Every tutorial now automatically generates log files with the screen output, which you can upload when asking for help in the forum, while all kinds of automatically generated files are now finally covered by a .gitignore. Some tutorials include reference results on the coupling interface, which we use in our revamped system regression tests (kudos to Valentin Seitz, who significantly accelerated the development as a student assistant).

The new “preCICE can now do that?” tutorials

Besides the tutorials accompanying the new features listed above, you might want to have a look at the following cases as well.

Breaking dam with a flexible pillar

This is a widely-requested tutorial, showcasing how to use the OpenFOAM adapter in FSI simulations with two-phase flows, as often encountered in wave-structure interaction. This tutorial was developed in the context of the dissertation of @KyleDavisSA at the University of Stuttgart. This tutorial uses a parallel-implicit scheme with IQN acceleration, coupling interFoam with CalculiX.

9750ce563d224c58398fe3d6a6b77169d79b44d7

Oscillator: Overlap

While we most commonly setup our coupled problems as Dirichlet-Neumann configurations, setting on the one participant the value of a field, and on the other participant the gradient of another field, Dirichlet-Dirichlet (overlapping Schwarz) coupling is also important, which implies overlapping domains. You can now find two examples using this approach (both developed by @BenjaminRodenberg in the context of his PhD at TUM):

New solver options in many tutorials

Find more details in the tutorials release. As an overview:

What to try next?

Start by running the Quickstart tutorial on your laptop or on the Demo Virtual Machine, or by watching a talk on YouTube.

As for us, besides the many items in our (slightly outdated) Roadmap, we are now working even more intensively on bringing consistency among the preCICE ecosystem and helping contributors integrate their work into the ecosystem, as well as on developing new tools to help users create and analyze their coupled simulations, plans we want to discuss with you in the upcoming preCICE Workshop.

By the way, if you found this blog post interesting, then the preCICE Workshop is definitely for you! We design it both for completely new and for experienced users, and this year you can optionally submit poster contributions for ongoing projects or application-specific projects, which would normally not be a perfect fit for a plenary talk.

See you all in September, and until then: Happy coupling! :precice: :beers:

5 Likes