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

OS-specific bug 'H2O' vs 'water' name in Gekko's Chemical Library #75

Open
Joseph-prism opened this issue Nov 23, 2019 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@Joseph-prism
Copy link

Joseph-prism commented Nov 23, 2019

I am working with Gekko's Chemical Library and I am trying to add compounds to my model.

I am trying to add water to my model, but it only works when I call it as 'water', not 'H2O'.

I posted this problem on stackoverflow: https://stackoverflow.com/questions/59002261/how-do-you-determine-what-to-call-a-compound-when-accessing-it-in-gekkos-chemic

I was responded:
The H2O compound name works on Windows (using remote=False) but it doesn't work on Linux, even with remote=False. The remote server is Linux as well so it fails when remote=True. You found an OS-specific bug! There may be something with how it is converting to h2o and the upper and lower case names not matching. Could you add this as a bug report on Github? github.com/BYU-PRISM/GEKKO/issues – John Hedengren 16 hours ago

Code example:

# usage: thermo('mw') for constants
# thermo('lvp',T) for temperature dependent
from gekko import GEKKO, chemical
m = GEKKO()
c = chemical.Properties(m)
# add compounds
c.compound('H2O')
# molecular weight
mw = c.thermo('mw')
# liquid vapor pressure
T = m.Param(value=310)
vp = c.thermo('lvp',T)
m.solve(disp=False)
print(mw)
print(vp)
@APMonitor APMonitor added the bug Something isn't working label Nov 24, 2019
@APMonitor APMonitor self-assigned this Nov 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants