return the pressure, temperature, density and viscosity of air as a function of altitude
Atmosphere(altitude, propertytype, opts)
Property(propertytype, altitude, opts)
number that represents the altitude above sea level. A unit should be included; if no unit is specified it is interpreted as being expressed in meters. As a special case, the name or string sealevel can be used to represent 0 meters above sea level.
(optional) string or name. In Atmosphere, can be one of: all, temperature, pressure, density, speedofsound, or viscosity. If all is specified, the function returns an expression sequence with all of temperature, pressure, density, speedofsound, and viscosity. If nothing is specified, the default is set to all. In Property, propertytype is a required argument and all is not permitted.
(optional) one or more equations of the form name = value, where name is one of model, temperatureoffset, altitudetype, and useunits; named options described below.
model : specifies the atmosphere model used to compute the results. It's one of: COESA (US 1976 Atmosphere model) or ISA (International Standard Atmosphere model). If nothing is specified, the default is set to COESA.
temperatureoffset is a number that will be added to the resulting temperatures. If no units are specified, then the default unit is set to Kelvin. If nothing is specified, the default is set to 0 K.
altitudetype specifies from where should the altitude given by the user be referenced. It is one of: geometric (altitude above sea level) or geopotential (adjustment to geometric height used in mathematical calculations that accounts for gravity). They are related by the formula: geopotential=RE⁢geometricRE+geometric where RE is the radius of Earth. If nothing is specified, the default is set to geopotential.
useunits specifies if units should be included in the results, it is one of: true, false. The units used are: K (temperature), Pa (pressure), kgm3 (density), ms (speed of sound) and Pa⁢s (viscosity). If nothing is specified, the default behavior is as follows: if altitude or the optional temperatureoffset values are specified with units, then units are included in the result, otherwise they are not. Specifying the special value sealevel counts as having units. Writing just useunits as a parameter is equivalent to writing useunits = true.
The Atmosphere command returns the specified property (or properties) under the 1976 US Atmosphere Model (see References) or the International Standard Atmosphere model (see References) as a function of altitude. The geopotential altitude given to the function should be between 0 m and 84852 m in the US Atmosphere model and between -5000 m and 80000 m in the International Standard Atmosphere model. If other units are specified, the function will convert them into meters.
Atmosphere is also a subpackage of the ThermophysicalData package, containing the Property command. The calling sequence Atmosphere:-Property(propertytype, altitude, opts) is equivalent to ThermophysicalData:-Property(propertytype, altitude, opts, source=Atmosphere).
As a command in the ThermophysicalData package, the Atmosphere command can be accessed using either the long form or the short form of the command name. Since Property is, in turn, a command in the Atmosphere package, it can also be accessed by using either the long form or the short form of the command.
The Property procedure can be used to obtain the same results.
heights ≔ seq⁡i,i=0..84000,1000:
temps ≔ `~`Atmosphere⁡heights,temperature,useunits=false:
plots:-pointplot⁡temps,heights,labels=Temperature (K),Geopotential Altitude (m),labeldirections=horizontal,vertical
press ≔ `~`Atmosphere⁡heights,pressure,useunits=false:
plots:-pointplot⁡press,heights,labels=Pressure (Pa),Geopotential Altitude(m),labeldirections=horizontal,vertical
speeds ≔ `~`Atmosphere⁡heights,speedofsound,useunits=false:
plots:-pointplot⁡speeds,heights,labels=Speed of Sound (m/s),Geopotential Altitude (m),labeldirections=horizontal,vertical
viscs ≔ `~`Atmosphere⁡heights,viscosity,useunits=false:
plots:-pointplot⁡viscs,heights,labels=Viscosity (Pa s),Geopotential Altitude (m),labeldirections=horizontal,vertical
p ≔ Atmosphere⁡a,pressure
Because zero times any unit immediately simplifies to just the number zero, the following returns a value with no units: the Atmosphere command receives a unitless value, despite the fact that the user intended to specify a unit.
This can be overcome by using the name or string sealevel.
US Standard Atmosphere, 1976; https://ntrs.nasa.gov/citations/19770009539
Revision of Atmosphere Model in BADA Aircraft Performance Model; 2010; https://www.eurocontrol.int/sites/default/files/library/001_Revision_of_BADA_atmosphere_model.pdf
The ThermophysicalData:-Atmosphere and ThermophysicalData:-Atmosphere:-Property commands were introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
Download Help Document
What kind of issue would you like to report? (Optional)