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

Missing Riedel Equation Parameters for Methanol #634

Open
joel-brelson opened this issue Oct 27, 2023 · 4 comments
Open

Missing Riedel Equation Parameters for Methanol #634

joel-brelson opened this issue Oct 27, 2023 · 4 comments

Comments

@joel-brelson
Copy link

joel-brelson commented Oct 27, 2023

I was trying to run a uspto reaction with methanol as a solvent but it threw me an error like this
Filling in rate rules in kinetics families by averaging...
Traceback (most recent call last):
File "rmg.py", line 118, in
main()
File "rmg.py", line 112, in main
rmg.execute(**kwargs)
File "/rmg/RMG-Py/rmgpy/rmg/main.py", line 751, in execute
self.initialize(**kwargs)
File "/rmg/RMG-Py/rmgpy/rmg/main.py", line 585, in initialize
self.reaction_model.core.phase_system.phases["Default"].set_solvent(solvent_data)
File "/rmg/RMG-Py/rmgpy/rmg/reactors.py", line 238, in set_solvent
self.solvent = to_rms(solvent)
File "/rmg/RMG-Py/rmgpy/rmg/reactors.py", line 767, in to_rms
return rms.Solvent("solvent", rms.RiedelViscosity(float(obj.A), float(obj.B), float(obj.C), float(obj.D), float(obj.E)))
TypeError: float() argument must be a string or a number, not 'NoneType'

Could someone help me regarding how could i rectify the error for this
I attached the input.py file i used for simulation
input.txt

@JacksonBurns
Copy link
Contributor

Hi @joel-brelson thank you for the report!

I can confirm that I was able to reproduce this error on RMG-Py v3.2.0 using the provided input. Unfortunately this will be difficult to solve quickly. If you take a look at this link to our database, we don't have the Riedel equation A, B, C, D, and E values for methanol, which are required for the backend simulator RMS. Now, this simulation does not use RMS so we may be able to skip this step (so this would be solved by ReactionMechanismGenerator/RMG-Py#2539, which we are still working on).

I've asked one of the other developers if we can skip this step so your simulation can proceed. I will follow up about that.

In the meantime, you can go your installation of RMG and open the RMG-database/input/solvation/libraries/solvent.py file and fill in some 'placeholder' values for A, B, C, D, and E for methanol, around line 1087 in the file. This should allow your simulation to run, but don't use any RMS-based reactors (stick to liquid reactor). Let me know if you need additional help with this!

@joel-brelson
Copy link
Author

Hello @JacksonBurns thanks for the reply the code ran without any errors after filling them with some placeholder values

@JacksonBurns
Copy link
Contributor

JacksonBurns commented Oct 30, 2023

Glad to hear it @joel-brelson! Keep in mind that the results may be unphysical with just placeholder values. If that is the case you may need to dig them up/estimate them somehow to get better results. We will also work on this from our end.

I'm going to update the title of this issue and move this issue to RMG-database, since this is a data issue.

@JacksonBurns JacksonBurns changed the title Chemical simulation of a uspto patented reaction with methanol as solvent is throwing an error. Missing Riedel Equation Parameters for Methanol Oct 30, 2023
@JacksonBurns JacksonBurns transferred this issue from ReactionMechanismGenerator/RMG-Py Oct 30, 2023
@JacksonBurns
Copy link
Contributor

This issue is caused when RMG attempts to pass non-existent Riedel parameters to RMS, which causes an error. However, in this case the user is not using an RMS reactor, so it does not make sense to raise the error in the first place. It should only come up if they actually need the parameters.

RMG PR ReactionMechanismGenerator/RMG-Py#2631 would resolve this, since it avoids creating any RMS objects unless they are specifically requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants