windpowerlib.density.ideal_gas

windpowerlib.density.ideal_gas(pressure, pressure_height, hub_height, temperature_hub_height)[source]

Calculates the density of air at hub height using the ideal gas equation.

This function is carried out when the parameter density_model of an instance of the ModelChain class is ‘ideal_gas’.

Parameters:
  • pressure (pandas.Series or numpy.array) – Air pressure in Pa.

  • pressure_height (float) – Height in m for which the parameter pressure applies.

  • hub_height (float) – Hub height of wind turbine in m.

  • temperature_hub_height (pandas.Series or numpy.array) – Air temperature at hub height in K.

Returns:

Density of air at hub height in kg/m³. Returns a pandas.Series if one of the input parameters is a pandas.Series.

Return type:

pandas.Series or numpy.array

Notes

The following equations are used [1] [2] [3]:

\rho_{hub}=p_{hub}/ (R_s T_{hub})

and [4]:

p_{hub}=\left(p/100-\left(h_{hub}-h_{p,data}\right)\cdot
\frac{1}{8}\right)\cdot 100

with:

T: temperature [K], \rho: density [kg/m³], p: pressure [Pa]

h_{p,data} is the height of the measurement or model data for pressure, R_s is the specific gas constant of dry air (287.058 J/(kg*K)) and p_{hub} is the pressure at hub height h_{hub}.

References