ThermophysicalData/Atmosphere - Maple Help

ThermophysicalData

 Atmosphere
 return the pressure, temperature, density and viscosity of air as a function of altitude
 Atmosphere[Property]
 return the pressure, temperature, density and viscosity of air as a function of altitude

 Calling Sequence Atmosphere(altitude) Atmosphere(altitude, propertytype, opts) Property(propertytype, altitude, opts)

Parameters

 altitude - 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. propertytype - (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. opts - (optional) one or more equations of the form name = value, where name is one of model, temperatureoffset, altitudetype, and useunits; named options described below.

Options

 • 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: $\mathrm{geopotential}=\frac{{R}_{E}\mathrm{geometric}}{{R}_{E}+\mathrm{geometric}}$ where ${R}_{E}$ 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), $⟦\mathrm{Pa}⟧$ (pressure), $⟦\frac{\mathrm{kg}}{{m}^{3}}⟧$ (density), $⟦\frac{m}{s}⟧$ (speed of sound) and $⟦\mathrm{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.

Description

 • 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.

Examples

 > $\mathrm{with}\left(\mathrm{ThermophysicalData}\right)$
 $\left[{\mathrm{Atmosphere}}{,}{\mathrm{Chemicals}}{,}{\mathrm{CoolProp}}{,}{\mathrm{PHTChart}}{,}{\mathrm{Property}}{,}{\mathrm{PsychrometricChart}}{,}{\mathrm{TemperatureEntropyChart}}\right]$ (1)
 > $\mathrm{Atmosphere}\left(3000\mathrm{Unit}\left(m\right),\mathrm{all},\mathrm{altitudetype}=\mathrm{geopotential}\right)$
 ${268.6500}{}⟦{K}⟧{,}{70108.52215}{}⟦{\mathrm{Pa}}⟧{,}{0.9091219586}{}⟦\frac{{\mathrm{kg}}}{{{m}}^{{3}}}⟧{,}{328.5779005}{}⟦\frac{{m}}{{s}}⟧{,}{0.00001693718731}{}⟦{\mathrm{Pa}}{}{s}⟧$ (2)
 > $\mathrm{Atmosphere}\left(10\mathrm{Unit}\left(\mathrm{km}\right),\mathrm{speedofsound},\mathrm{temperatureoffset}=20\mathrm{Unit}\left(\mathrm{Celsius}\right),\mathrm{altitudetype}=\mathrm{geometric}\right)$
 ${312.6606456}{}⟦\frac{{m}}{{s}}⟧$ (3)
 > $\mathrm{Atmosphere}\left(150,\mathrm{density},\mathrm{useunits}=\mathrm{false}\right)$
 ${1.207456620}$ (4)
 > $\mathrm{Atmosphere}\left(100,\mathrm{temperature}\right)$
 ${287.5000}$ (5)

The Property procedure can be used to obtain the same results.

 > $\mathrm{with}\left(\mathrm{Atmosphere}\right)$
 $\left[{\mathrm{Property}}\right]$ (6)
 > $\mathrm{Property}\left(\mathrm{temperature},100\mathrm{Unit}\left(m\right)\right)$
 ${287.5000}{}⟦{K}⟧$ (7)
 > $\mathrm{Atmosphere}\left(100,\mathrm{temperature},\mathrm{model}=\mathrm{COESA},\mathrm{temperatureoffset}=10\mathrm{Unit}\left(K\right)\right)$
 ${297.5000}{}⟦{K}⟧$ (8)
 > $\mathrm{Atmosphere}\left(100,\mathrm{temperature},\mathrm{model}=\mathrm{ISA},\mathrm{temperatureoffset}=10\mathrm{Unit}\left(K\right)\right)$
 ${297.5000}{}⟦{K}⟧$ (9)
 > $\mathrm{Atmosphere}\left(-5000,\mathrm{pressure},\mathrm{model}=\mathrm{ISA}\right)$
 ${108900.}$ (10)
 > $\mathrm{heights}≔\left[\mathrm{seq}\left(i,i=0..84000,1000\right)\right]:$
 > $\mathrm{temps}≔\mathrm{~}\left[\mathrm{Atmosphere}\right]\left(\mathrm{heights},\mathrm{temperature},\mathrm{useunits}=\mathrm{false}\right):$
 > $\mathrm{plots}:-\mathrm{pointplot}\left(\mathrm{temps},\mathrm{heights},\mathrm{labels}=\left["Temperature \left(K\right)","Geopotential Altitude \left(m\right)"\right],\mathrm{labeldirections}=\left[\mathrm{horizontal},\mathrm{vertical}\right]\right)$
 > $\mathrm{press}≔\mathrm{~}\left[\mathrm{Atmosphere}\right]\left(\mathrm{heights},\mathrm{pressure},\mathrm{useunits}=\mathrm{false}\right):$
 > $\mathrm{plots}:-\mathrm{pointplot}\left(\mathrm{press},\mathrm{heights},\mathrm{labels}=\left["Pressure \left(Pa\right)","Geopotential Altitude\left(m\right)"\right],\mathrm{labeldirections}=\left[\mathrm{horizontal},\mathrm{vertical}\right]\right)$
 > $\mathrm{speeds}≔\mathrm{~}\left[\mathrm{Atmosphere}\right]\left(\mathrm{heights},\mathrm{speedofsound},\mathrm{useunits}=\mathrm{false}\right):$
 > $\mathrm{plots}:-\mathrm{pointplot}\left(\mathrm{speeds},\mathrm{heights},\mathrm{labels}=\left["Speed of Sound \left(m/s\right)","Geopotential Altitude \left(m\right)"\right],\mathrm{labeldirections}=\left[\mathrm{horizontal},\mathrm{vertical}\right]\right)$
 > $\mathrm{viscs}≔\mathrm{~}\left[\mathrm{Atmosphere}\right]\left(\mathrm{heights},\mathrm{viscosity},\mathrm{useunits}=\mathrm{false}\right):$
 > $\mathrm{plots}:-\mathrm{pointplot}\left(\mathrm{viscs},\mathrm{heights},\mathrm{labels}=\left["Viscosity \left(Pa s\right)","Geopotential Altitude \left(m\right)"\right],\mathrm{labeldirections}=\left[\mathrm{horizontal},\mathrm{vertical}\right]\right)$
 > $p≔\mathrm{Atmosphere}\left(a,"pressure"\right)$
 ${p}{≔}{\mathrm{Atmosphere}}{}\left({a}{,}{"pressure"}\right)$ (11)
 > $\mathrm{plot}\left(p,a=0..10\mathrm{Unit}\left(\mathrm{km}\right)\right)$

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.

 > $\mathrm{Atmosphere}\left(0\mathrm{Unit}\left(\mathrm{ft}\right),"density"\right)$
 ${1.225000225}$ (12)

This can be overcome by using the name or string sealevel.

 > $\mathrm{Atmosphere}\left("sealevel","density"\right)$
 ${1.225000225}{}⟦\frac{{\mathrm{kg}}}{{{m}}^{{3}}}⟧$ (13)

References

 US Standard Atmosphere, 1976; https://ntrs.nasa.gov/citations/19770009539