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

Setting state with impossible internal energy / enthalpy does not generate errors #264

Closed
speth opened this issue Jun 1, 2015 · 0 comments
Labels

Comments

@speth
Copy link
Member

speth commented Jun 1, 2015

Setting the state with u or h as one of the state variables where the value of u or h does not correspond to a physical value of T does not generate an error. Instead, it silently leaves the ThermoPhase object in a state which does not satisfy the input requirement. Examples:

import cantera as ct
gas = ct.Solution('h2o2.xml')
gas.TPX = 300, 101325, 'H2:1.0'
gas.HP = -4e6, 101325
print(gas.h)

returns -3786007.497. Similarly,

gas.UV = -4e6, 101325
print(gas.u)

returns -3786007.584

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

No branches or pull requests

1 participant