AMReX-Combustion / PeleLM

An adaptive mesh hydrodynamics simulation code for low Mach number reacting flows
https://amrex-combustion.github.io/PeleLM/
Other
83 stars 41 forks source link

Combustion mechanics #241

Closed czc-zju closed 2 years ago

czc-zju commented 2 years ago

I use “python ${PELE_PHYSICS_HOME}/Support/Fuego/Mechanism/Models/useful_script/script_trans.py mechanism.inp tran.dat” to obtain a new mechanism, but always get an error: File "~/useful_script/script_trans.py", line 53, in tran_list.append(outlines[spec]), KeyError: '!' I hope someone can help me, thanks a lot.

marchdf commented 2 years ago

Hi, if you are using a current version of PelePhysics, then what you are doing won't work. These are the current instructions on how to generate a mechanism in PelePhysics: https://amrex-combustion.github.io/PelePhysics/Ceptr.html#usage Let us know if that doesn't work for you.

czc-zju commented 2 years ago

I'm using an old version of PelePhysics. Yesterday's question was answered, but when I executed ./make-mechanism.sh, a new error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 36: ordinal not in range(128), I hope you can try. tran.dat.txt mechanism.inp.txt therm.dat.txt

marchdf commented 2 years ago

I think something else is going on. You have some characters in those files which are not parse-able and need UTF-8/ See for example discussion here or here

You should check the encoding of these files.

czc-zju commented 2 years ago

here is very helpful to me, the header and .cpp file have been successfully generated, thank you very much!!!

esclapez commented 2 years ago

I'm closing this issue as it seems to have been addressed. Thanks !