PROPS_SI

Overview

Excel Usage

=PROPS_SI(props_si_output, props_si_name_one, value_one, props_si_name_two, value_two, fluid)
  • props_si_output (str, required): Desired property code (e.g., ‘D’ for density, ‘H’ for enthalpy).
  • props_si_name_one (str, required): Name of the first input property (e.g., ‘T’, ‘P’).
  • value_one (float, required): Value of the first input property in SI units.
  • props_si_name_two (str, required): Name of the second input property (e.g., ‘P’, ‘Q’).
  • value_two (float, required): Value of the second input property in SI units.
  • fluid (str, required): Fluid name (e.g., ‘Water’, ‘R134a’) or mixture string.

Returns (float): Calculated property value in SI units.

Examples

Example 1: Density of Water at STP

Inputs:

props_si_output props_si_name_one value_one props_si_name_two value_two fluid
D T 298.15 P 101325 Water

Excel formula:

=PROPS_SI("D", "T", 298.15, "P", 101325, "Water")

Expected output:

997.047

Example 2: Boiling point of Water at 1 atm

Inputs:

props_si_output props_si_name_one value_one props_si_name_two value_two fluid
T P 101325 Q 0 Water

Excel formula:

=PROPS_SI("T", "P", 101325, "Q", 0, "Water")

Expected output:

373.124

Example 3: Enthalpy of R134a

Inputs:

props_si_output props_si_name_one value_one props_si_name_two value_two fluid
H T 298.15 Q 1 R134a

Excel formula:

=PROPS_SI("H", "T", 298.15, "Q", 1, "R134a")

Expected output:

412330

Example 4: CO2 Supercritical Density

Inputs:

props_si_output props_si_name_one value_one props_si_name_two value_two fluid
D T 350 P 10000000 CO2

Excel formula:

=PROPS_SI("D", "T", 350, "P", 10000000, "CO2")

Expected output:

208.5

Python Code

import CoolProp.CoolProp as CP

def props_si(props_si_output, props_si_name_one, value_one, props_si_name_two, value_two, fluid):
    """
    Calculate thermophysical properties of fluids using CoolProp.

    See: https://coolprop.org/coolprop/HighLevelAPI.html#propssi-function

    This example function is provided as-is without any representation of accuracy.

    Args:
        props_si_output (str): Desired property code (e.g., 'D' for density, 'H' for enthalpy). Valid options: Temperature (T), Pressure (P), Density (D), Enthalpy (H), Entropy (S), Vapor Quality (Q), Internal Energy (U), Specific Heat Cp (C), Specific Heat Cv (O), Thermal Cond. (L), Viscosity (V), Prandtl (Prandtl), Speed of Sound (A), Phase Index (Phase).
        props_si_name_one (str): Name of the first input property (e.g., 'T', 'P'). Valid options: Temperature (T), Pressure (P), Density (D), Enthalpy (H), Entropy (S), Vapor Quality (Q), Internal Energy (U).
        value_one (float): Value of the first input property in SI units.
        props_si_name_two (str): Name of the second input property (e.g., 'P', 'Q'). Valid options: Temperature (T), Pressure (P), Density (D), Enthalpy (H), Entropy (S), Vapor Quality (Q), Internal Energy (U).
        value_two (float): Value of the second input property in SI units.
        fluid (str): Fluid name (e.g., 'Water', 'R134a') or mixture string.

    Returns:
        float: Calculated property value in SI units.
    """
    try:
        # CoolProp.PropsSI(output, name1, prop1, name2, prop2, Ref)
        result = CP.PropsSI(props_si_output, props_si_name_one, value_one, props_si_name_two, value_two, fluid)
        return float(result)
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator