The HYDRA project aims to develop a Finite Volume Method (FVM) solver for geophysical fluid dynamics (GFD), focusing on environments like coastal zones, estuaries, rivers, lakes, and reservoirs. The solver is designed to solve the Reynolds-Averaged Navier-Stokes (RANS) equations, a widely-used framework for simulating fluid flow in these domains. The ultimate goal is to model complex GFD problems efficiently and accurately, leveraging state-of-the-art numerical techniques and parallel computing.
HYDRA takes inspiration from PETSc, adopting a similar structure and functional approach to handle tasks like mesh management, parallelization, and solver routines. The project emphasizes flexibility, modularity, and scalability to address the computational challenges of geophysical simulations.
- FVM Solver: Targeting 3D fluid dynamics problems in complex domains using the FVM approach.
- RANS Equations: Solving the Reynolds-Averaged Navier-Stokes equations for turbulent flow.
- Geophysical Focus: Applications in environmental fluid dynamics, including modeling of natural water bodies.
- Modular and Extensible: Designed with flexibility in mind, allowing users to easily extend the framework with additional solvers, preconditioners, and boundary conditions.
- Parallel Computing: Future versions will support parallel computing using MPI and Rust’s concurrency features.
- PETSc-Inspired: Following PETSc’s approach, we adopt structured modules for solvers (e.g., KSP for Krylov subspace solvers), preconditioners (e.g., Jacobi), and mesh management.
.github/
: GitHub-specific configuration files..vscode/
: Visual Studio Code configuration.Cargo.toml
: Cargo configuration file for Rust.Cargo.lock
: Dependency lock file.src/
: Contains the source code for the HYDRA project.- solver/: Implements various solvers and preconditioners.
cg.rs
: Conjugate Gradient solver implementation.jacobi.rs
: Jacobi preconditioner.ksp.rs
: Krylov subspace solver manager.
- domain/: Contains modules for mesh management, including:
mesh_entity.rs
: Defines the basic geometric entities.sieve.rs
: For managing the structure and relationship between entities.section.rs
: For relating data to mesh entities.
- boundary/: Handles boundary conditions (e.g., Dirichlet, Neumann).
- solver/: Implements various solvers and preconditioners.
test.msh2
: Sample mesh file for testing.README.md
: This file.ROADMAP.md
: Future development plans and goals for HYDRA.
-
Conjugate Gradient (CG) Solver: A Krylov subspace solver for solving symmetric positive definite systems, integrated with the option to use preconditioners.
- Jacobi Preconditioner: Applied to improve the convergence of the CG solver, especially for ill-conditioned systems.
- Singular Matrix Detection: Added detection for non-convergence when the matrix is singular or nearly singular.
-
Unit Testing: Comprehensive tests for both the CG solver and the Jacobi preconditioner have been implemented.
- Tests for singular matrices: Verifying that the solver correctly fails for non-invertible systems.
- Preconditioner tests: Validating the functionality of the Jacobi preconditioner on simple matrix systems.
- Boundary Conditions: Implementing modules for handling various types of boundary conditions (Dirichlet, Neumann).
- Solver Extensions: Exploring additional solvers like GMRES for non-symmetric systems and other preconditioners.
- Performance Optimization: Profiling and optimizing key components, including solver convergence and matrix assembly efficiency.
The next steps for HYDRA include:
- Parallel Computing: Implementing support for distributed meshes and parallel solvers using MPI or Rust concurrency.
- Mesh Infrastructure: Developing a robust mesh management system inspired by PETSc's
DMPlex
, allowing for efficient handling of complex geometries and partitioning for parallel processing. - RANS Equations: Integrating the full Reynolds-Averaged Navier-Stokes equations into the solver framework for modeling turbulent fluid flow.
- Advanced Preconditioning: Adding more advanced preconditioners like ILU and multi-grid methods.
- Documentation and User Guide: Expanding documentation for users and developers, including a detailed user guide and API references.
To build and run the HYDRA project, you need the following:
- Rust: The programming language used for HYDRA. Install it from rust-lang.org.
- Cargo: The Rust package manager, used to build and manage dependencies.
- MPI (optional): For parallel computing support in future releases.
-
Clone the repository:
git clone https://github.com/tmathis720/HYDRA.git cd HYDRA
-
Build the project:
cargo build
-
Run tests to verify the setup:
cargo test
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new feature branch.
- Submit a pull request with detailed descriptions of changes.
For more details, see the CONTRIBUTING.md
file.
HYDRA is licensed under the MIT License. See LICENSE
for more information.
HYDRA is actively developed and maintained with a focus on advancing the state of fluid dynamics simulation, particularly for complex geophysical applications.