Doxygen update
Beat down a few warnings from doxygen Moved some definitions from .h files to .cpp files. There is no change in functionality in this update
This commit is contained in:
parent
ebcdbf3fa1
commit
7b4aeeb429
5 changed files with 241 additions and 158 deletions
|
|
@ -36,7 +36,8 @@ CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG) $(DEBUG_FLAG)
|
|||
# Base Transport Object Files
|
||||
TRAN_OBJ = TransportFactory.o MultiTransport.o MixTransport.o MMCollisionInt.o \
|
||||
SolidTransport.o DustyGasTransport.o TransportBase.o WaterTransport.o \
|
||||
SimpleTransport.o LiquidTransportData.o LiquidTransportParams.o LiquidTranInteraction.o
|
||||
SimpleTransport.o LiquidTransportData.o LiquidTransportParams.o LiquidTranInteraction.o \
|
||||
TransportParams.o
|
||||
|
||||
TRAN_H = TransportFactory.h MultiTransport.h MixTransport.h \
|
||||
MMCollisionInt.h SolidTransport.h DustyGasTransport.h \
|
||||
|
|
|
|||
|
|
@ -298,44 +298,27 @@ namespace Cantera {
|
|||
single transport property as a function of temperature
|
||||
and possibly composition.
|
||||
*/
|
||||
LTPspecies* TransportFactory::newLTP( const XML_Node &trNode,
|
||||
std::string &name,
|
||||
TransportPropertyList tp_ind,
|
||||
thermo_t* thermo) {
|
||||
LTPspecies* TransportFactory::newLTP(const XML_Node &trNode, std::string &name,
|
||||
TransportPropertyList tp_ind, thermo_t* thermo)
|
||||
{
|
||||
LTPspecies* ltps = 0;
|
||||
|
||||
std::string model = lowercase(trNode["model"]);
|
||||
switch ( m_LTRmodelMap[model] ) {
|
||||
switch (m_LTRmodelMap[model]) {
|
||||
case LTR_MODEL_CONSTANT:
|
||||
ltps = new LTPspecies_Const( trNode,
|
||||
name,
|
||||
tp_ind,
|
||||
thermo );
|
||||
ltps = new LTPspecies_Const(trNode, name, tp_ind, thermo);
|
||||
break;
|
||||
case LTR_MODEL_ARRHENIUS:
|
||||
ltps = new LTPspecies_Arrhenius( trNode,
|
||||
name,
|
||||
tp_ind,
|
||||
thermo );
|
||||
ltps = new LTPspecies_Arrhenius(trNode, name, tp_ind, thermo);
|
||||
break;
|
||||
case LTR_MODEL_POLY:
|
||||
ltps = new LTPspecies_Poly( trNode,
|
||||
name,
|
||||
tp_ind,
|
||||
thermo );
|
||||
ltps = new LTPspecies_Poly(trNode, name, tp_ind, thermo);
|
||||
break;
|
||||
case LTR_MODEL_EXPT:
|
||||
ltps = new LTPspecies_ExpT( trNode,
|
||||
name,
|
||||
tp_ind,
|
||||
thermo );
|
||||
ltps = new LTPspecies_ExpT(trNode, name, tp_ind, thermo);
|
||||
break;
|
||||
default:
|
||||
throw CanteraError("newLTP","unknown transport model: " + model );
|
||||
ltps = new LTPspecies( trNode,
|
||||
name,
|
||||
tp_ind,
|
||||
thermo );
|
||||
throw CanteraError("newLTP","unknown transport model: " + model);
|
||||
ltps = new LTPspecies(trNode, name, tp_ind, thermo);
|
||||
}
|
||||
return ltps;
|
||||
}
|
||||
|
|
@ -1549,5 +1532,53 @@ namespace Cantera {
|
|||
}
|
||||
#endif
|
||||
}
|
||||
//====================================================================================================================
|
||||
// Create a new transport manager instance.
|
||||
/*
|
||||
* @param transportModel String identifying the transport model to be instantiated, defaults to the empty string
|
||||
* @param thermo ThermoPhase object associated with the phase, defaults to null pointer
|
||||
* @param loglevel int containing the Loglevel, defaults to zero
|
||||
* @param f ptr to the TransportFactory object if it's been malloced.
|
||||
*
|
||||
* @ingroup transportProps
|
||||
*/
|
||||
Transport* newTransportMgr(std::string transportModel, thermo_t* thermo, int loglevel, TransportFactory* f)
|
||||
{
|
||||
if (f == 0) {
|
||||
f = TransportFactory::factory();
|
||||
}
|
||||
Transport* ptr = f->newTransport(transportModel, thermo, loglevel);
|
||||
/*
|
||||
* Note: We delete the static s_factory instance here, instead of in
|
||||
* appdelete() in misc.cpp, to avoid linking problems involving
|
||||
* the need for multiple cantera and transport library statements
|
||||
* for applications that don't have transport in them.
|
||||
*/
|
||||
return ptr;
|
||||
}
|
||||
//====================================================================================================================
|
||||
// Create a new transport manager instance.
|
||||
/*
|
||||
* @param thermo ThermoPhase object associated with the phase, defaults to null pointer
|
||||
* @param loglevel int containing the Loglevel, defaults to zero
|
||||
* @param f ptr to the TransportFactory object if it's been malloced.
|
||||
*
|
||||
* @ingroup transportProps
|
||||
*/
|
||||
Transport* newDefaultTransportMgr(thermo_t* thermo, int loglevel, TransportFactory* f)
|
||||
{
|
||||
if (f == 0) {
|
||||
f = TransportFactory::factory();
|
||||
}
|
||||
Transport* ptr = f->newTransport(thermo, loglevel);
|
||||
/*
|
||||
* Note: We delete the static s_factory instance here, instead of in
|
||||
* appdelete() in misc.cpp, to avoid linking problems involving
|
||||
* the need for multiple cantera and transport library statements
|
||||
* for applications that don't have transport in them.
|
||||
*/
|
||||
return ptr;
|
||||
}
|
||||
//====================================================================================================================
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,12 +40,10 @@
|
|||
#if defined(THREAD_SAFE_CANTERA)
|
||||
#include <boost/thread/mutex.hpp>
|
||||
#endif
|
||||
|
||||
//======================================================================================================================
|
||||
namespace Cantera {
|
||||
|
||||
/**
|
||||
* Struct to hold data read from a transport property database file.
|
||||
*/
|
||||
//====================================================================================================================
|
||||
//! Struct to hold data read from a transport property database file.
|
||||
struct GasTransportData {
|
||||
GasTransportData() : speciesName("-"),
|
||||
geometry(-1), wellDepth(-1.0),
|
||||
|
|
@ -63,27 +61,25 @@ namespace Cantera {
|
|||
doublereal rotRelaxNumber;
|
||||
};
|
||||
|
||||
|
||||
//====================================================================================================================
|
||||
// forward references
|
||||
class MMCollisionInt;
|
||||
class GasTransportParams;
|
||||
class LiquidTransportParams;
|
||||
class XML_Node;
|
||||
|
||||
|
||||
//! The purpose of TransportFactory is to create new instances of
|
||||
//====================================================================================================================
|
||||
//! The purpose of the TransportFactory class is to create new instances of
|
||||
//! 'transport managers', which are classes that provide transport
|
||||
//! properties and are derived from base class Transport.
|
||||
//! properties and which are derived from the base class, %Transport.
|
||||
/*!
|
||||
* TransportFactory handles all initialization
|
||||
* required, including evaluation of collision integrals and
|
||||
* generating polynomial fits. Transport managers can also be
|
||||
* created in other ways.
|
||||
* TransportFactory handles all initialization required, including evaluation of collision integrals and
|
||||
* generating polynomial fits. Transport managers can also be created in other ways.
|
||||
*
|
||||
* @ingroup transportgroup
|
||||
* @ingroup transportProps
|
||||
*/
|
||||
class TransportFactory : FactoryBase {
|
||||
class TransportFactory : public FactoryBase {
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -127,15 +123,19 @@ namespace Cantera {
|
|||
virtual ~TransportFactory();
|
||||
|
||||
|
||||
/**
|
||||
* make one of several transport models, and return a base class
|
||||
* pointer to it. This method operates at the level of a
|
||||
* single transport property as a function of temperature
|
||||
* and possibly composition.
|
||||
|
||||
//! Make one of several transport models, and return a base class pointer to it.
|
||||
/*!
|
||||
* This method operates at the level of a single transport property as a function of temperature
|
||||
* and possibly composition. It's a factory for LTPspecies classes.
|
||||
*
|
||||
* @param trNode XML node
|
||||
* @param name reference to the name
|
||||
* @param tp_ind TransportPropertyList class
|
||||
* @param thermo Pointer to the %ThermoPhase class
|
||||
*/
|
||||
virtual LTPspecies*
|
||||
newLTP( const XML_Node &trNode, std::string &name,
|
||||
TransportPropertyList tp_ind, thermo_t* thermo) ;
|
||||
virtual LTPspecies* newLTP(const XML_Node &trNode, std::string &name,
|
||||
TransportPropertyList tp_ind, thermo_t* thermo);
|
||||
|
||||
|
||||
//! Factory function for the construction of new LiquidTranInteraction
|
||||
|
|
@ -368,46 +368,32 @@ namespace Cantera {
|
|||
std::map<std::string, LiquidTranMixingModel> m_LTImodelMap;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Create a new transport manager instance.
|
||||
//====================================================================================================================
|
||||
//! Create a new transport manager instance.
|
||||
/*!
|
||||
* @param transportModel String identifying the transport model to be instantiated, defaults to the empty string
|
||||
* @param thermo ThermoPhase object associated with the phase, defaults to null pointer
|
||||
* @param loglevel int containing the Loglevel, defaults to zero
|
||||
* @param f ptr to the TransportFactory object if it's been malloced.
|
||||
*
|
||||
* @ingroup transportProps
|
||||
*/
|
||||
inline Transport* newTransportMgr(std::string transportModel = "",
|
||||
thermo_t* thermo = 0, int loglevel=0,
|
||||
TransportFactory* f=0) {
|
||||
if (f == 0) {
|
||||
f = TransportFactory::factory();
|
||||
}
|
||||
Transport* ptr = f->newTransport(transportModel, thermo, loglevel);
|
||||
/*
|
||||
* Note: We delete the static s_factory instance here, instead of in
|
||||
* appdelete() in misc.cpp, to avoid linking problems involving
|
||||
* the need for multiple cantera and transport library statements
|
||||
* for applications that don't have transport in them.
|
||||
*/
|
||||
return ptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new transport manager instance.
|
||||
Transport* newTransportMgr(std::string transportModel = "", thermo_t* thermo = 0, int loglevel = 0,
|
||||
TransportFactory* f = 0);
|
||||
//====================================================================================================================
|
||||
//! Create a new transport manager instance.
|
||||
/*!
|
||||
* @param thermo ThermoPhase object associated with the phase, defaults to null pointer
|
||||
* @param loglevel int containing the Loglevel, defaults to zero
|
||||
* @param f ptr to the TransportFactory object if it's been malloced.
|
||||
*
|
||||
* @return Returns a transport manager for the phase
|
||||
*
|
||||
* @ingroup transportProps
|
||||
*/
|
||||
inline Transport* newDefaultTransportMgr(thermo_t* thermo, int loglevel=0,
|
||||
TransportFactory* f=0) {
|
||||
if (f == 0) {
|
||||
f = TransportFactory::factory();
|
||||
}
|
||||
Transport* ptr = f->newTransport(thermo, loglevel);
|
||||
/*
|
||||
* Note: We delete the static s_factory instance here, instead of in
|
||||
* appdelete() in misc.cpp, to avoid linking problems involving
|
||||
* the need for multiple cantera and transport library statements
|
||||
* for applications that don't have transport in them.
|
||||
*/
|
||||
return ptr;
|
||||
}
|
||||
Transport* newDefaultTransportMgr(thermo_t* thermo, int loglevel = 0, TransportFactory* f = 0);
|
||||
|
||||
|
||||
}
|
||||
//====================================================================================================================
|
||||
} // End of namespace Cantera
|
||||
//======================================================================================================================
|
||||
#endif
|
||||
|
|
|
|||
85
Cantera/src/transport/TransportParams.cpp
Normal file
85
Cantera/src/transport/TransportParams.cpp
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
/**
|
||||
* @file TransportParams.h
|
||||
* Class that holds the data that is read in from the xml file, and which is used for
|
||||
* processing of the transport object
|
||||
* (see \ref tranprops and \link Cantera::TransportParams TransportParams \endlink).
|
||||
*/
|
||||
/*
|
||||
* Latest Checkin:
|
||||
* $Author: hkmoffa $
|
||||
* $Date: 2010-04-02 11:40:52 -0600 (Fri, 02 Apr 2010) $
|
||||
* $Revision: 429 $
|
||||
*/
|
||||
|
||||
#include "TransportParams.h"
|
||||
|
||||
#ifdef DEBUG_MODE
|
||||
#include "XML_Writer.h"
|
||||
#endif
|
||||
using namespace std;
|
||||
|
||||
|
||||
namespace Cantera {
|
||||
//====================================================================================================================
|
||||
NotImplemented::NotImplemented(std::string method) :
|
||||
CanteraError("Transport",
|
||||
"\n\n**** Method " + method + " not implemented. ****\n"
|
||||
"(Did you forget to specify a transport model?)\n\n")
|
||||
{
|
||||
}
|
||||
//====================================================================================================================
|
||||
TransportParams::TransportParams() :
|
||||
nsp_(0),
|
||||
thermo(0),
|
||||
mw(0),
|
||||
velocityBasis_(VB_MASSAVG),
|
||||
tmax(1000000.),
|
||||
tmin(10.),
|
||||
mode_(0),
|
||||
xml(0),
|
||||
log_level(-1)
|
||||
{
|
||||
}
|
||||
//====================================================================================================================
|
||||
// Destructor
|
||||
TransportParams::~TransportParams()
|
||||
{
|
||||
#ifdef DEBUG_MODE
|
||||
delete xml;
|
||||
#endif
|
||||
}
|
||||
//====================================================================================================================
|
||||
// Constructor
|
||||
GasTransportParams::GasTransportParams() :
|
||||
TransportParams(),
|
||||
visccoeffs(0),
|
||||
condcoeffs(0),
|
||||
diffcoeffs(0),
|
||||
poly(0),
|
||||
omega22_poly(0),
|
||||
astar_poly(0),
|
||||
bstar_poly(0),
|
||||
cstar_poly(0),
|
||||
zrot(0),
|
||||
crot(0),
|
||||
polar(0),
|
||||
alpha(0),
|
||||
fitlist(0),
|
||||
eps(0),
|
||||
sigma(0),
|
||||
reducedMass(0, 0),
|
||||
diam(0, 0),
|
||||
epsilon(0, 0),
|
||||
dipole(0, 0),
|
||||
delta(0, 0)
|
||||
{
|
||||
}
|
||||
//====================================================================================================================
|
||||
GasTransportParams:: ~GasTransportParams()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//====================================================================================================================
|
||||
} // End of namespace Cantera
|
||||
//======================================================================================================================
|
||||
|
|
@ -1,52 +1,57 @@
|
|||
/**
|
||||
* @file TransportParams.h
|
||||
* Class that holds the data that is read in from the xml file, and which is used for
|
||||
* processing of the transport object
|
||||
* (see \ref tranprops and \link Cantera::TransportParams TransportParams \endlink).
|
||||
*/
|
||||
/*
|
||||
* Latest Checkin:
|
||||
* $Date$
|
||||
* $Revision$
|
||||
*/
|
||||
|
||||
#ifndef CT_TRANSPORTPARAMS_H
|
||||
#define CT_TRANSPORTPARAMS_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "ct_defs.h"
|
||||
#include "TransportBase.h"
|
||||
#include "xml.h"
|
||||
#include "XML_Writer.h"
|
||||
#include "DenseMatrix.h"
|
||||
#include "TransportBase.h"
|
||||
|
||||
namespace Cantera {
|
||||
|
||||
class XML_Writer;
|
||||
|
||||
|
||||
//====================================================================================================================
|
||||
//! Error class to indicate an unimplemented method
|
||||
/*!
|
||||
* This class is used by transport objects
|
||||
*/
|
||||
class NotImplemented : public CanteraError {
|
||||
public:
|
||||
NotImplemented(std::string method) : CanteraError("Transport",
|
||||
"\n\n**** Method "+method+" not implemented. ****\n"
|
||||
"(Did you forget to specify a transport model?)\n\n") {}
|
||||
|
||||
//! Constructor for error class
|
||||
/*!
|
||||
* @param method Single string indicating a method that is not implemented
|
||||
*/
|
||||
NotImplemented(std::string method);
|
||||
};
|
||||
|
||||
/**
|
||||
* Base class to hold transport model parameters.
|
||||
* Used by TransportFactory.
|
||||
//====================================================================================================================
|
||||
//! Base structure to hold transport model parameters.
|
||||
/*!
|
||||
* This structure is used by TransportFactory.
|
||||
*/
|
||||
class TransportParams {
|
||||
|
||||
public:
|
||||
|
||||
//! Default Constructor
|
||||
TransportParams() :
|
||||
nsp_(0),
|
||||
thermo(0),
|
||||
mw(0),
|
||||
velocityBasis_(VB_MASSAVG),
|
||||
tmax(1000000.),
|
||||
tmin(10.),
|
||||
mode_(0),
|
||||
xml(0),
|
||||
log_level(-1)
|
||||
{
|
||||
}
|
||||
TransportParams();
|
||||
|
||||
//! Destructor
|
||||
virtual ~TransportParams()
|
||||
{
|
||||
#ifdef DEBUG_MODE
|
||||
delete xml;
|
||||
#endif
|
||||
}
|
||||
virtual ~TransportParams();
|
||||
|
||||
//! Local storage of the number of species
|
||||
int nsp_;
|
||||
|
|
@ -58,7 +63,7 @@ namespace Cantera {
|
|||
/*!
|
||||
* Length is nsp_ and units are kg kmol-1.
|
||||
*/
|
||||
vector_fp mw;
|
||||
vector_fp mw;
|
||||
|
||||
//! A basis for the average velocity can be specified.
|
||||
/*!
|
||||
|
|
@ -80,47 +85,23 @@ namespace Cantera {
|
|||
|
||||
//! Log level
|
||||
int log_level;
|
||||
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Holds transport model parameters relevant to transport in ideal
|
||||
* gases with a kinetic theory of gases derived transport model.
|
||||
* Used by TransportFactory.
|
||||
//====================================================================================================================
|
||||
//! This structure holds transport model parameters relevant to transport in ideal
|
||||
//! gases with a kinetic theory of gases derived transport model.
|
||||
/*!
|
||||
* This structure is used by TransportFactory object.
|
||||
*/
|
||||
class GasTransportParams : public TransportParams {
|
||||
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
GasTransportParams() :
|
||||
TransportParams(),
|
||||
visccoeffs(0),
|
||||
condcoeffs(0),
|
||||
diffcoeffs(0),
|
||||
poly(0),
|
||||
omega22_poly(0),
|
||||
astar_poly(0),
|
||||
bstar_poly(0),
|
||||
cstar_poly(0),
|
||||
zrot(0),
|
||||
crot(0),
|
||||
polar(0),
|
||||
alpha(0),
|
||||
fitlist(0),
|
||||
eps(0),
|
||||
sigma(0),
|
||||
reducedMass(0, 0),
|
||||
diam(0, 0),
|
||||
epsilon(0, 0),
|
||||
dipole(0, 0),
|
||||
delta(0, 0)
|
||||
{
|
||||
}
|
||||
GasTransportParams();
|
||||
|
||||
//! Destructor
|
||||
virtual ~GasTransportParams() {}
|
||||
virtual ~GasTransportParams();
|
||||
|
||||
// polynomial fits
|
||||
|
||||
|
|
@ -143,8 +124,7 @@ namespace Cantera {
|
|||
* The outer loop the number of species, nsp
|
||||
* The inner loop is over degree + 1, which is the polynomial order of the collision integral fit.
|
||||
*/
|
||||
std::vector<vector_fp> diffcoeffs;
|
||||
|
||||
std::vector<vector_fp> diffcoeffs;
|
||||
|
||||
//! This is vector of vectors containing the integer ookup value for the (i,j) interaction
|
||||
/*!
|
||||
|
|
@ -222,7 +202,7 @@ namespace Cantera {
|
|||
* Length = nsp
|
||||
* Units = m^3
|
||||
*/
|
||||
vector_fp alpha;
|
||||
vector_fp alpha;
|
||||
|
||||
//! This is vector containing the values of delta(i,j) that are used in the collision integral fits.
|
||||
/*!
|
||||
|
|
@ -256,7 +236,7 @@ namespace Cantera {
|
|||
*
|
||||
* Length nsp * nsp. This is a symmetric matrix
|
||||
*/
|
||||
DenseMatrix reducedMass;
|
||||
DenseMatrix reducedMass;
|
||||
|
||||
//! hard-sphere diameter for (i,j) collision
|
||||
/*!
|
||||
|
|
@ -265,7 +245,7 @@ namespace Cantera {
|
|||
*
|
||||
* Length nsp * nsp. This is a symmetric matrix.
|
||||
*/
|
||||
DenseMatrix diam;
|
||||
DenseMatrix diam;
|
||||
|
||||
//! The effective well depth for (i,j) collisions
|
||||
/*!
|
||||
|
|
@ -274,7 +254,7 @@ namespace Cantera {
|
|||
*
|
||||
* Length nsp * nsp. This is a symmetric matrix.
|
||||
*/
|
||||
DenseMatrix epsilon;
|
||||
DenseMatrix epsilon;
|
||||
|
||||
//! The effective dipole moment for (i,j) collisions
|
||||
/*!
|
||||
|
|
@ -286,7 +266,7 @@ namespace Cantera {
|
|||
*
|
||||
* Length nsp * nsp. This is a symmetric matrix.
|
||||
*/
|
||||
DenseMatrix dipole;
|
||||
DenseMatrix dipole;
|
||||
|
||||
//! Matrix containing the reduced dipole moment of the interaction between two species
|
||||
/*!
|
||||
|
|
@ -295,10 +275,10 @@ namespace Cantera {
|
|||
*
|
||||
* Length nsp * nsp .This is a symmetric matrix
|
||||
*/
|
||||
DenseMatrix delta;
|
||||
|
||||
DenseMatrix delta;
|
||||
};
|
||||
|
||||
}
|
||||
//====================================================================================================================
|
||||
} // End of namespace Cantera
|
||||
//======================================================================================================================
|
||||
|
||||
#endif //CT_TRANSPORTPARAMS_H
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue