Salva is a Rust library designed for simulating fluids in 2 and 3 dimensions using a particle-based approach. The project aims to provide a flexible and performant solution for simulating realistic fluid behavior, suitable for applications like games, visual effects, and scientific simulations. It leverages the nalgebra crate for linear algebra and offers optional integration with rapier for coupling with rigid bodies.
Salva distinguishes itself with its comprehensive set of fluid simulation techniques, accommodating pressure resolution methods like DFSPH and IISPH, along with various viscosity and surface tension models. The library's modular design allows for easy integration with physics engines via rapier, extending its capabilities beyond pure fluid simulation. WASM support expands its applicability to web-based applications.
- Pressure Resolution: Supports both DFSPH and IISPH algorithms for accurate pressure-based fluid simulations.
- Viscosity Models: Offers a variety of viscosity models, including DFSPH, artificial, and XSPH, for diverse fluid behaviors.
- Surface Tension: Implements WCSPH surface tension and other methods for realistic surface effects.
- Multiphase Fluids: Enables simulation of multiple fluids with different properties.
- Rapier Coupling: Provides optional two-way coupling with rapier for interaction with rigid and deformable bodies.
- WASM Support: Facilitates running simulations in web browsers using WebAssembly.
- Elasticity: Includes an elasticity model for simulating solid-like fluid interactions.
Salva is an active project with ongoing development, evidenced by recent commits and community engagement. The documentation is available for both 2D and 3D implementations, providing resources for users to quickly understand and integrate the library. The project has a community Discord server for support and feature discussions, indicating an active user base and maintainers.
Salva benefits game developers and researchers needing realistic fluid simulations. It addresses the need for a performant and flexible fluid dynamics engine in Rust, offering a good alternative to hand-rolled simulations or existing, less adaptable libraries. The library's versatility and ease of integration make it suitable for a wide range of projects.
