title | permalink | keywords | summary |
---|---|---|---|
Partitioned pipe two phase |
tutorials-partitioned-pipe-two-phase.html |
tutorial, FF, fluid-fluid coupling, OpenFOAM, interFoam, multiphase |
This tutorial describes how to run a partitioned two-phse fluid simulation using preCICE. |
{% note %} Get the case files of this tutorial. Read how in the tutorials introduction. {% endnote %}
This scenario consists of two pipes connected in series, both simulated with OpenFOAM's interFoam solver. Fluids can enter from the left (here $$ z=0
On the coupling interface, Fluid1 sends velocity, and alpha to Fluid2 and receives pressure, velocity gradient and alpha gradient. Fluid2 uses the fixedFluxExtrapolatedPressure boundary condition as shown in the partitioned pipe tutorial.
To make sure that preCICE works on the correct OpenFOAM fields, the field names are passed to the OpenFOAM adapter in fluid*/system/preciceDict
:
FF
{
nameP p_rgh;
nameAlpha alpha.water;
}
{% note %}
This is a very basic example case demonstrating the coupling of a two-phase flow. To keep it as simple as possible, gravity is set to
preCICE configuration (image generated using the precice-config-visualizer):
Both Fluid1 and Fluid2 are simulated with OpenFOAM (interFoam). An incompressible multiphase solver for two immiscible fluids using the Volume-of-fluid method. For more information, have a look at the OpenFOAM adapter documentation.
Open two separate terminals and start the fluid1 and fluid2 participants by calling the respective run script. For example:
cd fluid1-openfoam
./run.sh
and
cd fluid2-openfoam
./run.sh
The OpenFOAM solvers generate a .foam
file each. You can open this file in ParaView.
You can see the water-air interface crossing the coupling interface at around
{% disclaimer %} This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM® and OpenCFD® trade marks. {% enddisclaimer %}
[1] M. Mühlhäußer, G. Chourdakis and B. Uekermann, Partitioned Flow Simulations with preCICE and OpenFOAM, in: COUPLED 2023. DOI: 10.23967/c.coupled.2023.014