Thermodynamics

Overview

Thermodynamics is the branch of physics that describes the relationships between heat, work, temperature, and energy. In engineering practice, thermodynamic calculations are essential for designing power plants, refrigeration systems, chemical processes, and HVAC equipment. These tools provide access to accurate thermophysical property data and equilibrium calculations needed for rigorous engineering analysis.

All thermodynamic calculations are implemented using CoolProp, an open-source library providing high-accuracy equations of state for pure fluids and mixtures. CoolProp implements reference-quality equations from NIST and peer-reviewed literature, covering over 120 pure fluids and enabling calculations for refrigerants, hydrocarbons, cryogens, and common industrial fluids. The library is built on NumPy for efficient numerical operations.

Thermophysical Properties: The PROPS_SI tool is the primary interface for calculating fluid properties such as density, enthalpy, entropy, viscosity, thermal conductivity, and speed of sound. Given any two independent state variables (e.g., temperature and pressure, or pressure and enthalpy), it returns any desired thermophysical property. This enables calculations for pump work, heat exchanger sizing, pipe flow analysis, and thermodynamic cycle evaluation. The PHASE_SI tool identifies the phase (liquid, vapor, two-phase, supercritical) at any state point—critical for avoiding calculation errors when properties behave differently across phase boundaries.

Chemical Properties: For process engineering applications, CHEMICAL_PROPS retrieves fundamental substance data including molecular weight, critical temperature and pressure, acentric factor, normal boiling point, and triple point conditions. These properties are essential inputs for equation-of-state calculations, vapor-liquid equilibrium modeling, and experiment transport property correlations.

Humid Air and Psychrometrics: HVAC and drying applications require specialized treatment of moist air. The HA_PROPS_SI tool calculates psychrometric properties including relative humidity, wet-bulb temperature, dew point, humidity ratio, and specific enthalpy of humid air. These calculations follow the psychrometric relationships defined in ASHRAE standards, enabling accurate analysis of air conditioning, dehumidification, and evaporative cooling processes.

Mixture Calculations: Real industrial processes often involve fluid mixtures rather than pure components. The MIXTURE_STRING tool creates properly formatted mixture specifications from component lists and mole fractions, which can then be used with MIXTURE_FLASH to perform vapor-liquid equilibrium (VLE) flash calculations. Flash calculations determine the equilibrium phase compositions and fractions when a mixture is brought to specified temperature and pressure conditions—fundamental to distillation, absorption, and separation process design.

Practical Workflow: For pure fluid calculations, call PROPS_SI directly with the fluid name and state conditions. To verify you’re in the expected phase region, use PHASE_SI. For humid air applications, use HA_PROPS_SI with appropriate psychrometric inputs. For mixture work, first construct the mixture definition with MIXTURE_STRING, then perform equilibrium calculations with MIXTURE_FLASH.

CHEMICAL_PROPS

This function creates a thermo.Chemical object for a specified compound and returns one selected thermodynamic or physical attribute (such as critical temperature, critical pressure, or molecular weight). It is useful for quickly retrieving single-property values from a validated chemical identifier.

Conceptually, the lookup can be viewed as selecting one property from a property map for a fixed chemical state:

y = \mathrm{Property}(\text{chemical},\; p)

where p is the requested property name (for example, MW, T_c, or P_c), and y is the corresponding scalar value.

Excel Usage

=CHEMICAL_PROPS(chemical, thermo_prop)
  • chemical (str, required): Chemical identifier (e.g., ‘Water’, ‘67-56-1’).
  • thermo_prop (str, required): Numeric property attribute name (e.g., ‘MW’, ‘Tb’, ‘Tc’, ‘Pc’).

Returns (float): Numeric property value.

Example 1: Water Molecular Weight

Inputs:

chemical thermo_prop
Water MW

Excel formula:

=CHEMICAL_PROPS("Water", "MW")

Expected output:

18.0153

Example 2: Ethanol Critical Temperature

Inputs:

chemical thermo_prop
Ethanol Tc

Excel formula:

=CHEMICAL_PROPS("Ethanol", "Tc")

Expected output:

514.71

Example 3: Methane Acentric Factor

Inputs:

chemical thermo_prop
Methane omega

Excel formula:

=CHEMICAL_PROPS("Methane", "omega")

Expected output:

0.01142

Example 4: Benzene Critical Pressure

