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)

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.float64] | None, optional) – The pressure level, [\(hPa\)]. If None, the air_temperature argument must be a xarray.DataArray with a level coordinate.

  • air_temperature (xr.DataArray | npt.NDArray[np.float64] | None, optional) – The ambient air temperature, [\(K\)]. If None (default), the ISA temperature is computed from the level argument. If a xarray.DataArray, the level 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().

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.

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()
       aircraft_mass  engine_efficiency  fuel_flow
level
200.0   58416.230843           0.300958   0.575635
210.0   61617.676624           0.300958   0.604417
220.0   64829.702583           0.300958   0.633199
230.0   68026.415695           0.300958   0.662998
240.0   71187.897060           0.300958   0.694631
250.0   71775.399825           0.300824   0.703349
260.0   71765.716737           0.300363   0.708259
270.0   71752.405400           0.299671   0.714514
280.0   71736.129079           0.298823   0.721878
290.0   71717.392170           0.297875   0.730169
>>> # Now compute it for a higher Mach number
>>> perf = ps_nominal_grid("A320", level=level, mach_number=0.78)
>>> perf.to_dataframe()
       aircraft_mass  engine_efficiency  fuel_flow
level
200.0   57941.825236           0.306598   0.596100
210.0   60626.062062           0.306605   0.621331
220.0   63818.498306           0.306605   0.650918
230.0   66993.691517           0.306605   0.681551
240.0   70129.930503           0.306605   0.714069
250.0   71703.009059           0.306560   0.732944
260.0   71690.188652           0.306239   0.739276
270.0   71673.392089           0.305694   0.747052
280.0   71653.431321           0.304997   0.755990
290.0   71630.901315           0.304201   0.765883