usnistgov / REFPROP-wrappers

Wrappers around NIST REFPROP for languages such as Python, MATLAB, etc.
193 stars 127 forks source link

Is there DDHP and DDPH derivative in DLL. #386

Closed fuxinniu closed 3 years ago

fuxinniu commented 3 years ago

Hi All,

Does anyone know whether the DLL includes the DDHP and DDPH? If not, is there indirect way to calculate?

So appreciate that.

Frank

ianhbell commented 3 years ago

What are those derivatives?

CoolProp offers all the combinations (http://www.coolprop.org/coolprop/HighLevelAPI.html#partial-derivatives), and you can use that with the REFPROP backend (http://www.coolprop.org/coolprop/REFPROP.html)

fuxinniu commented 3 years ago

Hi Ian

DDHP is dD/dH at constant P. DDPH is dD/dP at constant H.

Thanks for your help.

Frank

ianhbell commented 3 years ago

I'd recommend the CoolProp approach

ianhbell commented 3 years ago

You can also work out the derivative yourself if you insist: http://www.coolprop.org/_static/doxygen/html/class_cool_prop_1_1_abstract_state.html#a8593e36dd1d70a9faf51dc608c3074b4

EricLemmon commented 3 years ago

If you are using the REFPROPdll routine to obtain properties, you can send it the following codes to obtain enthalpy derivatives. The derivative dD/dH at constant P is simply the inverse of dH/dD at constant P. dD/dP at constant H can be obtained with dH/dD at constant P and dH/dP at constant D, followed by the use of the chain rule formulas Ian provided in the weblink above.

    Enthalpy derivatives
    -----------------------------------------------------------------------------------------------------------
    DHDT_D     dH/dT at constant D                            [(J/mol)/K]              [(kJ/kg)/K]
    DHDT_P     dH/dT at constant P                            [(J/mol)/K]              [(kJ/kg)/K]
    DHDD_P     dH/dD at constant P                            [(J/mol)*(dm^3/mol)]     [(kJ/kg)*(m^3/kg)]
    DHDD_T     dH/dD at constant T                            [(J/mol)*(dm^3/mol)]     [(kJ/kg)*(m^3/kg)]
    DHDP_T     dH/dP at constant T                            [(J/mol)/kPa]            [(kJ/kg)/kPa]
    DHDP_D     dH/dP at constant D                            [(J/mol)/kPa]            [(kJ/kg)/kPa]
fuxinniu commented 3 years ago

Hi Ian & Eric,

So appreciate your helps.

I have tried CoolProp. It works. I will try REFPROPdll later.

Thanks again for your quick response.

Frank