SAT_ANCILLARY

This function evaluates CoolProp saturation ancillary equations for a selected fluid and property mapping.

It returns the scalar ancillary value for the specified quality branch, input variable, and input value.

Excel Usage

=SAT_ANCILLARY(name, output, quality, input, value)
  • name (str, required): Fluid name understood by CoolProp.
  • output (str, required): Requested output key.
  • quality (int, required): Quality branch selector as integer (0 for saturated liquid, 1 for saturated vapor).
  • input (str, required): Input variable key.
  • value (float, required): Input value in SI units.

Returns (float): Saturation ancillary result for the requested mapping.

Example 1: Water ancillary pressure from temperature on liquid branch

Inputs:

name output quality input value
Water p 0 T 300

Excel formula:

=SAT_ANCILLARY("Water", "p", 0, "T", 300)

Expected output:

3536.79

Example 2: Water ancillary pressure from temperature on vapor branch

Inputs:

name output quality input value
Water p 1 T 350

Excel formula:

=SAT_ANCILLARY("Water", "p", 1, "T", 350)

Expected output:

41681.3

Example 3: Water ancillary density from temperature on liquid branch

Inputs:

name output quality input value
Water rho 0 T 320

Excel formula:

=SAT_ANCILLARY("Water", "rho", 0, "T", 320)

Expected output:

54946

Example 4: Water ancillary density from temperature on vapor branch

Inputs:

name output quality input value
Water rho 1 T 320

Excel formula:

=SAT_ANCILLARY("Water", "rho", 1, "T", 320)

Expected output:

3.97815

Python Code

Show Code
from CoolProp.CoolProp import saturation_ancillary as coolprop_saturation_ancillary

def sat_ancillary(name, output, quality, input, value):
    """
    Evaluate a CoolProp saturation ancillary correlation value.

    See: https://coolprop.org/apidoc/CoolProp.CoolProp.html#CoolProp.CoolProp.saturation_ancillary

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

    Args:
        name (str): Fluid name understood by CoolProp.
        output (str): Requested output key.
        quality (int): Quality branch selector as integer (0 for saturated liquid, 1 for saturated vapor).
        input (str): Input variable key.
        value (float): Input value in SI units.

    Returns:
        float: Saturation ancillary result for the requested mapping.
    """
    try:
      def normalize_key(key):
        if key is None:
          return None
        text = str(key).strip()
        lowered = text.lower()
        aliases = {
          "p": "P",
          "pressure": "P",
          "t": "T",
          "temperature": "T",
          "rho": "Dmolar",
          "density": "Dmolar",
          "dmolar": "Dmolar",
          "hmolar": "Hmolar",
          "smolar": "Smolar"
        }
        return aliases.get(lowered, text)

      output_key = normalize_key(output)
      input_key = normalize_key(input)
      return coolprop_saturation_ancillary(name, output_key, quality, input_key, value)
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Fluid name understood by CoolProp.
Requested output key.
Quality branch selector as integer (0 for saturated liquid, 1 for saturated vapor).
Input variable key.
Input value in SI units.