8.3
general documentation
cs_air_props.cpp File Reference
#include "cs_defs.h"
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bft_mem.h"
#include "cs_atmo.h"
#include "cs_base.h"
#include "cs_math.h"
#include "cs_physical_constants.h"
#include "cs_air_props.h"
+ Include dependency graph for cs_air_props.cpp:

Functions

void cs_air_glob_properties_get_pointers (double **cp_a, double **cp_v)
 
cs_real_t cs_air_h_l (cs_real_t t_l)
 Calculation water mass enthalpy. More...
 
cs_real_t cs_air_hvap (cs_real_t t_vap)
 Calculation water vapor mass enthalpy. More...
 
cs_real_t cs_air_dxsath (cs_real_t th, cs_real_t p0)
 Calculation of the derivate of the absolute humidity at saturation. More...
 
cs_real_t cs_air_cp_humidair (cs_real_t x, cs_real_t x_s)
 Calculation of the Cp of humid air. More...
 
cs_real_t cs_air_h_humidair (cs_real_t cp_h, cs_real_t x, cs_real_t x_s, cs_real_t t_h)
 Calculation of the specific enthalpy of humid air. More...
 
cs_real_t cs_air_t_humidair (cs_real_t cp_h, cs_real_t x, cs_real_t x_s, cs_real_t h_h)
 Calculation of the temperature of humid air. More...
 
cs_real_t cs_liq_h_to_t (cs_real_t h_l)
 Calculation of the temperature of liquid water. More...
 
cs_real_t cs_liq_t_to_h (cs_real_t t_l)
 Calculation of the specific enthalpy of liquid water. More...
 
cs_real_t cs_air_yw_sat (cs_real_t t_c, cs_real_t p)
 Calculation of the air water mass fraction at saturation for a given temperature. More...
 
cs_real_t cs_air_x_to_yw (cs_real_t x)
 Convert the absolute humidity of humid air to the air water mass fraction qwt = Ym = mw/mh. More...
 
cs_real_t cs_air_yw_to_x (cs_real_t qw)
 Convert the air water mass fraction qwt = Ym = mw/mh to the absolute humidity of humid air. More...
 
void cs_rho_humidair (cs_real_t yw_h, cs_real_t theta_l, cs_real_t p, cs_real_t *yw_liq, cs_real_t *t_h, cs_real_t *rho_h, cs_real_t *beta_h)
 Calculation of the density of humid air. More...
 
cs_real_t cs_air_rho_humidair (cs_real_t x, cs_real_t rho0, cs_real_t p0, cs_real_t t0, cs_real_t molmassrat, cs_real_t t_h)
 Calculation of the density of humid air. More...
 

Variables

cs_air_fluid_props_tcs_glob_air_props = &_props
 

Function Documentation

◆ cs_air_cp_humidair()

cs_real_t cs_air_cp_humidair ( cs_real_t  x,
cs_real_t  x_s 
)

Calculation of the Cp of humid air.

Returns
specific heat of humid air
Parameters
[in]xabsolute humidity of humid air
[in]x_sabsolute humidity of saturated humid air

◆ cs_air_dxsath()

cs_real_t cs_air_dxsath ( cs_real_t  th,
cs_real_t  p0 
)

Calculation of the derivate of the absolute humidity at saturation.

Returns
derivative of the humidity of saturated air
Parameters
[in]thtemperature in Celsius degree
[in]p0reference pressure

◆ cs_air_glob_properties_get_pointers()

void cs_air_glob_properties_get_pointers ( double **  cp_a,
double **  cp_v 
)

◆ cs_air_h_humidair()

cs_real_t cs_air_h_humidair ( cs_real_t  cp_h,
cs_real_t  x,
cs_real_t  x_s,
cs_real_t  t_h 
)

Calculation of the specific enthalpy of humid air.

