Learn R Programming

wflo (version 1.9)

AirDensity: Provides convenient computations for air density.

Description

Implements a set of computations and constants to compute air density as a function of altitude (a.s.l.), temperature and relative humidity.

Usage

AirDensity(Altitude = 0, Temperature = 20, phi = 0.76)

Value

AirDensity returns a single value representing air density in kg per cubic meter.

Arguments

Altitude

altitude in meters above sea level.

Temperature

temperature in degrees Celsius.

phi

relative humidity, must be within [0, 1].

Author

Carsten Croonenbroeck

Details

The function first computes air pressure at user provided target altitude based on the barometric formula. Then, saturation vapor pressure is computed using the Magnus formula. With both, the density of air is computed afterward.

See Also

WindspeedLog and WindspeedHellmann to compute wind speed at target heights using two slightly different established models.

Examples

Run this code
AirDensity()
AirDensity(300, 25, 0.6)
AirDensity(0, 0, 0) # Standard conditions according to DIN 1343:1990,
                    # returns the expected value of 1.292.

Run the code above in your browser using DataLab