What is preCICE?

Hi! I was wondering, what is preCICE?

preCICE (Precise Code Interaction Coupling Environment) is a coupling library for partitioned multi-physics simulations designed with real-world use-cases in mind.
It can be used to couple existing software (solver) to simulate a subpart of the complete physics involved in a simulation. This allows for the high flexibility that is needed to keep a decent time-to-solution for complex multi-physics scenarios.

It is licensed under the LGPLv3, which allows institutes to couple in-house solvers without legal risks.

preCICE can be used with

  • C, C++, Python, Fortran95/2003 software
  • using its minimally-invasive API.

It was designed with HPC in mind. It:

  • is scalable over thousands of cores,
  • supports MPI communication back-ends, and
  • establishes and uses parallel point-to-point connections for communication.
1 Like

(a complementary answer, as I like explaining it to people that are not familiar with the technical terms or the field)

We often want to simulate physical phenomena (e.g. how a fluid or a solid moves), so that we can approximately predict their behavior (e.g. a heart valve expanding or a bridge collapsing). There are already multiple software projects that can simulate flows, structural deformation, heating/cooling, sound propagation, etc. These projects are often very finely crafted, after years or decades of development.

Sometimes we want to simulate complex phenomena where we have, for example, flow and deformation at the same time. Examples could be a bird moving its wings, airflow cooling a computer chip, or even a magnet moving a metallic fluid. We call such scenarios “coupled problems” or “multi-physics”.

If we want to simulate a multi-physics problem, there are two options:

  • Write a new program that solves both sets of equations at the same time (monolithic approach), or
  • Keep the existing single-physics solvers and use a third program to make the single-physics simulations “talk to each other” (partitioned approach). preCICE is exactly such a coupling tool.

See some examples of what users are simulating with preCICE.

preCICE is also special because:

See also Why should I pick preCICE over other coupling software? and the first part of my talk at FOSDEM 2019: Couple scientific simulation codes with preCICE.