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, theair_temperature
argument must be axarray.DataArray
with alevel
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 thelevel
argument. If axarray.DataArray
, thelevel
coordinate must be present and thelevel
argument must be None to avoid ambiguity. If anumpy.ndarray
is passed, it is assumed to be 1 dimensional with the same shape as thelevel
argument.q_fuel (
float
, optional) – The fuel heating value, by defaultJetA.q_fuel
mach_number (
float | None
, optional) – The Mach number. If None (default), the PS design Mach number is used.maxiter (
int
, optional) – Passed intoscipy.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.230844 0.308675 0.561244 210.0 61617.676623 0.308675 0.589307 220.0 64829.702583 0.308675 0.617369 230.0 68026.415693 0.308675 0.646423 240.0 71187.897058 0.308675 0.677265 250.0 71818.514829 0.308542 0.686129 260.0 71809.073819 0.308073 0.690896 270.0 71796.095265 0.307367 0.696978 280.0 71780.225852 0.306500 0.704144 290.0 71761.957365 0.305529 0.712217
>>> # 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 57857.463750 0.314462 0.580472 210.0 60626.062062 0.314467 0.605797 220.0 63818.498305 0.314467 0.634645 230.0 66993.691515 0.314467 0.664512 240.0 70129.930503 0.314467 0.696217 250.0 71747.933832 0.314423 0.714997 260.0 71735.433936 0.314098 0.721147 270.0 71719.057287 0.313542 0.728711 280.0 71699.595538 0.312830 0.737412 290.0 71677.628782 0.312016 0.747045