D-FlowFM + preC-SUMO coupling: serial explicit coupling with changing FM 3D mesh (resetMesh) possible?

Hi preCICE community,

We are building a coupled workflow between:

  1. A far-field hydrodynamic model (FM)
  2. A near-field plume model (preC-SUMO)

We want to check whether our intended coupling approach is compatible with preCICE.

Background (in plain terms):

  • FM provides flow/environment information to preC-SUMO.
  • preC-SUMO computes resulting source/sink terms.
  • Those source/sink terms are sent back to FM and applied in the next step.
  • There can be multiple discharge locations (“diffusers”) per time step.
  • FM horizontal mesh (2D) stays fixed.
  • FM vertical 3D representation can change over time (due to changing water level and bed level), so FM may need mesh reset/update calls during the run.

What we want to do:

  • Use serial explicit coupling (run D-FlowFM part, then near-field part, then continue).
  • Keep doing this while FM’s 3D mesh can change during the simulation. FM will only write the new 3D data in new 3D mesh at end of coupling time step.

Our questions:

  1. Is this scenario supported in preCICE: serial explicit coupling with runtime mesh changes on one participant?
  2. If not, what is the main reason?
  3. Is the issue mainly related to mapping consistency, mesh re-registration timing, participant state/lifecycle, or checkpoint/restart assumptions?
  4. What is the recommended approach for this case?
    • Keep a fixed coupling mesh and remap internally in the adapter?
    • Reinitialize at controlled points?
    • Use a different coupling scheme/configuration?

Any guidance, best practices, or references to similar setups would be greatly appreciated.

precice_config.xml (7.1 KB)

Hi @Aabhas,

to directly answer your questions:

In principle, yes, but this is a new/experimental feature in active development (in the context of @fsimonis work), see the documentation.

The remeshing feature sounds to me exactly fit for this use case.

By the way, this is the visualization of your attached config:

P.S.: I edited your post to fix the Markdown syntax. In case you copy-paste, check that this looks as intended.

Hi @Aabhas,
Sorry for the late reply. Very busy times.

This exact scenario is not supported. Reason being that remeshing with a serial coupling scheme is not yet supported.

Right now, you have two options:

  1. Use a parallel coupling scheme (which you already do in the given config) and use resetMesh as needed.
  2. Use a serial explicit scheme and hide the dynamic mesh. To do this, let FM directly access the static mesh of preC-SUMO and either use a custom mapping or a JIT mapping to map from/to the dynamic solver mesh to the DMA region. You can use the horizontal mesh to cleanly partition into separate regions when running FM in parallel.

Hi @fsimonis
Thanks for the reply. We have gone for option 1. We would prefer to get remeshing possible in serial-explicit coupling as well, but we can live with it currently by adjusting the stepping/exchange a bit. Our current exchange overview is in our github repository as a mermaid diagram, if you are interested.

I hope that I can find the time to look into this at the beginning of next year.

Interesting! Thank you!