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.float_] | 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.float] | 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\)]
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 58564.031595 0.296651 0.585492 210.0 61772.755626 0.296651 0.614767 220.0 64992.059200 0.296651 0.644041 230.0 68196.058808 0.296651 0.674351 240.0 71364.841887 0.296651 0.706525 250.0 71749.900301 0.296497 0.713566 260.0 71739.903908 0.296022 0.718626 270.0 71726.248416 0.295323 0.725039 280.0 71709.601531 0.294474 0.732570 290.0 71690.471232 0.293529 0.741036
>>> # 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 57989.240152 0.302153 0.604883 210.0 60819.870039 0.302156 0.631772 220.0 64021.435191 0.302156 0.661856 230.0 67205.781633 0.302156 0.693004 240.0 70351.196513 0.302156 0.726069 250.0 71677.860483 0.302096 0.743054 260.0 71664.587950 0.301756 0.749582 270.0 71647.346486 0.301200 0.757550 280.0 71626.941615 0.300498 0.766680 290.0 71603.964267 0.299700 0.776765