models subpackage

models.film module

Thermophysical film properties of humid air.

This module provides a convenient wrapper around specific funtionality of the CoolProp package. Specifically, the ability to calulate approximate constant film properties based on an e-state, s-state, and averaging rule.

Functions

  • est_liq_props – estimates of liquid properties.
  • est_mix_props – estimates of film properties.
  • use_rule – calculate film state by applying the given rule.
chamber.models.film.est_alpha_m(p, t_e, t_dp, t_s, rule)[source]

Estimate thermal diffusivity of the vapor mixture film.

chamber.models.film.est_c_pl(t_s, t_t, rule)[source]

Estimate specific heat of pure liquid water at the film temperature.

chamber.models.film.est_c_pm(p, t_e, t_dp, t_s, rule)[source]

Estimate specific heat of the vapor mixture film.

chamber.models.film.est_d_12(p, t_e, t_dp, t_s, rule, ref)[source]

Estimate binary species diffusivity of the vapor mixture film.

chamber.models.film.est_k_m(p, t_e, t_dp, t_s, rule)[source]

Estimate thermal conductivity of the vapor mixture film.

chamber.models.film.est_liq_props(t_s, t_t, rule)[source]

Estimates of liquid properties.

This function calculates estimations of constant liquid properties. Properties are returned in a dict with the follwoing keys: * ‘c_pl’: Specific heat of vapor mixture film in J/kg K

Parameters:
  • t_s (int or float) – Dry bulb temperature of saturated vapor mixture in K.
  • t_t (int or float) – Temperature of the liquid water (condensed phase) in K.
  • rule ({'1/2', '1/3'}) – Rule for calculating the film_prop, see Notes.
Returns:

The film properties in the same units as inputs.

Return type:

dict(float)

Examples

Let’s get the liquid props for t_s = 285, t_t = 290, rule = ‘1/2’

>>> t_s = 285
>>> t_t = 290
>>> rule = '1/2'
>>> liq_props = est_liq_props(t_s, t_t, rule)
>>> liq_props['c_pl']
4189.82872258844

Change rule to ‘1/3’

>>> rule = '1/3'
>>> liq_props = est_liq_props(t_s, t_t, rule)
>>> liq_props['c_pl']
4190.7955800723075
Raises:ValueError – If rule is not in {‘1/2’, ‘1/3’}.
chamber.models.film.est_mix_props(p, t_e, t_dp, t_s, ref, rule)[source]

Estimates of film properties.

This function calculates estimations of constant film properties based on input parameters. Properties are returned in a dict with the follwoing keys: * ‘c_pm’: Specific heat of vapor mixture film in J/kg K * ‘rho_m’: Specific mass of vapor mixture film in kg/m:sup:3 * ‘k_m’: Thermal conductivity of the vapor mixture film in W/m K. * ‘alpha_m’: Thermal diffusivity of the vapor mixture film in m:sup:2/s. * ‘d_12’: Binary species diffusivity of the vapor mixture film in m:sup:2/s

Parameters:
  • p (int or float) – Pressure in Pa.
  • t_e (int or float) – Dry bulb temperature of the environment in K.
  • t_s (int or float) – Dry bulb temperature of saturated vapor mixture in K.
  • t_dp (int or float) – Dew point temperature in K.
  • ref ({'Mills', 'Marrero', 'constant'}) – Reference for binary species diffusiity, see Notes.
  • rule ({'1/2', '1/3'}) – Rule for calculating the film_prop, see Notes.
Returns:

The film properties in the same units as inputs.

Return type:

dict(float)

Examples

Let’s get the film props as p = 101325, t = 290, t_dp = 280, t_s = 285, ref = ‘Mills’ and rule = ‘1/2’

>>> p = 101325
>>> t = 290
>>> t_dp = 280
>>> t_s = 285
>>> ref = 'Mills'
>>> rule = '1/2'
>>> film_props = est_mix_props(p, t, t_dp, t_s, ref, rule)
>>> film_props['c_pm']
1019.9627505486458
>>> film_props['rho_m']
1.2229936606324967
>>> film_props['k_m']
0.025446947707731902
>>> film_props['alpha_m']
2.040317009201964e-05
>>> film_props['d_12']
2.3955520502741308e-05

Change rule to ‘1/3’

>>> rule = '1/3'
>>> film_props = est_mix_props(p, t, t_dp, t_s, ref, rule)
>>> film_props['c_pm']
1020.7363637843752
>>> film_props['rho_m']
1.2262478476537964
>>> film_props['k_m']
0.025384761174818384
>>> film_props['alpha_m']
2.028355491502325e-05
>>> film_props['d_12']
2.3838525775468913e-05

Change ref to ‘Marrero’. Only film_props[‘d_12’] will update

>>> ref = 'Marrero'
>>> film_props = est_mix_props(p, t, t_dp, t_s, ref, rule)
>>> film_props['d_12']
2.3097223037856368e-05
Raises:
  • ValueError – If rule is not in {‘1/2’, ‘1/3’}.
  • ValueError – If ref is not in {‘Mills’, ‘Marrero’}

Notes

For more information regarding the choices for ref and rule see [1].

References

[1](1, 2, 3, 4, 5) Mills, A. F. and Coimbra, C. F. M., 2016 Mass Transfer: Third Edition, Temporal Publishing, LLC.
chamber.models.film.est_rho_m(p, t_e, t_dp, t_s, rule)[source]

Estimate specific mass of the vapor mixture film.

chamber.models.film.use_rule(e_value, s_value, rule)[source]

Calculate film state by applying the given rule.

This function returns the value of a film property given the e_value, s_value, and a rule.

Parameters:
  • e_value (int or float) – Value of the property at the e-state.
  • s_value (int or float) – Value of the property at the s-state.
  • rule ({'1/2', '1/3'}) – Rule for calculating the film_prop, see Notes.
Returns:

The film property in the same units as e_value and s_value.

Return type:

float

Examples

>>> e_temp = 300
>>> s_temp = 290
>>> rule = '1/2'
>>> use_rule(e_temp, s_temp, rule)
295.0
>>> rule = '1/3'
>>> use_rule(e_temp, s_temp, rule)
293.3333333333333
Raises:ValueError – If rule is not in {‘1/2’, ‘1/3’}.

Notes

For more information regarding the choices for rule see [1].

models.hardy module

Implementaion of Hardy equations for water vapor content in air.

chamber.models.hardy.A_COEFF_ICE

(float, float, float, float) – .. todo:: A_COEFF_ICE description.

chamber.models.hardy.A_COEFF_WATER

(float, float, float, float) – .. todo:: A_COEFF_WATER description.

chamber.models.hardy.B_COEFF_ICE

(float, float, float, float) – .. todo:: B_COEFF_ICE description.

chamber.models.hardy.B_COEFF_WATER

(float, float, float, float) – .. todo:: B_COEFF_WATER description.

chamber.models.hardy.G_COEFF

(float, float, float, float, float, float, float, float) – .. todo:: G_COEFF desctiption.

chamber.models.hardy.K_COEFF

(float, float, float, float, float, float) – .. todo:: K_COEFF desctiption.

Functions

  • get_p_sat – get the saturation vapor pressure.
chamber.models.hardy.get_p_sat(p_in, t_in)[source]

Get saturation vapor pressure.

Todo

get_p_sat documentation.

models.models module

Todo

Docstring.

class chamber.models.models.Spalding(m_l, p, t_e, t_dp, ref, rule)[source]

Bases: object

Init.

e_state

Persist e state.

Dictonary containing variables for the e-state, based on guess at surface temperature and experimental state.

Some keys include an ‘_g’ suffix to indicate that each value is based on t_s_guess.

m_1e h_e_g

exp_state

Dictonary of variables for the experimental state.

This should not be confused with the e-state which contains ‘m_1e’ and ‘h_e’ and requires a guess at the surface temperature.

