Force volume coupling in FF module

I am trying to implement Peskin’s continuous forcing immersed boundary method (IBM) for FSI within OpenFOAM. For this purpose I have created a solid solver that utilizes the OpenFOAM API. This solver accepts a velocity field as input, moves the points constituting the solid and calculates forces (output) due to deformation at the points, and writes them to the cell centers (using interpolation) of the finite volume mesh. A simple version of this solver with a single point and fixed velocity field is uploaded here.

I plan to couple it with a fluid flow solver, pisoFoam which uses the same mesh as the solid solver. This enables me to use the volume coupling at all the cells of the mesh using nearest neighbour mapping. My main intention in using precice for coupling is to be able to utilize its implicit coupling capabilities.

I am considering two approaches for coupling:

  1. Volume Coupling Between Solvers: Implementing a coupling where pisoFoam reads the force field and updates the velocity field, while my solid solver reads the updated velocity field and computes the force field. I think this maybe possible with FF module and volume coupling, however I am not sure if it will work with reading and writing of forces. Also mysolver is a psuedo fluid solver, so I don’t know if it’s supported by the official openfoam adapter?
  2. Developing a Separate Adapter for My Solver: Creating an adapter to facilitate the interaction between my solid solver and pisoFoam. (If approach 1 does not work)

With regard to the first approach, I think it should be possible to utilize fvOptions with the addSup function to incorporate a body force source term into the momentum equations?

Please let me know which of the above approaches are feasible?

Hi @dprakash,

I know it’s been a while since you asked, but let me still try to answer and give some starting points.

First of all, immersed boundary sounds to me like a case for dynamic meshes. I added the tag.

You mention you want to use pisoFoam. Why that and not pimpleFoam? The PIMPLE algorithm I think covers all use cases of the PISO algorithm and is more stable. We also have many examples where it works with preCICE.

We wanted to implement volume coupling for the force field, but we were struggling to find an application. Find more information in this issue: Generic writer/reader for volume coupling · Issue #279 · precice/openfoam-adapter · GitHub

You could extend the current adapter (and we could merge the contribution, if there is a tutorial along with it), but directly coupling your OpenFOAM solvers would also be an option. I don’t really see what you would gain from that in your case, though.

Do you in the meantime have a better idea of how to model this?