POLYTROPIC_EXP

This function computes the polytropic exponent from isentropic exponent and polytropic efficiency for gas compression modeling. It helps map real compressor behavior into a polytropic process representation.

n=\frac{k\eta_p}{1-k(1-\eta_p)}

Excel Usage

=POLYTROPIC_EXP(k_isentropic, eta_poly)
  • k_isentropic (float, required): Isentropic exponent of the gas (Cp/Cv) [-]
  • eta_poly (float, required): Polytropic efficiency of the process [-]

Returns (float): Polytropic exponent calculated from isentropic exponent and polytropic efficiency [-]

Example 1: Air with 78% polytropic efficiency

Inputs:

k_isentropic eta_poly
1.4 0.78

Excel formula:

=POLYTROPIC_EXP(1.4, 0.78)

Expected output:

1.57803

Example 2: Air with 85% polytropic efficiency

Inputs:

k_isentropic eta_poly
1.4 0.85

Excel formula:

=POLYTROPIC_EXP(1.4, 0.85)

Expected output:

1.50633

Example 3: Methane (k=1.3) with 80% efficiency

Inputs:

k_isentropic eta_poly
1.3 0.8

Excel formula:

=POLYTROPIC_EXP(1.3, 0.8)

Expected output:

1.40541

Example 4: High efficiency at 95%

Inputs:

k_isentropic eta_poly
1.4 0.95

Excel formula:

=POLYTROPIC_EXP(1.4, 0.95)

Expected output:

1.43011

Python Code

Show Code
from fluids.compressible import polytropic_exponent as fluids_poly_exp

def polytropic_exp(k_isentropic, eta_poly):
    """
    Calculate polytropic exponent or polytropic efficiency for compression.

    See: https://fluids.readthedocs.io/fluids.compressible.html#fluids.compressible.polytropic_exponent

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

    Args:
        k_isentropic (float): Isentropic exponent of the gas (Cp/Cv) [-]
        eta_poly (float): Polytropic efficiency of the process [-]

    Returns:
        float: Polytropic exponent calculated from isentropic exponent and polytropic efficiency [-]
    """
    try:
        k_isentropic = float(k_isentropic)
        eta_poly = float(eta_poly)

        if k_isentropic <= 1:
            return "Error: Invalid input: k_isentropic must be greater than 1."
        if eta_poly <= 0 or eta_poly > 1:
            return "Error: Invalid input: eta_poly must be between 0 and 1."

        result = fluids_poly_exp(k=k_isentropic, eta_p=eta_poly)
        return float(result)
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Isentropic exponent of the gas (Cp/Cv) [-]
Polytropic efficiency of the process [-]