Inputs:

chemical thermo_prop
Benzene Pc

Excel formula:

=CHEMICAL_PROPS("Benzene", "Pc")

Expected output:

4907280

Python Code

Show Code
from thermo import Chemical

def chemical_props(chemical, thermo_prop):
    """
    Retrieve physical and thermodynamic properties for a chemical specimen.

    See: https://thermo.readthedocs.io/thermo.chemical.html

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

    Args:
        chemical (str): Chemical identifier (e.g., 'Water', '67-56-1').
        thermo_prop (str): Numeric property attribute name (e.g., 'MW', 'Tb', 'Tc', 'Pc'). Valid options: Molecular Weight (MW), Normal Boiling Point (Tb), Melting Point (Tm), Critical Temperature (Tc), Critical Pressure (Pc), Critical Volume (Vc), Acentric Factor (omega).

    Returns:
        float: Numeric property value.
    """
    try:
        c = Chemical(chemical)
        if hasattr(c, thermo_prop):
            return getattr(c, thermo_prop)
        else:
            return f"Error: Property '{thermo_prop}' not found for '{chemical}'"
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Chemical identifier (e.g., 'Water', '67-56-1').
Numeric property attribute name (e.g., 'MW', 'Tb', 'Tc', 'Pc').

HA_PROPS_SI

Calculate humid air properties using CoolProp psychrometrics.

Excel Usage

=HA_PROPS_SI(ha_psi_out, ha_psi_name_one, value_one, ha_psi_name_two, value_two, ha_psi_name_three, value_three)
  • ha_psi_out (str, required): Desired property code (e.g., ‘H’, ‘W’, ‘Vda’).
  • ha_psi_name_one (str, required): Name of first input (e.g., ‘T’).
  • value_one (float, required): Value of first input.
  • ha_psi_name_two (str, required): Name of second input (e.g., ‘P’).
  • value_two (float, required): Value of second input.
  • ha_psi_name_three (str, required): Name of third input (e.g., ‘R’, ‘W’).
  • value_three (float, required): Value of third input.

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

Example 1: Enthalpy of standard air (25C, 1atm, 50% RH)

Inputs:

ha_psi_out ha_psi_name_one value_one ha_psi_name_two value_two ha_psi_name_three value_three
H T 298.15 P 101325 R 0.5

Excel formula:

=HA_PROPS_SI("H", "T", 298.15, "P", 101325, "R", 0.5)

Expected output:

50423.5

Example 2: Humidity Ratio (W)

Inputs:

ha_psi_out ha_psi_name_one value_one ha_psi_name_two value_two ha_psi_name_three value_three
W T 298.15 P 101325 R 0.5

Excel formula:

=HA_PROPS_SI("W", "T", 298.15, "P", 101325, "R", 0.5)

Expected output:

0.00992574

Example 3: Dew Point Temperature

Inputs:

ha_psi_out ha_psi_name_one value_one ha_psi_name_two value_two ha_psi_name_three value_three
Tdp T 298.15 P 101325 R 0.5

Excel formula:

=HA_PROPS_SI("Tdp", "T", 298.15, "P", 101325, "R", 0.5)

Expected output:

287.017

Example 4: Volume per unit dry air

Inputs:

ha_psi_out ha_psi_name_one value_one ha_psi_name_two value_two ha_psi_name_three value_three
Vda T 303.15 P 101325 R 0.8

Excel formula:

=HA_PROPS_SI("Vda", "T", 303.15, "P", 101325, "R", 0.8)

Expected output:

0.88837

Python Code

Show Code
import CoolProp.CoolProp as CP

