pycontrails.models.ps_model.ps_nominal_optimize_mach¶
- pycontrails.models.ps_model.ps_nominal_optimize_mach[A: (ndarray, float)](aircraft_type, aircraft_mass, cost_index, level, *, air_temperature=None, northward_wind=None, eastward_wind=None, sin_a=None, cos_a=None, q_fuel=43130000.0, engine_deterioration_factor=0.025)¶
Calculate the nominal optimal mach number for a given aircraft type.
This function is similar to the
ps_nominal_gridmethod, but rather than maximizing engine efficiency by adjusting aircraft, we are minimizing cost by adjusting mach number.- Parameters:
aircraft_type (
str) – The aircraft type.aircraft_mass (
A) – The aircraft mass, [\(kg\)].cost_index (
A) – The cost index, [\(kg/min\)], or non-fuel cost of one minute of flight timelevel (
A) – The pressure level, [\(hPa\)]. If anumpy.ndarrayis passed, it is assumed to be one dimensional and the same length as the``aircraft_mass`` argument.air_temperature (
A | None, optional) – The ambient air temperature, [\(K\)]. If None (default), the ISA temperature is computed from thelevelargument. If anumpy.ndarrayis passed, it is assumed to be one dimensional and the same length as theaircraft_massargument.air_temperature (
A | None, optional)northward_wind (
A | None = None, optional) – The northward component of winds, [\(m/s\)]. If None (default) assumed to be zero.eastward_wind (
A | None = None, optional) – The eastward component of winds, [\(m/s\)]. If None (default) assumed to be zero.sin_a (
A | None = None, optional) – The sine between the true bearing of flight and the longitudinal axis. Must be specified if wind data is provided. Will be ignored if wind data is not provided.cos_a (
A | None = None, optional) – The cosine between the true bearing of flight and the longitudinal axis. Must be specified if wind data is provided. Will be ignored if wind data is not provided.q_fuel (
float, optional) – The fuel heating value, by defaultq_fuel.engine_deterioration_factor (
float, optional) – The engine deterioration factor, by defaultPSGridParams.engine_deterioration_factor.
- Returns:
xarray.Dataset– The nominal performance grid. The grid is indexed by altitude. Contains the following variables:"mach_number": The mach number that minimizes segment cost"fuel_flow": Fuel flow rate, [\(kg/s\)]"engine_efficiency": Engine efficiency"aircraft_mass": Aircraft mass, [\(kg\)]
- Raises:
KeyError – If “aircraft_type” is not supported by the PS model.
ValueError – If wind data is provided without segment angles.
See also