doxygen update

This commit is contained in:
Harry Moffat 2008-12-29 17:48:50 +00:00
parent 1d4480db10
commit cf40d8b861

View file

@ -30,15 +30,38 @@ namespace Cantera {
//! The 3-parameter Troe falloff parameterization.
/*!
* This parameterization is
* defined by
* \f[ F = F_{cent}^{1/(1 + f_1^2)} \f]
* The falloff function defines the value of \f$ F \f$ in the following
* rate expression
*
* \f[
* k = k_{\infty} \left( \frac{P_r}{1 + P_r} \right) F
* \f]
* where
* \f[
* P_r = \frac{k_0 [M]}{k_{\infty}}
* \f]
*
* This parameterization is defined by
* \f[
* F = F_{cent}^{1/(1 + f_1^2)}
* \f]
* where
* \f[ F_{cent} = (1 - A)\exp(-T/T_3) + A \exp(-T/T_1) \f]
* \f[ f_1 = (\log_{10} P_r + C) / \left(N - 0.14
* (\log_{10} P_r + C)\right) \f]
* \f[ C = -0.4 - 0.67 \log_{10} F_{cent} \f]
* \f[ N = 0.75 - 1.27 \log_{10} F_{cent} \f]
* \f[
* F_{cent} = (1 - A)\exp(-T/T_3) + A \exp(-T/T_1)
* \f]
*
* \f[
* f_1 = (\log_{10} P_r + C) / \left(N - 0.14
* (\log_{10} P_r + C)\right)
* \f]
*
* \f[
* C = -0.4 - 0.67 \log_{10} F_{cent}
* \f]
*
* \f[
* N = 0.75 - 1.27 \log_{10} F_{cent}
* \f]
*
* There are a few requirements for the parameters
*
@ -53,10 +76,10 @@ namespace Cantera {
class Troe3 : public Falloff {
public:
/// Default constructor.
//! Default constructor.
Troe3() : m_a (0.0), m_rt3 (0.0), m_rt1 (0.0) {}
// Destructor. Does nothing.
//! Destructor. Does nothing.
virtual ~Troe3() {}
/**
@ -87,12 +110,26 @@ namespace Cantera {
}
}
//! Update the temperature parameters in the representation
/*!
* The workspace has a length of one
*
* @param T Temperature (Kelvin)
* @param work Vector of working space representing
* the temperature dependent part of the
* parameterization.
*/
virtual void updateTemp(doublereal T, workPtr work) const {
doublereal Fcent = (1.0 - m_a) * exp(- T * m_rt3 )
+ m_a * exp(- T * m_rt1 );
*work = log10( fmaxx( Fcent, SmallNumber ) );
}
//! Function that returns <I>F</I>
/*!
* @param pr Value of the reduced pressure for this reaction
* @param work Pointer to the previously saved work space
*/
virtual doublereal F(doublereal pr, const_workPtr work) const {
doublereal lpr,f1,lgf, cc, nn;
lpr = log10( fmaxx(pr,SmallNumber) );
@ -103,28 +140,66 @@ namespace Cantera {
return pow(10.0, lgf );
}
//! Utility function that returns the size of the workspace
virtual size_t workSize() { return 1; }
protected:
doublereal m_a, m_rt3, m_rt1;
//! parameter a in the 4-parameter Troe falloff function
/*!
* This is unitless
*/
doublereal m_a;
private:
//! parameter 1/T_3 in the 4-parameter Troe falloff function
/*!
* This has units of Kelvin-1
*/
doublereal m_rt3;
//! parameter 1/T_1 in the 4-parameter Troe falloff function
/*!
* This has units of Kelvin-1
*/
doublereal m_rt1;
};
//! The 4-parameter Troe falloff parameterization.
/*!
* The falloff function defines the value of \f$ F \f$ in the following
* rate expression
*
* \f[
* k = k_{\infty} \left( \frac{P_r}{1 + P_r} \right) F
* \f]
* where
* \f[
* P_r = \frac{k_0 [M]}{k_{\infty}}
* \f]
*
* This parameterization is defined by
*
* \f[ F = F_{cent}^{1/(1 + f_1^2)} \f]
* where
* \f[ F_{cent} = (1 - A)\exp(-T/T_3) + A \exp(-T/T_1) + \exp(-T_2/T) \f]
* \f[ f_1 = (\log_{10} P_r + C) / \left(N - 0.14
* (\log_{10} P_r + C)\right) \f]
* \f[ C = -0.4 - 0.67 \log_{10} F_{cent} \f]
* \f[ N = 0.75 - 1.27 \log_{10} F_{cent} \f]
* \f[
* F = F_{cent}^{1/(1 + f_1^2)}
* \f]
* where
* \f[
* F_{cent} = (1 - A)\exp(-T/T_3) + A \exp(-T/T_1) + \exp(-T_2/T)
* \f]
*
* \f[
* f_1 = (\log_{10} P_r + C) /
* \left(N - 0.14 (\log_{10} P_r + C)\right)
* \f]
*
* \f[
* C = -0.4 - 0.67 \log_{10} F_{cent}
* \f]
*
* \f[
* N = 0.75 - 1.27 \log_{10} F_{cent}
* \f]
*
*
* There are a few requirements for the parameters
@ -141,11 +216,19 @@ namespace Cantera {
*/
class Troe4 : public Falloff {
public:
//! Constructor
Troe4() : m_a (0.0), m_rt3 (0.0), m_rt1 (0.0),
m_t2 (0.0) {}
//! Destructor
virtual ~Troe4() {}
//! Initialization of the object
/*!
* @param c Vector of four doubles: The doubles are the parameters,
* a,, T_3, T_1, and T_2 of the SRI parameterization
*/
virtual void init(const vector_fp& c) {
m_a = c[0];
if (c[1] <= 0.0) {
@ -172,8 +255,15 @@ namespace Cantera {
m_t2 = c[3];
}
//! Update the temperature parameters in the representation
/*!
* The workspace has a length of one
*
* @param T Temperature (Kelvin)
* @param work Vector of working space representing
* the temperature dependent part of the
* parameterization.
*/
virtual void updateTemp(doublereal T, workPtr work) const {
doublereal Fcent = (1.0 - m_a) * exp(- T * m_rt3 )
+ m_a * exp(- T * m_rt1 )
@ -181,6 +271,11 @@ namespace Cantera {
*work = log10( fmaxx( Fcent, SmallNumber ) );
}
//! Function that returns <I>F</I>
/*!
* @param pr Value of the reduced pressure for this reaction
* @param work Pointer to the previously saved work space
*/
virtual doublereal F(doublereal pr, const_workPtr work) const {
doublereal lpr,f1,lgf, cc, nn;
lpr = log10( fmaxx(pr,SmallNumber) );
@ -191,21 +286,59 @@ namespace Cantera {
return pow(10.0, lgf );
}
//! Utility function that returns the size of the workspace
virtual size_t workSize() { return 1; }
protected:
doublereal m_a, m_rt3, m_rt1;
doublereal m_t2;
//! parameter a in the 4-parameter Troe falloff function
/*!
* This is unitless
*/
doublereal m_a;
private:
//! parameter 1/T_3 in the 4-parameter Troe falloff function
/*!
* This has units of Kelvin-1
*/
doublereal m_rt3;
//! parameter 1/T_1 in the 4-parameter Troe falloff function
/*!
* This has units of Kelvin-1
*/
doublereal m_rt1;
//! parameter T_2 in the 4-parameter Troe falloff function
/*!
* This has units of Kelvin
*/
doublereal m_t2;
};
/**
* The 3-parameter SRI falloff function.
//! The 3-parameter SRI falloff function for <I>F</I>
/*!
* The falloff function defines the value of \f$ F \f$ in the following
* rate expression
*
* \f[
* k = k_{\infty} \left( \frac{P_r}{1 + P_r} \right) F
* \f]
* where
* \f[
* P_r = \frac{k_0 [M]}{k_{\infty}}
* \f]
*
* m_c is required to greater than or equal to zero. If it is zero,
* \f[
* F = {\left( a \; exp(\frac{-b}{T}) + exp(\frac{-T}{c})\right)}^n
* \f]
* where
* \f[
* n = \frac{1.0}{1.0 + {\log_{10} P_r}^2}
* \f]
*
* \f$ c \f$ s required to greater than or equal to zero. If it is zero,
* then the corresponding term is set to zero.
*
* @ingroup falloffGroup
@ -214,21 +347,42 @@ namespace Cantera {
public:
//! Constructor
SRI3() {}
//! Destructor
virtual ~SRI3() {}
//! Initialization of the object
/*!
* @param c Vector of three doubles: The doubles are the parameters,
* a, b, and c of the SRI parameterization
*/
virtual void init(const vector_fp& c) {
m_a = c[0];
m_b = c[1];
m_c = c[2];
}
//! Update the temperature parameters in the representation
/*!
* The workspace has a length of one
*
* @param T Temperature (Kelvin)
* @param work Vector of working space representing
* the temperature dependent part of the
* parameterization.
*/
virtual void updateTemp(doublereal T, workPtr work) const {
*work = m_a * exp( - m_b / T);
if (m_c != 0.0) *work += exp( - T/m_c );
}
//! Function that returns <I>F</I>
/*!
* @param pr Value of the reduced pressure for this reaction
* @param work Pointer to the previously saved work space
*/
virtual doublereal F(doublereal pr, const_workPtr work) const {
doublereal lpr = log10( fmaxx(pr,SmallNumber) );
doublereal xx = 1.0/(1.0 + lpr*lpr);
@ -236,19 +390,55 @@ namespace Cantera {
return ff;
}
//! Utility function that returns the size of the workspace
virtual size_t workSize() { return 1; }
protected:
doublereal m_a, m_b, m_c;
private:
//! parameter a in the 3-parameter SRI falloff function
/*!
* This is unitless
*/
doublereal m_a;
//! parameter b in the 3-parameter SRI falloff function
/*!
* This has units of Kelvin
*/
doublereal m_b;
//! parameter c in the 3-parameter SRI falloff function
/*!
* This has units of Kelvin
*/
doublereal m_c;
};
/**
* The 5-parameter SRI falloff function.
//! The 5-parameter SRI falloff function.
/*!
* The falloff function defines the value of \f$ F \f$ in the following
* rate expression
*
* \f[
* k = k_{\infty} \left( \frac{P_r}{1 + P_r} \right) F
* \f]
* where
* \f[
* P_r = \frac{k_0 [M]}{k_{\infty}}
* \f]
*
* \f[
* F = {\left( a \; exp(\frac{-b}{T}) + exp(\frac{-T}{c})\right)}^n
* \; d \; exp(\frac{-e}{T})
* \f]
* where
* \f[
* n = \frac{1.0}{1.0 + {\log_{10} P_r}^2}
* \f]
*
* \f$ c \f$ s required to greater than or equal to zero. If it is zero,
* then the corresponding term is set to zero.
*
* m_c is required to greater than or equal to zero. If it is zero,
* then the corresponding term is set to zero.
@ -260,8 +450,18 @@ namespace Cantera {
class SRI5 : public Falloff {
public:
//! Constructor
SRI5() {}
//! Destructor
virtual ~SRI5() {}
//! Initialization of the object
/*!
* @param c Vector of five doubles: The doubles are the parameters,
* a, b, c, d, and e of the SRI parameterization
*/
virtual void init(const vector_fp& c) {
m_a = c[0];
m_b = c[1];
@ -270,32 +470,105 @@ namespace Cantera {
m_e = c[4];
}
//! Update the temperature parameters in the representation
/*!
* The workspace has a length of two
*
* @param T Temperature (Kelvin)
* @param work Vector of working space representing
* the temperature dependent part of the
* parameterization.
*/
virtual void updateTemp(doublereal T, workPtr work) const {
*work = m_a * exp( - m_b / T);
if (m_c != 0.0) *work += exp( - T/m_c );
work[1] = m_d * pow(T,m_e);
}
//! Function that returns <I>F</I>
/*!
* @param pr Value of the reduced pressure for this reaction
* @param work Pointer to the previously saved work space
*/
virtual doublereal F(doublereal pr, const_workPtr work) const {
doublereal lpr = log10( fmaxx(pr,SmallNumber) );
doublereal xx = 1.0/(1.0 + lpr*lpr);
return pow( *work, xx) * work[1];
}
//! Utility function that returns the size of the workspace
virtual size_t workSize() { return 2; }
protected:
doublereal m_a, m_b, m_c;
doublereal m_d, m_e;
//! parameter a in the 5-parameter SRI falloff function
/*!
* This is unitless
*/
doublereal m_a;
private:
//! parameter b in the 5-parameter SRI falloff function
/*!
* This has units of Kelvin
*/
doublereal m_b;
//! parameter c in the 5-parameter SRI falloff function
/*!
* This has units of Kelvin
*/
doublereal m_c;
//! parameter d in the 5-parameter SRI falloff function
/*!
* This is unitless
*/
doublereal m_d;
//! parameter d in the 5-parameter SRI falloff function
/*!
* This is unitless
*/
doublereal m_e;
};
//! Wang-Frenklach falloff function.
/*!
*
* The falloff function defines the value of \f$ F \f$ in the following
* rate expression
*
* \f[
* k = k_{\infty} \left( \frac{P_r}{1 + P_r} \right) F
* \f]
* where
* \f[
* P_r = \frac{k_0 [M]}{k_{\infty}}
* \f]
*
* \f[
* F = 10.0^{Flog}
* \f]
* where
* \f[
* Flog = \frac{\log_{10} F_{cent}}{\exp{(\frac{\log_{10} P_r - \alpha}{\sigma})^2}}
* \f]
* where
*
* \f[
* F_{cent} = (1 - A)\exp(-T/T_3) + A \exp(-T/T_1) + \exp(-T/T_2)
* \f]
*
* \f[
* \alpha = \alpha_0 + \alpha_1 T + \alpha_2 T^2
* \f]
*
* \f[
* \sigma = \sigma_0 + \sigma_1 T + \sigma_2 T^2
* \f]
*
*
* Reference: Wang, H., and
* Frenklach, M., Chem. Phys. Lett. vol. 205, 271 (1993).
@ -316,6 +589,9 @@ namespace Cantera {
//! Initialization routine
/*!
* @param c Vector of 10 doubles
* with the following ordering:
* a, T_1, T_2, T_3, alpha0, alpha1, alpha2
* sigma0, sigma1, sigma2
*/
virtual void init(const vector_fp& c) {
m_a = c[0];
@ -329,7 +605,16 @@ namespace Cantera {
m_sigma1 = c[8];
m_sigma2 = c[9];
}
//! Update the temperature parameters in the representation
/*!
* The workspace has a length of three
*
* @param T Temperature (Kelvin)
* @param work Vector of working space representing
* the temperature dependent part of the
* parameterization.
*/
virtual void updateTemp(doublereal T, workPtr work) const {
work[0] = m_alpha0 + (m_alpha1 + m_alpha2*T)*T; // alpha
work[1] = m_sigma0 + (m_sigma1 + m_sigma2*T)*T; // sigma
@ -338,6 +623,11 @@ namespace Cantera {
work[2] = log10(Fcent);
}
//! Function that returns <I>F</I>
/*!
* @param pr Value of the reduced pressure for this reaction
* @param work Pointer to the previously saved work space
*/
virtual doublereal F(doublereal pr, const_workPtr work) const {
doublereal lpr = log10( fmaxx(pr, SmallNumber) );
doublereal x = (lpr - work[0])/work[1];
@ -345,6 +635,7 @@ namespace Cantera {
return pow( 10.0, flog);
}
//! Utility function that returns the size of the workspace
virtual size_t workSize() { return 3; }
protected:
@ -413,7 +704,16 @@ namespace Cantera {
};
// Factory routine that returns a new Falloff parameterization object
/*
* @param type Integer type of the falloff parameterization. These
* integers are listed in reaction_defs.h
*
* @param c Vector of input parameterizations for the Falloff
* object. The function is initialized with this vector.
*
* @return Returns a pointer to a newly malloced Falloff object
*/
Falloff* FalloffFactory::newFalloff(int type, const vector_fp& c) {
Falloff* f;
switch(type) {