def ha_props_si(ha_psi_out, ha_psi_name_one, value_one, ha_psi_name_two, value_two, ha_psi_name_three, value_three):
    """
    Calculate humid air properties using CoolProp psychrometrics.

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

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

    Args:
        ha_psi_out (str): Desired property code (e.g., 'H', 'W', 'Vda'). Valid options: Temperature (T), Pressure (P), Humidity Ratio (W), Relative Humidity (R), Dew Point (Tdp), Wet Bulb (Twb), Enthalpy (H), Entropy (S), Mixture Volume (V), Dry Air Volume (Vda), Viscosity (M), Conductivity (K).
        ha_psi_name_one (str): Name of first input (e.g., 'T'). Valid options: Temperature (T), Pressure (P), Humidity Ratio (W), Relative Humidity (R), Dew Point (Tdp), Wet Bulb (Twb), Enthalpy (H).
        value_one (float): Value of first input.
        ha_psi_name_two (str): Name of second input (e.g., 'P'). Valid options: Temperature (T), Pressure (P), Humidity Ratio (W), Relative Humidity (R), Dew Point (Tdp), Wet Bulb (Twb).
        value_two (float): Value of second input.
        ha_psi_name_three (str): Name of third input (e.g., 'R', 'W'). Valid options: Temperature (T), Pressure (P), Humidity Ratio (W), Relative Humidity (R), Dew Point (Tdp), Wet Bulb (Twb).
        value_three (float): Value of third input.

    Returns:
        float: Calculated property value in SI units.
    """
    try:
        # CoolProp.HAPropsSI(Output, Name1, Prop1, Name2, Prop2, Name3, Prop3)
        result = CP.HAPropsSI(ha_psi_out, ha_psi_name_one, value_one, ha_psi_name_two, value_two, ha_psi_name_three, value_three)
        return float(result)
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Desired property code (e.g., 'H', 'W', 'Vda').
Name of first input (e.g., 'T').
Value of first input.
Name of second input (e.g., 'P').
Value of second input.
Name of third input (e.g., 'R', 'W').
Value of third input.

MIXTURE_FLASH

This function performs a mixture flash calculation with the thermo package from component identifiers, composition, temperature, and pressure, then returns key bulk properties such as phase, vapor fraction, density, enthalpy, and entropy.

Input mole fractions are normalized before calculation so they sum to unity:

z_i^{*} = \frac{z_i}{\sum_j z_j}

The normalized composition and specified state variables are then used to solve for equilibrium state-dependent mixture properties.

Excel Usage

=MIXTURE_FLASH(compounds, fractions, temperature, pressure)
  • compounds (list[list], required): Range of chemical identifiers (names, CAS).
  • fractions (list[list], required): Range of mole fractions.
  • temperature (float, optional, default: 298.15): Temperature [K].
  • pressure (float, optional, default: 101325): Pressure [Pa].

Returns (list[list]): 2D array of property names and values.

Example 1: Ethanol-Water Mixture Flash

Inputs:

compounds fractions temperature pressure
Ethanol 0.5 350 101325
Water 0.5

Excel formula:

=MIXTURE_FLASH({"Ethanol";"Water"}, {0.5;0.5}, 350, 101325)

Expected output:

Property Value
Vapor Fraction 0
Phase l
Molar Volume 0.000039208
Enthalpy -37819.6
Entropy -97.7244
Density 817.228
Example 2: Pure Water at Standard Conditions

Inputs:

compounds fractions temperature pressure
Water 1 298.15 101325

Excel formula:

=MIXTURE_FLASH("Water", 1, 298.15, 101325)

Expected output:

Property Value
Vapor Fraction 0
Phase l
Molar Volume 0.0000180683
Enthalpy -43985.7
Entropy -118.728
Density 997.064
Example 3: Air (N2/O2) Mixture

Inputs:

compounds fractions temperature pressure
Nitrogen 0.79 300 101325
Oxygen 0.21

Excel formula:

=MIXTURE_FLASH({"Nitrogen";"Oxygen"}, {0.79;0.21}, 300, 101325)

Expected output:

Property Value
Vapor Fraction 1
Phase g
Molar Volume 0.0246172
Enthalpy 53.9815
Entropy 4.45377
Density 1.17196
Example 4: Methanol-Benzene Mixture

Inputs:

compounds fractions temperature pressure
Methanol 0.4 320 50000
Benzene 0.6

Excel formula:

=MIXTURE_FLASH({"Methanol";"Benzene"}, {0.4;0.6}, 320, 50000)

Expected output:

Property Value
Vapor Fraction 0
Phase l
Molar Volume 0.0000718494
Enthalpy -32604.2
Entropy -87.9393
Density 830.679

Python Code

Show Code
from thermo import Mixture

