ASTE and more new components in the preCICE Distribution v2211.0

This black Friday, get all the latest and fastest from preCICE with a 50% discount, now only 0€! :money_with_wings:
Once or twice per year, we release the preCICE Distribution, documenting the latest versions of all official components that work together in a citable format. At the same time, we release the preCICE Demo Virtual Machine, which offers these components, as well as the respective open-source solvers, already pre-installed.

The v2211.0 release is the last distribution release with preCICE v2.x (just before the preCICE v3.0.0 iceberg). It offers a few important new components we want you to know about (ASTE, ci-images, config-visualizer, Julia bindings), as well as several new tutorial cases.

Artificial Solver Testing Environment

In this distribution release, we present you a completely reshaped version of our Artificial Solver Testing Environment (ASTE). ASTE is a tool that can help you configuring your preCICE simulation, troubleshooting your coupled simulation setup, as well as developing in and around preCICE. In its core, ASTE emulates a preCICE participant in a coupled simulation by reading and writing coupling data through VTK files. This allows two particularly interesting use-cases:

  1. Tailoring mapping configurations for accuracy-performance trade-off
  2. Replacing entire participants in coupled scenarios to develop preCICE adapters in minimal environments

Most notable here is the compatibility of ASTE with preCICE’s coupling data export functionality, i.e., whenever you want to investigate your setup using ASTE, add an export tag in your preCICE configuration file and enjoy the full insight ASTE opens up.

Let’s look at the first use-case: As an example, we consider a preCICE-coupled FSI simulation of a wind turbine blade with a coarse mesh on the solid side and a more refined mesh on the fluid side. We don’t know exactly how to configure our mapping in preCICE and how the configuration affects the mapping performance or the accuracy. Therefore, we export the interface meshes via the preCICE configuration file into a coarse_mesh.vtk and a fine_mesh.vtk. In a first step, we pick one of the predefined test functions in order to generate TestData for our experiment on the input mesh. Using the command-line interface of ASTE, this can be done by

precice-aste-evaluate --mesh coarse_mesh.vtk --function "franke3d" --data "TestData"

Our coarse_mesh.vtk contains now the new data set TestData, which can also be visualized using ParaView. Afterwards, we start two instances of ASTE (one per participant) in order to execute the actual mapping:

# Map from coarse mesh to fine mesh, start two ASTE instances, one for each participant
precice-aste-run --participant A --mesh coarse_mesh --data "TestData"
precice-aste-run --participant B --mesh fine_mesh --output result --data "InterpolatedData"

This step generates now a new file result.vtu containing the data received from preCICE (called InterpolatedData). To get the mapping error as well as performance metrics, we have to evaluate the generated data using

# Measure the difference between the original function and the mapped values
# Save into data array called Error
precice-aste-evaluate --mesh result.vtu --function "franke3d" --data "Error" --diffdata "InterpolatedData" --diff

In addition to the quantitative error metrics printed to the console, one can visualize the resulting mapping error distribution:

In case one of the steps above was not clear enough, checkout our complete ASTE documentation or our new ASTE tutorial case.

The seond use case is especially interesting for adapter development. In the so-called replay mode, we emulate the behavior of individual participants in a coupled simulation. If you have your own solid solver (as an example) and want to couple it via preCICE to a fluid solver, the development process might become intricate as you need a properly functional coupling partner. With ASTE, you can easily replace the missing participant so that you can implement and verify your adapter in an isolated environment. This helps to avoid nasty feedback effects from the coupling partner, but is also more effcient in terms of runtime. We have created a complete step-by-step guide explaining all necessary steps to setup the replay mode for your coupling scenario.

More new components

The config visualizer is a very helpful tool for understanding your preCICE configuration file. Many of you have used this already, but we now consider it stable enough to release it, while we will need to change it to support preCICE v3.

If you are running simulations in Docker containers (locally or in your CI), have a look at the ci images. These are images we build and publish in Dockerhub, which we then also use for our continuous integration systems.

Finally, if you want to couple solvers written in Julia, you will be happy to know that we now have Julia bindings!

New tutorial: Oscillator

The new oscillator tutorial consists of a simple two-mass system that is interconnected with springs and allows you to study energy conservation or higher-order time stepping schemes with a simple ODE example:

If you are interested in further details, please take a look at the paper, where this case is studied.

More new tutorials

Apart from the ASTE and the oscillator tutorials, this release also brings two volume-coupled tutorials (channel transport and channel transport with chemical reactions), a tutorial demonstrating the direct mesh access feature, a simplified heat exchanger, as well as new OpenFOAM, solids4foam, CalculiX, and dune-fem cases for existing tutorials. Read the release notes.

New versions

As always, we keep updating components. In this distribution release, find:

Stay tuned

Are you interested in learning more about what is going on with preCICE and in our community? Then don’t miss the preCICE Workshop 2023 next February :technologist: Are you already working with preCICE? Then definitely submit your talk! :fire:

3 Likes