A high-performance fluid simulation library written in Go.
This project provides reusable fluid dynamics algorithms and simulation components for scientific computing, engineering, computer graphics, and physics-based applications. It focuses on building efficient, modular, and production-ready fluid simulation systems implemented in pure Go with minimal external dependencies.
- Grid-Based Fluid Simulation
- Particle-Based Fluid Simulation
- Navier–Stokes Solvers
- Incompressible Flow
- Advection Methods
- Pressure Solvers
- Boundary Conditions
- Surface Reconstruction
- Smoke Simulation
- Water Simulation
- Multiphase Fluids
- Performance Optimization
Objective: Build the core mathematical framework required for fluid simulation.
Key Deliverables
- Vector Mathematics
- Matrix Operations
- Numerical Integration
- Finite Difference Methods
- Linear Solvers
Objective: Implement structured grid data structures for fluid simulation.
Key Deliverables
- Uniform Grids
- Staggered MAC Grids
- Cell Utilities
- Grid Sampling
- Interpolation
Objective: Implement fluid transport algorithms.
Key Deliverables
- Semi-Lagrangian Advection
- MacCormack Advection
- BFECC Advection
- Velocity Advection
- Scalar Advection
Objective: Enforce incompressibility using pressure projection.
Key Deliverables
- Poisson Solver
- Conjugate Gradient
- Jacobi Solver
- Pressure Projection
- Divergence Computation
Objective: Implement boundary handling for realistic simulations.
Key Deliverables
- Solid Boundaries
- Open Boundaries
- Periodic Boundaries
- Obstacle Handling
- Collision Detection
Objective: Build complete incompressible fluid solvers.
Key Deliverables
- Stable Fluids
- Navier–Stokes Solver
- PIC
- FLIP
- APIC
Objective: Develop particle-based simulation methods.
Key Deliverables
- Particle Emitters
- Particle Advection
- SPH
- Neighbor Search
- Particle Collision
Objective: Generate fluid surfaces from simulation data.
Key Deliverables
- Signed Distance Fields
- Marching Cubes
- Surface Mesh Generation
- Level Sets
- Surface Normals
Objective: Simulate gaseous fluids.
Key Deliverables
- Smoke Simulation
- Density Fields
- Temperature Fields
- Buoyancy Forces
- Vorticity Confinement
Objective: Simulate realistic liquid behavior.
Key Deliverables
- Free Surface Simulation
- Splash Effects
- Wave Generation
- Foam Generation
- Water Rendering Utilities
Objective: Improve computational performance and scalability.
Key Deliverables
- Parallel Processing
- SIMD Optimizations
- Memory Pooling
- Cache Optimization
- Benchmark Suite
Objective: Deliver the first production-ready release.
Key Deliverables
- Stable Public API
- Comprehensive Documentation
- Example Applications
- Unit Testing
- Benchmark Results
- Release Notes
go-fluid-simulation/
├── benchmarks/
├── cmd/
├── docs/
├── examples/
├── internal/
├── pkg/
│ ├── advection/
│ ├── boundary/
│ ├── grid/
│ ├── math/
│ ├── particles/
│ ├── pressure/
│ ├── rendering/
│ ├── smoke/
│ ├── solver/
│ ├── surface/
│ └── water/
├── testdata/
└── LICENSE
- Pure Go implementation
- Minimal external dependencies
- Modular architecture
- High-performance computation
- Cross-platform compatibility
- Production-ready APIs
- Comprehensive documentation
- Extensive testing and benchmarking
- Educational reference implementation
- Stable Fluids
- Navier–Stokes Solver
- PIC
- FLIP
- APIC
- SPH
- Finite Difference
- Poisson Solver
- Conjugate Gradient
- Jacobi Iteration
- Multigrid Methods
- Level Sets
- Marching Cubes
- Signed Distance Fields
- Density Advection
- Temperature Simulation
- Buoyancy
- Vorticity Confinement
- Free Surface
- Splash Generation
- Foam Simulation
- Wave Propagation
Contributions are welcome.
You can contribute by:
- Reporting bugs
- Requesting new features
- Improving documentation
- Optimizing simulation algorithms
- Adding new numerical methods
- Writing tests and benchmarks
Please open an issue before submitting large changes.
This project is licensed under the MIT License.