AirDensity: Provides convenient computations for air density.

View source: R/Functions.R

AirDensityR Documentation

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)

Arguments

Altitude

altitude in meters above sea level.

Temperature

temperature in degrees Celsius.

phi

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

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.

Value

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

Note

This function returns valid values for negative altitudes, but only for temperature values between -45 and +60 degrees Celsius.

Author(s)

Carsten Croonenbroeck

See Also

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

Examples

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

wflo documentation built on Jan. 15, 2023, 5:10 p.m.

Related to AirDensity in wflo...