‘p’ : Pressure in Pa of the experimental state. ‘t_e’ : Dry bulb temperature of the experimental state in K. ‘t_dp’ : Dew point temperature of the experimental in K.

film_guide

Persist information for the calculation of film props.

‘ref’ : Reference for binary species diffusiity. ‘rule’ : Rule for calculating the film properties

film_props

Persist film properties.

Dictionary containing variables for the vapor mixture film properties, based on guess at surface temperature.

Keys include an ‘_g’ suffix to indicate that each value is based on t_s_guess.

c_pm_g : Specific heat of vapor mixture film in J/kg K. rho_m_g : Specific mass of vapor mixture film in kg/m:math:^3 k_m_g : Thermal conductivity of the vapor mixture film in W/m K. alpha_m_g : Thermal diffusivity of the vapor mixture film in

m:math:^2/s.
d_12_g : Binary species diffusivity of the vapor mixture film in
m:math:^2/s
liq_props

Persist liquid properties.

Dictionary containing variables for the liquid properties, based on guess at surface temperature.

Keys include an ‘_g’ suffix to indicate that each value is based on t_s_guess.

c_pl_g : Specific heat of pure water in J/kg K.

s_state

Persist saturated state.

Dictonary containing variables for the s-state, based on guess at surface temperature.

Keys include an ‘_g’ suffix to indicate that each value is based on t_s_guess.

‘m_1s_g’ : Mass fraction of water vapor in the s-state (saturated vapor
mixture) in [0, 1].
‘h_s_g’ : Mixture enthalpy at the s-state (saturated vapor mixture) in
J/kg.
‘h_fgs_g’ : Specific enthalpy of vaporization for pure water at t_s in
J/kg.
solve_system(mdpp_g, q_cu_g, q_rs_g, m_1s_g)[source]

Iterate through guesses to solve Spalding model.

Itterate through guesses determined by a progressively decreasing step size to approach and find a solution to the Spalding model.

Parameters:
  • mdpp_g (float) – Initial guess for the mass flux in kg/s/m2.
  • q_cu_g (float) – Initial guess for the conductive heat flux in liquid at liquid-vapor interface in W/m2.
  • q_rs_g (float) – Initial guess for the radiative heat flux at the surface in W/m2.
  • m_1s_g (float) – Inital guess for the mass fraction of water vapor in the saturated vapor mixture in [0, 1].
Returns:

Series containing the results found by the solver.

Return type:

Series

Examples

l_s = 0.044 ref = ‘constant’ rule = ‘1/2’

# 1atm t_e=290K t_dp=289K p = 101325 t_e = 290 t_dp = 289 spald_1 = Spalding(l_s, p, t_e, t_dp, ref, rule) res, df = spald_1.solve_system(2e-7, 0.01, 0.1, 0.01)

t_s_guess

Guess at the surface temperature in K.

t_state

Persist t state.

Dictionary containing variables for the t-state, based on guess at surface temperature.

Keys include an ‘_g’ suffix to indicate that each value is based on t_s_guess.

h_t_g : Specific enthalpy of pure water at the ‘t-state’ in J/kg.

u_state

Persist u state.

Dictionary containing variables for the u-state, based on guess at surface temperature.

Keys include an ‘_g’ suffix to indicate that each value is based on t_s_guess.

h_u_g : Specific enthalpy of pure water at t_s in J/kg.

models.params module

Nondimensional parameters.

chamber.models.params.RADIUS

float – Inside radius of Stefan tube used in experiments

Functions

  • get_grashof – get the Grashof number for the vapor mixture.
  • get_prandtl – get the Prandtl number for the vapor mixture.
  • get_schmidt – get the Sherwood number for the vapor mixture.
  • get_sherwood – get the Sherwood number for the vapor mixture.
chamber.models.params.get_grashof(p, t, t_dp, t_s)[source]

Get the Grashof number for the vapor mixture.

This function uses the humid air property getter functions in props.py to calculate the Grashof number, the ratio of the buoyant force and the viscous force, of the vapor liquid mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t (int or float) – Dry bulb temperature in K.
  • t_dp (int or float) – Dew point temperature in K.
  • t_s (int or float) – Saturated liquid surface temperature in K.
Returns:

The Grashof number for the vapor mixture.

Return type:

float

Examples

>>> p = 101325
>>> t = 290
>>> t_dp = 280
>>> t_s = 289.5
>>> get_grashof(p, t, t_dp, t_s)
230.11072973650792
chamber.models.params.get_prandtl(p, t, t_dp)[source]

Get the Prandtl number for the vapor mixture.

This function uses the humid air property getter functions in props.py to calculate the Prandtl number, the ratio of momentum diffusivity and thermal diffusivity, of the vapor liquid mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t (int or float) – Dry bulb temperature in K.
  • t_dp (int or float) – Dew point temperature in K.
Returns:

The Prandtl number for the vapor mixture.

Return type:

float

Examples

>>> p = 101325
>>> t = 290
>>> t_dp = 280
>>> get_prandtl(p, t, t_dp)
0.7146248666414813
chamber.models.params.get_schmidt(p, t, t_dp, ref)[source]

Get the Schmidt number for the vapor mixture.

This function uses the humid air property getter functions in props.py to calculate the Schmidt number, the ratio of momentum diffusivity and mass diffusivity, of the vapor liquid mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t (int or float) – Dry bulb temperature in K.
  • t_dp (int or float) – Dew point temperature in K.
  • ref ({'Mills', 'Marrero', 'constant'}) – Reference for binary species diffusiity, see Notes.
Returns:

The schmidt number for the vapor mixture.

Return type:

float

Examples

>>> p = 101325
>>> t = 290
>>> t_dp = 280
>>> get_schmidt(p, t, t_dp, 'Mills')
0.6104149007992397

Notes

For more information regarding the choices for ref see Appendix of [1].

chamber.models.params.get_sherwood(l, m_dot_pp, p, t, t_dp, t_s, ref)[source]

Get the Sherwood number for the vapor mixture.

This function uses the humid air property getter functions in props.py to calculate the Sherwood number, the ratio of convective mass transfer and diffusive mass transport, of the vapor liquid mixture.

Parameters:
  • l (int or float) – The length of the stefan tube from the water surface in m.
  • m_dot_pp (int or float) – The evaporation flux in kg/s/m2.
  • p (int or float) – Pressure in Pa.
  • t (int or float) – Dry bulb temperature in K.
  • t_dp (int or float) – Dew point temperature in K.
  • t_s (int or float) – Saturated liquid surface temperature in K.
  • ref ({'Mills', 'Marrero', 'constant'}) – Reference for binary species diffusiity, see Notes.
Returns:

The Sherwood number for the vapor mixture.

Return type:

float

Examples

>>> l = 0.044
>>> m_dot_pp = 1.2e-6
>>> p = 101325
>>> t = 290
>>> t_dp = 280
>>> t_s = 289
>>> ref = 'constant'
>>> get_sherwood(l, m_dot_pp, p, t, t_dp, t_s, ref)
0.3540373651492251

Notes

For more information regarding the choices for ref see Appendix of [1].

models.props module

Thermophysical properties of water and humid air.

This module provides a convenient wrapper around specific funtionality of the CoolProp package. Specifically, the ability to calulate properties at a given state. A state in this case is defined as the combination of pressure p in Pa, dry bulb temperature t in K, and dew point t_dp in K.

chamber.models.props.M1

float – Molecular weight of H2O (species-1) in kg/kmol.

chamber.models.props.M2

float – Molecular weight of dry-air (species-2) in kg/kmol.

Functions

  • get_alpha_m – get the thermal diffusivity of the vapor mixture.
  • get_alpha_m_sat – get the thermal diffusivity of the saturated vapor mixture.
  • get_beta_m1 – get the mass transfer rate coefficient of the stefan tube system.
  • get_c_pl – get the specific heat of pure liquid water.
  • get_c_pm – get the specific heat of the vapor mixture.
  • get_c_pm_sat – get the specific heat of the saturated vapor mixture.
  • get_d_12 – get the binary species diffusivity of the vapor mixture.
  • get_gamma – get the coefficient of volumetric expansion of the vapor mixture.
  • get_h_fg_sat – get the specific enthalpy of vaporization for pure water.
  • get_k_m – get the thermal conductivity of the vapor mixture.
  • get_k_m_sat – get the thermal conductivity of the saturated vapor mixture.
  • get_m_1 – get the mass fraction of water vapor in the vapor mixture.
  • get_m_1_sat – get the mass fraction of water vapor in the saturated vapor mixture.
  • get_mol_wgt – get the molar mass of the vapor mixture.
  • get_mu – get the dynamic viscocity of the vapor mixture.
  • get_rh – get the relative humidity of the vapor liquid mixture.
  • get_rho_m – get the specific mass of the vapor mixture.
  • get_rho_m_sat – get the specific mass of the saturated vapor mixture.
  • get_tdp – get the dew point temperature of the vapor mixture.
  • get_x_1 – get the mole fraction of water vapor in mixture.
  • get_x_1_sat – get the mole fraction of water vapor in the saturated mixture.
  • x1_2_m1 – convert the mole fraction to mass fraction.
chamber.models.props.get_alpha_m(p, t, t_dp)[source]

Get the thermal diffusivity of the vapor mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t (int or float) – Dry bulb temperature in K.
  • t_dp (int or float) – Dew point temperature in K.
Returns:

The thermal diffusivity of the vapor mixture in m2/s.

Return type:

float

Examples

>>> p = 101325
>>> t = 290
>>> t_dp = 280
>>> get_alpha_m(p, t, t_dp)
2.076201562300882e-05
chamber.models.props.get_alpha_m_sat(p, t_s)[source]

Get the thermal diffusivity of the saturated vapor mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t_s (int or float) – Dry bulb temperature of saturated vapor mixture in K.
Returns:

The thermal diffusivity of the saturated vapor mixture in m2/s.

Return type:

float

Examples

>>> p = 101325
>>> t_s = 285
>>> get_alpha_m_sat(p, t_s)
2.0044324561030463e-05
chamber.models.props.get_beta_m1(p, t, t_dp, t_s)[source]

Get the mass transfer rate coefficient of the stefan tube system.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t (int or float) – Dry bulb temperature in K.
  • t_dp (int or float) – Dew point temperature in K.
  • t_s (int or float) – Saturated liquid surface temperature in K.
Returns:

The mass transfer rate coefficient.

Return type:

float

Examples

>>> p = 101325
>>> t = 290
>>> t_dp = 280
>>> t_s = 285
>>> get_beta_m1(p, t, t_dp, t_s)
0.002491563166729926
chamber.models.props.get_c_pl(t)[source]

Get the specific heat of pure liquid water.

Parameters:t (int or float) – Temperature of the liquid water (condensed phase) in K.
Returns:Specific heat of pure liquid water in J/kg K.
Return type:float

Examples

>>> t = 285
>>> get_c_pl(t)
4192.729295040042
chamber.models.props.get_c_pm(p, t, t_dp)[source]

Get the specific heat of th evapor mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t (int or float) – Dry bulb temperature in K.
  • t_dp (int or float) – Dew point temperature in K.
Returns:

The specific heat of the vapor mixture in J/kg K.

Return type:

float

Examples

>>> p = 101325
>>> t = 290
>>> t_dp = 280
>>> get_c_pm(p, t, t_dp)
1017.641910841458
chamber.models.props.get_c_pm_sat(p, t_s)[source]

Get the specific heat of the saturated vapor mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t_s (int or float) – Dry bulb temperature of saturated vapor mixture in K.
Returns:

