Files
CoolProp/dev/scripts/set_reference_state.py
Matthis Thorade 526cb198a4 autopep8 whitespace (#1613)
* autopep8 whitespace only:

--select="E101,W1,W2"

* revert single file: web2py_online.py

Should this be a .py file at all?

* revert file Tickets/1443.py because the diff looked strange:

maybe there is an encoding problem?

* Rename web2py_online.py to web2py_online.rst
2017-12-12 08:32:38 -07:00

19 lines
528 B
Python

import CoolProp
CPmod = CoolProp.CoolProp
def get_offset_NBP(name):
#CPmod.set_debug_level(10)
CPmod.set_reference_state(name,"RESET")
HEOS = CoolProp.AbstractState('HEOS', name)
HEOS.update(CoolProp.PQ_INPUTS, 101325, 0)
gas_constant = HEOS.gas_constant()/HEOS.molar_mass()
delta_a1 = HEOS.smass()/(gas_constant)
delta_a2 = -HEOS.hmass()/(gas_constant*HEOS.keyed_output(CoolProp.iT_reducing))
return delta_a1, delta_a2
if __name__=='__main__':
name = 'MM'
print get_offset_NBP(name)