Counterflow diffusion flames are a canonical problem in combustion simulations. Solutions to these systems of equations are used to perform large-scale calculations in a faster manner through tabulation.
RFS is a mixture-fraction space based flamelet solver with robust arc-length continuation and Flamelet Progress Variable (FPV) tabulation capabilities.
- Robust Continuation: Mixture-fraction space solver with logarithmic arc-length continuation for quick traversal of the S-curve (from stable burning to extinction).
- FPV Tabulation: Build Flamelet Progress Variable (FPV) tables for temperature, mass fractions, and reaction source terms.
- Visualization: Tools for plotting S-curves and 2D FPV table visualizations.
- Use
condato setup Cantera 3.0 as suggested on its website. - Install the dependencies:
pip install -r requirements.txt - Make sure you have pacopy_cython available in the root directory. Request here if required.
- Build the Cython extensions for the continuation solver:
cd pacopy_cython python setup.py build_ext --inplace cd ..
Run the main simulation and tabulation script:
python main.py
To run the Bratu problem test for the continuation solver:
PYTHONPATH=. python pacopy_cython/test/test_bratu.py
The following snippet (simplified from main.py) illustrates how to define a problem, run continuation, and build a table:
from flamelet_problem import FlameletProblem
from tabulation_module import FPVTabulation, PV_H2O
# 1. Define the problem (Hydrogen flame at 250 PSI)
problem = FlameletProblem(
lmbda0=8.3,
npts=30,
t_ox=750.0,
t_f=290.0,
p=1.72e6, # 250 PSI in Pa
mech='burke-hydrogen.yaml'
)
# 2. Run arc-length continuation
problem.continuation(
newton_tol=1.0e-3,
max_newton_steps=40,
stepsize0=1.0e-1,
adaptive_theta=True
)
# 3. Build and save FPV table
tabulation = FPVTabulation(problem, pv_definition=PV_H2O)
tabulation.build_table(n_c=100)
tabulation.save_to_file('output/fpv_table.npz')
Visualize the generated tables and source terms using:
python post_process.py
Please direct your queries to gpavanb1.
This would not have been possible without the immense efforts of Spitfire and Pacopy. RFS uses a Cython-optimized version of Pacopy. The sample Hydrogen mechanism is from Spitfire.