This document provides an overview of how to distribute fluid-structure interaction problems in which algebraic node update methods are used to deform the fluid mesh in response to changes in the shape of the domain boundary. It is part of a series of tutorials that discuss how to modify existing serial driver codes so that the
Problem object can be distributed across multiple processors.
As discussed in the general MPI tutorial, the parallel implementation of algebraic node update methods for specific meshes is greatly facilitated if the
GeomObject that describes the motion of the moving domain boundary is available on all processors. In FSI problems, the moving boundary is typically represented by a
MeshAsGeomObject – a compound
GeomObject formed from the lower-dimensional mesh of
SolidElements that define the moving boundary of the fluid domain. To ensure that the
MeshAsGeomObject remains available on all processors when the underlying mesh is distributed, we use the function
Mesh::keep_all_elements_as_halos() to indicate that all elements should be retained on all processors.
We demonstrate the methodology for the problem of flow past an elastic leaflet in a 2D channel. Most of driver code is identical to its serial counterpart and we only discuss the changes required to distribute the problem. Please refer to another tutorial for a more detailed discussion of the problem and its (serial) implementation.
As with other parallel driver codes, the changes from the serial driver code are extremely modest, essentially including the initialisation and shutdown of MPI. Once the problem is set up, we call
Problem::distribute(...), using the boolean flag
report_stats to indicate that the statistics of the distribution should be reported on screen.
The only additional function is
actions_after_distribute(), described later in this tutorial.
The only difference from the serial counterpart is that we insist that all beam elements are kept as halos when the mesh is distributed.
actions_after_adapt() function requires only a minor change from the serial version — a simple re-ordering of the sequence in which the various steps are performed. In serial it does not matter in which order the (re-)assignment of the auxiliary node update functions and (re-)setup of the fluid-structure interaction are performed. In the parallel version, however, the assignment of the auxiliary node update functions must take place after the (re-)setup of the fluid-structure interaction. This is because the function
FSI_functions::setup_fluid_load_info_for_solid_elements(...) creates halo copies of the fluid elements (and their nodes!) if the required fluid element is not present on the current processor. Any newly-created halo fluid nodes on the FSI boundary are accessible via the usual boundary lookup schemes and must be told about the auxiliary node update function which applies the no-slip condition.
The actions required after distribution are extremely similar to those required after adaptation because distribution deletes certain elements (or replaces them by halo copies). The only difference is that the redundant pressure degrees of freedom do not have to be re-pinned.
As usual, we add the processor number to the end of the filename for each output file to make sure that the different processors don't over-write each other's output.
The trace file documents the time trace of the imposed influx and the displacement of the node at the tip of the leaflet. It could be written by any processor since all solid elements are retained everywhere. We only write to the trace file from processor 0.
The source files for this tutorial can be found in
Similar examples of modified driver codes for FSI problems for a channel with a collapsible wall and an oscillating ring can be found in
A pdf version of this document is available.