ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
MaterialPropertiesCore Struct Reference

#include <ERF_MaterialProperties.H>

Inheritance diagram for MaterialPropertiesCore:
Collaboration diagram for MaterialPropertiesCore:

Public Member Functions

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real molarHeatCapacity (const amrex::Real a_T) const
 Return the molar heat capacity. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real surfaceTension (const amrex::Real a_T) const
 Compute the surface tension coeff given temperature. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real coeffCurv (const amrex::Real a_T) const
 Return the coeff of curvature given the temperature. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real coeffVPSolute () const
 Return the vapour pressure coefficient. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real coeffMolecularDiffusion (const amrex::Real a_T, const amrex::Real a_P) const
 Return the molecular diffusion coefficient given temperature and pressure. More...
 

Public Attributes

amrex::Real m_density = DBL_MAX
 
amrex::Real m_ionization = DBL_MAX
 
amrex::Real m_mol_weight = DBL_MAX
 
amrex::Real m_lat_vap = DBL_MAX
 
amrex::Real m_Rv = DBL_MAX
 
amrex::Real m_Tc = DBL_MAX
 
amrex::Real m_Tb = DBL_MAX
 
amrex::Real m_Nav_by_molweight = DBL_MAX
 
amrex::Real m_mol_Cp_coeffs [7]
 
bool m_is_soluble = false
 
bool m_is_water = false
 

Static Public Attributes

static constexpr amrex::Real s_N_av = 6.02214076e23
 
static constexpr amrex::Real s_kb = 1.380649e-23
 
static constexpr amrex::Real s_mol_weight_air = 0.0289647
 
static constexpr amrex::Real s_sigma_air = 3.62e-10
 
static constexpr amrex::Real s_eps_air_k = 97
 

Member Function Documentation

◆ coeffCurv()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real MaterialPropertiesCore::coeffCurv ( const amrex::Real  a_T) const
inline

Return the coeff of curvature given the temperature.

108  {
109  auto surf_tens = surfaceTension(a_T);
110  auto retval = 2 * surf_tens / (m_Rv * m_density);
111  return retval;
112  }
amrex::Real m_Rv
Definition: ERF_MaterialProperties.H:63
amrex::Real m_density
Definition: ERF_MaterialProperties.H:59
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real surfaceTension(const amrex::Real a_T) const
Compute the surface tension coeff given temperature.
Definition: ERF_MaterialProperties.H:93
Here is the call graph for this function:

◆ coeffMolecularDiffusion()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real MaterialPropertiesCore::coeffMolecularDiffusion ( const amrex::Real  a_T,
const amrex::Real  a_P 
) const
inline

Return the molecular diffusion coefficient given temperature and pressure.

128  {
129  if (m_is_water) {
130 
131  return diffelq; // from ERF_Constants.H (2.21e-05 [m^2 s^{-1}])
132 
133  } else {
134 
135  auto mol_weight_v = s_N_av/m_Nav_by_molweight;
136  auto sigma = 1.18e-8 * std::cbrt(mol_weight_v/m_density);
137  auto sigma_v_air = 0.5 * (sigma + s_sigma_air);
138 
139  auto eps_v = 1.15 * m_Tb * s_kb;
140  auto eps_v_air = std::sqrt( eps_v * s_eps_air_k * s_kb);
141  auto T_star = a_T / (eps_v_air/s_kb);
142 
143  auto omegaD = 1.06036 / std::pow(T_star, 0.1561)
144  + 0.193 / std::exp(0.47635*T_star)
145  + 1.03587 / std::exp(1.52996*T_star)
146  + 1.76474 / std::exp(3.89411*T_star);
147 
148  auto term1 = 3 * std::sqrt( s_kb*a_T * s_kb*a_T * s_kb*a_T);
149  auto term2 = 8.0 * std::sqrt(2*PI) * a_P * sigma_v_air*sigma_v_air * omegaD;
150  auto term3 = std::sqrt( m_Nav_by_molweight + s_N_av/s_mol_weight_air );
151 
152  auto retval = term1*term3/term2;
153  return retval;
154  }
155  }
constexpr amrex::Real diffelq
Definition: ERF_Constants.H:73
constexpr amrex::Real PI
Definition: ERF_Constants.H:6
amrex::Real sigma
Definition: ERF_InitCustomPert_IsentropicVortex.H:11
bool m_is_water
Definition: ERF_MaterialProperties.H:76
static constexpr amrex::Real s_sigma_air
Definition: ERF_MaterialProperties.H:55
static constexpr amrex::Real s_mol_weight_air
Definition: ERF_MaterialProperties.H:53
static constexpr amrex::Real s_kb
Definition: ERF_MaterialProperties.H:50
static constexpr amrex::Real s_eps_air_k
Definition: ERF_MaterialProperties.H:57
amrex::Real m_Nav_by_molweight
Definition: ERF_MaterialProperties.H:66
amrex::Real m_Tb
Definition: ERF_MaterialProperties.H:65
static constexpr amrex::Real s_N_av
Definition: ERF_MaterialProperties.H:49

◆ coeffVPSolute()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real MaterialPropertiesCore::coeffVPSolute ( ) const
inline

