5.0 | 6 ratings Rate this file 85 Downloads (last 30 days) File Size: 12.4 KB File ID: #28135 Version: 1.23
image thumbnail

STDATMO: Standard Atmosphere Function


Sky Sartorius (view profile)


05 Jul 2010 (Updated )

Gas properties at altitudes from N-dim input. Non-standard atmospheres capable. Many units supported

| Watch this File

File Information

A standard atmosphere function based on the 1976 Standard Atmosphere returns density, speed of sound, temperature, pressure, and viscosity for a given altitude input up to 86 km.
This function is designed to be useful for those designing and analyzing aircraft and has the following features that hitherto have not been combined in a single standard atmosphere function:

•Input may be a scalar, vector, matrix, or n-dimensional array of altitudes. The function is vectorized and fast for computing atmospheric conditions at a large number of points simultaneously.

•Temperature offset option for non-standard atmospheres, e.g analyzing hot day aircraft performance.

•Input and output may independently be either SI or imperial units.

•Units consistency can be enforced by using the DimensionedVariable class, reducing errors and making code clearer.

•Returns everything needed to easily determine important parameters such as dynamic pressure, Mach number, Reynolds number, stagnation temperature, etc.

•Option for geometric instead of geopotential altitude input.

Examples included in help:

•Create tables of atmospheric properties up to 30000 ft for a cold (-15°C), standard, and hot (+15°C) day with columns
[h(ft) Z(ft) rho(slug/ft3) sigma a(ft/s) T(°R) P(psf) µ(slug/ft-s) nu(ft2/s)]
using 3-dimensional array inputs.

•Find atmospheric properties at every 100m of geometric height for an off-standard atmosphere with temperature offset varying +/- 25 degC sinusoidally with a period of 4km.
•Use the capabilities of the DimensionedVariable class to find the SI dynamic pressure, Mach number, Reynolds number, and stagnation temperature of an aircraft flying at flight level FL500 (50000 ft) with speed 500 knots and characteristic length of 80 inches.

References: ESDU 77022; www.pdas.com/atmos.html


Standard Atmosphere Calculator, Complete 1976 Standard Atmosphere, Isa Chart, Dimensioned Variable Class Units Support For Matlab, and Density Altitude Calculator inspired this file.

This file inspired Core: Conceptual Optimization Of Rotorcraft Environment, Simple Turbine Engine Performance Estimation, and Density Altitude Calculator.

MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (8)
31 Mar 2015 liang he  
15 May 2014 jean dufour

it looks great but do you know how you could include it in MATLAB function block?

Comment only
16 Oct 2012 qiongge  
16 Oct 2012 qiongge

with a good help!!!!
good job!!!!!!!!!!

16 Oct 2012 qiongge  
11 Sep 2012 qiongge  
09 May 2011 Sky Sartorius

Sky Sartorius (view profile)

Right now STDATMO expects the temperature offset to be in degrees Kelvin/Celsius regardless of which length unit is used for altitude input. Keep in mind that dT is an offset, so when converting between Celsius and Fahrenheit, use only the scaling factor (offset C/F = K/R = 5/9).

It was originally thought that non-standard atmospheres would rarely be based on temperature offsets in degrees Fahrenheit, but I would greatly appreciate user feedback: Should the temperature offset for altitude input in meters be in degrees C/K and in degrees F/R for altitude input in feet?

Comment only
05 Oct 2010 Sander Aerts

very clean code with a good help. Haven't yet been able to check the correctness, but it seems OK. The code seems to be implemented way better than the "Complete 1976 Standard Atmosphere" implementation.
Great job

07 Jul 2010 1.3

Update to references and improved input handling

12 Jul 2010 1.6

Changed handling of units to be more intuitive and added feature to allow different units for input and output. Earlier version syntax works as before.
Two examples added to help.

26 Jul 2010 1.8

Now substantially faster than earlier versions and ATMOSISA. Cleaned up help and setup for Example 1.

09 Aug 2010 1.9

Final output, Hgeop, changed to ZorH, and is geometric altitude for geopotential input, and geopotential for geometric input. Code made a bit more succinct.

27 Aug 2010 1.11

Added a section such that troposphere-only simple function calls are a bit faster

27 Aug 2010 1.12

A bit quicker for troposphere only problems; fixed small units bug.

23 Dec 2010 1.13

Minor changes. Tested in R2010a. Added another example to help.

13 May 2011 1.14

fixed error that occurred when using 5 output arguments

07 Jul 2011 1.19

Imperial unit temperature offset now in F/R instead of C/K

21 Nov 2012 1.20

tiny changes to help and input handling; improved vectorization; tested in 2012b

05 Dec 2012 1.21

Added STDATMODIM wrapper function and updated documentation.

07 Jan 2013 1.22

capabilities of stdatmodim integrated into main function; documentation and example

19 May 2014 1.23


Contact us