MCPcopy Create free account
hub / github.com/CoolProp/CoolProp / get_offset_NBP

Function get_offset_NBP

dev/scripts/set_reference_state.py:5–15  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

3
4
5def get_offset_NBP(name):
6 # CPmod.set_debug_level(10)
7 CPmod.set_reference_state(name, "RESET")
8 HEOS = CoolProp.AbstractState('HEOS', name)
9 HEOS.update(CoolProp.PQ_INPUTS, 101325, 0)
10
11 gas_constant = HEOS.gas_constant() / HEOS.molar_mass()
12
13 delta_a1 = HEOS.smass() / (gas_constant)
14 delta_a2 = -HEOS.hmass() / (gas_constant * HEOS.keyed_output(CoolProp.iT_reducing))
15 return delta_a1, delta_a2
16
17
18if __name__ == '__main__':

Callers 1

Calls 8

gas_constantMethod · 0.95
molar_massMethod · 0.95
smassMethod · 0.95
hmassMethod · 0.95
keyed_outputMethod · 0.95
AbstractStateMethod · 0.80
set_reference_stateMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected