There is a strong variation of density with altitude and this needs to be reflected in aerodynamic calculations. While actual density varies constantly over any location all the time, aerospace design assumes a standard model for the atmosphere that engineers use for design calculations.
This variation of temperature with altitude for this atmosphere (1960 US Standard Atmosphere) is defined below in the figure. Three relations are used for relating pressure, density, viscosity, and altitude:
Equation of state:
Equation of Fluid Statics:
The viscosity is calculated from the Sutherland's equation:
where A, B depend on units