Fluidsolid interaction tutorial using preCICE: flexibleOversetCylinder
Tutorial Aims
 Demonstrate how to use preCICE to couple
solids4Foam
andoverPimpleDyMFoam
overset solver for a fluidsolid interaction problem.  Show how to extend a standard fluid dynamics OpenFOAM tutorial to include fluidsolid interaction using solids4foam with preCICE.
Case Overview
This case is an extension of the overset cylinder tutorial present in the OpenFOAM ESI versions, which uses the overPimpleDyMFoam
solver. The original tutorial consists of air flowing over a cylinder (diameter = 1 m), where the cylinder is included using an overset (chimera) meshing approach. In the current tutorial, the rigid cylinder is replaced by moving a deformable ring, resulting in a fluidsolid interaction problem (Figure 1). For demonstration purposes, this tutorial shows how to solve the problem using the standard overPimpleDyMFoam
solver coupled to a solids4foam solid solver using preCICE, which is an opensource coupling library for partitioned multiphysics simulations.
Figure 1: flexibleOversetCylinder
case mesh showing the fluid domain (yellow) and the solid domain (cyan)
The fluid domain consists of air (density = 1 kg/m3, viscosity = 1.48e5 m2/s) entering the domain inlet at 10 m/s. The solid domain is an isotropic elastic ring (outer diameter = 1 m, inner diameter = 0.5 m) with a Young's modulus of 0.2 MPa and a Poisson's ratio of 0.45; this broadly corresponds to soft rubber. Small strains are assumed in the solid, where the linearGeometryTotalDisplacement
solids4foam solid model is chosen. A timevarying displacement is prescribed on the inner boundary of the solid ring according to a sine curve about the starting point with an amplitude of 1 m in the vertical direction and 0.5 m in the horizontal direction.
Coupling between the solid and fluid domain is achieved by preCICE using a partitioned DirichletNeumann approach, which is accelerated using the IQNILS QuasiNewton scheme in the current case. See the preCICE documentation for further details. This is the same IQNILS approach that is implemented within solids4foam. Mapping of the fields between the solid and fluid interfaces is performed using radialbasis function mapping.
The firstorder Euler time scheme is used for the solid and fluid equations. The time step is 5 ms, and the total time is 2 s.
Running the Case
To run a fluidsolid interaction case using OpenFOAM and preCICE, the solid and fluid solvers are started independently, where communication is controlled using preCICE function objects. To run an OpenFOAM or solids4foam case with preCICE requires the following modifications:
 Fluid case
 Add the preCICE OpenFOAM adapter function object to
system/controlDict
, for example:
preCICE_Adapter { type preciceAdapterFunctionObject; libs ("libpreciceAdapterFunctionObject.so"); }

 Add the
preciceDict
to thesystem
directory; for example, see the preCICE perpendicularflap tutorial OpenFOAM fluid case.  Use the
displacementLaplacian
mesh motion solver; this means that thepointDisplacement
field needs to be specified in the 0 directory, where the interface condition is set tofixedValue
;  Optionally, add the
solids4Foam::removeEmptyDirs
bash call to the end of the Allrun script; the purpose of this function is to remove empty time directories which are inadvertently created by preCICE.
 Add the preCICE OpenFOAM adapter function object to
 Solid case
 Add the preCICE OpenFOAM adapter function object to
system/controlDict
, the same as for the fluid case.  Add the
preciceDict
to thesystem
directory; for example, see the preCICE perpendicularflap tutorial solids4foam case.  Use the
solidForce
boundary condition for the interface in the displacement solution field:interface { type solidForce; forceField solidForce; value uniform (0 0 0); }
 As in the fluid case, you can optionally add the
solids4Foam::removeEmptyDirs
bash call to the end of the Allrun script.
 Add the preCICE OpenFOAM adapter function object to
You can see these modifications in the tutorial at solids4foam/tutorials/fluidSolidInteractionpreCICE/flexibleOversetCylinder
.
To run the tutorial, we suggest using two terminal tabs: one for the solid; and one for the fluid. Note that the solid and fluid cases can use different versions of OpenFOAM as long as they are supported by the preCICE adapter function object. In the solid terminal, start the solid solver with the included Allrun script, i.e. ./Allrun.solid
; while in the fluid terminal, start the fluid solver, i.e. ./Allrun.fluid
. Notice that just like in the original OpenFOAM tutorial, the fluid directory contains two subdirectories: cylinderMesh
; and cylinderAndBackground
.
Expected Results
The timevarying velocity field in the fluid and hydrostatic stress in the solid are shown in Video 1. A bouncing type behaviour can be seen in the solid in the early stages of the simulation, where the acceleration on the solid is greatest (Figure 2).
Video 1: Velocity field within the fluid domain and hydrostatic stress field within the solid domain in the flexibleOversetCylinder
tutorial
Figure 2: Snapshot of the solid deformation in the early stages of the flexibleOversetCylinder
tutorial