WaterLily is a high-performance fluid dynamics simulation library written in pure Julia, designed for both educational and research purposes. It addresses the need for a fast and user-friendly tool to solve the unsteady incompressible Navier-Stokes equations in 2D and 3D. The solver utilizes geometric multigrid for efficient pressure Poisson equation solving and the Boundary Data Immersion Method for handling solid boundaries.
WaterLily distinguishes itself through its simplicity of use, pure Julia implementation for performance, and support for GPU and multi-threaded execution via CUDA. The project provides a comprehensive range of examples and documentation, facilitated by WaterLily-Examples. Its implementation of automatic differentiation through automatically for geometric parameter inference and its rigorous benchmarking have enabled published research in Computer Physics Communications.
- Core Functionality: Solves unsteady incompressible Navier-Stokes equations in 2D and 3D.
- Backend Support: Runs on serial CPU, multi-threaded CPU, and GPU backends for performance scaling.
- Geometry Handling: Supports solid boundaries using the Boundary Data Immersion Method and automatic geometric parameter inference.
- Metrics: Includes a set of pre-implemented flow metric functions for analyzing simulation results.
- Extensibility: Easily adaptable to different geometries with custom signed distance functions.
- Visualization: Integrates well with Julia's Plots ecosystem for data visualization.
- Performance: Achieves speeds as low as 1.44 ns/degree of freedom per timestep.
WaterLily represents a relatively mature project with active development and a growing community. The project boasts a publication in Computer Physics Communications, indicating its validation and scientific relevance. Recent commits and issue resolution suggest ongoing maintenance and improvement. Comprehensive documentation and numerous examples contribute to its usability and accessibility. The project also employs codecov to ensure code correctness.
WaterLily benefits researchers and students by providing a straightforward, performant, and versatile platform for fluid dynamics simulations. It's valuable for investigating various flow phenomena, validating computational approaches, and exploring multi-physics systems. WaterLily offers an alternative to complex commercial solvers, offering a cost-effective and customizable solution.
