Skip to content

core.performance

Scalar performance metrics derived from a finished thrust–time history: total impulse (the numerical time integral of thrust) and specific impulse.

machwave.core.performance

Performance metrics and calculations.

get_effective_flame_temperature(adiabatic_flame_temperature, combustion_efficiency)

Apply the combustion efficiency to the adiabatic flame temperature.

Parameters:

Name Type Description Default
adiabatic_flame_temperature float

Adiabatic flame temperature [K].

required
combustion_efficiency float

Combustion efficiency in (0, 1], the ratio of the actual to the ideal (adiabatic) flame temperature.

required

Returns:

Type Description
float

Effective flame temperature [K].

Source code in machwave/core/performance.py
def get_effective_flame_temperature(
    adiabatic_flame_temperature: float, combustion_efficiency: float
) -> float:
    """
    Apply the combustion efficiency to the adiabatic flame temperature.

    Args:
        adiabatic_flame_temperature: Adiabatic flame temperature [K].
        combustion_efficiency: Combustion efficiency in (0, 1], the ratio of the actual
            to the ideal (adiabatic) flame temperature.

    Returns:
        Effective flame temperature [K].
    """
    return combustion_efficiency * adiabatic_flame_temperature

get_specific_impulse(total_impulse, initial_propellant_mass)

Get specific impulse.

Parameters:

Name Type Description Default
total_impulse float

Total impulse [N-s].

required
initial_propellant_mass float

Initial propellant mass [kg].

required

Returns:

Type Description
float

Specific impulse [s].

Source code in machwave/core/performance.py
def get_specific_impulse(total_impulse: float, initial_propellant_mass: float) -> float:
    """
    Get specific impulse.

    Args:
        total_impulse: Total impulse [N-s].
        initial_propellant_mass: Initial propellant mass [kg].

    Returns:
        Specific impulse [s].
    """
    return total_impulse / initial_propellant_mass / scipy.constants.g

get_total_impulse(thrust, time)

Get total impulse by trapezoidal integration of the thrust curve.

Parameters:

Name Type Description Default
thrust NDArray[float64]

Thrust samples [N].

required
time NDArray[float64]

Time samples [s] matching the thrust samples.

required

Returns:

Type Description
float

Total impulse [N-s].

Source code in machwave/core/performance.py
def get_total_impulse(
    thrust: npt.NDArray[np.float64],
    time: npt.NDArray[np.float64],
) -> float:
    """
    Get total impulse by trapezoidal integration of the thrust curve.

    Args:
        thrust: Thrust samples [N].
        time: Time samples [s] matching the thrust samples.

    Returns:
        Total impulse [N-s].
    """
    return float(np.trapezoid(thrust, time))