Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to_rms issue #2214

Closed
NUSCondy opened this issue Oct 15, 2021 · 10 comments
Closed

to_rms issue #2214

NUSCondy opened this issue Oct 15, 2021 · 10 comments
Labels
abandoned abandoned issue/PR as determined by actions bot stale stale issue/PR as determined by actions bot

Comments

@NUSCondy
Copy link

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
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 755, in execute
trimolecular_react=self.trimolecular_react)
File "/home/zhuqiren/RMG-Py/rmgpy/rmg/model.py", line 679, in enlarge
self.update_unimolecular_reaction_networks()
File "/home/zhuqiren/RMG-Py/rmgpy/rmg/model.py", line 1872, in update_unimolecular_reaction_networks
network.update(self, self.pressure_dependence)
File "/home/zhuqiren/RMG-Py/rmgpy/rmg/pdep.py", line 893, in update
reaction_model.add_reaction_to_edge(net_reaction)
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 483, in to_rms
raise ValueError(f"Couldn't convert object of type {errortype} to an RMS object")
ValueError: Couldn't convert object of type <class 'NoneType'> to an RMS object

****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
:

@alongd
Copy link
Member

alongd commented Oct 15, 2021

@mjohnson541, would you know?

@NUSCondy
Copy link
Author

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.

@mjohnson541
Copy link
Contributor

We're working on these in #2208. I think the second one is at least fixed on that branch.

@NUSCondy
Copy link
Author

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.

@NUSCondy
Copy link
Author

Hi @mjohnson541,
Is this issue fixed on the latest version or on other branch?

@mjohnson541
Copy link
Contributor

Sorry, I must've missed this, I think this is fixed on the other branch, which hopefully will be on main soon.

@NUSCondy
Copy link
Author

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?

@mjohnson541
Copy link
Contributor

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.

@NUSCondy
Copy link
Author

Got it! Thank you for the explanation!

@github-actions
Copy link

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.

@github-actions github-actions bot added the stale stale issue/PR as determined by actions bot label Jun 21, 2023
@github-actions github-actions bot added the abandoned abandoned issue/PR as determined by actions bot label Jul 22, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abandoned abandoned issue/PR as determined by actions bot stale stale issue/PR as determined by actions bot
Projects
None yet
Development

No branches or pull requests

3 participants