RMG-Py
RMG-Py copied to clipboard
to_rms issue
Hi @alongd ,
This issue seems to be related with RMS module. I have tried two different tests, one use AramcoMech_2.0 and the other is an example case. Both encountered bugs, shown below:
**Traceback (most recent call last):
File "/home/zhuqiren/anaconda3/envs/rmg_env/lib/python3.7/site-packages/julia/pseudo_python_cli.py", line 308, in main
python(**vars(ns))
File "/home/zhuqiren/anaconda3/envs/rmg_env/lib/python3.7/site-packages/julia/pseudo_python_cli.py", line 59, in python
scope = runpy.run_path(script, run_name="main")
File "/home/zhuqiren/anaconda3/envs/rmg_env/lib/python3.7/runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "/home/zhuqiren/anaconda3/envs/rmg_env/lib/python3.7/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/home/zhuqiren/anaconda3/envs/rmg_env/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/zhuqiren/RMG-Py/rmg.py", line 118, in
****Traceback (most recent call last): File "/home/zhuqiren/anaconda3/envs/rmg_env/lib/python3.7/site-packages/julia/pseudo_python_cli.py", line 308, in main python(**vars(ns)) File "/home/zhuqiren/anaconda3/envs/rmg_env/lib/python3.7/site-packages/julia/pseudo_python_cli.py", line 59, in python scope = runpy.run_path(script, run_name="main") File "/home/zhuqiren/anaconda3/envs/rmg_env/lib/python3.7/runpy.py", line 263, in run_path pkg_name=pkg_name, script_name=fname) File "/home/zhuqiren/anaconda3/envs/rmg_env/lib/python3.7/runpy.py", line 96, in _run_module_code mod_name, mod_spec, pkg_name, script_name) File "/home/zhuqiren/anaconda3/envs/rmg_env/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/zhuqiren/RMG-Py/rmg.py", line 118, in main() File "/home/zhuqiren/RMG-Py/rmg.py", line 112, in main rmg.execute(kwargs) File "/home/zhuqiren/RMG-Py/rmgpy/rmg/main.py", line 695, in execute self.initialize(kwargs) File "/home/zhuqiren/RMG-Py/rmgpy/rmg/main.py", line 577, in initialize self.reaction_model.add_reaction_library_to_edge(library) File "/home/zhuqiren/RMG-Py/rmgpy/rmg/model.py", line 1725, in add_reaction_library_to_edge self.add_reaction_to_edge(rxn) File "/home/zhuqiren/RMG-Py/rmgpy/rmg/model.py", line 1478, in add_reaction_to_edge self.edge.phase_system.phases["Default"].add_reaction(rxn) File "/home/zhuqiren/RMG-Py/rmgpy/rmg/reactors.py", line 217, in add_reaction self.reactions.append(to_rms(rxn, species_names=self.names, rms_species_list=self.species)) File "/home/zhuqiren/RMG-Py/rmgpy/rmg/reactors.py", line 467, in to_rms kinetics = to_rms(obj.kinetics) File "/home/zhuqiren/RMG-Py/rmgpy/rmg/reactors.py", line 416, in to_rms efficiencies = {spc.label: float(val) for spc, val in obj.efficiencies.items() if val != 1} File "/home/zhuqiren/RMG-Py/rmgpy/rmg/reactors.py", line 416, in efficiencies = {spc.label: float(val) for spc, val in obj.efficiencies.items() if val != 1} AttributeError: 'rmgpy.molecule.molecule.Molecule' object has no attribute 'label'
The input files are attached input1.txt inputAramco.txt :
@mjohnson541, would you know?
Hi, FYI, for the ethane example case, if I comment the pressure dependence options, it becomes good again. For the one using AramcoMech_2.0, such a change doesn't work.
We're working on these in https://github.com/ReactionMechanismGenerator/RMG-Py/pull/2208. I think the second one is at least fixed on that branch.
Hi,
FYI, I have tried to build an ethane oxidation mechanism using Aramcomech_2.0 thermo and kinetics library with RMG I installed in Sept 2020. It seems that it is okay with that old version.
Hi @mjohnson541, Is this issue fixed on the latest version or on other branch?
Sorry, I must've missed this, I think this is fixed on the other branch, which hopefully will be on main soon.
Hi @mjohnson541 , It is good to hear that. I also have a question about to_rms option. Since sensitivity analysis or simulation on model is optional, is it necessary to construct rms object when using RMG with these options not chosen?
So RMG has to simulate the model as a part of mechanism generation. Before adding RMS, RMG relied on its own internal simulation codes that weren't particularly well optimized and were difficult to extend. Using RMS allows us to write new reactors easily and include simulations where the rate constants aren't constant efficiently. The long term plan is to switch over all the reactors over to RMS.
Got it! Thank you for the explanation!
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.