Return the vapour pressure coefficient.

117  {
118  auto retval = (0.75/PI)*(m_mol_weight/m_density);
119  if (m_is_water) {
120  retval = 4.3e-06;
121  }
122  return retval;
123  }
amrex::Real m_mol_weight
Definition: ERF_MaterialProperties.H:61

◆ molarHeatCapacity()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real MaterialPropertiesCore::molarHeatCapacity ( const amrex::Real  a_T) const
inline

Return the molar heat capacity.

81  {
82  auto retval = 0.0;
83  auto term = 1.0;
84  for (auto i = 0; i < 7; i++) {
85  retval += (m_mol_Cp_coeffs[i] * term);
86  term *= a_T;
87  }
88  return retval;
89  }
amrex::Real m_mol_Cp_coeffs[7]
Definition: ERF_MaterialProperties.H:68

Referenced by surfaceTension().

Here is the caller graph for this function:

◆ surfaceTension()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real MaterialPropertiesCore::surfaceTension ( const amrex::Real  a_T) const
inline

Compute the surface tension coeff given temperature.

94  {
95  if (m_is_water) {
96  return amrex::Real(0.076148325); // N m^{-1}
97  } else {
98  auto term1 = 6.0 * std::cbrt(s_N_av);
99  auto term2 = std::cbrt((m_density/m_mol_weight)*(m_density/m_mol_weight));
100  auto retval = molarHeatCapacity(a_T)*(term2/term1)*(m_Tc - a_T);
101  return retval;
102  }
103  }
amrex::Real Real
Definition: ERF_ShocInterface.H:19
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real molarHeatCapacity(const amrex::Real a_T) const
Return the molar heat capacity.
Definition: ERF_MaterialProperties.H:80
amrex::Real m_Tc
Definition: ERF_MaterialProperties.H:64

Referenced by coeffCurv().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_density

◆ m_ionization

amrex::Real MaterialPropertiesCore::m_ionization = DBL_MAX

◆ m_is_soluble

bool MaterialPropertiesCore::m_is_soluble = false

is soluble in water?

Referenced by MaterialProperties::MaterialProperties().

◆ m_is_water

bool MaterialPropertiesCore::m_is_water = false

◆ m_lat_vap

amrex::Real MaterialPropertiesCore::m_lat_vap = DBL_MAX

latent heat of vaporization

Referenced by MaterialProperties::MaterialProperties(), and MaterialProperties::print().

◆ m_mol_Cp_coeffs

amrex::Real MaterialPropertiesCore::m_mol_Cp_coeffs[7]
Initial value:
= { amrex::Real(DBL_MAX),
amrex::Real(DBL_MAX),
amrex::Real(DBL_MAX),
amrex::Real(DBL_MAX),
amrex::Real(DBL_MAX),
amrex::Real(DBL_MAX),
amrex::Real(DBL_MAX) }

vector of molar heat capacity polynomial coeffs

Referenced by MaterialProperties::MaterialProperties(), molarHeatCapacity(), and MaterialProperties::print().

◆ m_mol_weight

amrex::Real MaterialPropertiesCore::m_mol_weight = DBL_MAX

◆ m_Nav_by_molweight

amrex::Real MaterialPropertiesCore::m_Nav_by_molweight = DBL_MAX

Avogadro number by vapour mol. weight

Referenced by coeffMolecularDiffusion(), MaterialProperties::MaterialProperties(), and MaterialProperties::print().

◆ m_Rv

amrex::Real MaterialPropertiesCore::m_Rv = DBL_MAX

gas constant for vapour of this material

Referenced by coeffCurv(), MaterialProperties::MaterialProperties(), and MaterialProperties::print().

◆ m_Tb

amrex::Real MaterialPropertiesCore::m_Tb = DBL_MAX

◆ m_Tc

amrex::Real MaterialPropertiesCore::m_Tc = DBL_MAX

critical temperature for surface tension

Referenced by MaterialProperties::MaterialProperties(), MaterialProperties::print(), and surfaceTension().

◆ s_eps_air_k

constexpr amrex::Real MaterialPropertiesCore::s_eps_air_k = 97
staticconstexpr

Temperature parameter for air [K]

Referenced by coeffMolecularDiffusion().

◆ s_kb

constexpr amrex::Real MaterialPropertiesCore::s_kb = 1.380649e-23
staticconstexpr

Boltzmann constant [J K^{-1}]

Referenced by coeffMolecularDiffusion().

◆ s_mol_weight_air

constexpr amrex::Real MaterialPropertiesCore::s_mol_weight_air = 0.0289647
staticconstexpr

Molecular weight of air [kg mol^{-1}]

Referenced by coeffMolecularDiffusion().

◆ s_N_av

constexpr amrex::Real MaterialPropertiesCore::s_N_av = 6.02214076e23
staticconstexpr

Avogadro's number

Referenced by coeffMolecularDiffusion(), and surfaceTension().

◆ s_sigma_air

constexpr amrex::Real MaterialPropertiesCore::s_sigma_air = 3.62e-10
staticconstexpr

Molecular length scale of air [m]

Referenced by coeffMolecularDiffusion().


The documentation for this struct was generated from the following file: