Skip to content

python script to convert grid and variable data from cantera into Openfoam 0 folder

License

Notifications You must be signed in to change notification settings

WWIIWWIIWW/canteraToFoam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

canteraToFoam

python script to convert grid and variable data from cantera into Openfoam 0 folder

Usage (assuming env name in conda = 'cantera')

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)

Extra

  1. In 'ctToFoam.py', Line 87-93 may need to be changed depending on the version of cantera.
  2. You need to manually change the cell number in x direction of blockMeshDict to len(grid).
  3. Run blockMesh before using OF solvers.
  4. Sample mechanism is a methanol mech.

Author

Kai Zhang, KTH, Royal Institute of Technology, Sweden - Google Scholar

Email: [email protected]; [email protected]

Reference

JSqueo299 in GitHub - matlab converter

About

python script to convert grid and variable data from cantera into Openfoam 0 folder

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published