ReactionMechanismGenerator / RMG-Py

Python version of the amazing Reaction Mechanism Generator (RMG).
http://reactionmechanismgenerator.github.io/RMG-Py/
Other
389 stars 227 forks source link

How to build cyclopentadiene combustion reaction model by RMG ? #2147

Closed TaikiKato closed 1 year ago

TaikiKato commented 3 years ago

Topic

[Inquiry] Cyclopentadiene combustion reaction model building by RMG

Context

I've found two references about JP-10 combustion & pyrolysis.

https://www.sciencedirect.com/science/article/abs/pii/S0010218015000528 https://pubs.acs.org/doi/10.1021/ef502274r

I tried import chem.inp & dictionary.txt into kinetics-library & thermo-library by importChemkinLibrary.py. But, they gave some errors.

JP-10_pyro_dict.txt JP-10_comb_error.txt JP-10_comb_chem.txt JP-10_comb_dict.txt JP-10_pyro_error.txt JP-10_pyro_chem.txt

Question

How to solve these errors ? Or, are there any methods to build cyclopentadiene combustion model without RMG-database tuning ?

Installation Information

mjohnson541 commented 3 years ago

I suspect the first error is happening because you have an extra space on some of the lines with efficiencies. The second one is failing on a call to Python's readline() method so something is wrong with the file in a encoding sense.

I believe RMG should be able to handle cyclopentadiene pretty well. That doesn't mean you won't need to add libraries with better values for important thermochemistries and rates, and you should definitely include a C2 seed/thermo library and the ab initio thermochemistry libraries, but it should be able to build you a good starting point for refining a mechanism.

TaikiKato commented 3 years ago

Thank you for your advice. I understood that CPD combustion modeling may be feasible on RMG.

I did chem.inp space trials & errors. But, I couldn't solve this errors on CPD_comb chemistry. And, I used dos2unix on CPD_pyro chemistry files. But, I couldn't improve status. Will you please teach me how to modify chemkin files ?

TaikiKato commented 3 years ago

Now, I'm trying another approach. I tried CPD combustion model building by original RMG-libraries.

I used this input file. CpH.txt


thermoLibraries=['FFCM1(-)','BurkeH2O2','thermo_DFT_CCSDTF12_BAC','CBS_QB3_1dHR','DFT_QCI_thermo','SulfurGlarborgH2S','primaryThermoLibrary','SABIC_aromatics','CHN','GRI-Mech3.0-N'], reactionLibraries=['primaryNitrogenLibrary','JetSurF2.0'], seedMechanisms=['FFCM1(-)','BurkeH2O2inArHe'],

(thermo : SulfurGlarborgH2S & seed : primaryNitrogenLibrary are added for ozone inclusion)


species(label='CPD', reactive=True, structure=SMILES("C1=CCC=C1")) # cyclopentadiene species(label='O2', reactive=True, structure=SMILES("[O][O]")) species(label='O3', reactive=True, structure=SMILES("[O-][O+]=O")) species(label='Ar', reactive=False, structure=adjacencyList("""1 Ar u0 p4 c0""")) species(label='OH', reactive=True, structure=SMILES("[OH]")) species(label='H2O', reactive=True, structure=SMILES("O")) species(label='CO', reactive=True, structure=SMILES("[C-]#[O+]"))


How do you think this input file ? ( Good or Bad ? ) If you have some knowledge, please give some advices.

mjohnson541 commented 3 years ago

For the first issue I need to know what error messages your getting, for the second I'm not very familiar with file encodings and why it doesn't like the file.

