-
Hello, I am not able to find any examples on defining a new mixture using REFPROP python wrappers. Code that I could copy/paste with explanatory comments would be extremely helpful as I'm a first-time REFPROP user. Thank you in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Some info here: https://refprop-docs.readthedocs.io/en/latest/DLL/high_level.html#f/_/REFPROPdll . There are also copious examples within the issues in this repository you should check out. A snippet for your mixture to calculate the normal boiling point temperature of the saturated liquid state: import os
os.environ['RPPREFIX'] = os.getenv('HOME')+'/REFPROP10'
root = os.getenv('RPPREFIX')
import ctREFPROP.ctREFPROP as ct
RP = ct.REFPROPFunctionLibrary(root)
RP.SETPATHdll(root)
p = 101325
z = [0.98, 0.015, 0.005]
q = 0
r = RP.REFPROPdll('ETHANE;METHANE;PROPANE','PQ','T',RP.MOLAR_BASE_SI,0,0,p,q, z)
print('TNBP:', r.Output[0], r.hUnits) yielding
|
Beta Was this translation helpful? Give feedback.
-
I cannot recommend the use of USER units. Much better to use one of the base SI variants (molar or mass). It is fragile and has some bugs not present with the use of base-SI units. Also the use of base SI units avoids unit conversions in your code. q is the molar vapor quality, or the number of moles in the vapor phase relative to the total number of moles. It is 1 for a saturated vapor and 0 for a saturated liquid |
Beta Was this translation helpful? Give feedback.
Some info here: https://refprop-docs.readthedocs.io/en/latest/DLL/high_level.html#f/_/REFPROPdll . There are also copious examples within the issues in this repository you should check out.
A snippet for your mixture to calculate the normal boiling point temperature of the saturated liquid state:
yielding