CP_FLUIDS_LIST

This function returns fluid names included in the CoolProp library. An optional maximum count can be supplied to limit the number of returned rows for lightweight previews in spreadsheet ranges.

The output set is:

\mathcal{F}_k = \{f_1, f_2, \dots, f_k\}

where each f_i is a supported CoolProp fluid name and k is either the full list length or the provided cap.

Excel Usage

=CP_FLUIDS_LIST(max_items)
  • max_items (int, optional, default: null): Maximum number of fluid names to return; leave blank to return all names.

Returns (list[list]): Single-column table of CoolProp fluid names.

Example 1: Retrieve capped CoolProp fluids list

Inputs:

max_items
10

Excel formula:

=CP_FLUIDS_LIST(10)

Expected output:

Isopentane
Neon
Fluorine
R11
R125
cis-2-Butene
R13I1
trans-2-Butene
Ethylene
Acetone
Example 2: Repeat capped fluids list retrieval

Inputs:

max_items
12

Excel formula:

=CP_FLUIDS_LIST(12)

Expected output:

Isopentane
Neon
Fluorine
R11
R125
cis-2-Butene
R13I1
trans-2-Butene
Ethylene
Acetone
MethylPalmitate
DimethylEther
Example 3: Additional capped fluids list retrieval

Inputs:

max_items
15

Excel formula:

=CP_FLUIDS_LIST(15)

Expected output:

Isopentane
Neon
Fluorine
R11
R125
cis-2-Butene
R13I1
trans-2-Butene
Ethylene
Acetone
MethylPalmitate
DimethylEther
R152A
Hydrogen
ParaHydrogen
Example 4: Fourth capped fluids list retrieval

Inputs:

max_items
20

Excel formula:

=CP_FLUIDS_LIST(20)

Expected output:

Isopentane
Neon
Fluorine
R11
R125
cis-2-Butene
R13I1
trans-2-Butene
Ethylene
Acetone
MethylPalmitate
DimethylEther
R152A
Hydrogen
ParaHydrogen
R22
CycloHexane
R1233zd(E)
Isohexane
R236EA

Python Code

Show Code
import CoolProp.CoolProp as CP

def cp_fluids_list(max_items=None):
    """
    Return a list of CoolProp fluid names, optionally capped to a maximum count.

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

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

    Args:
        max_items (int, optional): Maximum number of fluid names to return; leave blank to return all names. Default is None.

    Returns:
        list[list]: Single-column table of CoolProp fluid names.
    """
    try:
        names = CP.FluidsList()
        if max_items is None:
            selected = names
        else:
            if max_items < 1:
                return "Error: max_items must be at least 1"
            selected = names[:max_items]
        return [[name] for name in selected]
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Maximum number of fluid names to return; leave blank to return all names.