2D Navier-Stokes Equations Solver for 2D Open Channel Flow
July 8, 2025 ยท View on GitHub
Introduction
- This solver, developed in
Fortran 2008, solves the 2D Navier-Stokes Equations for a fluid flowing in an Open-Channel which can be thought of as a river. - The Finite Volume Method (FVM) has been used to discretisise the 2D Navier-Stokes Equations.
- The solver has been parallelised using
coarraysand the resulting Algebraic Equations from discretisation are solved via the Successive Over Relaxation Method (SOR). - The problem-domain is divided up using Domain Decomposition.
Theory
Domain Decomposition
- This is a computational technique used to solve large-scale problems - especially partial differential equations (PDEs) โ by breaking down the computational domain into smaller subdomains.
- Each subdomain is then solved (often in parallel), and the results are combined to obtain the global solution.
Key Concepts
1.Partitioning:
- The overall problem domain (e.g., a mesh in FEM or grid in FDM) is divided into smaller parts. This can be done geometrically or based on graph partitioning.
2. Subdomain Solvers:
- Each subdomain is treated as an independent problem, often solved using local solvers.
- Communication between neighboring subdomains ensures consistency across interfaces.
3. Parallelisation:
- Domain decomposition is widely used in parallel computing, as each subdomain can be assigned to a different processor or thread.
4. Coupling:
- Solutions at the boundaries of subdomains must be matched (e.g., using iterative methods like Schwarz methods or Lagrange multipliers) to ensure global consistency.
5. Types:
- Overlapping (e.g., Schwarz methods): Subdomains may overlap; iterative data exchange improves convergence.
- Non-overlapping (e.g., Schur complement methods, FETI, BDDC): Subdomains meet at interfaces, requiring global interface solvers.
Requirements
- Compiler:
gfortran. - OS: Developed and test on
Ubuntu 20.04. Maketo build the software.
Getting and Running the Software
References
- Modern Fortran: Building Efficient Parallel Applications by Milan Curcic.