Welcome to AMPHIBIOUS

amphibious

AMPHIBIOUS is a code for the direct numerical simulation (DNS) of the incompressible Navier--Stokes equations, based on the immersed boundary (IB) method. The core IB algorithm is described in the paper by Luchini et al. (2025), to appear in the J. Comp. Physics.

The name AMPHIBIOUS emphasizes the ability to adapt to different environments. The source can be compiled without modification for CPU or GPU hardware; the program works with computational domains that have either a simple shape described analytically, or a complex shape described via STL files. The distribution includes two tutorial examples: the flow in a plane channel for analytical geometry, the flow in the human nose for STL geometry.

The code is written in CPL and parallelized using MPI and OpenACC for CPU and GPU execution. OpenACC support for NVIDIA and (work in progress) AMD GPUs enables a wide range of graphics hardware. The code is very fast.

The program is split in two parts, preproc and solver, to be run sequentially, and is controlled by a single input file settings.in. Basic statistics are computed runtime and can be visualized in a postprocessing stage with createVTK.

The first program, preproc:

  • defines the computational domain, and creates a Cartesian mesh within it;
  • decomposes the meshed volume into subdomains, called cubes, establishes the connectivity among cubes, and gets rids of empty cubes;
  • computes the IB coefficients;
  • sets the boundary conditions;
  • writes to disk all the information later needed by solver.

The second program, solver, runs the actual simulation in parallel, by using either CPU or GPU:

  • advances the solution in time;
  • optionally computes flow statistics;
  • optionally creates a database of flow snapshots.

The output of solver can be customized by editing settings.in

The third program, createVTK:

  • converts in VTK the flow snapshots previously saved, if any;
  • converts in VTK the statistics computed runtime, if any;
  • produces ASCII files where statistics are averaged over time and homogeneous directions, when available

Documentation

More in-depth documentation can be found in the following pages:

Overview: a brief tour of the code, including instructions to launch the two tutorials

Preproc: description of the preprocessor (geometry, mesh, boundary conditions)

Solver: description of the solver (layout, communication strategy, main variables)

Output: description of postprocessor (output files, flow statistics, conversion to VTK for visualization)