python script to convert grid and variable data from cantera into Openfoam 0 folder
conda activate cantera -> load cantera
python flameSpeedTest.py -> calculate flame speed info and save to 'cantera_save.csv'
python ctToFoam.py -> convert 'cantera_save.csv' to variables in 0 folder (OF)
- In 'ctToFoam.py', Line 87-93 may need to be changed depending on the version of cantera.
- You need to manually change the cell number in x direction of blockMeshDict to len(grid).
- Run blockMesh before using OF solvers.
- Sample mechanism is a methanol mech.
Kai Zhang, KTH, Royal Institute of Technology, Sweden - Google Scholar
Email: [email protected]; [email protected]