This project implements Peskin's continuous forcing immersed boundary method in OpenFOAM. The solver facilitates fluid-structure interaction by managing the coupling between fluid flow and solid deformation through interpolation using discrete Dirac delta functions.
The implementation follows Peskin's immersed boundary method, which uses a Eulerian description for the fluid and a Lagrangian description for the structure. The key features include:
- Velocity Interpolation: Fluid velocities are interpolated from the Eulerian grid to the Lagrangian points representing the solid structure.
- Force Spreading: Forces computed at the Lagrangian points are spread back to the Eulerian grid using the same interpolation kernel.
- Structure Movement: The Lagrangian points are moved according to the interpolated fluid velocities.
The method uses a regularized discrete Dirac delta function for both interpolation operations, ensuring smooth coupling between the fluid and solid domains.
pointSolver.C: Main solver implementing the IB methodcreateFields.H: Initializes the velocity (U) and force (F) fieldscreateIbPoints.H: Sets up the Lagrangian points cloudinterpolateForces.H: Implements force spreading from points to meshinterpolateVelocity.H: Implements velocity interpolation from mesh to pointsdiracdelta.H: Implements the discrete Dirac delta functionUEqn.H: Defines the prescribed velocity field (currently a rotation)
Cloud<passiveParticle> ibpoints(mesh, "pointsCloud", false);The solid structure is represented by Lagrangian points stored in an OpenFOAM particle cloud.
const indexedOctree<treeDataCell>& cellTree = mesh.cellTree();An octree data structure is used for efficient spatial searching when identifying cells near Lagrangian points.
The implementation uses a three-dimensional regularized delta function with compact support:
scalar diracdelta(vector x, scalar h)The function implements a smoothed approximation with support over 2 mesh cells in each direction.
The current version includes:
- Single point demonstration
- Prescribed rotational velocity field
- Force spreading and velocity interpolation using regularized delta functions
- Point tracking and movement
- Fortran FEM Integration: Integration with an external Fortran library for computing deformation forces of a solid comprising of multiple points using the finite element method.
- Fluid Solver Coupling: Full coupling with an OpenFOAM fluid solver for two-way interaction.
- OpenFOAM installation
- Compatible C++ compiler
- Compile the solver using wmake
- Set up the case directory with appropriate boundary and initial conditions
- Execute the solver using
pointSolver
The velocity at each Lagrangian point is computed as:
pu[i] = pu[i] + U[icell][i]*diracdelta(ddpoint,hh)*(hh*hh*hh);where hh is the mesh spacing and ddpoint is the distance vector between the cell center and the Lagrangian point.
Forces are spread to the Eulerian grid using:
F[icell][i] = F[icell][i] + pf[i]*diracdelta(ddpoint,hh);Points are moved using the interpolated velocity:
dispvec.x() = pu[0]*runTime.deltaTValue();
iter().track(dispvec,1.0);- Search Region: The code uses a 3-cell radius for force spreading and velocity interpolation:
scalar minX = pos.x() - 3*meshWidth;- Time Integration: Currently implements first-order Euler time integration for point movement.
- Implementation of higher-order time integration schemes
- Addition of multiple Dirac delta function options
- Parallel computation support
- Integration with dynamic mesh handling
- Advanced FEM coupling through the planned Fortran library