Fixed a UMR error, due to a missing initialization list.

This commit is contained in:
Harry Moffat 2010-01-19 18:27:34 +00:00
parent 7abb1dc33a
commit be731888a4
5 changed files with 113 additions and 97 deletions

View file

@ -243,7 +243,7 @@ namespace Cantera {
//for each species, assign viscosity model and coefficients
for (k = 0; k < m_nsp; k++) {
Cantera::LiquidTransportData &ltd = tr.LTData[k];
if ( ltd.speciesDiffusivity >= 0 ) {
if (ltd.speciesDiffusivity != 0) {
cout << "Warning: diffusion coefficient data for "
<< m_thermo->speciesName(k)
<< endl

View file

@ -44,16 +44,31 @@ namespace Cantera {
E /= GasConstant;
}
LiquidTransportData::LiquidTransportData() :
speciesName("-"),
hydroRadius(0),
viscosity(0),
thermalCond(0),
electCond(0),
speciesDiffusivity(0)
{
}
//! Copy constructor
LiquidTransportData::LiquidTransportData( const LiquidTransportData &right )
// Copy constructor
LiquidTransportData::LiquidTransportData(const LiquidTransportData &right) :
speciesName("-"),
hydroRadius(0),
viscosity(0),
thermalCond(0),
electCond(0),
speciesDiffusivity(0)
{
*this = right; //use assignment operator to do other work
}
//! Assignment operator
LiquidTransportData& LiquidTransportData::operator=(const LiquidTransportData& right )
// Assignment operator
LiquidTransportData& LiquidTransportData::operator=(const LiquidTransportData& right)
{
if (&right != this) {
speciesName = right.speciesName;

View file

@ -177,12 +177,11 @@ namespace Cantera {
public:
LiquidTransportData() :
speciesName("-")
{
}
//! Default constructor
LiquidTransportData();
//! Copy constructor
LiquidTransportData( const LiquidTransportData &right ) ;
LiquidTransportData(const LiquidTransportData &right) ;
//! Assignment operator
LiquidTransportData& operator=(const LiquidTransportData& right );
@ -213,7 +212,7 @@ namespace Cantera {
//! Class LTPspecies_Const holds transport parameters for a
//! specific liquid-phase species when the transport property
//! is just a constant value.
/**
/*!
* As an example of the input required for LTPspecies_Const
* consider the following XML fragment
*
@ -229,7 +228,7 @@ namespace Cantera {
* </species>
* \endverbatim
*/
class LTPspecies_Const : public LTPspecies{
class LTPspecies_Const : public LTPspecies {
public:
@ -269,7 +268,7 @@ namespace Cantera {
//! Class LTPspecies_Arrhenius holds transport parameters for a
//! specific liquid-phase species when the transport property
//! is expressed in Arrhenius form.
/**
/*!
* As an example of the input required for LTPspecies_Arrhenius
* consider the following XML fragment
*
@ -307,7 +306,7 @@ namespace Cantera {
//! Return the pure species value for this transport property evaluated
//! from the Arrhenius expression
/**
/*!
* In general the Arrhenius expression is
*
* \f[
@ -343,7 +342,8 @@ namespace Cantera {
doublereal m_logProp;
//! Internal model to adjust species-specific properties for composition.
/** Currently just a place holder, but this method could take
/*!
* Currently just a place holder, but this method could take
* the composition from the thermo object and adjust coefficients
* accoding to some unspecified model.
*/
@ -355,7 +355,7 @@ namespace Cantera {
//! Class LTPspecies_Poly holds transport parameters for a
//! specific liquid-phase species when the transport property
//! is expressed as a polynomial in temperature.
/**
/*!
* As an example of the input required for LTPspecies_Poly
* consider the following XML fragment
*
@ -405,7 +405,8 @@ namespace Cantera {
doublereal m_prop;
//! Internal model to adjust species-specific properties for composition.
/** Currently just a place holder, but this method could take
/*!
* Currently just a place holder, but this method could take
* the composition from the thermo object and adjust coefficients
* accoding to some unspecified model.
*/

View file

@ -321,7 +321,7 @@ namespace Cantera {
}
doublereal LTI_Log_MoleFracs::getMixTransProp( std::vector<LTPspecies*> LTPptrs ) {
doublereal LTI_Log_MoleFracs::getMixTransProp(std::vector<LTPspecies*> LTPptrs) {
int nsp = m_thermo->nSpecies();
doublereal temp = m_thermo->temperature();
@ -331,7 +331,7 @@ namespace Cantera {
doublereal value = 0;
for ( int k = 0; k < nsp; k++) {
value += log( LTPptrs[k]->getSpeciesTransProp() ) * LTPptrs[k]->getMixWeight( ) * molefracs[k];
value += log( LTPptrs[k]->getSpeciesTransProp() ) * LTPptrs[k]->getMixWeight() * molefracs[k];
}
for ( int i = 0; i < nsp; i++ )
@ -348,18 +348,18 @@ namespace Cantera {
void LTI_Pairwise_Interaction::setParameters( LiquidTransportParams& trParam ) {
void LTI_Pairwise_Interaction::setParameters(LiquidTransportParams& trParam) {
int nsp = m_thermo->nSpecies();
m_diagonals.resize(nsp, 0);
for (int k = 0; k < nsp; k++) {
Cantera::LiquidTransportData &ltd = trParam.LTData[k];
if ( ltd.speciesDiffusivity )
if (ltd.speciesDiffusivity)
m_diagonals[k] = ltd.speciesDiffusivity;
}
}
doublereal LTI_Pairwise_Interaction::getMixTransProp( doublereal *speciesValues, doublereal *speciesWeight ) {
doublereal LTI_Pairwise_Interaction::getMixTransProp(doublereal *speciesValues, doublereal *speciesWeight) {
int nsp = m_thermo->nSpecies();
doublereal molefracs[nsp];
@ -373,7 +373,7 @@ namespace Cantera {
}
doublereal LTI_Pairwise_Interaction::getMixTransProp( std::vector<LTPspecies*> LTPptrs ) {
doublereal LTI_Pairwise_Interaction::getMixTransProp(std::vector<LTPspecies*> LTPptrs) {
int nsp = m_thermo->nSpecies();
doublereal molefracs[nsp];
@ -386,7 +386,7 @@ namespace Cantera {
return value;
}
void LTI_Pairwise_Interaction::getMatrixTransProp( DenseMatrix &mat, doublereal *speciesValues ) {
void LTI_Pairwise_Interaction::getMatrixTransProp(DenseMatrix &mat, doublereal *speciesValues) {
int nsp = m_thermo->nSpecies();
doublereal temp = m_thermo->temperature();

View file

@ -33,57 +33,57 @@ namespace Cantera {
};
//! Composition dependence type for liquid mixture transport properties
/*!
* Types of temperature dependencies:
* - 0 - Mixture calculations with this property are not allowed
* - 1 - Use solvent (species 0) properties
* - 2 - Properties weighted linearly by mole fractions
* - 3 - Properties weighted linearly by mass fractions
* - 4 - Properties weighted logarithmically by mole fractions (interaction energy weighting)
* - 5 - Interactions given pairwise between each possible species (i.e. D_ij)
*
* \verbatim
* <transport model="Liquid">
* <viscosity>
* <compositionDependence model="logMoleFractions">
* <interaction>
* <speciesA> LiCl(L) </speciesA>
* <speciesB> KCl(L) </speciesB>
* <Eij units="J/kmol"> -1.0 </Eij>
* <Sij units="J/kmol/K"> 1.0E-1 </Eij>
* </interaction>
* </compositionDependence>
* </viscosity>
* <speciesDiffusivity>
* <compositionDependence model="pairwiseInteraction">
* <interaction>
* <speciesA> Li+ </speciesA>
* <speciesB> K+ </speciesB>
* <Dij units="m2/s"> 1.5 </Dij>
* </interaction>
* <interaction>
* <speciesA> K+ </speciesA>
* <speciesB> Cl- </speciesB>
* <Dij units="m2/s"> 1.0 </Dij>
* </interaction>
* <interaction>
* <speciesA> Li+ </speciesA>
* <speciesB> Cl- </speciesB>
* <Dij units="m2/s"> 1.2 </Dij>
* </interaction>
* </compositionDependence>
* </speciesDiffusivity>
* <thermalConductivity>
* <compositionDependence model="massFractions"/>
* </thermalConductivity>
* <hydrodynamicRadius>
* <compositionDependence model="none"/>
* </hydrodynamicRadius>
* </transport>
* \endverbatim
*
*/
//! Composition dependence type for liquid mixture transport properties
/*!
* Types of temperature dependencies:
* - 0 - Mixture calculations with this property are not allowed
* - 1 - Use solvent (species 0) properties
* - 2 - Properties weighted linearly by mole fractions
* - 3 - Properties weighted linearly by mass fractions
* - 4 - Properties weighted logarithmically by mole fractions (interaction energy weighting)
* - 5 - Interactions given pairwise between each possible species (i.e. D_ij)
*
* \verbatim
* <transport model="Liquid">
* <viscosity>
* <compositionDependence model="logMoleFractions">
* <interaction>
* <speciesA> LiCl(L) </speciesA>
* <speciesB> KCl(L) </speciesB>
* <Eij units="J/kmol"> -1.0 </Eij>
* <Sij units="J/kmol/K"> 1.0E-1 </Eij>
* </interaction>
* </compositionDependence>
* </viscosity>
* <speciesDiffusivity>
* <compositionDependence model="pairwiseInteraction">
* <interaction>
* <speciesA> Li+ </speciesA>
* <speciesB> K+ </speciesB>
* <Dij units="m2/s"> 1.5 </Dij>
* </interaction>
* <interaction>
* <speciesA> K+ </speciesA>
* <speciesB> Cl- </speciesB>
* <Dij units="m2/s"> 1.0 </Dij>
* </interaction>
* <interaction>
* <speciesA> Li+ </speciesA>
* <speciesB> Cl- </speciesB>
* <Dij units="m2/s"> 1.2 </Dij>
* </interaction>
* </compositionDependence>
* </speciesDiffusivity>
* <thermalConductivity>
* <compositionDependence model="massFractions"/>
* </thermalConductivity>
* <hydrodynamicRadius>
* <compositionDependence model="none"/>
* </hydrodynamicRadius>
* </transport>
* \endverbatim
*
*/
enum LiquidTranMixingModel {
LTI_MODEL_NOTSET=-1,
LTI_MODEL_NONE,
@ -120,9 +120,9 @@ namespace Cantera {
public:
//! Constructor
/**
* @param tp_ind Index indicating transport property type (i.e. viscosity)
*/
/**
* @param tp_ind Index indicating transport property type (i.e. viscosity)
*/
LiquidTranInteraction( TransportPropertyList tp_ind = TP_UNKNOWN );
//! Copy constructor
@ -140,7 +140,7 @@ namespace Cantera {
* @param thermo Pointer to thermo object
*/
virtual void init( const XML_Node &compModelNode = 0,
thermo_t* thermo = 0 );
thermo_t* thermo = 0 );
virtual void setParameters( LiquidTransportParams& trParam ) { ; }
@ -260,9 +260,9 @@ namespace Cantera {
public:
LTI_Solvent( TransportPropertyList tp_ind = TP_UNKNOWN ) :
LiquidTranInteraction( tp_ind )
{
m_model = LTI_MODEL_SOLVENT;
}
{
m_model = LTI_MODEL_SOLVENT;
}
//! Copy constructor
// LTI_Solvent( const LTI_Solvent &right );
@ -301,9 +301,9 @@ namespace Cantera {
public:
LTI_MoleFracs( TransportPropertyList tp_ind = TP_UNKNOWN ) :
LiquidTranInteraction( tp_ind )
{
m_model = LTI_MODEL_MOLEFRACS;
}
{
m_model = LTI_MODEL_MOLEFRACS;
}
//! Copy constructor
@ -344,9 +344,9 @@ namespace Cantera {
public:
LTI_MassFracs( TransportPropertyList tp_ind = TP_UNKNOWN ) :
LiquidTranInteraction( tp_ind )
{
m_model = LTI_MODEL_MASSFRACS;
}
{
m_model = LTI_MODEL_MASSFRACS;
}
//! Copy constructor
@ -418,9 +418,9 @@ namespace Cantera {
public:
LTI_Log_MoleFracs( TransportPropertyList tp_ind = TP_UNKNOWN ) :
LiquidTranInteraction( tp_ind )
{
m_model = LTI_MODEL_LOG_MOLEFRACS;
}
{
m_model = LTI_MODEL_LOG_MOLEFRACS;
}
//! Copy constructor
@ -475,9 +475,9 @@ namespace Cantera {
public:
LTI_Pairwise_Interaction( TransportPropertyList tp_ind = TP_UNKNOWN ) :
LiquidTranInteraction( tp_ind )
{
m_model = LTI_MODEL_PAIRWISE_INTERACTION;
}
{
m_model = LTI_MODEL_PAIRWISE_INTERACTION;
}
//! Copy constructor
@ -512,9 +512,9 @@ namespace Cantera {
public:
LTI_StokesEinstein( TransportPropertyList tp_ind = TP_UNKNOWN ) :
LiquidTranInteraction( tp_ind )
{
m_model = LTI_MODEL_STOKES_EINSTEIN;
}
{
m_model = LTI_MODEL_STOKES_EINSTEIN;
}
//! Copy constructor