Immersa.jl is a Julia package that implements immersed boundary methods for the numerical solution of strongly coupled fluid–structure interaction (FSI) problems governed by the incompressible Navier–Stokes equations.
The package includes implementations of:
- The immersed boundary method of Colonius & Taira (2008)
- The strongly coupled FSI formulation of Goza & Colonius (2017)
An implementation of the primitive-variable formulation proposed by Kunihiko & Colonius (2007) is currently in progress.
Prescribed structural deformations are supported in both 2D and 3D flows. Strongly coupled FSI is currently limited to 2D configurations. The solver uses far-field boundary conditions and represents immersed structures as point clouds.
The code uses KernelAbstractions.jl for parallel execution on both CPUs and GPUs. It also supports automatic differentiation via ForwardDiff.jl to compute sensitivities of solver outputs.
Install the latest version of Julia, then start it and and add the Immersa package:
using Pkg
Pkg.add(url="https://github.com/NUFgroup/Immersa.jl")
using ImmersaTo run bundled examples from a fresh temporary environment without cloning:
julia --project=@. -e 'using Pkg; Pkg.add(url="https://github.com/NUFgroup/Immersa.jl")'
julia --project=@. examples/<example_name>.jlTo run examples from the REPL after adding the Immersa package:
using Immersa
include(joinpath(pkgdir(Immersa), "examples", "<example_name>.jl"))- Cylinder: non-deforming cylinder in a steady-state freestream flow.
- Flag: flag immersed in a steady-state freestream flow (FSI).
- Moving cylinder: oscillating rigid cylinder in a quiescent flow.
- Naca0012: rigid airfoil in steady-state freestream flow.
- Oscillating plate: oscillating rigid plate in a quiescent flow.
- Plate: rigid plate in steady-state freestream flow.
- Plate actuation: rigid plate in steady-state freestream flow with moving wall boundary condition.
Run the cylinder simulation example included in the repository:
julia --project=@. examples/cylinder.jlOr from the Julia REPL:
using Immersa
include(joinpath(pkgdir(Immersa), "examples", "cylinder.jl"))This will run the simulation and save results (vorticity, lift, and drag) in HDF5 and CGNS format files. You can then visualize the outputs using the plotting scripts provided, or importing the CGNS files into ParaView.
Contributions are welcome and appreciated! If you would like to improve Immersa.jl, please follow these steps:
git clone https://github.com/NUFgroup/Immersa.jl.git
cd Immersa.jljulia --project=. -e 'using Pkg; Pkg.instantiate()'git checkout -b feature/<short-description>- Follow the existing code style
- Add or update documentation if needed
- Include tests when applicable
julia --project=. -e 'using Pkg; Pkg.test()'git add -A
git commit -m "Describe your changes"
git push -u origin feature/<short-description>Submit a pull request on GitHub targeting the main branch. Please include a clear description of your changes and their purpose.
Use --project=. to ensure a consistent environment.
For major changes, consider opening an issue first to discuss your approach.
- Colonius, T., & Taira, K. (2008). A fast immersed boundary method using a nullspace approach and multi-domain far-field boundary conditions.
- Goza, A., & Colonius, T. (2017). A strongly-coupled immersed-boundary method for thin elastic structures.
- Kunihiko, T., & Colonius, T. (2007). An immersed boundary method for incompressible flows using primitive variables.