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

#include <sutherland_parsing.h>

Inheritance diagram for Antioch::SutherlandViscosity< CoeffType >:
Antioch::SpeciesViscosityBase< SutherlandViscosity< CoeffType >, CoeffType >

Public Member Functions

 SutherlandViscosity (const CoeffType mu_ref, const CoeffType T_ref)
 
 SutherlandViscosity (const std::vector< CoeffType > &coeffs)
 
 ~SutherlandViscosity ()
 
void reset_coeffs (const CoeffType mu_ref, const CoeffType T_ref)
 
StateType operator() (const StateType &T) const
 Evaluates viscosity at temperature T. More...
 
void extrapolate_max_temp (const StateType &Tmax)
 Extrapolate to input maximum temperature, given in [K]. More...
 
void reset_coeffs (const std::vector< CoeffType > &coeffs)
 Resets coefficients associated with the viscosity model. More...
 
void print (std::ostream &os=std::cout) const
 Formatted print, by default to std::cout. More...
 

Protected Member Functions

template<typename StateType >
 op_impl (StateType &T) const ANTIOCH_AUTOFUNC(StateType
 
template<typename StateType >
void extrapolate_max_temp_impl (const StateType &Tmax)
 No extrapolation needed. More...
 

Protected Attributes

CoeffType _mu_ref
 
CoeffType _T_ref
 

Private Member Functions

 SutherlandViscosity ()
 

Friends

class SpeciesViscosityBase< SutherlandViscosity< CoeffType >, CoeffType >
 Friend base class so we can make implementation protected. More...
 

Detailed Description

template<typename CoeffType = double>
class Antioch::SutherlandViscosity< CoeffType >

Definition at line 38 of file sutherland_parsing.h.

Constructor & Destructor Documentation

template<typename CoeffType >
Antioch::SutherlandViscosity< CoeffType >::SutherlandViscosity ( const CoeffType  mu_ref,
const CoeffType  T_ref 
)

Definition at line 94 of file sutherland_viscosity.h.

95  : SpeciesViscosityBase<SutherlandViscosity<CoeffType>,CoeffType>(),
96  _mu_ref(mu_ref), _T_ref(T_ref)
97  {
98  }
template<typename CoeffType >
Antioch::SutherlandViscosity< CoeffType >::SutherlandViscosity ( const std::vector< CoeffType > &  coeffs)

Definition at line 101 of file sutherland_viscosity.h.

References antioch_assert_equal_to.

103  : SpeciesViscosityBase<SutherlandViscosity<CoeffType>,CoeffType>(),
104  _mu_ref(-1), _T_ref(-1)
105 #else
106  : SpeciesViscosityBase<SutherlandViscosity<CoeffType>,CoeffType>(),
107  _mu_ref(coeffs[0]), _T_ref(coeffs[1])
108 #endif
109  {
110 #ifndef NDEBUG
111  antioch_assert_equal_to( coeffs.size(), 2 );
112  _mu_ref = coeffs[0];
113  _T_ref = coeffs[1];
114 #endif
115  }
#define antioch_assert_equal_to(expr1, expr2)
template<typename CoeffType = double>
Antioch::SutherlandViscosity< CoeffType >::~SutherlandViscosity ( )
inline

Definition at line 61 of file sutherland_viscosity.h.

61 {};
template<typename CoeffType = double>
Antioch::SutherlandViscosity< CoeffType >::SutherlandViscosity ( )
private

Member Function Documentation

void Antioch::SpeciesViscosityBase< SutherlandViscosity< CoeffType > , CoeffType >::extrapolate_max_temp ( const StateType &  Tmax)
inherited

Extrapolate to input maximum temperature, given in [K].

Some species viscosity models, e.g. KineticsTheoryViscosity, use interpolated quantities for a given temperature range. If the viscosity is to be evaluated outside that range, an error will occur. This method will reconstruct the interpolation table, but use a linear extrapolation from the max in the existing table to the input maximum temperature.

This method is only applicable to a subset of species viscosity models. Others will throw a runtime error.

template<typename CoeffType >
template<typename StateType >
void Antioch::SutherlandViscosity< CoeffType >::extrapolate_max_temp_impl ( const StateType &  Tmax)
inlineprotected

No extrapolation needed.

Implementation needed for the interface, but we just throw an error is this is called since it's not defined for SutherlandViscosity.

Definition at line 142 of file sutherland_viscosity.h.

References antioch_error_msg.

143  {
144  antioch_error_msg("Extrapolation not well defined for SutherlandViscosity!");
145  }
#define antioch_error_msg(errmsg)
template<typename CoeffType = double>
template<typename StateType >
Antioch::SutherlandViscosity< CoeffType >::op_impl ( StateType &  T) const
protected
StateType Antioch::SpeciesViscosityBase< SutherlandViscosity< CoeffType > , CoeffType >::operator() ( const StateType &  T) const
inherited

Evaluates viscosity at temperature T.

void Antioch::SpeciesViscosityBase< SutherlandViscosity< CoeffType > , CoeffType >::print ( std::ostream &  os = std::cout) const
inherited

Formatted print, by default to std::cout.

template<typename CoeffType >
void Antioch::SutherlandViscosity< CoeffType >::reset_coeffs ( const CoeffType  mu_ref,
const CoeffType  T_ref 
)
inline

Definition at line 125 of file sutherland_viscosity.h.

Referenced by tester(), and vectester().

126  {
127  _mu_ref = mu_ref;
128  _T_ref = T_ref;
129  }
void Antioch::SpeciesViscosityBase< SutherlandViscosity< CoeffType > , CoeffType >::reset_coeffs ( const std::vector< CoeffType > &  coeffs)
inherited

Resets coefficients associated with the viscosity model.

Friends And Related Function Documentation

template<typename CoeffType = double>
friend class SpeciesViscosityBase< SutherlandViscosity< CoeffType >, CoeffType >
friend

Friend base class so we can make implementation protected.

Definition at line 66 of file sutherland_viscosity.h.

Member Data Documentation

template<typename CoeffType = double>
CoeffType Antioch::SutherlandViscosity< CoeffType >::_mu_ref
protected

Definition at line 52 of file sutherland_viscosity.h.

template<typename CoeffType = double>
CoeffType Antioch::SutherlandViscosity< CoeffType >::_T_ref
protected

Definition at line 53 of file sutherland_viscosity.h.


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

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