The specific heat of the saturated vapor mixture in J/kg K.

Return type:

float

Examples

>>> p = 101325
>>> t_s = 285
>>> get_c_pm_sat(p, t_s)
1022.2835902558337
chamber.models.props.get_d_12(p, t, t_dp, ref)[source]

Get the binary species diffusivity of the vapor mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t (int or float) – Dry bulb temperature in K.
  • t_dp (int or float) – Dew point temperature in K.
  • ref ({'Mills', 'Marrero', 'constant'}) – Reference for binary species diffusiity, see Notes.
Returns:

The thermal diffusivity of the vapor mixture in m2/s.

Return type:

float

Examples

>>> p = 101325
>>> t = 290
>>> t_dp = 280
>>> ref = 'Mills'
>>> get_d_12(p, t, t_dp, ref)
2.4306504684558495e-05
>>> ref = 'Marrero'
>>> get_d_12(p, t, t_dp, ref)
2.365539793302829e-05
>>> ref = 'constant'
>>> get_d_12(p, t, t_dp, ref)
2.416458085635347e-05
Raises:ValueError – If ref is not in {‘Mills’, ‘Marrero’, ‘constant’}.

Notes

For more information regarding the choices for ref see Appendix of [1].

chamber.models.props.get_gamma(p, t, t_dp)[source]

Get the coefficient of volumetric expansion of the vapor mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t (int or float) – Dry bulb temperature in K.
  • t_dp (int or float) – Dew point temperature in K.
Returns:

The coefficient of volumetric expansion of the vapor mixture. in m:math:^-3

Return type:

float

Examples

>>> p = 101325
>>> t = 290
>>> t_dp = 280
>>> get_gamma(p, t, t_dp)
0.49602914637400736
chamber.models.props.get_h_fg_sat(t_s)[source]

Get the specific enthalpy of vaporization for pure water.

Parameters:t_s (int or float) – Dry bulb temperature of saturated vapor mixture in K.
Returns:Specific enthalpy of vaporization for pure water in J/kg.
Return type:float

Examples

>>> t_s = 285
>>> get_h_fg_sat(t_s)
2472806.6902607535
chamber.models.props.get_k_m(p, t, t_dp)[source]

Get the thermal conductivity of the vapor mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t (int or float) – Dry bulb temperature in K.
  • t_dp (int or float) – Dew point temperature in K.
Returns:

The thermal conductivity of the vapor mixture in W/m K.

Return type:

float

Examples

>>> p = 101325
>>> t = 290
>>> t_dp = 280
>>> get_k_m(p, t, t_dp)
0.02563350730647246
chamber.models.props.get_k_m_sat(p, t_s)[source]

Get the thermal conductivity of the saturated vapor mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t_s (int or float) – Dry bulb temperature of saturated vapor mixture in K.
Returns:

The thermal conductivity of the saturated vapor mixture in W/m K.

Return type:

float

Examples

>>> p = 101325
>>> t_s = 285
>>> get_k_m_sat(p, t_s)
0.025260388108991345
chamber.models.props.get_m_1(p, t, t_dp)[source]

Get the mass fraction of water vapor in the vapor mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t (int or float) – Dry bulb temperature in K.
  • t_dp (int or float) – Dew point temperature in K.
Returns:

Mass fraction of water vapor in the vapor mixture in [0, 1].

Return type:

float

Examples

>>> p = 101325
>>> t = 290
>>> t_dp = 280
>>> get_m_1(p, t, t_dp)
0.0061357476021502095
chamber.models.props.get_m_1_sat(p, t_s)[source]

Get the mass fraction of water vapor in the saturated vapor mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t_s (int or float) – Dry bulb temperature of saturated vapor mixture in K.
Returns:

Mass fraction of water vapor in the saturated vapor mixture in [0, 1].

Return type:

float

Examples

>>> p = 101325
>>> t_s = 285
>>> get_m_1_sat(p, t_s)
0.008605868703401028
chamber.models.props.get_mol_wgt(p, t, t_dp)[source]

Get the molar mass of the vapor mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t (int or float) – Dry bulb temperature in K.
  • t_dp (int or float) – Dew point temperature in K.
Returns:

The total molar mass of the vapor mixture in kg/mol.

Return type:

float

Examples

>>> p = 101325
>>> t = 290
>>> t_dp = 280
>>> get_mol_wgt(p, t, t_dp)
28.856390729921483
chamber.models.props.get_mu(p, t, t_dp)[source]

Get the dynamic viscocity of the vapor mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t (int or float) – Dry bulb temperature in K.
  • t_dp (int or float) – Dew point temperature in K.
Returns:

The viscocity of the vapor mixture in Pa*s.

Return type:

float

Examples

>>> p = 101325
>>> t = 290
>>> t_dp = 280
>>> get_mu(p, t, t_dp)
1.800077369582236e-05
chamber.models.props.get_rh(p, t, t_dp)[source]

Get the relative humidity of the vapor liquid mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t (int or float) – Dry bulb temperature in K.
  • t_dp (int or float) – Dew point temperature in K.
Returns:

Relative humidity in [0, 1].

Return type:

float

Examples

>>> p = 101325
>>> t = 290
>>> t_dp = 280
>>> get_rh(p, t, t_dp)
0.5165573311068835
chamber.models.props.get_rho_m(p, t, t_dp)[source]

Get the specific mass of the vapor mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t (int or float) – Dry bulb temperature in K.
  • t_dp (int or float) – Dew point temperature in K.
Returns:

The specific mass of the vapor mixture in kg/m3.

Return type:

float

Examples

>>> p = 101325
>>> t = 290
>>> t_dp = 280
>>> get_rho_m(p, t, t_dp)
1.213231099568598
chamber.models.props.get_rho_m_sat(p, t_s)[source]

Get the specific mass of the saturated vapor mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t_s (int or float) – Dry bulb temperature of saturated vapor mixture in K.
Returns:

The specific mass of the saturated vapor mixture in kg/m3.

Return type:

float

Examples

>>> p = 101325
>>> t_s = 285
>>> get_rho_m_sat(p, t_s)
1.2327562216963954
chamber.models.props.get_tdp(p, t, rh)[source]

Get the dew point temperature of the vapor mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t (int or float) – Dry bulb temperature in K.
  • rh (float.) – Relative humidity fraction between 0 and 1.
Returns:

The dew point temperature of the vapor mixture in K.

Return type:

float

Examples

>>> p = 101325
>>> t = 290
>>> rh = 0.5
>>> get_tdp(p, t, rh)
279.5268317988297
chamber.models.props.get_x_1(p, t, t_dp)[source]

Get the mole fraction of water vapor in mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t (int or float) – Dry bulb temperature in K.
  • t_dp (int or float) – Dew point temperature in K.
Returns:

The mole fraction of water vapor in the vapor mixture in [0, 1].

Return type:

float

Examples

>>> p = 101325
>>> t = 290
>>> t_dp = 280
>>> get_x_1(p, t, t_dp)
0.00982822815586041
chamber.models.props.get_x_1_sat(p, t_s)[source]

Get the mole fraction of water vapor in the saturated mixture.

Parameters:
  • p (int or float) – Pressure in Pa.
  • t_s (int or float) – Dry bulb temperature of saturated vapor mixture in K.
Returns:

The mole fraction of water vapor in the saturated vapor mixture in [0, 1].

Return type:

float

Examples

>>> p = 101325
>>> t_s = 285
>>> get_x_1_sat(p, t_s)
0.01376427605764327
chamber.models.props.x1_2_m1(x_1)[source]

Convert the mole fraction to mass fraction.

Parameters:x_1 (float) – Mole fraction of water vapor in [0, 1].
Returns:Relative humidity in [0, 1]
Return type:float

Examples

>>> x_1 = 0.01
>>> x1_2_m1(x_1)
0.006243391414375084