Returns
specific enthalpy of humid air
Parameters
[in]cp_hCp of humid air
[in]xabsolute humidity of humid air
[in]x_sabsolute humidity of saturated humid air
[in]t_htemperature of humid air in Celsius

◆ cs_air_h_l()

cs_real_t cs_air_h_l ( cs_real_t  t_l)

Calculation water mass enthalpy.

Returns
Liquid water mass enthalpy
Parameters
[in]t_lwater temperature in Celsius degree

◆ cs_air_hvap()

cs_real_t cs_air_hvap ( cs_real_t  t_vap)

Calculation water vapor mass enthalpy.

Returns
water vapor mass enthalpy
Parameters
[in]t_vapwater vapor temperature in Celsius

◆ cs_air_rho_humidair()

cs_real_t cs_air_rho_humidair ( cs_real_t  x,
cs_real_t  rho0,
cs_real_t  p0,
cs_real_t  t0,
cs_real_t  molmassrat,
cs_real_t  t_h 
)

Calculation of the density of humid air.

Returns
density of humid air
Parameters
[in]xabsolute humidity of humid air
[in]rho0reference density of humid air
[in]p0reference pressure
[in]t0reference temperature of humid air (Kelvin)
[in]molmassratdry air to water vapor molecular mass ratio
[in]t_htemperature of humid air in Celsius

◆ cs_air_t_humidair()

cs_real_t cs_air_t_humidair ( cs_real_t  cp_h,
cs_real_t  x,
cs_real_t  x_s,
cs_real_t  h_h 
)

Calculation of the temperature of humid air.

Returns
temperature of humid air (in Celsius)
Parameters
[in]cp_hCp of humid air
[in]xabsolute humidity of humid air
[in]x_sabsolute humidity of saturated humid air
[in]h_hhumid air enthalpy

◆ cs_air_x_to_yw()

cs_real_t cs_air_x_to_yw ( cs_real_t  x)

Convert the absolute humidity of humid air to the air water mass fraction qwt = Ym = mw/mh.

Returns
air water mass fraction
Parameters
[in]xabsolute humidity of humid air

◆ cs_air_yw_sat()

cs_real_t cs_air_yw_sat ( cs_real_t  t_c,
cs_real_t  p 
)

Calculation of the air water mass fraction at saturation for a given temperature.

Returns
the air water mass fraction at saturation
Parameters
[in]t_ctemperature in Celsius degree
[in]preference pressure

◆ cs_air_yw_to_x()

cs_real_t cs_air_yw_to_x ( cs_real_t  qw)

Convert the air water mass fraction qwt = Ym = mw/mh to the absolute humidity of humid air.

Returns
absolute humidity of humid air
Parameters
[in]qwair water mass fraction

◆ cs_liq_h_to_t()

cs_real_t cs_liq_h_to_t ( cs_real_t  h_l)

Calculation of the temperature of liquid water.

Returns
liquid water temperature (in Celsius)
Parameters
[in]h_lspecific enthalpy of liquid water

◆ cs_liq_t_to_h()

cs_real_t cs_liq_t_to_h ( cs_real_t  t_l)

Calculation of the specific enthalpy of liquid water.

Returns
specific enthalpy of liquid water
Parameters
[in]t_lliquid water temperature (in Celsius)

◆ cs_rho_humidair()

void cs_rho_humidair ( cs_real_t  yw_h,
cs_real_t  theta_l,
cs_real_t  p,
cs_real_t yw_liq,
cs_real_t t_h,
cs_real_t rho_h,
cs_real_t beta_h 
)

Calculation of the density of humid air.

Parameters
[in]yw_hair water mass fraction
[in]theta_lliquid potential temperature (K)
[in]ppressure
[out]yw_liqliquid water mass fraction
[out]t_htemperature of humid air in Celsius
[out]rho_hdensity of humid air
[out]beta_hthermal expansion of the bulk

Variable Documentation

◆ cs_glob_air_props

cs_air_fluid_props_t* cs_glob_air_props = &_props