HyFlow1D is a lightweight, high-performance research code implementing a Hybrid Finite Volume (FV) / Discontinuous Galerkin (DG) solver for 1D aerodynamic flows.
It serves as a Proof of Concept (PoC) for coupling robust low-order industrial schemes with high-order accurate methods to achieve superior fidelity in transient simulations.
- Hybrid Coupling: Seamlessly couples 1st-order FV (robust near-field) with High-Order DG (accurate far-field).
-
High-Order Accuracy: Arbitrary polynomial order DG implementation (default
$P=3$ ). - Efficient Numerics: Uses Gauss-Legendre quadrature and optimized Legendre basis evaluation.
- Simple & Modular: Written in clean C++17 with no external dependencies (standard library only).
- Visualization: Python scripts included for immediate result analysis.
- C++ Compiler: GCC 7+, Clang 5+, or MSVC (C++17 support required).
- CMake: Version 3.10 or higher.
- Python: For plotting (optional, requires
matplotlibandpandas).
# Clone the repository
git clone https://github.com/username/HyFlow1D.git
cd HyFlow1D
# Create build directory
mkdir build && cd build
# Configure and Build
cmake ..
makeAfter building, run the executable from the build directory:
./hyflow1dThe simulation propagates a Gaussian pulse through the domain. The domain
Output files (solution_*.csv) will be generated in the current directory.
To see the wave move through the hybrid interface:
python3 ../scripts/plot_results.py(Ensure matplotlib and pandas are installed: pip install matplotlib pandas)
The project includes unit tests for numerical integration and solver logic.
cd build
make test
# Output:
# Start 1: numerics_test
# 1/2 Test #1: numerics_test .................... Passed 0.00 sec
# Start 2: solvers_test
# 2/2 Test #2: solvers_test ..................... Passed 0.00 secThis project is licensed under the MIT License - see the LICENSE file for details.
The Hybrid Strategy:
-
Near-Field (FV): Uses standard Finite Volume methods (
$P=0$ ). This handles complex geometries and discontinuities robustly but is dissipative. -
Far-Field (DG): Uses Discontinuous Galerkin methods (
$P=k$ ). This preserves wave shape and energy over long distances (low dispersion/dissipation). - Interface: Fluxes are exchanged by treating the neighbor's state as a boundary condition. Reconstruction is performed to pass high-order information to the FV cells and vice-versa.