pycontrails.models.ps_model.ps_nominal_grid

pycontrails.models.ps_model.ps_nominal_grid(aircraft_type, *, level=None, air_temperature=None, q_fuel=43130000.0, mach_number=None, maxiter=10, engine_deterioration_factor=0.025)

Calculate the nominal performance grid for a given aircraft type.

This function is similar to the PSGrid model, but it doesn’t require meteorological data. Instead, the ambient air temperature can be computed from the ISA model or passed as an argument.

Parameters:
  • aircraft_type (str) – The aircraft type.

  • level (npt.NDArray[np.floating] | None, optional) – The pressure level, [\(hPa\)]. If None, the air_temperature argument must be a xarray.DataArray with an air_pressure coordinate.

  • air_temperature (xr.DataArray | npt.NDArray[np.floating] | None, optional) – The ambient air temperature, [\(K\)]. If None (default), the ISA temperature is computed from the level argument. If a xarray.DataArray, an air_pressure coordinate must be present and the level argument must be None to avoid ambiguity. If a numpy.ndarray is passed, it is assumed to be 1 dimensional with the same shape as the level argument.

  • q_fuel (float, optional) – The fuel heating value, by default JetA.q_fuel

  • mach_number (float | None, optional) – The Mach number. If None (default), the PS design Mach number is used.

  • maxiter (int, optional) – Passed into scipy.optimize.newton().

  • engine_deterioration_factor (float, optional) – The engine deterioration factor, by default PSGridParams.engine_deterioration_factor.

Returns:

xarray.Dataset – The nominal performance grid. The grid is indexed by altitude and Mach number. Contains the following variables:

  • "fuel_flow" : Fuel flow rate, [\(kg/s\)]

  • "engine_efficiency" : Engine efficiency

  • "aircraft_mass" : Aircraft mass at which the engine efficiency is maximized, [\(kg\)]

Raises:

KeyError – If “aircraft_type” is not supported by the PS model.

See also

ps_nominal_optimize_mach

Examples

>>> level = np.arange(200, 300, 10, dtype=float)
>>> # Compute nominal aircraft performance assuming ISA conditions
>>> # and the design Mach number
>>> perf = ps_nominal_grid("A320", level=level)
>>> perf.attrs["mach_number"]
0.753
>>> perf.to_dataframe().round({"aircraft_mass": 0, "engine_efficiency": 3, "fuel_flow": 3})
       aircraft_mass  engine_efficiency  fuel_flow
level
200.0        58416.0              0.301      0.576
210.0        61618.0              0.301      0.604
220.0        64830.0              0.301      0.633
230.0        68026.0              0.301      0.663
240.0        71188.0              0.301      0.695
250.0        71775.0              0.301      0.703
260.0        71766.0              0.300      0.708
270.0        71752.0              0.300      0.715
280.0        71736.0              0.299      0.722
290.0        71717.0              0.298      0.730
>>> # Now compute it for a higher Mach number
>>> perf = ps_nominal_grid("A320", level=level, mach_number=0.78)
>>> perf.to_dataframe().round({"aircraft_mass": 0, "engine_efficiency": 3, "fuel_flow": 3})
       aircraft_mass  engine_efficiency  fuel_flow
level
200.0        58473.0              0.307      0.601
210.0        60626.0              0.307      0.621
220.0        63818.0              0.307      0.651
230.0        66994.0              0.307      0.682
240.0        70130.0              0.307      0.714
250.0        71703.0              0.307      0.733
260.0        71690.0              0.306      0.739
270.0        71673.0              0.306      0.747
280.0        71653.0              0.305      0.756
290.0        71631.0              0.304      0.766