That pretty much looks fine to me. You can remove 'BurkeH2O2inArHe' from the seed mechanisms since you're using FFCM for C2 chemistry and any extra reactions the Burke library might not be consistent with FFCM. I'd recommend setting generateOutputHTML=False (this slows RMG down and you can do it with a post processing step only for the ones you want after you've run RMG). I'm not certain how familiar RMG is with ozone chemistry so ozone might not react as expected.

TaikiKato commented 3 years ago

Thank you for your kind advices. I've removed 'BurkeH2O2inArHe' & set 'generateOutputHTML=False'. Now, I'm calculating this new file. CpH_2nd.txt

Error messages on JP-10_comb (CPD_comb) are below.


(rmg_env) taiki-kato@JP06856910:~/RMG/Trial/JP-10_comb$ python importChemkinLibrary.py chem_wo_efficiency.inp species_dictionary.txt JP-10_comb

Traceback (most recent call last): File "importChemkinLibrary.py", line 43, in molecule = species.molecule[0].to_adjacency_list(), IndexError: list index out of range

(rmg_env) taiki-kato@JP06856910:~/RMG/Trial/JP-10_comb$


importChemkinLibrary.txt chem_wo_efficiency.txt species_dictionary.txt


chem_wo_efficiency.inp : Only efficiency (ex. Ar/1.23/ N2/3.31/ ) comment outed file. original file is chem.inp chem.txt


If you have some ideas, please let me know.

mjohnson541 commented 3 years ago

Hmm...it seems like the species dictionary didn't provide a structure for at least one species in the Chemkin file.

TaikiKato commented 3 years ago

Do you know how to check the lost species ?

TaikiKato commented 3 years ago

By the way, I've got some errors from CpH_2nd.py job. Will you please teach me how to solve this error messages ?

CpH_2nd.txt CpH_2nd_error.txt


Warning: No density of states found for structure 157 in network PDepNetwork #48. possibly a product witout any thermo. Warning: No density of states found for structure 158 in network PDepNetwork #48. possibly a product witout any thermo. Warning: No density of states found for structure 159 in network PDepNetwork #48. possibly a product witout any thermo. Warning: No density of states found for structure 160 in network PDepNetwork #48. possibly a product witout any thermo. Warning: Collision matrix too large to manage Warning: Adjusting to use 8028 grains instead of 16056 Traceback (most recent call last): File "/home/t112860/miniconda3/envs/rmg_env2/bin/rmg.py", line 111, in main() File "/home/t112860/miniconda3/envs/rmg_env2/bin/rmg.py", line 105, in main rmg.execute(**kwargs) File "/home/t112860/miniconda3/envs/rmg_env2/lib/python3.7/site-packages/rmgpy/rmg/main.py", line 830, in execute self.reaction_model.enlarge(objectToEnlarge) File "/home/t112860/miniconda3/envs/rmg_env2/lib/python3.7/site-packages/rmgpy/rmg/model.py", line 644, in enlarge self.update_unimolecular_reaction_networks() File "/home/t112860/miniconda3/envs/rmg_env2/lib/python3.7/site-packages/rmgpy/rmg/model.py", line 1755, in update_unimolecular_reaction_networks network.update(self, self.pressure_dependence) File "/home/t112860/miniconda3/envs/rmg_env2/lib/python3.7/site-packages/rmgpy/rmg/pdep.py", line 838, in update K = self.calculate_rate_coefficients(Tlist, Plist, method) File "/home/t112860/miniconda3/envs/rmg_env2/lib/python3.7/site-packages/rmgpy/pdep/network.py", line 266, in calculate_rate_coefficients self.apply_modified_strong_collision_method() File "/home/t112860/miniconda3/envs/rmg_env2/lib/python3.7/site-packages/rmgpy/pdep/network.py", line 893, in apply_modified_strong_collision_method self.K, self.p0 = msc.apply_modified_strong_collision_method(self, efficiency_model) File "rmgpy/pdep/msc.pyx", line 44, in rmgpy.pdep.msc.apply_modified_strong_collision_method File "rmgpy/pdep/msc.pyx", line 133, in rmgpy.pdep.msc.apply_modified_strong_collision_method IndexError: Out of bounds on buffer access (axis 0) (rmg_env2) [t112860@n03 CpH_2nd]$


TaikiKato commented 3 years ago

I added Ar, N2, Ne, He to species_dictionary.txt of JP-10combustion chemistry. And I changed species name from CH3CO(36) to CH3CO(36) because of duplication of CH3CO(10). species_dictionary.txt chem.txt

The situation may proceed a little. But, it still gives some errors.

error_message.txt


(rmg_env) taiki-kato@JP06856910:~/RMG/Trial/JP-10_comb$ python importChemkinLibrary.py chem.inp species_dictionary .txt JP-10_comb Traceback (most recent call last): File "importChemkinLibrary.py", line 44, in thermo = species.thermo, File "/home/taiki-kato/RMG/RMG-Py/rmgpy/data/thermo.py", line 667, in load_entry 'Please correct your library.'.format(label, self.name)) rmgpy.exceptions.DatabaseError: Found a duplicate molecule with label C10H16JJ in the thermo library JP-10_comb. Please correct your library. (rmg_env) taiki-kato@JP06856910:~/RMG/Trial/JP-10_comb$


Do you know how to solve this error message ? Could you please give some advices ?

mjohnson541 commented 3 years ago

That first one looks like a duplicate of #1499 that isn't resolved.

I believe the duplication error means there's two species in the generated library with the label C10H16JJ (which probably means there are two species by that name in the species_dictionary or chemkin file).

TaikiKato commented 3 years ago

Thank you for your answers. I understood that 'pdep error' is not solved problem.

I found that C10H16JJ is not the species of chem.inp (C10H16JJ is comment out line). *** for example **** C10H16(45) ! C10H16JJ(45) C10H16(46) ! C10H16JJ(46)


chem.txt

And I tried species name change (C10H16_1(45), C10H16_2(46) and so on), but the error persisted. Is this solved by chem.inp file or change some rmg libraries ? Please give some advices.

mjohnson541 commented 3 years ago

The error persists even without C10H16JJ anywhere in the files?

TaikiKato commented 3 years ago

I'm sorry this is the modified files & error messages.

species_dictionary_trial.txt chem_trial.txt trial_error.txt

mjohnson541 commented 3 years ago

I think you need to change the C10H16JJ names in the comments. Those are the names RMG is parsing not the names outside the comments that Chemkin reads.

TaikiKato commented 3 years ago

Thank you for your lecture. I've succeeded ImportChemkinLibrary.py with JP-10 reaction set. Here are the files & messages.

success.txt spec_dict.txt chem_chng_C10H16JJ.txt

Next, I'll try to make training set by JP-10 set with kinetics_library_to_training.ipynb.

github-actions[bot] commented 1 year ago

This issue is being automatically marked as stale because it has not received any interaction in the last 90 days. Please leave a comment if this is still a relevant issue, otherwise it will automatically be closed in 30 days.