antioch-0.4.0
|
Container class for species binary diffusion models. More...
#include <mixture_diffusion.h>
Public Member Functions | |
MixtureDiffusion (const TransportMixture< CoeffType > &transport_mixture) | |
virtual | ~MixtureDiffusion () |
template<typename StateType , typename MatrixStateType > | |
void | compute_binary_diffusion_matrix (const StateType &T, const StateType &molar_density, MatrixStateType &D) const |
Computes the binary diffusion matrix. More... | |
template<typename StateType > | |
void | compute_species_diffusivity (unsigned int s, const StateType &rho, const StateType &cp, const StateType &k, StateType &D) const |
Computes species diffusivity for species s. More... | |
void | add_species_diffusion (unsigned int s, const std::vector< CoeffType > &coeffs) |
Add species diffusion model for species s. More... | |
template<typename StateType > | |
void | extrapolate_max_temp (const StateType &Tmax) |
Extrapolate to input maximum temperature, given in [K]. More... | |
const ChemicalMixture < CoeffType > & | chemical_mixture () const |
const TransportMixture < CoeffType > & | transport_mixture () const |
const TransportMixture < CoeffType > & | mixture () const |
Protected Attributes | |
std::vector < SpeciesDiffusionBase < Diffusion, CoeffType > * > | _species_diffusivities |
Stores species diffusivity models. More... | |
std::vector< std::vector < BinaryDiffusionBase < Diffusion, CoeffType > * > > | _binary_diffusivities |
Stores binary diffusion model for all species pairs. More... | |
const TransportMixture < CoeffType > & | _transport_mixture |
Private Member Functions | |
void | private_init_impl (AntiochPrivate::diffusion_tag< SpeciesDiffusionBase< Diffusion, CoeffType > > &) |
Initialize species diffusion models. More... | |
void | private_init_impl (AntiochPrivate::diffusion_tag< BinaryDiffusionBase< Diffusion, CoeffType > > &) |
Initialize binary diffusion models. More... | |
template<typename StateType , typename MatrixStateType > | |
void | private_diff_matrix_impl (const StateType &T, const StateType &molar_density, MatrixStateType &D, AntiochPrivate::diffusion_tag< BinaryDiffusionBase< Diffusion, CoeffType > > &) const |
Compute binary diffusion matrix. More... | |
template<typename StateType , typename MatrixStateType > | |
void | private_diff_matrix_impl (const StateType &, const StateType &, MatrixStateType &, AntiochPrivate::diffusion_tag< SpeciesDiffusionBase< Diffusion, CoeffType > > &) const |
Invalid to call binary diffusion matrix with SpeciesDiffusionBase model. More... | |
template<typename StateType > | |
void | private_species_diff_impl (unsigned int s, const StateType &rho, const StateType &cp, const StateType &k, StateType &D, AntiochPrivate::diffusion_tag< SpeciesDiffusionBase< Diffusion, CoeffType > > &) const |
Compute species diffusivities. More... | |
template<typename StateType > | |
void | private_species_diff_impl (unsigned int, const StateType &, const StateType &, const StateType &, StateType &, AntiochPrivate::diffusion_tag< BinaryDiffusionBase< Diffusion, CoeffType > > &) const |
Invalid to call species diffusivity calculation with BinaryDiffusionBase model. More... | |
MixtureDiffusion () | |
Container class for species binary diffusion models.
For the given set of chemical species in the input TransportMixture, this contains the diffusion models for each of those species and provides an interface for computing the species diffusion coefficients/binary diffusion matrix, depending on the Diffusion model template parameter. Total/mixture diffusion coefficients are computed by a mixing model, e.g. MixtureAveragedTransportEvaluator. This class is templated on the diffusion model, so an inherent assumption is that all species diffusions have the same model.
This is intended to only be used through a mixing model, e.g. MixtureAveragedTransportEvaluator.
This class supports interfaces to multiple types of species diffusion models. As such, we use "tagging" mechanisms to defer to the correct, private, implemenation for various functions.
Definition at line 55 of file mixture_diffusion.h.
Antioch::MixtureDiffusion< Diffusion, CoeffType >::MixtureDiffusion | ( | const TransportMixture< CoeffType > & | transport_mixture | ) |
Definition at line 210 of file mixture_diffusion.h.
References antioch_error_msg, antioch_static_assert, and Antioch::MixtureDiffusion< Diffusion, CoeffType >::private_init_impl().
|
virtual |
Definition at line 235 of file mixture_diffusion.h.
|
private |
void Antioch::MixtureDiffusion< Diffusion, CoeffType >::add_species_diffusion | ( | unsigned int | s, |
const std::vector< CoeffType > & | coeffs | ||
) |
Add species diffusion model for species s.
Definition at line 314 of file mixture_diffusion.h.
References antioch_assert_less, and antioch_static_assert_runtime_fallback.
|
inlineinherited |
Definition at line 68 of file mixture_transport_base.h.
|
inline |
Computes the binary diffusion matrix.
Should only be called when using a binary diffusion model.
Definition at line 259 of file mixture_diffusion.h.
References antioch_assert_equal_to, and antioch_assert_greater.
|
inline |
Computes species diffusivity for species s.
Definition at line 280 of file mixture_diffusion.h.
References antioch_assert, and antioch_assert_less.
|
inline |
Extrapolate to input maximum temperature, given in [K].
For certain species diffusion models, interpolation of various quantities may be done based on the temperature. This method will use linear extrapolation to extend the range of temperature for all the species diffusion models.
This method is currently only valid for BinaryDiffusionBase subclasses. A static_assert will be throw if the user tries to instantiate a call to this method with a SpeciesDiffusionBase sublass (or runtime error if the compiler does not support static_assert).
Definition at line 297 of file mixture_diffusion.h.
References antioch_static_assert_runtime_fallback.
|
inlineinherited |
Definition at line 82 of file mixture_transport_base.h.
|
inlineprivate |
Compute binary diffusion matrix.
BinaryDiffusionBase models should've subclassed diffusion_tag so that they call this method.
Definition at line 154 of file mixture_diffusion.h.
|
inlineprivate |
Invalid to call binary diffusion matrix with SpeciesDiffusionBase model.
Definition at line 172 of file mixture_diffusion.h.
|
inlineprivate |
Initialize species diffusion models.
SpeciesDiffusionBase models should've subclassed diffusion_tag so that they call this method.
Definition at line 120 of file mixture_diffusion.h.
Referenced by Antioch::MixtureDiffusion< Diffusion, CoeffType >::MixtureDiffusion().
|
inlineprivate |
Initialize binary diffusion models.
BinaryDiffusionBase models should've subclassed diffusion_tag so that they call this method.
Definition at line 130 of file mixture_diffusion.h.
|
inlineprivate |
Compute species diffusivities.
SpeciesDiffusionBase models should've subclassed diffusion_tag so that they call this method.
Definition at line 183 of file mixture_diffusion.h.
|
inlineprivate |
Invalid to call species diffusivity calculation with BinaryDiffusionBase model.
Definition at line 195 of file mixture_diffusion.h.
|
inlineinherited |
Definition at line 75 of file mixture_transport_base.h.
|
protected |
Stores binary diffusion model for all species pairs.
This only gets built if Diffusion is a binary diffusion model.
Definition at line 114 of file mixture_diffusion.h.
|
protected |
Stores species diffusivity models.
This only gets built if Diffusion is a species diffusion model. Actually populating this is done in a separate function that calls the add_species_diffusivity method in this class since it depends on user-prescribed coefficients. However, if Diffusion is of species type, then the constructor will allocate space to add species diffusivities later.
Definition at line 106 of file mixture_diffusion.h.
|
protectedinherited |
Definition at line 53 of file mixture_transport_base.h.
Referenced by Antioch::MixtureDiffusion< Antioch::ConstantLewisDiffusivity< CoeffType >, CoeffType >::private_init_impl().