fluid = 'Water';
backend = 'REFPROP';
# This one doesn't see the change in reference state
AS1 = CoolProp.AbstractState(backend,fluid);
AS1.update(CoolProp.QT_INPUTS, 0, 280);
CoolProp.CoolProp.set_reference_state(backend + '::' + fluid,'NBP')
# This one gets the update in the reference state
AS2 = CoolProp.AbstractState(backend,fluid);
AS2.update(CoolProp.QT_INPUTS, 0, 280);
print backend, AS1.hmass(), AS2.hmass()
--
You received this message because you are subscribed to the Google Groups "coolprop-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coolprop-users+unsubscribe@googlegroups.com.
To post to this group, send email to coolprop-users@googlegroups.com.
Visit this group at https://groups.google.com/group/coolprop-users.
For more options, visit https://groups.google.com/d/optout.
import CoolProp.CoolProp as CP
# change the reference state here to IIR or DEF or ASH to see if the values change
ref = 'NBP'; # or ASH, IIR, DEF
CP.set_reference_state('REFPROP::D2O', ref);
# Should be zero (or very close to it)
print CP.PropsSI('H', 'T', 300, 'P', 1E5, 'REFPROP::D2O');
-313177.846288
Any luck with this?
To unsubscribe from this group and stop receiving emails from it, send an email to coolprop-user...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to coolprop-users+unsubscribe@googlegroups.com.
To post to this group, send email to coolprop-users@googlegroups.com.
Accepts one of two signatures:
Type #1 (A Python wrapper of CoolProp::set_reference_stateS()):
set_reference_state(FluidName,reference_state)
FluidName The name of the fluid param reference_state The reference state to use, one of
Type #2 (A Python wrapper of CoolProp::set_reference_stateD()):
set_reference_state(FluidName,T0,rho0,h0,s0)
FluidName The name of the fluid
T0 The temperature at the reference point [K]
rho0 The density at the reference point [kg/m^3]
h0 The enthalpy at the reference point [J/kg]
s0 The entropy at the reference point [J/kg]
To view this discussion on the web visit https://groups.google.com/d/msgid/coolprop-users/738e0fc5-d110-4b98-b5cf-731577acb983n%40googlegroups.com.
Am I misunderstanding how the `set_reference_state` method works or missing a step to use it correctly?
The example from the user's guide (http://www.coolprop.org/coolprop/HighLevelAPI.html#reference-states) works as expected (meaning I get the expected specific enthalpy of the specified reference state):
In [4]: CP_CP.set_reference_state('n-Propane', 'ASHRAE')
In [5]: CP_CP.PropsSI('H','T', 233.15, 'Q', 0, 'n-Propane')
Out[5]: -4.88073098973112e-12
In [6]: CP_CP.set_reference_state('n-Propane', 'DEF')
In [7]: CP_CP.PropsSI('H','T', 233.15, 'Q', 0, 'n-Propane')
Out[7]: 105123.27213761563
But if I use the REFPROP fluid I do not:
In [1]: import CoolProp.CoolProp as CP_CP
In [2]: CP_CP.set_reference_state('REFPROP::PROPANE', 'ASHRAE')
In [3]: CP_CP.PropsSI('H','T', 233.15, 'Q', 0, 'REFPROP::PROPANE')
Out[3]: 105123.38853908639
Can someone shed some light on what I'm doing wrong, or misunderstanding?
Thanks,
Jesse
To view this discussion on the web visit https://groups.google.com/d/msgid/coolprop-users/1eb4fd3d-229a-471c-82c4-3e976e02647cn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coolprop-users/ae6e56ec-18c0-4e8f-b7a6-efc5e1e495e7n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coolprop-users/ff03e457-d900-490b-a6ce-85e32cf4c141n%40googlegroups.com.