antioch-0.4.0
List of all members | Public Member Functions | Protected Attributes
Antioch::MixtureAveragedTransportMixture< CoeffType > Class Template Reference

Mixture object for MixtureAveragedTransport model. More...

#include <mixture_averaged_transport_mixture.h>

Public Member Functions

 MixtureAveragedTransportMixture (const TransportMixture< CoeffType > &mixture)
 
 ~MixtureAveragedTransportMixture ()
 
CoeffType Mr_Ms_to_the_one_fourth (const unsigned int r, const unsigned int s) const
 

\[ \left(\frac{M_r}{M_s}\right)^{1/4} \]

More...
 
CoeffType denominator (const unsigned int r, const unsigned int s) const
 

\[ \sqrt{8\left( 1 + \frac{M_r}{M_s} \right)} \]

More...
 
const ChemicalMixture
< CoeffType > & 
chem_mixture () const
 chemical mixture, mostly for backward compatibility More...
 
const TransportMixture
< CoeffType > & 
transport_mixture () const
 transport mixture More...
 

Protected Attributes

const TransportMixture
< CoeffType > & 
_mixture
 
std::vector< std::vector
< CoeffType > > 
_Mr_Ms_to_the_one_fourth
 Cache for numerator term. More...
 
std::vector< std::vector
< CoeffType > > 
_denom
 Cache for denominator term. More...
 

Detailed Description

template<class CoeffType = double>
class Antioch::MixtureAveragedTransportMixture< CoeffType >

Mixture object for MixtureAveragedTransport model.

This object is meant to live for the life of the program and contains data that is reused by the MixtureAveragedTransportEvaluator object. In particular, there are two terms for species indices r and s:

\[ \left(\frac{M_r}{M_s}\right)^{1/4} \]

\[ \sqrt{8\left( 1 + \frac{M_r}{M_s} \right)} \]

These terms appear in the mixing formulae used in MixtureAveragedTransportEvaluator.

Definition at line 59 of file mixture_averaged_transport_mixture.h.

Constructor & Destructor Documentation

template<class CoeffType >
Antioch::MixtureAveragedTransportMixture< CoeffType >::MixtureAveragedTransportMixture ( const TransportMixture< CoeffType > &  mixture)

Definition at line 96 of file mixture_averaged_transport_mixture.h.

References Antioch::MixtureAveragedTransportMixture< CoeffType >::_denom, Antioch::MixtureAveragedTransportMixture< CoeffType >::_Mr_Ms_to_the_one_fourth, Antioch::TransportMixture< CoeffType >::chemical_mixture(), Antioch::TransportMixture< CoeffType >::n_species(), and std::pow().

97  : _mixture(mixture),
98  _Mr_Ms_to_the_one_fourth(mixture.n_species()),
99  _denom(mixture.n_species())
100  {
101  using std::pow;
102 
103  for( unsigned int r = 0; r < mixture.n_species(); r++ )
104  {
105  _Mr_Ms_to_the_one_fourth[r].resize(mixture.n_species());
106  _denom[r].resize(mixture.n_species());
107 
108  for( unsigned int s = 0; s < mixture.n_species(); s++ )
109  {
110  const CoeffType Mr = mixture.chemical_mixture().M(r);
111  const CoeffType Ms = mixture.chemical_mixture().M(s);
112 
113  _Mr_Ms_to_the_one_fourth[r][s] = pow( Mr/Ms, CoeffType(0.25) );
114  _denom[r][s] = std::sqrt(8.0*(1.0+Ms/Mr));
115  }
116  }
117  }
Antioch::enable_if_c< Antioch::is_valarray< T >::value, typename Antioch::state_type< T >::type >::type pow(const T &in, const T2 &n)
std::vector< std::vector< CoeffType > > _denom
Cache for denominator term.
std::vector< std::vector< CoeffType > > _Mr_Ms_to_the_one_fourth
Cache for numerator term.
template<class CoeffType = double>
Antioch::MixtureAveragedTransportMixture< CoeffType >::~MixtureAveragedTransportMixture ( )
inline

Definition at line 65 of file mixture_averaged_transport_mixture.h.

65 {};

Member Function Documentation

template<class CoeffType >
const ChemicalMixture< CoeffType > & Antioch::MixtureAveragedTransportMixture< CoeffType >::chem_mixture ( ) const
inline

chemical mixture, mostly for backward compatibility

Definition at line 138 of file mixture_averaged_transport_mixture.h.

139  {
140  return _mixture.chemical_mixture();
141  }
template<class CoeffType >
CoeffType Antioch::MixtureAveragedTransportMixture< CoeffType >::denominator ( const unsigned int  r,
const unsigned int  s 
) const
inline

\[ \sqrt{8\left( 1 + \frac{M_r}{M_s} \right)} \]

Definition at line 130 of file mixture_averaged_transport_mixture.h.

132  {
133  return _denom[r][s];
134  }
std::vector< std::vector< CoeffType > > _denom
Cache for denominator term.
template<class CoeffType >
CoeffType Antioch::MixtureAveragedTransportMixture< CoeffType >::Mr_Ms_to_the_one_fourth ( const unsigned int  r,
const unsigned int  s 
) const
inline

\[ \left(\frac{M_r}{M_s}\right)^{1/4} \]

Definition at line 121 of file mixture_averaged_transport_mixture.h.

123  {
124  return _Mr_Ms_to_the_one_fourth[r][s];
125  }
std::vector< std::vector< CoeffType > > _Mr_Ms_to_the_one_fourth
Cache for numerator term.
template<class CoeffType >
const TransportMixture< CoeffType > & Antioch::MixtureAveragedTransportMixture< CoeffType >::transport_mixture ( ) const
inline

transport mixture

Definition at line 145 of file mixture_averaged_transport_mixture.h.

146  {
147  return _mixture;
148  }

Member Data Documentation

template<class CoeffType = double>
std::vector<std::vector<CoeffType> > Antioch::MixtureAveragedTransportMixture< CoeffType >::_denom
protected

Cache for denominator term.

Todo:
We should use a more efficient data structure

Definition at line 91 of file mixture_averaged_transport_mixture.h.

Referenced by Antioch::MixtureAveragedTransportMixture< CoeffType >::MixtureAveragedTransportMixture().

template<class CoeffType = double>
const TransportMixture<CoeffType>& Antioch::MixtureAveragedTransportMixture< CoeffType >::_mixture
protected

Definition at line 83 of file mixture_averaged_transport_mixture.h.

template<class CoeffType = double>
std::vector<std::vector<CoeffType> > Antioch::MixtureAveragedTransportMixture< CoeffType >::_Mr_Ms_to_the_one_fourth
protected

Cache for numerator term.

Todo:
We should use a more efficient data structure

Definition at line 87 of file mixture_averaged_transport_mixture.h.

Referenced by Antioch::MixtureAveragedTransportMixture< CoeffType >::MixtureAveragedTransportMixture().


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

Generated on Thu Jul 7 2016 11:09:49 for antioch-0.4.0 by  doxygen 1.8.8