def mixture_flash(compounds, fractions, temperature=298.15, pressure=101325):
    """
    Perform a flash calculation for a chemical mixture and return key properties.

    See: https://thermo.readthedocs.io/thermo.mixture.html

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

    Args:
        compounds (list[list]): Range of chemical identifiers (names, CAS).
        fractions (list[list]): Range of mole fractions.
        temperature (float, optional): Temperature [K]. Default is 298.15.
        pressure (float, optional): Pressure [Pa]. Default is 101325.

    Returns:
        list[list]: 2D array of property names and values.
    """
    def to_list(x):
        if isinstance(x, list):
            return [val for row in x for val in row if val is not None and val != ""]
        return [x] if x is not None else []

    try:
        ids = to_list(compounds)
        zs_raw = to_list(fractions)
        zs = [float(z) for z in zs_raw]

        if len(ids) != len(zs):
            return f"Error: Count mismatch: {len(ids)} compounds vs {len(zs)} fractions"

        total_z = sum(zs)
        if total_z == 0:
            return "Error: Sum of fractions must be greater than zero"
        zs = [z/total_z for z in zs]

        m = Mixture(ids, zs=zs, T=temperature, P=pressure)

        # Safer property extraction
        def get_prop(obj, attr):
            try:
                val = getattr(obj, attr)
                return float(val) if val is not None else 0.0
            except:
                return 0.0

        results = [
            ["Property", "Value"],
            ["Vapor Fraction", get_prop(m, 'VF')],
            ["Phase", str(m.phase)],
            ["Molar Volume", get_prop(m, 'Vm')],
            ["Enthalpy", get_prop(m, 'Hm')],
            ["Entropy", get_prop(m, 'Sm')],
            ["Density", get_prop(m, 'rho')]
        ]
        return results
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Range of chemical identifiers (names, CAS).
Range of mole fractions.
Temperature [K].
Pressure [Pa].

MIXTURE_STRING

This function constructs a CoolProp-compatible HEOS mixture identifier string from fluid names and mole fractions supplied in Excel ranges or scalar inputs. It flattens 2D inputs, removes blanks, and joins component terms into the required backend format.

For components i=1,\dots,n, the constructed mixture string corresponds to:

exttt{HEOS::Fluid}_1[z_1]\&\texttt{Fluid}_2[z_2]\&\cdots\&\texttt{Fluid}_n[z_n]

where each z_i is the provided mole fraction associated with fluid i.

Excel Usage

=MIXTURE_STRING(fluids, fractions)
  • fluids (list[list], required): List or range of fluid names (strings).
  • fractions (list[list], required): List or range of mole fractions (floats).

Returns (str): Formatted mixture string.

Example 1: Water Ethanol Mixture

Inputs:

fluids fractions
Water Ethanol 0.4 0.6

Excel formula:

=MIXTURE_STRING({"Water","Ethanol"}, {0.4,0.6})

Expected output:

"HEOS::Water[0.4]&Ethanol[0.6]"

Example 2: Input from Excel 2D Range

Inputs:

fluids fractions
Nitrogen 0.7
Argon 0.3

Excel formula:

=MIXTURE_STRING({"Nitrogen";"Argon"}, {0.7;0.3})

Expected output:

"HEOS::Nitrogen[0.7]&Argon[0.3]"

Example 3: R410A Definitions (50/50 R32/R125)

Inputs:

fluids fractions
R32 R125 0.5 0.5

Excel formula:

=MIXTURE_STRING({"R32","R125"}, {0.5,0.5})

Expected output:

"HEOS::R32[0.5]&R125[0.5]"

Example 4: Artificial Air (Approximate)

Inputs:

fluids fractions
Nitrogen Oxygen Argon 0.78 0.21 0.01

Excel formula:

=MIXTURE_STRING({"Nitrogen","Oxygen","Argon"}, {0.78,0.21,0.01})

Expected output:

"HEOS::Nitrogen[0.78]&Oxygen[0.21]&Argon[0.01]"

Python Code

Show Code
# No external imports needed for string formatting

def mixture_string(fluids, fractions):
    """
    Create a formatted CoolProp mixture string from component fluids and mole fractions.

    See: https://coolprop.org/fluid_properties/Mixtures.html

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

    Args:
        fluids (list[list]): List or range of fluid names (strings).
        fractions (list[list]): List or range of mole fractions (floats).

    Returns:
        str: Formatted mixture string.
    """
    def flatten(data):
        if isinstance(data, list):
            flat = []
            for item in data:
                if isinstance(item, list):
                    flat.extend(flatten(item))
                else:
                    flat.append(item)
            return flat
        return [data]

    try:
        names = flatten(fluids)
        fracs = flatten(fractions)

        # Filter out empty strings or None values which might come from larger Excel ranges
        names = [str(n).strip() for n in names if n is not None and str(n).strip() != ""]
        fracs = [float(f) for f in fracs if f is not None and str(f).strip() != ""]

        if len(names) != len(fracs):
            return f"Error: Number of fluids ({len(names)}) does not match number of fractions ({len(fracs)})"

        if not names:
            return "Error: No fluids provided"

        # Validate sum of fractions? 
        # CoolProp might not strictly require sum=1.0 for all backends, but usually for mixtures it should be close.
        # We will just format the string and let CoolProp validate the physics later.

        components = []
        for n, f in zip(names, fracs):
            components.append(f"{n}[{f}]")

        return "HEOS::" + "&".join(components)

    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

List or range of fluid names (strings).
List or range of mole fractions (floats).

PHASE_SI

This function determines the thermodynamic phase region of a fluid by querying CoolProp with two independent input properties and one fluid identifier. The output is a phase label such as liquid, gas, twophase, or supercritical.

Phase determination can be expressed as:

\phi = g\left(n_1, v_1,\; n_2, v_2,\; \text{fluid}\right)

where n_1,n_2 are property codes, v_1,v_2 are SI values, and \phi is the returned phase classification string.

Excel Usage

=PHASE_SI(phase_si_name_one, value_one, phase_si_name_two, value_two, fluid)
  • phase_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.
  • phase_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’).

Returns (str): Phase description string (e.g., ‘liquid’, ‘gas’).

Example 1: Water Liquid Phase

Inputs:

phase_si_name_one value_one phase_si_name_two value_two fluid
T 300 P 101325 Water

Excel formula:

=PHASE_SI("T", 300, "P", 101325, "Water")

Expected output:

"liquid"

Example 2: Water Gas Phase

Inputs:

phase_si_name_one value_one phase_si_name_two value_two fluid
T 400 P 101325 Water

Excel formula:

=PHASE_SI("T", 400, "P", 101325, "Water")

Expected output:

"gas"

Example 3: Water Two-Phase

Inputs:

phase_si_name_one value_one phase_si_name_two value_two fluid
T 373.15 Q 0.5 Water

Excel formula:

=PHASE_SI("T", 373.15, "Q", 0.5, "Water")

Expected output:

"twophase"

Example 4: CO2 Supercritical

Inputs:

phase_si_name_one value_one phase_si_name_two value_two fluid
T 350 P 10000000 CO2

Excel formula:

=PHASE_SI("T", 350, "P", 10000000, "CO2")

Expected output:

"supercritical"

Python Code

Show Code
import CoolProp.CoolProp as CP

def phase_si(phase_si_name_one, value_one, phase_si_name_two, value_two, fluid):
    """
    Identify the phase of a fluid at a given state using CoolProp.

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

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

    Args:
        phase_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.
        phase_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').

    Returns:
        str: Phase description string (e.g., 'liquid', 'gas').
    """
    try:
        # CoolProp.PhaseSI(name1, prop1, name2, prop2, Ref)
        result = CP.PhaseSI(phase_si_name_one, value_one, phase_si_name_two, value_two, fluid)
        return str(result)
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Name of the first input property (e.g., 'T', 'P').
Value of the first input property in SI units.
Name of the second input property (e.g., 'P', 'Q').
Value of the second input property in SI units.
Fluid name (e.g., 'Water', 'R134a').

PROPS_SI

This function evaluates a requested thermophysical property for a pure fluid or mixture string using CoolProp’s high-level SI interface with two independent state inputs. It supports common thermodynamic and transport properties such as density, enthalpy, entropy, viscosity, and conductivity.

The property calculation is represented as:

y = h\left(o,\; n_1, v_1,\; n_2, v_2,\; \text{fluid}\right)

where o is the requested output property code, n_1,n_2 are input property codes, v_1,v_2 are SI values, and y is the computed scalar result.

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.

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.048

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:

412334

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:

228.804

Python Code

Show 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

Desired property code (e.g., 'D' for density, 'H' for enthalpy).
Name of the first input property (e.g., 'T', 'P').
Value of the first input property in SI units.
Name of the second input property (e.g., 'P', 'Q').
Value of the second input property in SI units.
Fluid name (e.g., 'Water', 'R134a') or mixture string.