antioch-0.4.0
|
Compute transport properties using ``mixture averaged" model. More...
#include <mixture_averaged_transport_evaluator.h>
Public Types | |
enum | DiffusivityType { MOLE_FLUX_MOLE_FRACTION, MASS_FLUX_MASS_FRACTION, MASS_FLUX_MOLE_FRACTION } |
For the mixture averaged diffusion models, there are three typical ways of computing an average diffusivity, depending on the "units" of the flux and which variable with which the gradient is taken:
| |
Public Member Functions | |
MixtureAveragedTransportEvaluator (const MixtureAveragedTransportMixture< CoeffType > &mixture, const MixtureDiffusion< Diffusion, CoeffType > &diffusion, const MixtureViscosity< Viscosity, CoeffType > &viscosity, const MixtureConductivity< ThermalConductivity, CoeffType > &conductivity) | |
~MixtureAveragedTransportEvaluator () | |
template<typename StateType , typename VectorStateType > | |
void | D (const StateType &rho, const StateType &T, const VectorStateType &mass_fractions, VectorStateType &D_vec, DiffusivityType diff_type=DiffusivityType::MASS_FLUX_MOLE_FRACTION) const |
Mixture diffusivities for each species, in [m^2/s]. More... | |
template<typename StateType , typename VectorStateType > | |
value_type< VectorStateType >::type | mu (const StateType &T, const VectorStateType &mass_fractions) const |
Mixture viscosity, in [Pa-s]. More... | |
template<typename StateType , typename VectorStateType > | |
value_type< VectorStateType >::type | k (const StateType &T, const VectorStateType &mass_fractions) const |
Mixture conducivity, in [W/m-K]. More... | |
template<typename StateType , typename VectorStateType > | |
void | mu_and_k (const StateType &T, const VectorStateType &mass_fractions, StateType &mu, StateType &k) const |
Mixture viscosity and thermal conductivity, in [Pa-s], [W/m-K] respectively. More... | |
template<typename StateType , typename VectorStateType > | |
void | mu_and_k_and_D (const StateType &T, const StateType &rho, const StateType &cp, const VectorStateType &mass_fractions, StateType &mu, StateType &k, VectorStateType &D_vec, DiffusivityType diff_type=DiffusivityType::MASS_FLUX_MOLE_FRACTION) const |
Mixture viscosity, thermal conductivity, and diffusivities in [Pa-s], [W/m-K], [m^2/s] respectively. More... | |
template<typename StateType , typename VectorStateType > | |
void | compute_mu_chi (const StateType &T, const VectorStateType &mass_fractions, VectorStateType &mu, VectorStateType &chi) const |
Helper function to reduce code duplication. More... | |
template<typename VectorStateType > | |
value_type< VectorStateType >::type | compute_phi (typename rebind< VectorStateType, VectorStateType >::type &mu_mu_sqrt, const VectorStateType &chi, const unsigned int s) const |
Helper function to reduce code duplication. More... | |
template<typename VectorStateType > | |
void | compute_mu_mu_sqrt (const VectorStateType &mu, typename rebind< VectorStateType, VectorStateType >::type &mu_mu_sqrt) const |
Helper function to reduce code duplication. More... | |
template<typename StateType , typename VectorStateType > | |
value_type< VectorStateType >::type | mu (const StateType &T, const VectorStateType &mass_fractions) const |
template<typename StateType , typename VectorStateType > | |
value_type< VectorStateType >::type | k (const StateType &T, const VectorStateType &mass_fractions) const |
template<typename VectorStateType > | |
value_type< VectorStateType >::type | compute_phi (typename Antioch::rebind< VectorStateType, VectorStateType >::type &mu_mu_sqrt, const VectorStateType &chi, const unsigned int s) const |
Protected Member Functions | |
template<typename VectorStateType , typename MatrixStateType > | |
void | diffusion_mixing_rule (const ChemicalMixture< CoeffType > &mixture, const VectorStateType &mass_fractions, const MatrixStateType &D_mat, DiffusivityType diff_type, VectorStateType &D_vec) const |
Compute species diffusion coefficients. More... | |
Protected Attributes | |
const MixtureAveragedTransportMixture < CoeffType > & | _mixture |
const MixtureDiffusion < Diffusion, CoeffType > & | _diffusion |
const MixtureViscosity < Viscosity, CoeffType > & | _viscosity |
const MixtureConductivity < ThermalConductivity, CoeffType > & | _conductivity |
Private Member Functions | |
MixtureAveragedTransportEvaluator () | |
Compute transport properties using ``mixture averaged" model.
Use the species transport models (template parameters) to evaluate species values, then use Wilke's mixing rule to compute the mixture viscosity and thermal conductivity and the appropriate DiffusivityType for the mixture diffusivity. This is the expected interface for the user. Underlying compile time decisions are made based on the species transport models that should be invisible to the user. The preferred, most efficient, and most general method is mu_and_k_and_D for evaluating the transport quantities. The other methods are less efficient and may only be available for a subset of species model; they are present for backwards compatibility and pedagogical reasons.
In a multi-threaded computing environment, this object should be created after threads have been forked. In other words, this object is meant to live only temporarily for computing quantities.
Definition at line 66 of file mixture_averaged_transport_evaluator.h.
enum Antioch::MixtureAveragedTransportEvaluator::DiffusivityType |
For the mixture averaged diffusion models, there are three typical ways of computing an average diffusivity, depending on the "units" of the flux and which variable with which the gradient is taken:
Enumerator | |
---|---|
MOLE_FLUX_MOLE_FRACTION | |
MASS_FLUX_MASS_FRACTION | |
MASS_FLUX_MOLE_FRACTION |
Definition at line 86 of file mixture_averaged_transport_evaluator.h.
Antioch::MixtureAveragedTransportEvaluator< Diffusion, Viscosity, ThermalConductivity, CoeffType >::MixtureAveragedTransportEvaluator | ( | const MixtureAveragedTransportMixture< CoeffType > & | mixture, |
const MixtureDiffusion< Diffusion, CoeffType > & | diffusion, | ||
const MixtureViscosity< Viscosity, CoeffType > & | viscosity, | ||
const MixtureConductivity< ThermalConductivity, CoeffType > & | conductivity | ||
) |
|
inline |
Definition at line 75 of file mixture_averaged_transport_evaluator.h.
|
private |
void Antioch::MixtureAveragedTransportEvaluator< Diff, Visc, TherCond, CoeffType >::compute_mu_chi | ( | const StateType & | T, |
const VectorStateType & | mass_fractions, | ||
VectorStateType & | mu, | ||
VectorStateType & | chi | ||
) | const |
Helper function to reduce code duplication.
Populates species viscosities and the intermediate variable needed for Wilke's mixing rule. This is not intended for the user; only public to facilitate testing.
Definition at line 425 of file mixture_averaged_transport_evaluator.h.
Referenced by Antioch::WilkeEvaluator< MixtureViscosity, ThermalConductivity, CoeffType >::compute_mu_chi().
|
inline |
Helper function to reduce code duplication.
Computes the intermediate , matrix needed for Wilke's mixing rule. Not intended for the user; only public to facilitate testing.
first the diagonal
then the square roots and the inversion (first row, first column)
now the remaining n-2 matrix, using the fact that mu[i]/mu[j] = mu[i]/mu[0] * mu[0]/mu[j]
Definition at line 474 of file mixture_averaged_transport_evaluator.h.
References antioch_assert_equal_to, antioch_assert_greater, and Antioch::constant_clone().
Referenced by tester().
value_type<VectorStateType>::type Antioch::MixtureAveragedTransportEvaluator< Diffusion, Viscosity, ThermalConductivity, CoeffType >::compute_phi | ( | typename rebind< VectorStateType, VectorStateType >::type & | mu_mu_sqrt, |
const VectorStateType & | chi, | ||
const unsigned int | s | ||
) | const |
Helper function to reduce code duplication.
Computes the intermediate variable needed for Wilke's mixing rule. Not intended for the user; only public to facilitate testing.
Referenced by tester().
value_type<VectorStateType>::type Antioch::MixtureAveragedTransportEvaluator< Diffusion, Viscosity, ThermalConductivity, CoeffType >::compute_phi | ( | typename Antioch::rebind< VectorStateType, VectorStateType >::type & | mu_mu_sqrt, |
const VectorStateType & | chi, | ||
const unsigned int | s | ||
) | const |
Definition at line 447 of file mixture_averaged_transport_evaluator.h.
void Antioch::MixtureAveragedTransportEvaluator< Diff, Visc, TherCond, CoeffType >::D | ( | const StateType & | rho, |
const StateType & | T, | ||
const VectorStateType & | mass_fractions, | ||
VectorStateType & | D_vec, | ||
DiffusivityType | diff_type = DiffusivityType::MASS_FLUX_MOLE_FRACTION |
||
) | const |
Mixture diffusivities for each species, in [m^2/s].
Only valid for BinaryDiffusionBase species diffusion models. Compile time error if otherwise.
Definition at line 198 of file mixture_averaged_transport_evaluator.h.
References antioch_static_assert_runtime_fallback, and Antioch::init_constant().
Referenced by tester().
|
protected |
Compute species diffusion coefficients.
Uses Wilke mixing rule to compute species diffusion coefficients, D_vec, based on the given binary diffusion matrix, D_mat.
Definition at line 511 of file mixture_averaged_transport_evaluator.h.
References antioch_assert_equal_to, antioch_error_msg, Antioch::constant_clone(), Antioch::ChemicalMixture< CoeffType >::M(), Antioch::ChemicalMixture< CoeffType >::n_species(), and Antioch::zero_clone().
value_type<VectorStateType>::type Antioch::MixtureAveragedTransportEvaluator< Diffusion, Viscosity, ThermalConductivity, CoeffType >::k | ( | const StateType & | T, |
const VectorStateType & | mass_fractions | ||
) | const |
Mixture conducivity, in [W/m-K].
Only valid for "no diffusion" conductivity models. Compile time error if otherwise.
Referenced by Antioch::WilkeEvaluator< MixtureViscosity, ThermalConductivity, CoeffType >::k(), and tester().
value_type<VectorStateType>::type Antioch::MixtureAveragedTransportEvaluator< Diffusion, Viscosity, ThermalConductivity, CoeffType >::k | ( | const StateType & | T, |
const VectorStateType & | mass_fractions | ||
) | const |
Definition at line 254 of file mixture_averaged_transport_evaluator.h.
References antioch_assert_equal_to, antioch_static_assert_runtime_fallback, Antioch::init_constant(), and Antioch::zero_clone().
value_type<VectorStateType>::type Antioch::MixtureAveragedTransportEvaluator< Diffusion, Viscosity, ThermalConductivity, CoeffType >::mu | ( | const StateType & | T, |
const VectorStateType & | mass_fractions | ||
) | const |
Mixture viscosity, in [Pa-s].
Referenced by Antioch::WilkeEvaluator< MixtureViscosity, ThermalConductivity, CoeffType >::mu(), and tester().
|
inline |
Definition at line 225 of file mixture_averaged_transport_evaluator.h.
References Antioch::init_constant(), and Antioch::zero_clone().
void Antioch::MixtureAveragedTransportEvaluator< Diff, Visc, TherCond, CoeffType >::mu_and_k | ( | const StateType & | T, |
const VectorStateType & | mass_fractions, | ||
StateType & | mu, | ||
StateType & | k | ||
) | const |
Mixture viscosity and thermal conductivity, in [Pa-s], [W/m-K] respectively.
Only valid for "no diffusion" conductivity models. Compile time error if otherwise.
Definition at line 292 of file mixture_averaged_transport_evaluator.h.
References antioch_static_assert_runtime_fallback, Antioch::init_constant(), and Antioch::zero_clone().
Referenced by Antioch::WilkeEvaluator< MixtureViscosity, ThermalConductivity, CoeffType >::mu_and_k(), and tester().
void Antioch::MixtureAveragedTransportEvaluator< Diff, Visc, TherCond, CoeffType >::mu_and_k_and_D | ( | const StateType & | T, |
const StateType & | rho, | ||
const StateType & | cp, | ||
const VectorStateType & | mass_fractions, | ||
StateType & | mu, | ||
StateType & | k, | ||
VectorStateType & | D_vec, | ||
DiffusivityType | diff_type = DiffusivityType::MASS_FLUX_MOLE_FRACTION |
||
) | const |
Mixture viscosity, thermal conductivity, and diffusivities in [Pa-s], [W/m-K], [m^2/s] respectively.
This is the preferred, most efficient, and most general method.
Definition at line 330 of file mixture_averaged_transport_evaluator.h.
References antioch_static_assert_runtime_fallback, Antioch::init_constant(), and Antioch::zero_clone().
Referenced by tester().
|
protected |
Definition at line 175 of file mixture_averaged_transport_evaluator.h.
|
protected |
Definition at line 171 of file mixture_averaged_transport_evaluator.h.
|
protected |
Definition at line 169 of file mixture_averaged_transport_evaluator.h.
|
protected |
Definition at line 173 of file mixture_averaged_transport_evaluator.h.