GPU-accelerated CFD simulations of mosquito flight aerodynamics using IAMReX (Immersed-boundary Adaptive Mesh Refinement).
Prototype simulations for the APEX supercomputing proposal, validating against van Veen et al. (2022) mosquito wing aerodynamics.
# Pull the pre-built FP64 image
docker pull ghcr.io/talmolab/mosquito-cfd:fp64
# Run with GPU support
docker run --gpus all -it -v $(pwd):/workspace ghcr.io/talmolab/mosquito-cfd:fp64
# Inside container: run FlowPastSphere example
cd /opt/cfd/IAMReX/Tutorials/FlowPastSphere
mpirun --allow-run-as-root -np 1 ./amr3d.gnu.MPI.CUDA.ex inputs.3d.flow_past_sphere max_step=10Available images:
ghcr.io/talmolab/mosquito-cfd:fp64- Validation (accurate, currently recommended)ghcr.io/talmolab/mosquito-cfd:fp32- A40 prototyping (blocked: upstream bug)ghcr.io/talmolab/mosquito-cfd:python- Post-processing only
See docker/README.md for full documentation.
- CUDA 12.x with A40 or newer GPU
- MPI (OpenMPI recommended)
- GNU compilers (g++, gfortran)
cd /path/to/mosquito-cfd
git clone https://github.com/ruohai0925/amrex
git clone https://github.com/ruohai0925/AMReX-Hydro
git clone https://github.com/ruohai0925/IAMReX.git -b developmentcd IAMReX/Tutorials/FlowPastSphere
export AMREX_HOME=/path/to/mosquito-cfd/amrex
export AMREX_HYDRO_HOME=/path/to/mosquito-cfd/AMReX-Hydro
# Edit GNUmakefile:
# USE_CUDA=TRUE
# CUDA_ARCH=86
# PRECISION=FLOAT
make -j$(nproc)mpirun -np 1 ./amr3d.gnu.MPI.CUDA.ex inputs.3d.flow_past_sphere max_step=10mosquito-cfd/
├── src/mosquito_cfd/ # Python utilities (marker generation, metadata, force surrogate)
├── scripts/ # Thin CLI drivers over the library (e.g. run_sweep.py, extract_forces.py)
├── examples/ # Validation cases + force-surrogate sweep corpus
├── cluster/argo/ # Argo Workflows for cluster-side sweep orchestration
├── docker/ # Dockerfiles and build documentation
├── .github/workflows/# CI/CD pipelines
├── openspec/ # Specification-driven development
├── pyproject.toml # Python project configuration
└── uv.lock # Dependency lockfile
The NVIDIA A40 has strong FP32 (37.4 TFLOPS) but weak FP64 (0.585 TFLOPS). We use PRECISION=FLOAT for development and validate accuracy against FP64 spot-checks.
- van Veen et al. (2022). "The unsteady aerodynamics of insect wings with rotational stroke accelerations." Journal of Fluid Mechanics, 936, A3. DOI
- IAMReX GitHub
- AMReX Documentation
TBD