Clean up interstitial whitespace

Remove extra space around operators, between words, etc.
This commit is contained in:
Ray Speth 2015-08-01 15:57:30 -04:00
parent 6a04193646
commit acdf9cf0ed
291 changed files with 3510 additions and 3516 deletions

View file

@ -26,13 +26,13 @@ public:
//! static function that deletes all factories
//! in the internal registry maintained in a static variable
static void deleteFactories() {
std::vector< FactoryBase* >::iterator iter ;
std::vector< FactoryBase* >::iterator iter;
for (iter = s_vFactoryRegistry.begin();
iter != s_vFactoryRegistry.end();
++iter) {
(*iter)->deleteFactory() ;
(*iter)->deleteFactory();
}
s_vFactoryRegistry.clear() ;
s_vFactoryRegistry.clear();
}
protected:
@ -42,18 +42,18 @@ protected:
* Adds the current object to the current static list
*/
FactoryBase() {
s_vFactoryRegistry.push_back(this) ;
s_vFactoryRegistry.push_back(this);
}
//! Virtual abstract function that deletes the factory
/*!
* This must be properly defined in child objects.
*/
virtual void deleteFactory() = 0 ;
virtual void deleteFactory() = 0;
private:
//! statically held list of Factories.
static std::vector<FactoryBase*> s_vFactoryRegistry ;
static std::vector<FactoryBase*> s_vFactoryRegistry;
};
}

View file

@ -115,7 +115,7 @@ void addDirectory(const std::string& dir);
void appdelete();
//! @copydoc Application::thread_complete
void thread_complete() ;
void thread_complete();
//! Returns root directory where %Cantera is installed
/*!

View file

@ -308,7 +308,7 @@ inline void sum_each(OutputIter x_begin, OutputIter x_end,
* Example:
*
* \code
* vector<double> x(3), y(20), ;
* vector<double> x(3), y(20);
* vector<int> index(3);
* index[0] = 9;
* index[1] = 2;

View file

@ -395,7 +395,7 @@ public:
/*!
* @param n Number of the child to return
*/
XML_Node& child(const size_t n) const ;
XML_Node& child(const size_t n) const;
//! Return an unchangeable reference to the vector of children of the current node
/*!

View file

@ -82,7 +82,7 @@ public:
* number of components, which can be obtained from the
* numComponents() command.
*/
size_t component(size_t m) const ;
size_t component(size_t m) const;
//! Get the stoichiometric reaction coefficients for a single
//! reaction index

View file

@ -39,8 +39,8 @@ public:
virtual void deleteFactory() {
ScopedLock lock(kinetics_mutex);
delete s_factory ;
s_factory = 0 ;
delete s_factory;
s_factory = 0;
}
/**

View file

@ -269,8 +269,7 @@ public:
std::string dashed_color;
std::string element;
std::string m_font;
doublereal threshold,
bold_min, dashed_max, label_min;
doublereal threshold, bold_min, dashed_max, label_min;
doublereal x_size, y_size;
std::string name, dot_options;
flow_t flow_type;

View file

@ -123,7 +123,7 @@ namespace Cantera
* values defined in @ref solvesp_methods.
*
* ### Pseudo time stepping algorithm:
* The time step is determined from sdot[], so so that the time step
* The time step is determined from sdot[], so that the time step
* doesn't ever change the value of a variable by more than 100%.
*
* This algorithm does use a damped Newton's method to relax the equations.

View file

@ -21,8 +21,8 @@ const int DIAG = 1;
const int DENSE = 2;
const int NOJAC = 4;
const int JAC = 8;
const int GMRES =16;
const int BAND =32;
const int GMRES = 16;
const int BAND = 32;
/**
* Specifies the method used to integrate the system of equations.

View file

@ -252,7 +252,7 @@ public:
* \beta = \frac{1}{v}\left(\frac{\partial v}{\partial T}\right)_P
* \f]
*/
virtual doublereal thermalExpansionCoeff() const ;
virtual doublereal thermalExpansionCoeff() const;
/**
* @}

View file

@ -43,7 +43,7 @@ public:
*/
GeneralSpeciesThermo& operator=(const GeneralSpeciesThermo& b);
virtual SpeciesThermo* duplMyselfAsSpeciesThermo() const ;
virtual SpeciesThermo* duplMyselfAsSpeciesThermo() const;
virtual void install_STIT(size_t index,
shared_ptr<SpeciesThermoInterpType> stit_ptr);

View file

@ -362,7 +362,7 @@ public:
* @param dlnActCoeffdlnN Output vector of derivatives of the
* log Activity Coefficients. length = m_kk * m_kk
*/
virtual void getdlnActCoeffdlnN(const size_t ld, doublereal* const dlnActCoeffdlnN) ;
virtual void getdlnActCoeffdlnN(const size_t ld, doublereal* const dlnActCoeffdlnN);
//! @}
//! Get the Salt Dissociation Coefficients

View file

@ -166,7 +166,7 @@ public:
//! Returns the reference pressure in Pa. This function is a wrapper
//! that calls the species thermo refPressure function.
virtual doublereal refPressure() const ;
virtual doublereal refPressure() const;
//! This method returns the convention used in specification
//! of the standard state, of which there are currently two,

View file

@ -578,7 +578,7 @@ public:
* @param dlnActCoeffdlnN Output vector of derivatives of the
* log Activity Coefficients. length = m_kk * m_kk
*/
virtual void getdlnActCoeffdlnN(const size_t ld, doublereal* const dlnActCoeffdlnN) ;
virtual void getdlnActCoeffdlnN(const size_t ld, doublereal* const dlnActCoeffdlnN);
//@}

View file

@ -269,7 +269,7 @@ public:
* \beta = \frac{1}{v}\left(\frac{\partial v}{\partial T}\right)_P
* \f]
*/
virtual doublereal thermalExpansionCoeff() const ;
virtual doublereal thermalExpansionCoeff() const;
//! @}
//! @name Activities, Standard States, and Activity Concentrations

View file

@ -181,7 +181,7 @@ public:
* \beta = \frac{1}{v}\left(\frac{\partial v}{\partial T}\right)_P
* \f]
*/
virtual doublereal thermalExpansionCoeff() const ;
virtual doublereal thermalExpansionCoeff() const;
/**
* @}

View file

@ -572,7 +572,7 @@ public:
* @param dlnActCoeffdlnN Output vector of derivatives of the
* log Activity Coefficients. length = m_kk * m_kk
*/
virtual void getdlnActCoeffdlnN(const size_t ld, doublereal* const dlnActCoeffdlnN) ;
virtual void getdlnActCoeffdlnN(const size_t ld, doublereal* const dlnActCoeffdlnN);
//@}
private:

View file

@ -615,7 +615,7 @@ protected:
//! Calculate the value of z
/*!
* \f[
* z = \frac{P v}{ R T}
* z = \frac{P v}{R T}
* \f]
*
* returns the value of z
@ -714,7 +714,7 @@ public:
* - WATER_LIQUID below the critical temperature but above the critical density
* - WATER_SUPERCRIT above the critical temperature
*/
int phaseState(bool checkState = false) const ;
int phaseState(bool checkState = false) const;
//! Return the value of the density at the liquid spinodal point (on the liquid side)
//! for the current temperature.

View file

@ -125,12 +125,12 @@ public:
*/
virtual void updateProperties(const doublereal* tPoly,
doublereal* cp_R, doublereal* h_RT,
doublereal* s_R) const ;
doublereal* s_R) const;
virtual void updatePropertiesTemp(const doublereal temp,
doublereal* cp_R,
doublereal* h_RT,
doublereal* s_R) const ;
doublereal* s_R) const;
virtual void reportParameters(size_t& n, int& type,
doublereal& tlow, doublereal& thigh,
doublereal& pref,

View file

@ -563,7 +563,7 @@ public:
* @param dlnActCoeffdlnN Output vector of derivatives of the
* log Activity Coefficients. length = m_kk * m_kk
*/
virtual void getdlnActCoeffdlnN(const size_t ld, doublereal* const dlnActCoeffdlnN) ;
virtual void getdlnActCoeffdlnN(const size_t ld, doublereal* const dlnActCoeffdlnN);
//@}
@ -624,7 +624,7 @@ public:
* @param VintOut Output contribution to the voltage corresponding to nonideal term
* @param voltsOut Output contribution to the voltage corresponding to nonideal term and mf term
*/
void Vint(double& VintOut, double& voltsOut) ;
void Vint(double& VintOut, double& voltsOut);
#endif
protected:

View file

@ -244,7 +244,7 @@ public:
* \beta = \frac{1}{v}\left(\frac{\partial v}{\partial T}\right)_P
* \f]
*/
virtual doublereal thermalExpansionCoeff() const ;
virtual doublereal thermalExpansionCoeff() const;
/**
* @}

View file

@ -1063,7 +1063,7 @@ public:
* @param rho Density (kg/m^3)
* @param p Pressure (Pa)
*/
virtual void setState_RP(doublereal rho, doublereal p){
virtual void setState_RP(doublereal rho, doublereal p) {
throw NotImplementedError("ThermoPhase::setState_RP");
}

View file

@ -396,7 +396,7 @@ public:
* of the reference state of the species
* length = m_kk, units = dimensionless.
*/
virtual void getGibbs_RT_ref(doublereal* grt) const ;
virtual void getGibbs_RT_ref(doublereal* grt) const;
//! Return a reference to the vector of Gibbs free energies of the species
@ -413,7 +413,7 @@ public:
* of the reference state of the species
* length = m_kk, units = J/kmol.
*/
virtual void getGibbs_ref(doublereal* g) const ;
virtual void getGibbs_ref(doublereal* g) const;
/*!
* Returns the vector of nondimensional entropies of the reference state
@ -424,7 +424,7 @@ public:
* of the species in their reference states
* length: m_kk, units: dimensionless.
*/
virtual void getEntropy_R_ref(doublereal* er) const ;
virtual void getEntropy_R_ref(doublereal* er) const;
/*!
* Returns the vector of nondimensional constant pressure heat capacities
@ -435,7 +435,7 @@ public:
* of the species in their reference states
* length: m_kk, units: dimensionless.
*/
virtual void getCp_R_ref(doublereal* cpr) const ;
virtual void getCp_R_ref(doublereal* cpr) const;
//! Get the molar volumes of the species reference states at the current
//! *T* and *P_ref* of the solution.
@ -445,7 +445,7 @@ public:
* @param vol Output vector containing the standard state volumes.
* Length: m_kk.
*/
virtual void getStandardVolumes_ref(doublereal* vol) const ;
virtual void getStandardVolumes_ref(doublereal* vol) const;
//@}
/*! @name Setting the Internal State of the System
@ -576,7 +576,7 @@ public:
/*!
* @param index Species index
*/
virtual PDSS_enumType reportPDSSType(int index = -1) const ;
virtual PDSS_enumType reportPDSSType(int index = -1) const;
//! This utility function reports the type of manager
//! for the calculation of ss properties
@ -584,7 +584,7 @@ public:
* @return Returns an enum type called VPSSMgr_enumType, which is a list
* of the known VPSSMgr objects
*/
virtual VPSSMgr_enumType reportVPSSMgrType() const ;
virtual VPSSMgr_enumType reportVPSSMgrType() const;
//! Minimum temperature.
/*!
@ -595,7 +595,7 @@ public:
*
* @param k Species index
*/
virtual doublereal minTemp(size_t k=npos) const ;
virtual doublereal minTemp(size_t k=npos) const;
//! Maximum temperature.
/*!
@ -619,7 +619,7 @@ public:
* @param k Species index. Default is -1, which returns
* the generic answer.
*/
virtual doublereal refPressure(size_t k=npos) const ;
virtual doublereal refPressure(size_t k=npos) const;
//@}
/*! @name Initialization Methods - For Internal use

View file

@ -73,8 +73,8 @@ protected:
*/
//@{
virtual void getGibbs_RT_ref(doublereal* grt) const ;
virtual void getStandardVolumes_ref(doublereal* vol) const ;
virtual void getGibbs_RT_ref(doublereal* grt) const;
virtual void getStandardVolumes_ref(doublereal* vol) const;
//@}
/*! @name Initialization Methods - For Internal use
@ -111,8 +111,8 @@ public:
const XML_Node* const phaseNode_ptr);
//@}
virtual PDSS_enumType reportPDSSType(int index = -1) const ;
virtual VPSSMgr_enumType reportVPSSMgrType() const ;
virtual PDSS_enumType reportPDSSType(int index = -1) const;
virtual VPSSMgr_enumType reportVPSSMgrType() const;
};
}

View file

@ -73,7 +73,7 @@ protected:
* the routine _updateRefStateThermo().
*/
//@{
virtual void getGibbs_ref(doublereal* g) const ;
virtual void getGibbs_ref(doublereal* g) const;
//@}
/*! @name Initialization Methods - For Internal use
@ -128,8 +128,8 @@ public:
virtual PDSS* createInstallPDSS(size_t k, const XML_Node& speciesNode,
const XML_Node* const phaseNode_ptr);
virtual PDSS_enumType reportPDSSType(int index = -1) const ;
virtual VPSSMgr_enumType reportVPSSMgrType() const ;
virtual PDSS_enumType reportPDSSType(int index = -1) const;
virtual VPSSMgr_enumType reportVPSSMgrType() const;
virtual void initAllPtrs(VPStandardStateTP* vp_ptr, SpeciesThermo* sp_ptr);
private:

View file

@ -74,8 +74,8 @@ public:
virtual PDSS* createInstallPDSS(size_t k, const XML_Node& speciesNode,
const XML_Node* const phaseNode_ptr);
virtual PDSS_enumType reportPDSSType(int index = -1) const ;
virtual VPSSMgr_enumType reportVPSSMgrType() const ;
virtual PDSS_enumType reportPDSSType(int index = -1) const;
virtual VPSSMgr_enumType reportVPSSMgrType() const;
};
}

View file

@ -70,11 +70,11 @@ public:
//@{
virtual void getEnthalpy_RT_ref(doublereal* hrt) const;
virtual void getGibbs_RT_ref(doublereal* grt) const ;
virtual void getGibbs_ref(doublereal* g) const ;
virtual void getEntropy_R_ref(doublereal* er) const ;
virtual void getCp_R_ref(doublereal* cpr) const ;
virtual void getStandardVolumes_ref(doublereal* vol) const ;
virtual void getGibbs_RT_ref(doublereal* grt) const;
virtual void getGibbs_ref(doublereal* g) const;
virtual void getEntropy_R_ref(doublereal* er) const;
virtual void getCp_R_ref(doublereal* cpr) const;
virtual void getStandardVolumes_ref(doublereal* vol) const;
//! @}
/*! @name Initialization Methods - For Internal use
@ -91,8 +91,8 @@ public:
virtual PDSS* createInstallPDSS(size_t k, const XML_Node& speciesNode,
const XML_Node* const phaseNode_ptr);
virtual PDSS_enumType reportPDSSType(int index = -1) const ;
virtual VPSSMgr_enumType reportVPSSMgrType() const ;
virtual PDSS_enumType reportPDSSType(int index = -1) const;
virtual VPSSMgr_enumType reportVPSSMgrType() const;
virtual void initAllPtrs(VPStandardStateTP* vp_ptr, SpeciesThermo* sp_ptr);
private:

View file

@ -55,11 +55,11 @@ public:
//@{
virtual void getEnthalpy_RT_ref(doublereal* hrt) const;
virtual void getGibbs_RT_ref(doublereal* grt) const ;
virtual void getGibbs_ref(doublereal* g) const ;
virtual void getEntropy_R_ref(doublereal* er) const ;
virtual void getCp_R_ref(doublereal* cpr) const ;
virtual void getStandardVolumes_ref(doublereal* vol) const ;
virtual void getGibbs_RT_ref(doublereal* grt) const;
virtual void getGibbs_ref(doublereal* g) const;
virtual void getEntropy_R_ref(doublereal* er) const;
virtual void getCp_R_ref(doublereal* cpr) const;
virtual void getStandardVolumes_ref(doublereal* vol) const;
//@}
virtual void setState_TP(doublereal T, doublereal P);
@ -96,8 +96,8 @@ public:
* various states and attributes
*/
//@{
virtual PDSS_enumType reportPDSSType(int index = -1) const ;
virtual VPSSMgr_enumType reportVPSSMgrType() const ;
virtual PDSS_enumType reportPDSSType(int index = -1) const;
virtual VPSSMgr_enumType reportVPSSMgrType() const;
//@}
/*! @name Initialization Methods - For Internal use (VPStandardState)

View file

@ -387,7 +387,7 @@ public:
* - WATER_LIQUID below the critical temperature but above the critical density
* - WATER_SUPERCRIT above the critical temperature
*/
int phaseState(bool checkState = false) const ;
int phaseState(bool checkState = false) const;
//! Returns the critical temperature of water (Kelvin)
/*!

View file

@ -121,9 +121,7 @@ public:
virtual void init(const XML_Node& compModelNode = XML_Node(),
thermo_t* thermo = 0);
virtual void setParameters(LiquidTransportParams& trParam) {
;
}
virtual void setParameters(LiquidTransportParams& trParam) {}
//! Return the mixture transport property value.
//! (Must be implemented in subclasses.)
@ -184,7 +182,7 @@ public:
* does not know what transport property it is at this point).
*/
doublereal getMixTransProp(doublereal* valueSpecies, doublereal* weightSpecies = 0);
doublereal getMixTransProp(std::vector<LTPspecies*> LTPptrs) ;
doublereal getMixTransProp(std::vector<LTPspecies*> LTPptrs);
//! Return the matrix of binary interaction parameters.
/**
@ -217,7 +215,7 @@ public:
* does not know what transport property it is at this point.
*/
doublereal getMixTransProp(doublereal* valueSpecies, doublereal* weightSpecies = 0);
doublereal getMixTransProp(std::vector<LTPspecies*> LTPptrs) ;
doublereal getMixTransProp(std::vector<LTPspecies*> LTPptrs);
//! Return the matrix of binary interaction parameters.
/**
@ -253,7 +251,7 @@ public:
* does not know what transport property it is at this point.
*/
doublereal getMixTransProp(doublereal* valueSpecies, doublereal* weightSpecies = 0);
doublereal getMixTransProp(std::vector<LTPspecies*> LTPptrs) ;
doublereal getMixTransProp(std::vector<LTPspecies*> LTPptrs);
//! Return the matrix of binary interaction parameters.
/**
@ -318,7 +316,7 @@ public:
* does not know what transport property it is at this point.
*/
doublereal getMixTransProp(doublereal* valueSpecies, doublereal* weightSpecies = 0);
doublereal getMixTransProp(std::vector<LTPspecies*> LTPptrs) ;
doublereal getMixTransProp(std::vector<LTPspecies*> LTPptrs);
//! Return the matrix of binary interaction parameters.
/**
@ -359,7 +357,7 @@ public:
m_model = LTI_MODEL_PAIRWISE_INTERACTION;
}
void setParameters(LiquidTransportParams& trParam) ;
void setParameters(LiquidTransportParams& trParam);
//! Return the mixture transport property value.
/**
@ -367,14 +365,14 @@ public:
* does not know what transport property it is at this point.
*/
doublereal getMixTransProp(doublereal* valueSpecies, doublereal* weightSpecies = 0);
doublereal getMixTransProp(std::vector<LTPspecies*> LTPptrs) ;
doublereal getMixTransProp(std::vector<LTPspecies*> LTPptrs);
//! Return the matrix of binary interaction parameters.
/**
* Takes the proper mixing rule for the binary interaction parameters
* and calculates them
*/
void getMatrixTransProp(DenseMatrix& mat, doublereal* speciesValues = 0) ;
void getMatrixTransProp(DenseMatrix& mat, doublereal* speciesValues = 0);
protected:
std::vector<LTPspecies*> m_diagonals;
@ -457,7 +455,7 @@ public:
m_model = LTI_MODEL_STEFANMAXWELL_PPN;
}
void setParameters(LiquidTransportParams& trParam) ;
void setParameters(LiquidTransportParams& trParam);
//! Return the mixture transport property value.
/**
@ -465,14 +463,14 @@ public:
* does not know what transport property it is at this point.
*/
doublereal getMixTransProp(doublereal* valueSpecies, doublereal* weightSpecies = 0);
doublereal getMixTransProp(std::vector<LTPspecies*> LTPptrs) ;
doublereal getMixTransProp(std::vector<LTPspecies*> LTPptrs);
//! Return the matrix of binary interaction parameters.
/**
* Takes the proper mixing rule for the binary interaction parameters
* and calculates them
*/
void getMatrixTransProp(DenseMatrix& mat, doublereal* speciesValues = 0) ;
void getMatrixTransProp(DenseMatrix& mat, doublereal* speciesValues = 0);
protected:
doublereal m_ionCondMix;
@ -506,14 +504,14 @@ public:
* transport property it is at this point.
*/
doublereal getMixTransProp(doublereal* valueSpecies, doublereal* weightSpecies = 0);
doublereal getMixTransProp(std::vector<LTPspecies*> LTPptrs) ;
doublereal getMixTransProp(std::vector<LTPspecies*> LTPptrs);
//! Return the matrix of binary interaction parameters.
/**
* Takes the proper mixing rule for the binary interaction parameters
* and calculates them
*/
void getMatrixTransProp(DenseMatrix& mat, doublereal* speciesValues = 0) ;
void getMatrixTransProp(DenseMatrix& mat, doublereal* speciesValues = 0);
protected:
std::vector<LTPspecies*> m_viscosity;
@ -542,7 +540,7 @@ public:
* does not know what transport property it is at this point.
*/
doublereal getMixTransProp(doublereal* valueSpecies, doublereal* weightSpecies = 0);
doublereal getMixTransProp(std::vector<LTPspecies*> LTPptrs) ;
doublereal getMixTransProp(std::vector<LTPspecies*> LTPptrs);
//! Return the matrix of binary interaction parameters.
/**

View file

@ -473,7 +473,7 @@ public:
virtual void getSpeciesVdiffES(size_t ndim, const doublereal* grad_T,
int ldx, const doublereal* grad_X,
int ldf, const doublereal* grad_Phi,
doublereal* Vdiff) ;
doublereal* Vdiff);
//! Return the species diffusive mass fluxes wrt to
//! the averaged velocity in [kmol/m^2/s].

View file

@ -35,7 +35,7 @@ public:
* The ionConductivity calculation is handled by subclasses of
* LTPspecies as specified in the input file.
*/
virtual doublereal ionConductivity() ;
virtual doublereal ionConductivity();
//! Returns the thermal conductivity of the phase
/*!

View file

@ -72,7 +72,7 @@ public:
protected:
//! Bruggeman exponent: power to which the tortuosity depends on the volume fraction
double expBrug_ ;
double expBrug_;
};

View file

@ -122,7 +122,7 @@ int flamespeed(double phi)
locs.resize(3);
value.resize(3);
//ramp values from inlet to adiabatic flame conditions
// ramp values from inlet to adiabatic flame conditions
// over 70% of domain and then level off at equilibrium
double z1=0.7;

View file

@ -108,17 +108,17 @@ void Application::Messages::addError(const std::string& r, const std::string& ms
int Application::Messages::getErrorCount()
{
return static_cast<int>(errorMessage.size()) ;
return static_cast<int>(errorMessage.size());
}
void Application::Messages::setLogger(Logger* _logwriter)
{
if (logwriter == _logwriter) {
return ;
return;
}
if (logwriter != 0) {
delete logwriter;
logwriter = 0 ;
logwriter = 0;
}
logwriter = _logwriter;
}
@ -141,23 +141,23 @@ static mutex_t msg_mutex;
Application::Messages* Application::ThreadMessages::operator ->()
{
ScopedLock msgLock(msg_mutex);
cthreadId_t curId = getThisThreadId() ;
threadMsgMap_t::iterator iter = m_threadMsgMap.find(curId) ;
cthreadId_t curId = getThisThreadId();
threadMsgMap_t::iterator iter = m_threadMsgMap.find(curId);
if (iter != m_threadMsgMap.end()) {
return iter->second.get();
}
pMessages_t pMsgs(new Messages()) ;
m_threadMsgMap.insert(std::pair< cthreadId_t, pMessages_t >(curId, pMsgs)) ;
return pMsgs.get() ;
pMessages_t pMsgs(new Messages());
m_threadMsgMap.insert(std::pair< cthreadId_t, pMessages_t >(curId, pMsgs));
return pMsgs.get();
}
void Application::ThreadMessages::removeThreadMessages()
{
ScopedLock msgLock(msg_mutex);
cthreadId_t curId = getThisThreadId() ;
threadMsgMap_t::iterator iter = m_threadMsgMap.find(curId) ;
cthreadId_t curId = getThisThreadId();
threadMsgMap_t::iterator iter = m_threadMsgMap.find(curId);
if (iter != m_threadMsgMap.end()) {
m_threadMsgMap.erase(iter) ;
m_threadMsgMap.erase(iter);
}
}
#endif // THREAD_SAFE_CANTERA
@ -173,7 +173,7 @@ Application::Application() :
// output / standard error
setDefaultDirectories();
#if defined(THREAD_SAFE_CANTERA)
Unit::units() ;
Unit::units();
#endif
}
@ -219,7 +219,7 @@ void Application::warn_deprecated(const std::string& method,
void Application::thread_complete()
{
#if defined(THREAD_SAFE_CANTERA)
pMessenger.removeThreadMessages() ;
pMessenger.removeThreadMessages();
#endif
}
@ -333,8 +333,8 @@ long int Application::readStringRegistryKey(const std::string& keyName, const st
void Application::Messages::popError()
{
if (!errorMessage.empty()) {
errorRoutine.pop_back() ;
errorMessage.pop_back() ;
errorRoutine.pop_back();
errorMessage.pop_back();
}
}

View file

@ -69,7 +69,7 @@ protected:
/*!
* @ingroup errorhandling
*/
int getErrorCount() ;
int getErrorCount();
//! Discard the last error message
/*!
@ -79,7 +79,7 @@ protected:
*
* @ingroup errorhandling
*/
void popError() ;
void popError();
//! Retrieve the last error message in a string
/*!
@ -88,7 +88,7 @@ protected:
*
* @ingroup errorhandling
*/
std::string lastErrorMessage() ;
std::string lastErrorMessage();
//! Prints all of the error messages to an ostream
/*!
@ -102,7 +102,7 @@ protected:
*
* @ingroup errorhandling
*/
void getErrors(std::ostream& f) ;
void getErrors(std::ostream& f);
//! Prints all of the error messages using writelog
/*!
@ -143,7 +143,7 @@ protected:
* @see Logger.
* @ingroup textlogs
*/
void setLogger(Logger* logwriter) ;
void setLogger(Logger* logwriter);
protected:
//! Current list of error messages
@ -154,11 +154,11 @@ protected:
//! Current pointer to the logwriter
Logger* logwriter;
} ;
};
#ifdef THREAD_SAFE_CANTERA
//! Typedef for thread specific messages
typedef boost::shared_ptr< Messages > pMessages_t ;
typedef boost::shared_ptr< Messages > pMessages_t;
//! Class that stores thread messages for each thread, and retrieves them
//! based on the thread id.
@ -178,12 +178,12 @@ protected:
void removeThreadMessages();
//! Typedef for map between a thread and the message
typedef std::map< cthreadId_t, pMessages_t > threadMsgMap_t ;
typedef std::map< cthreadId_t, pMessages_t > threadMsgMap_t;
private:
//! Thread Msg Map
threadMsgMap_t m_threadMsgMap ;
} ;
threadMsgMap_t m_threadMsgMap;
};
#endif
protected:
@ -209,32 +209,32 @@ public:
//! @copydoc Messages::addError
void addError(const std::string& r, const std::string& msg) {
pMessenger->addError(r, msg) ;
pMessenger->addError(r, msg);
}
//! @copydoc Messages::getErrorCount
int getErrorCount() {
return pMessenger->getErrorCount() ;
return pMessenger->getErrorCount();
}
//! @copydoc Messages::popError
void popError() {
pMessenger->popError() ;
pMessenger->popError();
}
//! @copydoc Messages::lastErrorMessage
std::string lastErrorMessage() {
return pMessenger->lastErrorMessage() ;
return pMessenger->lastErrorMessage();
}
//! @copydoc Messages::getErrors
void getErrors(std::ostream& f) {
pMessenger->getErrors(f) ;
pMessenger->getErrors(f);
}
//! @copydoc Messages::logErrors
void logErrors() {
pMessenger->logErrors() ;
pMessenger->logErrors();
}
//! Add a directory to the data file search path.
@ -243,7 +243,7 @@ public:
*
* @param dir String name for the directory to be added to the search path
*/
void addDataDirectory(const std::string& dir) ;
void addDataDirectory(const std::string& dir);
//! Find an input file.
/*!
@ -270,7 +270,7 @@ public:
*
* @ingroup inputfiles
*/
std::string findInputFile(const std::string& name) ;
std::string findInputFile(const std::string& name);
//! Return a pointer to the XML tree for a Cantera input file.
/*!
@ -282,7 +282,7 @@ public:
* @param file String containing the relative or absolute file name
* @param debug Debug flag
*/
XML_Node* get_XML_File(const std::string& file, int debug=0) ;
XML_Node* get_XML_File(const std::string& file, int debug=0);
//! Read a CTI or CTML string and fill up an XML tree.
/*!
@ -301,7 +301,7 @@ public:
*
* @param file String containing the relative or absolute file name
*/
void close_XML_File(const std::string& file) ;
void close_XML_File(const std::string& file);
#ifdef _WIN32
long int readStringRegistryKey(const std::string& keyName, const std::string& valueName,
@ -342,7 +342,7 @@ public:
* version of Cantera has not been specifically compiled for thread safety
* this function does nothing.
*/
void thread_complete() ;
void thread_complete();
protected:
//! Set the default directories for input files.
@ -386,14 +386,14 @@ protected:
bool m_suppress_deprecation_warnings;
#if defined(THREAD_SAFE_CANTERA)
ThreadMessages pMessenger ;
ThreadMessages pMessenger;
#else
std::auto_ptr<Messages> pMessenger ;
std::auto_ptr<Messages> pMessenger;
#endif
private:
//! Pointer to the single Application instance
static Application* s_app ;
static Application* s_app;
};
}

View file

@ -60,7 +60,7 @@ void ct2ctml(const char* file, const int debug)
// For Windows, make the path POSIX compliant so code looking for directory
// separators is simpler. Just look for '/' not both '/' and '\\'
std::replace_if(out_name.begin(), out_name.end(),
std::bind2nd(std::equal_to<char>(), '\\'), '/') ;
std::bind2nd(std::equal_to<char>(), '\\'), '/');
#endif
size_t idir = out_name.rfind('/');
if (idir != npos) {

View file

@ -16,7 +16,7 @@ namespace Cantera
//! Return a pointer to the application object
static Application* app()
{
return Application::Instance() ;
return Application::Instance();
}
// **************** Text Logging ****************
@ -24,7 +24,7 @@ static Application* app()
void setLogger(Logger* logwriter)
{
try {
app()->setLogger(logwriter) ;
app()->setLogger(logwriter);
} catch (std::bad_alloc) {
logwriter->error("bad alloc thrown by app()");
}
@ -37,20 +37,20 @@ void writelog(const std::string& msg)
void writelogf(const char* fmt,...)
{
enum { BUFSIZE = 2048 } ;
char sbuf[BUFSIZE] ;
enum { BUFSIZE = 2048 };
char sbuf[BUFSIZE];
va_list args ;
va_start(args, fmt) ;
va_list args;
va_start(args, fmt);
#ifdef _MSC_VER
_vsnprintf(sbuf, BUFSIZE, fmt, args) ;
_vsnprintf(sbuf, BUFSIZE, fmt, args);
#else
vsprintf(sbuf, fmt, args) ;
vsprintf(sbuf, fmt, args);
#endif
writelog(sbuf) ;
va_end(args) ;
writelog(sbuf);
va_end(args);
}
void writelogendl()
@ -86,19 +86,19 @@ mutex_t Unit::units_mutex;
void appdelete()
{
Application::ApplicationDestroy() ;
Application::ApplicationDestroy();
FactoryBase::deleteFactories();
Unit::deleteUnit();
}
void thread_complete()
{
app()->thread_complete() ;
app()->thread_complete();
}
XML_Node* get_XML_File(const std::string& file, int debug)
{
XML_Node* xtmp = app()->get_XML_File(file, debug) ;
XML_Node* xtmp = app()->get_XML_File(file, debug);
return xtmp;
}
@ -109,7 +109,7 @@ XML_Node* get_XML_from_string(const std::string& text)
void close_XML_File(const std::string& file)
{
app()->close_XML_File(file) ;
app()->close_XML_File(file);
}
int nErrors()
@ -119,37 +119,37 @@ int nErrors()
void popError()
{
app()->popError() ;
app()->popError();
}
string lastErrorMessage()
{
return app()->lastErrorMessage() ;
return app()->lastErrorMessage();
}
void showErrors(std::ostream& f)
{
app()->getErrors(f) ;
app()->getErrors(f);
}
void showErrors()
{
app()->logErrors() ;
app()->logErrors();
}
void setError(const std::string& r, const std::string& msg)
{
app()->addError(r, msg) ;
app()->addError(r, msg);
}
void addDirectory(const std::string& dir)
{
app()->addDataDirectory(dir) ;
app()->addDataDirectory(dir);
}
std::string findInputFile(const std::string& name)
{
return app()->findInputFile(name) ;
return app()->findInputFile(name);
}
doublereal toSI(const std::string& unit)

View file

@ -382,7 +382,7 @@ int VCS_SOLVE::vcs_elcorr(double aa[], double x[])
(m_elType[i] == VCS_ELEM_TYPE_ABSPOS && m_elemAbundancesGoal[i] == 0.0)) {
for (size_t kspec = 0; kspec < m_numSpeciesRdc; kspec++) {
if (m_elemAbundances[i] > 0.0 && m_formulaMatrix(kspec,i) < 0.0) {
m_molNumSpecies_old[kspec] -= m_elemAbundances[i] / m_formulaMatrix(kspec,i) ;
m_molNumSpecies_old[kspec] -= m_elemAbundances[i] / m_formulaMatrix(kspec,i);
m_molNumSpecies_old[kspec] = std::max(m_molNumSpecies_old[kspec], 0.0);
vcs_elab();
break;
@ -424,14 +424,14 @@ int VCS_SOLVE::vcs_elcorr(double aa[], double x[])
for (size_t kspec = 0; kspec < m_numSpeciesRdc; kspec++) {
if (m_molNumSpecies_old[kspec] > 0.0 || useZeroed) {
if (dev < 0.0 && m_formulaMatrix(kspec,i) < 0.0) {
double delta = dev / m_formulaMatrix(kspec,i) ;
double delta = dev / m_formulaMatrix(kspec,i);
m_molNumSpecies_old[kspec] += delta;
m_molNumSpecies_old[kspec] = std::max(m_molNumSpecies_old[kspec], 0.0);
vcs_elab();
break;
}
if (dev > 0.0 && m_formulaMatrix(kspec,i) > 0.0) {
double delta = dev / m_formulaMatrix(kspec,i) ;
double delta = dev / m_formulaMatrix(kspec,i);
m_molNumSpecies_old[kspec] += delta;
m_molNumSpecies_old[kspec] = std::max(m_molNumSpecies_old[kspec], 0.0);
vcs_elab();

View file

@ -3456,7 +3456,7 @@ void VCS_SOLVE::vcs_dfe(const int stateCalc,
AssertThrowMsg(m_chargeSpecies[kspec] == -1.0, "VCS_SOLVE::vcs_dfe",
"We have an unexpected situation!");
feSpecies[kspec] = m_SSfeSpecies[kspec]
+ m_chargeSpecies[kspec] * m_Faraday_dim * m_phasePhi[iphase]; ;
+ m_chargeSpecies[kspec] * m_Faraday_dim * m_phasePhi[iphase];
} else {
if (m_SSPhase[kspec]) {
feSpecies[kspec] = m_SSfeSpecies[kspec]

View file

@ -140,7 +140,7 @@ void onedimmethods(int nlhs, mxArray* plhs[],
case 18:
checkNArgs(4, nrhs);
nm = getString(prhs[3]);
vv = (double) domain_componentIndex(dom, nm) ;
vv = (double) domain_componentIndex(dom, nm);
if (vv >= 0.0) {
vv += 1.0;
}

View file

@ -523,7 +523,7 @@ int RootFind::solve(doublereal xmin, doublereal xmax, int itmax, doublereal& fun
*/
doublereal xDelMax = 1.5 * fabs(x2 - x1);
if (specifiedDeltaXnorm_ && 0.5 * DeltaXnorm_ > xDelMax) {
xDelMax = 0.5 *DeltaXnorm_ ;
xDelMax = 0.5 *DeltaXnorm_;
}
if (fabs(xDelMax) < fabs(xnew - x2)) {
xnew = x2 + sign(xnew-x2) * xDelMax;

View file

@ -434,8 +434,7 @@ void StFlow::eval(size_t jg, doublereal* xg,
dtdzj = dTdz(x,j);
sum2 *= GasConstant * dtdzj;
rsd[index(c_offset_T, j)] =
- m_cp[j]*rho_u(x,j)*dtdzj
rsd[index(c_offset_T, j)] = - m_cp[j]*rho_u(x,j)*dtdzj
- divHeatFlux(x,j) - sum - sum2;
rsd[index(c_offset_T, j)] /= (m_rho[j]*m_cp[j]);
rsd[index(c_offset_T, j)] -= rdt*(T(x,j) - T_prev(j));

View file

@ -130,7 +130,7 @@ DebyeHuckel& DebyeHuckel::operator=(const DebyeHuckel& b)
m_npActCoeff = b.m_npActCoeff;
// This is an internal shallow copy of the PDSS_Water pointer
m_waterSS = dynamic_cast<PDSS_Water*>(providePDSS(0)) ;
m_waterSS = dynamic_cast<PDSS_Water*>(providePDSS(0));
if (!m_waterSS) {
throw CanteraError("DebyHuckel::operator=()", "Dynamic cast to waterPDSS failed");
}
@ -578,7 +578,7 @@ void DebyeHuckel::initThermoXML(XML_Node& phaseNode, const std::string& id_)
if (formString == "Dilute_limit") {
m_formDH = DHFORM_DILUTE_LIMIT;
} else if (formString == "Bdot_with_variable_a") {
m_formDH = DHFORM_BDOT_AK ;
m_formDH = DHFORM_BDOT_AK;
} else if (formString == "Bdot_with_common_a") {
m_formDH = DHFORM_BDOT_ACOMMON;
} else if (formString == "Beta_ij") {
@ -703,7 +703,7 @@ void DebyeHuckel::initThermoXML(XML_Node& phaseNode, const std::string& id_)
/*
* Initialize the water standard state model
*/
m_waterSS = dynamic_cast<PDSS_Water*>(providePDSS(0)) ;
m_waterSS = dynamic_cast<PDSS_Water*>(providePDSS(0));
if (!m_waterSS) {
throw CanteraError("HMWSoln::installThermoXML",
"Dynamic cast to PDSS_Water failed");
@ -1225,8 +1225,7 @@ void DebyeHuckel::s_update_lnMolalityActCoeff() const
m_IionicMolalityStoich += m_molalities[k] * z_k * z_k;
} else {
zs_k2 = z_k - zs_k1;
m_IionicMolalityStoich
+= m_molalities[k] * (zs_k1 * zs_k1 + zs_k2 * zs_k2);
m_IionicMolalityStoich += m_molalities[k] * (zs_k1 * zs_k1 + zs_k2 * zs_k2);
}
}
m_IionicMolalityStoich /= 2.0;

View file

@ -312,7 +312,7 @@ HMWSoln& HMWSoln::operator=(const HMWSoln& b)
m_dlnActCoeffMolaldT_Scaled = b.m_dlnActCoeffMolaldT_Scaled;
m_dlnActCoeffMolaldT_Unscaled = b.m_dlnActCoeffMolaldT_Unscaled;
m_d2lnActCoeffMolaldT2_Scaled = b.m_d2lnActCoeffMolaldT2_Scaled;
m_d2lnActCoeffMolaldT2_Unscaled= b.m_d2lnActCoeffMolaldT2_Unscaled;
m_d2lnActCoeffMolaldT2_Unscaled = b.m_d2lnActCoeffMolaldT2_Unscaled;
m_dlnActCoeffMolaldP_Scaled = b.m_dlnActCoeffMolaldP_Scaled;
m_dlnActCoeffMolaldP_Unscaled = b.m_dlnActCoeffMolaldP_Unscaled;
@ -1127,8 +1127,7 @@ void HMWSoln::s_update_lnMolalityActCoeff() const
m_IionicMolalityStoich += m_molalities[k] * z_k * z_k;
} else {
double zs_k2 = z_k - zs_k1;
m_IionicMolalityStoich
+= m_molalities[k] * (zs_k1 * zs_k1 + zs_k2 * zs_k2);
m_IionicMolalityStoich += m_molalities[k] * (zs_k1 * zs_k1 + zs_k2 * zs_k2);
}
}
@ -1261,14 +1260,14 @@ void HMWSoln::calcMolalitiesCropped() const
double charge_i = charge(i);
if (charge_i < 0.0) {
double anion_contrib = - m_molalitiesCropped[i] * charge_i;
anion_charge += anion_contrib ;
anion_charge += anion_contrib;
if (anion_contrib > anion_contrib_max) {
anion_contrib_max = anion_contrib;
anion_contrib_max_i = i;
}
} else if (charge_i > 0.0) {
double cation_contrib = m_molalitiesCropped[i] * charge_i;
cation_charge += cation_contrib ;
cation_charge += cation_contrib;
if (cation_contrib > cation_contrib_max) {
cation_contrib_max = cation_contrib;
cation_contrib_max_i = i;
@ -1313,7 +1312,7 @@ void HMWSoln::calcMolalitiesCropped() const
double p = xmolSolvent + MC_epCut_ + exp(- xmolSolvent/ MC_cpCut_) * poly;
double denomInv = 1.0/ (m_Mnaught * p);
for (size_t k = 0; k < m_kk; k++) {
m_molalitiesCropped[k] = molF[k] * denomInv ;
m_molalitiesCropped[k] = molF[k] * denomInv;
}
// Do a further check to see if the Ionic strength is below a max value
@ -1560,7 +1559,7 @@ void HMWSoln::s_updatePitzer_CoeffWRTemp(int doDerivs) const
for (size_t i = 1; i < m_kk; i++) {
for (size_t j = 1; j < m_kk; j++) {
for (size_t k = 1; k < m_kk; k++) {
size_t n = i * m_kk *m_kk + j * m_kk + k ;
size_t n = i * m_kk *m_kk + j * m_kk + k;
const double* Psi_coeff = m_Psi_ijk_coeff.ptrColumn(n);
m_Psi_ijk[n] = Psi_coeff[0];
}
@ -1571,7 +1570,7 @@ void HMWSoln::s_updatePitzer_CoeffWRTemp(int doDerivs) const
for (size_t i = 1; i < m_kk; i++) {
for (size_t j = 1; j < m_kk; j++) {
for (size_t k = 1; k < m_kk; k++) {
size_t n = i * m_kk *m_kk + j * m_kk + k ;
size_t n = i * m_kk *m_kk + j * m_kk + k;
const double* Psi_coeff = m_Psi_ijk_coeff.ptrColumn(n);
m_Psi_ijk[n] = Psi_coeff[0] + Psi_coeff[1]*tlin;
m_Psi_ijk_L[n] = Psi_coeff[1];
@ -1584,7 +1583,7 @@ void HMWSoln::s_updatePitzer_CoeffWRTemp(int doDerivs) const
for (size_t i = 1; i < m_kk; i++) {
for (size_t j = 1; j < m_kk; j++) {
for (size_t k = 1; k < m_kk; k++) {
size_t n = i * m_kk *m_kk + j * m_kk + k ;
size_t n = i * m_kk *m_kk + j * m_kk + k;
const double* Psi_coeff = m_Psi_ijk_coeff.ptrColumn(n);
m_Psi_ijk[n] = Psi_coeff[0]
+ Psi_coeff[1]*tlin
@ -3262,14 +3261,14 @@ void HMWSoln::s_updatePitzer_d2lnMolalityActCoeff_dT2() const
}
const double* molality = DATA_PTR(m_molalitiesCropped);
const double* beta0MX_LL= DATA_PTR(m_Beta0MX_ij_LL);
const double* beta1MX_LL= DATA_PTR(m_Beta1MX_ij_LL);
const double* beta2MX_LL= DATA_PTR(m_Beta2MX_ij_LL);
const double* beta0MX_LL = DATA_PTR(m_Beta0MX_ij_LL);
const double* beta1MX_LL = DATA_PTR(m_Beta1MX_ij_LL);
const double* beta2MX_LL = DATA_PTR(m_Beta2MX_ij_LL);
const double* CphiMX_LL = DATA_PTR(m_CphiMX_ij_LL);
const double* thetaij_LL= DATA_PTR(m_Theta_ij_LL);
const double* thetaij_LL = DATA_PTR(m_Theta_ij_LL);
const double* alpha1MX = DATA_PTR(m_Alpha1MX_ij);
const double* alpha2MX = DATA_PTR(m_Alpha2MX_ij);
const double* psi_ijk_LL= DATA_PTR(m_Psi_ijk_LL);
const double* psi_ijk_LL = DATA_PTR(m_Psi_ijk_LL);
/*
* Local variables defined by Coltrin
@ -3295,11 +3294,11 @@ void HMWSoln::s_updatePitzer_d2lnMolalityActCoeff_dT2() const
double* hfunc = DATA_PTR(m_hfunc_IJ);
double* h2func = DATA_PTR(m_h2func_IJ);
double* BMX_LL = DATA_PTR(m_BMX_IJ_LL);
double* BprimeMX_LL=DATA_PTR(m_BprimeMX_IJ_LL);
double* BphiMX_LL= DATA_PTR(m_BphiMX_IJ_LL);
double* BprimeMX_LL = DATA_PTR(m_BprimeMX_IJ_LL);
double* BphiMX_LL = DATA_PTR(m_BphiMX_IJ_LL);
double* Phi_LL = DATA_PTR(m_Phi_IJ_LL);
double* Phiprime = DATA_PTR(m_Phiprime_IJ);
double* Phiphi_LL= DATA_PTR(m_PhiPhi_IJ_LL);
double* Phiphi_LL = DATA_PTR(m_PhiPhi_IJ_LL);
double* CMX_LL = DATA_PTR(m_CMX_IJ_LL);
if (DEBUG_MODE_ENABLED && m_debugCalc) {
@ -4044,7 +4043,7 @@ void HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dP() const
double* hfunc = DATA_PTR(m_hfunc_IJ);
double* h2func = DATA_PTR(m_h2func_IJ);
double* BMX_P = DATA_PTR(m_BMX_IJ_P);
double* BprimeMX_P= DATA_PTR(m_BprimeMX_IJ_P);
double* BprimeMX_P = DATA_PTR(m_BprimeMX_IJ_P);
double* BphiMX_P = DATA_PTR(m_BphiMX_IJ_P);
double* Phi_P = DATA_PTR(m_Phi_IJ_P);
double* Phiprime = DATA_PTR(m_Phiprime_IJ);

View file

@ -473,7 +473,7 @@ void HMWSoln::readXMLPsiCommonCation(XML_Node& BinSalt)
if (nodeName == "psi") {
getFloatArray(xmlChild, vParams, false, "", stemp);
size_t nParamsFound = vParams.size();
n = iSpecies * m_kk *m_kk + jSpecies * m_kk + kSpecies ;
n = iSpecies * m_kk *m_kk + jSpecies * m_kk + kSpecies;
if (m_formPitzerTemp == PITZER_TEMP_CONSTANT) {
if (nParamsFound != 1) {
@ -508,31 +508,31 @@ void HMWSoln::readXMLPsiCommonCation(XML_Node& BinSalt)
}
// fill in the duplicate entries
n = iSpecies * m_kk *m_kk + kSpecies * m_kk + jSpecies ;
n = iSpecies * m_kk *m_kk + kSpecies * m_kk + jSpecies;
for (size_t j = 0; j < nParamsFound; j++) {
m_Psi_ijk_coeff(j, n) = vParams[j];
}
m_Psi_ijk[n] = vParams[0];
n = jSpecies * m_kk *m_kk + iSpecies * m_kk + kSpecies ;
n = jSpecies * m_kk *m_kk + iSpecies * m_kk + kSpecies;
for (size_t j = 0; j < nParamsFound; j++) {
m_Psi_ijk_coeff(j, n) = vParams[j];
}
m_Psi_ijk[n] = vParams[0];
n = jSpecies * m_kk *m_kk + kSpecies * m_kk + iSpecies ;
n = jSpecies * m_kk *m_kk + kSpecies * m_kk + iSpecies;
for (size_t j = 0; j < nParamsFound; j++) {
m_Psi_ijk_coeff(j, n) = vParams[j];
}
m_Psi_ijk[n] = vParams[0];
n = kSpecies * m_kk *m_kk + jSpecies * m_kk + iSpecies ;
n = kSpecies * m_kk *m_kk + jSpecies * m_kk + iSpecies;
for (size_t j = 0; j < nParamsFound; j++) {
m_Psi_ijk_coeff(j, n) = vParams[j];
}
m_Psi_ijk[n] = vParams[0];
n = kSpecies * m_kk *m_kk + iSpecies * m_kk + jSpecies ;
n = kSpecies * m_kk *m_kk + iSpecies * m_kk + jSpecies;
for (size_t j = 0; j < nParamsFound; j++) {
m_Psi_ijk_coeff(j, n) = vParams[j];
}
@ -607,7 +607,7 @@ void HMWSoln::readXMLPsiCommonAnion(XML_Node& BinSalt)
if (nodeName == "psi") {
getFloatArray(xmlChild, vParams, false, "", stemp);
size_t nParamsFound = vParams.size();
n = iSpecies * m_kk *m_kk + jSpecies * m_kk + kSpecies ;
n = iSpecies * m_kk *m_kk + jSpecies * m_kk + kSpecies;
if (m_formPitzerTemp == PITZER_TEMP_CONSTANT) {
if (nParamsFound != 1) {
@ -642,31 +642,31 @@ void HMWSoln::readXMLPsiCommonAnion(XML_Node& BinSalt)
}
// fill in the duplicate entries
n = iSpecies * m_kk *m_kk + kSpecies * m_kk + jSpecies ;
n = iSpecies * m_kk *m_kk + kSpecies * m_kk + jSpecies;
for (size_t j = 0; j < nParamsFound; j++) {
m_Psi_ijk_coeff(j, n) = vParams[j];
}
m_Psi_ijk[n] = vParams[0];
n = jSpecies * m_kk *m_kk + iSpecies * m_kk + kSpecies ;
n = jSpecies * m_kk *m_kk + iSpecies * m_kk + kSpecies;
for (size_t j = 0; j < nParamsFound; j++) {
m_Psi_ijk_coeff(j, n) = vParams[j];
}
m_Psi_ijk[n] = vParams[0];
n = jSpecies * m_kk *m_kk + kSpecies * m_kk + iSpecies ;
n = jSpecies * m_kk *m_kk + kSpecies * m_kk + iSpecies;
for (size_t j = 0; j < nParamsFound; j++) {
m_Psi_ijk_coeff(j, n) = vParams[j];
}
m_Psi_ijk[n] = vParams[0];
n = kSpecies * m_kk *m_kk + jSpecies * m_kk + iSpecies ;
n = kSpecies * m_kk *m_kk + jSpecies * m_kk + iSpecies;
for (size_t j = 0; j < nParamsFound; j++) {
m_Psi_ijk_coeff(j, n) = vParams[j];
}
m_Psi_ijk[n] = vParams[0];
n = kSpecies * m_kk *m_kk + iSpecies * m_kk + jSpecies ;
n = kSpecies * m_kk *m_kk + iSpecies * m_kk + jSpecies;
for (size_t j = 0; j < nParamsFound; j++) {
m_Psi_ijk_coeff(j, n) = vParams[j];
}
@ -876,7 +876,7 @@ void HMWSoln::readXMLZetaCation(const XML_Node& BinSalt)
if (nodeName == "zeta") {
getFloatArray(xmlChild, vParams, false, "", "zeta");
size_t nParamsFound = vParams.size();
size_t n = iSpecies * m_kk *m_kk + jSpecies * m_kk + kSpecies ;
size_t n = iSpecies * m_kk *m_kk + jSpecies * m_kk + kSpecies;
if (m_formPitzerTemp == PITZER_TEMP_CONSTANT) {
if (nParamsFound != 1) {
@ -1279,7 +1279,7 @@ void HMWSoln::initThermoXML(XML_Node& phaseNode, const std::string& id_)
* Store a local pointer to the water standard state model.
* -> We've hardcoded it to a PDSS_Water model, so this is ok.
*/
m_waterSS = dynamic_cast<PDSS_Water*>(providePDSS(0)) ;
m_waterSS = dynamic_cast<PDSS_Water*>(providePDSS(0));
if (!m_waterSS) {
throw CanteraError("HMWSoln::initThermoXML",
"Dynamic cast to PDSS_Water failed");

View file

@ -55,7 +55,7 @@ MargulesVPSSTP& MargulesVPSSTP::operator=(const MargulesVPSSTP& b)
GibbsExcessVPSSTP::operator=(b);
numBinaryInteractions_ = b.numBinaryInteractions_ ;
numBinaryInteractions_ = b.numBinaryInteractions_;
m_HE_b_ij = b.m_HE_b_ij;
m_HE_c_ij = b.m_HE_c_ij;
m_HE_d_ij = b.m_HE_d_ij;

View file

@ -59,7 +59,7 @@ MixedSolventElectrolyte::operator=(const MixedSolventElectrolyte& b)
MolarityIonicVPSSTP::operator=(b);
numBinaryInteractions_ = b.numBinaryInteractions_ ;
numBinaryInteractions_ = b.numBinaryInteractions_;
m_HE_b_ij = b.m_HE_b_ij;
m_HE_c_ij = b.m_HE_c_ij;
m_HE_d_ij = b.m_HE_d_ij;

View file

@ -39,7 +39,7 @@ PDSS_ConstVol::PDSS_ConstVol(VPStandardStateTP* tp, size_t spindex,
PDSS(tp, spindex)
{
m_pdssType = cPDSS_CONSTVOL;
constructPDSSXML(tp, spindex, speciesNode, phaseRoot, spInstalled) ;
constructPDSSXML(tp, spindex, speciesNode, phaseRoot, spInstalled);
}
PDSS_ConstVol::PDSS_ConstVol(const PDSS_ConstVol& b) :

View file

@ -48,7 +48,7 @@ PDSS_SSVol::PDSS_SSVol(VPStandardStateTP* tp, size_t spindex,
m_constMolarVolume(-1.0)
{
m_pdssType = cPDSS_SSVOL;
constructPDSSXML(tp, spindex, speciesNode, phaseRoot, spInstalled) ;
constructPDSSXML(tp, spindex, speciesNode, phaseRoot, spInstalled);
}
PDSS_SSVol::PDSS_SSVol(const PDSS_SSVol& b) :

View file

@ -80,7 +80,7 @@ PDSS_Water::PDSS_Water(VPStandardStateTP* tp, int spindex,
{
m_pdssType = cPDSS_WATER;
std::string id= "";
constructPDSSXML(tp, spindex, phaseRoot, id) ;
constructPDSSXML(tp, spindex, phaseRoot, id);
initThermo();
m_spthermo = 0;
m_minTemp = 200.;

View file

@ -600,7 +600,7 @@ void Phase::getMassFractions(doublereal* const y) const
doublereal Phase::concentration(const size_t k) const
{
checkSpeciesIndex(k);
return m_y[k] * m_dens * m_rmolwts[k] ;
return m_y[k] * m_dens * m_rmolwts[k];
}
void Phase::getConcentrations(doublereal* const c) const

View file

@ -54,7 +54,7 @@ PhaseCombo_Interaction& PhaseCombo_Interaction::operator=(const PhaseCombo_Inter
GibbsExcessVPSSTP::operator=(b);
numBinaryInteractions_ = b.numBinaryInteractions_ ;
numBinaryInteractions_ = b.numBinaryInteractions_;
m_HE_b_ij = b.m_HE_b_ij;
m_HE_c_ij = b.m_HE_c_ij;
m_HE_d_ij = b.m_HE_d_ij;

View file

@ -61,7 +61,7 @@ RedlichKisterVPSSTP& RedlichKisterVPSSTP::operator=(const RedlichKisterVPSSTP& b
GibbsExcessVPSSTP::operator=(b);
numBinaryInteractions_ = b.numBinaryInteractions_ ;
numBinaryInteractions_ = b.numBinaryInteractions_;
m_pSpecies_A_ij = b.m_pSpecies_A_ij;
m_pSpecies_B_ij = b.m_pSpecies_B_ij;
m_N_ij = b.m_N_ij;

View file

@ -449,7 +449,7 @@ void RedlichKwongMFTP::getPartialMolarEntropies(doublereal* sbar) const
- 2.0 * m_tmpV[k]/(m_b_current * sqt) * log(vpb/mv)
+ b_vec_Curr_[k] / (m_b_current * m_b_current * sqt) * log(vpb/mv) * fac
- 1.0 / (m_b_current * sqt) * b_vec_Curr_[k] / vpb * fac
) ;
);
}
pressureDerivatives();

View file

@ -87,31 +87,31 @@ static const double G[]= {
double CarbonDioxide::C(int j,double Tinverse, double T2inverse, double T3inverse, double T4inverse)
{
switch (j) {
case 0 :
case 0:
return Acarbdi[0]*T +
Acarbdi[1] +
Acarbdi[2] * Tinverse +
Acarbdi[3] * T2inverse +
Acarbdi[4] * T3inverse ;
case 1 :
Acarbdi[4] * T3inverse;
case 1:
return Acarbdi[5] *T +
Acarbdi[6] +
Acarbdi[7] * Tinverse ;
case 2 :
Acarbdi[7] * Tinverse;
case 2:
return Acarbdi[8]*T + Acarbdi[9];
case 3 :
case 3:
return Acarbdi[10]*T + Acarbdi[11];
case 4 :
case 4:
return Acarbdi[12];
case 5 :
case 5:
return Acarbdi[13] *T2inverse +
Acarbdi[14] *T3inverse +
Acarbdi[15] *T4inverse;
case 6 :
case 6:
return Acarbdi[16] *T2inverse +
Acarbdi[17] *T3inverse +
Acarbdi[18] *T4inverse;
default :
default:
return 0.0;
}
}
@ -119,31 +119,31 @@ double CarbonDioxide::C(int j,double Tinverse, double T2inverse, double T3invers
inline double CarbonDioxide::Cprime(int j, double T2inverse, double T3inverse, double T4inverse)
{
switch (j) {
case 0 :
case 0:
return Acarbdi[0] +
- Acarbdi[2] * T2inverse +
-2 * Acarbdi[3] * T3inverse +
-3 * Acarbdi[4] * T4inverse ;
case 1 :
-3 * Acarbdi[4] * T4inverse;
case 1:
return Acarbdi[5] -
Acarbdi[7] * T2inverse;
case 2 :
return Acarbdi[8] ;
case 3 :
return Acarbdi[10] ;
case 4 :
case 2:
return Acarbdi[8];
case 3:
return Acarbdi[10];
case 4:
return 0;
case 5 :
case 5:
return
-2 *Acarbdi[13] *T3inverse +
-3 *Acarbdi[14] *T4inverse +
-4 *Acarbdi[15]* pow(T,-5);
case 6 :
case 6:
return
-2 *Acarbdi[16] *T3inverse +
-3 *Acarbdi[17] *T4inverse +
-4 *Acarbdi[18] *pow(T,-5);
default :
default:
return 0.0;
}
}

View file

@ -76,21 +76,21 @@ static const double G[]= {
double Heptane::C(int j,double Tinverse, double T2inverse, double T3inverse, double T4inverse)
{
switch (j) {
case 0 :
case 0:
return Ahept[0] * R * T -
Ahept[1] -
Ahept[2] * T2inverse +
Ahept[3] * T3inverse -
Ahept[4] * T4inverse;
case 1 :
case 1:
return Ahept[5] * R * T -
Ahept[6] -
Ahept[7] * Tinverse;
case 2 :
case 2:
return Ahept[9] * (Ahept[6] + Ahept[7] * Tinverse);
case 3 :
case 3:
return Ahept[8] * T2inverse;
default :
default:
return 0.0;
}
}
@ -98,19 +98,19 @@ double Heptane::C(int j,double Tinverse, double T2inverse, double T3inverse, dou
inline double Heptane::Cprime(int j, double T2inverse, double T3inverse, double T4inverse)
{
switch (j) {
case 0 :
case 0:
return Ahept[0] * R -
-2 * Ahept[2] * T3inverse +
-3 * Ahept[3] * T4inverse -
-4 * Ahept[4] * pow(T, -5.0);
case 1 :
case 1:
return Ahept[5] * R -
-1 * Ahept[7] * T2inverse;
case 2 :
case 2:
return Ahept[9] * (-1 * Ahept[7] * T2inverse);
case 3 :
case 3:
return -2 * Ahept[8] * T3inverse;
default :
default:
return 0.0;
}
}

View file

@ -54,35 +54,35 @@ static const double Ghydro[]= {
double hydrogen::C(int i, double rt, double rt2)
{
switch (i) {
case 0 :
case 0:
return Ahydro[0] * T + Ahydro[1] * sqrt(T) + Ahydro[2] + (Ahydro[3] + Ahydro[4] * rt) * rt;
case 1 :
case 1:
return Ahydro[5] * T + Ahydro[6] + rt * (Ahydro[7] + Ahydro[8] * rt);
case 2 :
case 2:
return Ahydro[9] * T + Ahydro[10] + Ahydro[11] * rt;
case 3 :
case 3:
return Ahydro[12];
case 4 :
case 4:
return rt*(Ahydro[13] + Ahydro[14]*rt);
case 5 :
case 5:
return Ahydro[15]*rt;
case 6 :
case 6:
return rt*(Ahydro[16] + Ahydro[17]*rt);
case 7 :
case 7:
return Ahydro[18]*rt2;
case 8 :
case 8:
return rt2*(Ahydro[19] + Ahydro[20]*rt);
case 9 :
case 9:
return rt2*(Ahydro[21] + Ahydro[22]*rt2);
case 10 :
case 10:
return rt2*(Ahydro[23] + Ahydro[24]*rt);
case 11 :
case 11:
return rt2*(Ahydro[25] + Ahydro[26]*rt2);
case 12 :
case 12:
return rt2*(Ahydro[27] + Ahydro[28]*rt);
case 13 :
case 13:
return rt2*(Ahydro[29] + Ahydro[30]*rt + Ahydro[31]*rt2);
default :
default:
return 0.0;
}
}
@ -90,35 +90,35 @@ double hydrogen::C(int i, double rt, double rt2)
double hydrogen::Cprime(int i, double rt, double rt2, double rt3)
{
switch (i) {
case 0 :
case 0:
return Ahydro[0] + 0.5*Ahydro[1]/sqrt(T) - (Ahydro[3] + 2.0*Ahydro[4]*rt)*rt2;
case 1 :
case 1:
return Ahydro[5] - rt2*(Ahydro[7] + 2.0*Ahydro[8]*rt);
case 2 :
case 2:
return Ahydro[9] - Ahydro[11]*rt2;
case 3 :
case 3:
return 0.0;
case 4 :
case 4:
return -rt2*(Ahydro[13] + 2.0*Ahydro[14]*rt);
case 5 :
case 5:
return -Ahydro[15]*rt2;
case 6 :
case 6:
return -rt2*(Ahydro[16] + 2.0*Ahydro[17]*rt);
case 7 :
case 7:
return -2.0*Ahydro[18]*rt3;
case 8 :
case 8:
return -rt3*(2.0*Ahydro[19] + 3.0*Ahydro[20]*rt);
case 9 :
case 9:
return -rt3*(2.0*Ahydro[21] + 4.0*Ahydro[22]*rt2);
case 10 :
case 10:
return -rt3*(2.0*Ahydro[23] + 3.0*Ahydro[24]*rt);
case 11 :
case 11:
return -rt3*(2.0*Ahydro[25] + 4.0*Ahydro[26]*rt2);
case 12 :
case 12:
return -rt3*(2.0*Ahydro[27] + 3.0*Ahydro[28]*rt);
case 13 :
case 13:
return -rt3*(2.0*Ahydro[29] + 3.0*Ahydro[30]*rt + 4.0*Ahydro[31]*rt2);
default :
default:
return 0.0;
}
}

View file

@ -49,35 +49,35 @@ static const double Gmeth[]=
double methane::C(int i, double rt, double rt2)
{
switch (i) {
case 0 :
case 0:
return Ameth[0] * T + Ameth[1] * sqrt(T) + Ameth[2] + (Ameth[3] + Ameth[4] * rt) * rt;
case 1 :
case 1:
return Ameth[5] * T + Ameth[6] + rt * (Ameth[7] + Ameth[8] * rt);
case 2 :
case 2:
return Ameth[9] * T + Ameth[10] + Ameth[11] * rt;
case 3 :
case 3:
return Ameth[12];
case 4 :
case 4:
return rt*(Ameth[13] + Ameth[14]*rt);
case 5 :
case 5:
return Ameth[15]*rt;
case 6 :
case 6:
return rt*(Ameth[16] + Ameth[17]*rt);
case 7 :
case 7:
return Ameth[18]*rt2;
case 8 :
case 8:
return rt2*(Ameth[19] + Ameth[20]*rt);
case 9 :
case 9:
return rt2*(Ameth[21] + Ameth[22]*rt2);
case 10 :
case 10:
return rt2*(Ameth[23] + Ameth[24]*rt);
case 11 :
case 11:
return rt2*(Ameth[25] + Ameth[26]*rt2);
case 12 :
case 12:
return rt2*(Ameth[27] + Ameth[28]*rt);
case 13 :
case 13:
return rt2*(Ameth[29] + Ameth[30]*rt + Ameth[31]*rt2);
default :
default:
return 0.0;
}
}
@ -85,35 +85,35 @@ double methane::C(int i, double rt, double rt2)
double methane::Cprime(int i, double rt, double rt2, double rt3)
{
switch (i) {
case 0 :
case 0:
return Ameth[0] + 0.5*Ameth[1]/sqrt(T) - (Ameth[3] + 2.0*Ameth[4]*rt)*rt2;
case 1 :
case 1:
return Ameth[5] - rt2*(Ameth[7] + 2.0*Ameth[8]*rt);
case 2 :
case 2:
return Ameth[9] - Ameth[11]*rt2;
case 3 :
case 3:
return 0.0;
case 4 :
case 4:
return -rt2*(Ameth[13] + 2.0*Ameth[14]*rt);
case 5 :
case 5:
return -Ameth[15]*rt2;
case 6 :
case 6:
return -rt2*(Ameth[16] + 2.0*Ameth[17]*rt);
case 7 :
case 7:
return -2.0*Ameth[18]*rt3;
case 8 :
case 8:
return -rt3*(2.0*Ameth[19] + 3.0*Ameth[20]*rt);
case 9 :
case 9:
return -rt3*(2.0*Ameth[21] + 4.0*Ameth[22]*rt2);
case 10 :
case 10:
return -rt3*(2.0*Ameth[23] + 3.0*Ameth[24]*rt);
case 11 :
case 11:
return -rt3*(2.0*Ameth[25] + 4.0*Ameth[26]*rt2);
case 12 :
case 12:
return -rt3*(2.0*Ameth[27] + 3.0*Ameth[28]*rt);
case 13 :
case 13:
return -rt3*(2.0*Ameth[29] + 3.0*Ameth[30]*rt + 4.0*Ameth[31]*rt2);
default :
default:
return 0.0;
}
}

View file

@ -55,36 +55,36 @@ static const double Gnn[] = {
double nitrogen::C(int i, double rt, double rt2)
{
switch (i) {
case 0 :
case 0:
return Ann[0] * T + Ann[1] * sqrt(T)
+ Ann[2] + (Ann[3] + Ann[4] * rt) * rt;
case 1 :
case 1:
return Ann[5] * T + Ann[6] + rt * (Ann[7] + Ann[8] * rt);
case 2 :
case 2:
return Ann[9] * T + Ann[10] + Ann[11] * rt;
case 3 :
case 3:
return Ann[12];
case 4 :
case 4:
return rt*(Ann[13] + Ann[14]*rt);
case 5 :
case 5:
return Ann[15]*rt;
case 6 :
case 6:
return rt*(Ann[16] + Ann[17]*rt);
case 7 :
case 7:
return Ann[18]*rt2;
case 8 :
case 8:
return rt2*(Ann[19] + Ann[20]*rt);
case 9 :
case 9:
return rt2*(Ann[21] + Ann[22]*rt2);
case 10 :
case 10:
return rt2*(Ann[23] + Ann[24]*rt);
case 11 :
case 11:
return rt2*(Ann[25] + Ann[26]*rt2);
case 12 :
case 12:
return rt2*(Ann[27] + Ann[28]*rt);
case 13 :
case 13:
return rt2*(Ann[29] + Ann[30]*rt + Ann[31]*rt2);
default :
default:
return 0.0;
}
}
@ -92,35 +92,35 @@ double nitrogen::C(int i, double rt, double rt2)
double nitrogen::Cprime(int i, double rt, double rt2, double rt3)
{
switch (i) {
case 0 :
case 0:
return Ann[0] + 0.5*Ann[1]/sqrt(T) - (Ann[3] + 2.0*Ann[4]*rt)*rt2;
case 1 :
case 1:
return Ann[5] - rt2*(Ann[7] + 2.0*Ann[8]*rt);
case 2 :
case 2:
return Ann[9] - Ann[11]*rt2;
case 3 :
case 3:
return 0.0;
case 4 :
case 4:
return -rt2*(Ann[13] + 2.0*Ann[14]*rt);
case 5 :
case 5:
return -Ann[15]*rt2;
case 6 :
case 6:
return -rt2*(Ann[16] + 2.0*Ann[17]*rt);
case 7 :
case 7:
return -2.0*Ann[18]*rt3;
case 8 :
case 8:
return -rt3*(2.0*Ann[19] + 3.0*Ann[20]*rt);
case 9 :
case 9:
return -rt3*(2.0*Ann[21] + 4.0*Ann[22]*rt2);
case 10 :
case 10:
return -rt3*(2.0*Ann[23] + 3.0*Ann[24]*rt);
case 11 :
case 11:
return -rt3*(2.0*Ann[25] + 4.0*Ann[26]*rt2);
case 12 :
case 12:
return -rt3*(2.0*Ann[27] + 3.0*Ann[28]*rt);
case 13 :
case 13:
return -rt3*(2.0*Ann[29] + 3.0*Ann[30]*rt + 4.0*Ann[31]*rt2);
default :
default:
return 0.0;
}
}

View file

@ -52,35 +52,35 @@ static const double Goxy[] = {
double oxygen::C(int i, double rt, double rt2)
{
switch (i) {
case 0 :
case 0:
return Aoxy[0] * T + Aoxy[1] * sqrt(T) + Aoxy[2] + (Aoxy[3] + Aoxy[4] * rt) * rt;
case 1 :
case 1:
return Aoxy[5] * T + Aoxy[6] + rt * (Aoxy[7] + Aoxy[8] * rt);
case 2 :
case 2:
return Aoxy[9] * T + Aoxy[10] + Aoxy[11] * rt;
case 3 :
case 3:
return Aoxy[12];
case 4 :
case 4:
return rt*(Aoxy[13] + Aoxy[14]*rt);
case 5 :
case 5:
return Aoxy[15]*rt;
case 6 :
case 6:
return rt*(Aoxy[16] + Aoxy[17]*rt);
case 7 :
case 7:
return Aoxy[18]*rt2;
case 8 :
case 8:
return rt2*(Aoxy[19] + Aoxy[20]*rt);
case 9 :
case 9:
return rt2*(Aoxy[21] + Aoxy[22]*rt2);
case 10 :
case 10:
return rt2*(Aoxy[23] + Aoxy[24]*rt);
case 11 :
case 11:
return rt2*(Aoxy[25] + Aoxy[26]*rt2);
case 12 :
case 12:
return rt2*(Aoxy[27] + Aoxy[28]*rt);
case 13 :
case 13:
return rt2*(Aoxy[29] + Aoxy[30]*rt + Aoxy[31]*rt2);
default :
default:
return 0.0;
}
}
@ -88,35 +88,35 @@ double oxygen::C(int i, double rt, double rt2)
double oxygen::Cprime(int i, double rt, double rt2, double rt3)
{
switch (i) {
case 0 :
case 0:
return Aoxy[0] + 0.5*Aoxy[1]/sqrt(T) - (Aoxy[3] + 2.0*Aoxy[4]*rt)*rt2;
case 1 :
case 1:
return Aoxy[5] - rt2*(Aoxy[7] + 2.0*Aoxy[8]*rt);
case 2 :
case 2:
return Aoxy[9] - Aoxy[11]*rt2;
case 3 :
case 3:
return 0.0;
case 4 :
case 4:
return -rt2*(Aoxy[13] + 2.0*Aoxy[14]*rt);
case 5 :
case 5:
return -Aoxy[15]*rt2;
case 6 :
case 6:
return -rt2*(Aoxy[16] + 2.0*Aoxy[17]*rt);
case 7 :
case 7:
return -2.0*Aoxy[18]*rt3;
case 8 :
case 8:
return -rt3*(2.0*Aoxy[19] + 3.0*Aoxy[20]*rt);
case 9 :
case 9:
return -rt3*(2.0*Aoxy[21] + 4.0*Aoxy[22]*rt2);
case 10 :
case 10:
return -rt3*(2.0*Aoxy[23] + 3.0*Aoxy[24]*rt);
case 11 :
case 11:
return -rt3*(2.0*Aoxy[25] + 4.0*Aoxy[26]*rt2);
case 12 :
case 12:
return -rt3*(2.0*Aoxy[27] + 3.0*Aoxy[28]*rt);
case 13 :
case 13:
return -rt3*(2.0*Aoxy[29] + 3.0*Aoxy[30]*rt + 4.0*Aoxy[31]*rt2);
default :
default:
return 0.0;
}
}

View file

@ -359,7 +359,7 @@ doublereal HighPressureGasTransport::viscosity()
+ 0.340*exp(-4.058*Tr_mix)+0.018)*FP_mix_o*FQ_mix_o;
// Calculate Z2m:
if (Tr_mix <= 1.0){
if (Tr_mix <= 1.0) {
if (Pr_mix < Pvp_mix/Pc_mix) {
doublereal alpha = 3.262 + 14.98*pow(Pr_mix,5.508);
doublereal beta = 1.390 + 5.746*Pr_mix;

View file

@ -196,9 +196,9 @@ doublereal LTPspecies_Arrhenius::getSpeciesTransProp()
m_logt = log(m_temp);
//For viscosity the sign convention on positive activation energy is swithced
if (m_property == TP_VISCOSITY) {
m_logProp = m_coeffs[3] + m_coeffs[1] * m_logt + m_coeffs[2] / m_temp ;
m_logProp = m_coeffs[3] + m_coeffs[1] * m_logt + m_coeffs[2] / m_temp;
} else {
m_logProp = m_coeffs[3] + m_coeffs[1] * m_logt - m_coeffs[2] / m_temp ;
m_logProp = m_coeffs[3] + m_coeffs[1] * m_logt - m_coeffs[2] / m_temp;
}
m_prop = exp(m_logProp);
}

View file

@ -99,7 +99,7 @@ void LiquidTranInteraction::init(const XML_Node& compModelNode,
if (xmlChild.hasChild("Eij")) {
m_Eij(iSpecies,jSpecies) = getFloat(xmlChild, "Eij", "actEnergy");
m_Eij(iSpecies,jSpecies) /= GasConstant;
m_Eij(jSpecies,iSpecies) = m_Eij(iSpecies,jSpecies) ;
m_Eij(jSpecies,iSpecies) = m_Eij(iSpecies,jSpecies);
}
if (xmlChild.hasChild("Aij")) {
@ -158,7 +158,7 @@ void LiquidTranInteraction::init(const XML_Node& compModelNode,
if (xmlChild.hasChild("Dij")) {
m_Dij(iSpecies,jSpecies) = getFloat(xmlChild, "Dij", "toSI");
m_Dij(jSpecies,iSpecies) = m_Dij(iSpecies,jSpecies) ;
m_Dij(jSpecies,iSpecies) = m_Dij(iSpecies,jSpecies);
}
}
}
@ -482,7 +482,7 @@ void LTI_Pairwise_Interaction::getMatrixTransProp(DenseMatrix& mat, doublereal*
for (size_t i = 0; i < nsp; i++) {
if (mat(i,i) == 0.0 && m_diagonals[i]) {
mat(i,i) = 1.0 / m_diagonals[i]->getSpeciesTransProp() ;
mat(i,i) = 1.0 / m_diagonals[i]->getSpeciesTransProp();
}
}
}
@ -657,8 +657,8 @@ void LTI_StokesEinstein::getMatrixTransProp(DenseMatrix& mat, doublereal* specie
vector_fp radiusSpec(nsp);
for (size_t k = 0; k < nsp; k++) {
viscSpec[k] = m_viscosity[k]->getSpeciesTransProp() ;
radiusSpec[k] = m_hydroRadius[k]->getSpeciesTransProp() ;
viscSpec[k] = m_viscosity[k]->getSpeciesTransProp();
radiusSpec[k] = m_hydroRadius[k]->getSpeciesTransProp();
}
mat.resize(nsp,nsp, 0.0);

View file

@ -809,7 +809,7 @@ bool LiquidTransport::update_C()
void LiquidTransport::updateCond_T()
{
for (size_t k = 0; k < m_nsp; k++) {
m_lambdaSpecies[k] = m_lambdaTempDep_Ns[k]->getSpeciesTransProp() ;
m_lambdaSpecies[k] = m_lambdaTempDep_Ns[k]->getSpeciesTransProp();
}
m_lambda_temp_ok = true;
m_lambda_mix_ok = false;
@ -830,7 +830,7 @@ void LiquidTransport::updateViscosities_C()
void LiquidTransport::updateViscosity_T()
{
for (size_t k = 0; k < m_nsp; k++) {
m_viscSpecies[k] = m_viscTempDep_Ns[k]->getSpeciesTransProp() ;
m_viscSpecies[k] = m_viscTempDep_Ns[k]->getSpeciesTransProp();
}
m_visc_temp_ok = true;
m_visc_mix_ok = false;
@ -844,7 +844,7 @@ void LiquidTransport::updateIonConductivity_C()
void LiquidTransport::updateIonConductivity_T()
{
for (size_t k = 0; k < m_nsp; k++) {
m_ionCondSpecies[k] = m_ionCondTempDep_Ns[k]->getSpeciesTransProp() ;
m_ionCondSpecies[k] = m_ionCondTempDep_Ns[k]->getSpeciesTransProp();
}
m_ionCond_temp_ok = true;
m_ionCond_mix_ok = false;
@ -875,7 +875,7 @@ void LiquidTransport::updateSelfDiffusion_T()
{
for (size_t k = 0; k < m_nsp2; k++) {
for (size_t j = 0; j < m_nsp; j++) {
m_selfDiffSpecies(k,j) = m_selfDiffTempDep_Ns[k][j]->getSpeciesTransProp() ;
m_selfDiffSpecies(k,j) = m_selfDiffTempDep_Ns[k][j]->getSpeciesTransProp();
}
}
m_selfDiff_temp_ok = true;
@ -890,7 +890,7 @@ void LiquidTransport::updateHydrodynamicRadius_C()
void LiquidTransport::updateHydrodynamicRadius_T()
{
for (size_t k = 0; k < m_nsp; k++) {
m_hydrodynamic_radius[k] = m_radiusTempDep_Ns[k]->getSpeciesTransProp() ;
m_hydrodynamic_radius[k] = m_radiusTempDep_Ns[k]->getSpeciesTransProp();
}
m_radi_temp_ok = true;
m_radi_mix_ok = false;
@ -935,7 +935,7 @@ void LiquidTransport::stefan_maxwell_solve()
}
double T = m_thermo->temperature();
update_Grad_lnAC() ;
update_Grad_lnAC();
m_thermo->getActivityCoefficients(DATA_PTR(m_actCoeff));
/*

View file

@ -579,7 +579,7 @@ void SimpleTransport::updateDiff_T()
double visc = viscosity();
double RT = GasConstant * m_temp;
for (size_t k = 0; k < m_nsp; k++) {
double rad = m_coeffHydroRadius_Ns[k]->getSpeciesTransProp() ;
double rad = m_coeffHydroRadius_Ns[k]->getSpeciesTransProp();
m_diffSpecies[k] = RT / (6.0 * Pi * visc * rad);
}
} else {

View file

@ -223,17 +223,17 @@ int main(int argc, char** argv)
printf(" Species MoleFrac Molal Cp0 "
" partCp (partCp - Cp0)\n");
printf(" H2O(L)");
printf("%13.5f %13.5f %13.5f %13.5f %13.5f\n", Xmol[0], moll[0], Cp0_H2O , Cp_H2O, Cp_H2O-Cp0_H2O);
printf("%13.5f %13.5f %13.5f %13.5f %13.5f\n", Xmol[0], moll[0], Cp0_H2O, Cp_H2O, Cp_H2O-Cp0_H2O);
printf(" Na+ ");
printf("%13.5f %13.5f %13.5f %13.5f %13.5f\n", Xmol[i1], moll[i1],
Cp0_Naplus , Cp_Naplus, Cp_Naplus -Cp0_Naplus);
Cp0_Naplus, Cp_Naplus, Cp_Naplus-Cp0_Naplus);
printf(" Cl- ");
printf("%13.5f %13.5f %13.5f %13.5f %13.5f\n", Xmol[i2], moll[i2],
Cp0_Clminus , Cp_Clminus, Cp_Clminus - Cp0_Clminus);
Cp0_Clminus, Cp_Clminus, Cp_Clminus-Cp0_Clminus);
printf(" NaCl(s)");
printf("%13.5f %13.5f %13.5f %13.5f\n", 1.0,
Cp0_NaCl , Cp_NaCl, Cp_NaCl - Cp0_NaCl);
Cp0_NaCl, Cp_NaCl, Cp_NaCl-Cp0_NaCl);
}

View file

@ -86,7 +86,7 @@ double Cphi(double temp, int ifunc)
+ q13 / temp + q14;
} else if (ifunc == 2) {
retn = + 2.0 * q12 / (temp * temp * temp)
- q13 / (temp * temp) ;
- q13 / (temp * temp);
} else {
exit(-1);
}

View file

@ -210,17 +210,17 @@ int main(int argc, char** argv)
printf(" Species MoleFrac Molal Cp0 "
" partCp (partCp - Cp0)\n");
printf(" H2O(L)");
printf("%13.5g %13.5g %13.5g %13.5g %13.5g\n", Xmol[0], moll[0], Cp0_H2O , Cp_H2O, Cp_H2O-Cp0_H2O);
printf("%13.5g %13.5g %13.5g %13.5g %13.5g\n", Xmol[0], moll[0], Cp0_H2O, Cp_H2O, Cp_H2O-Cp0_H2O);
printf(" Na+ ");
printf("%13.5g %13.5g %13.5g %13.5g %13.5g\n", Xmol[i1], moll[i1],
Cp0_Naplus , Cp_Naplus, Cp_Naplus -Cp0_Naplus);
Cp0_Naplus, Cp_Naplus, Cp_Naplus-Cp0_Naplus);
printf(" Cl- ");
printf("%13.5g %13.5g %13.5g %13.5g %13.5g\n", Xmol[i2], moll[i2],
Cp0_Clminus , Cp_Clminus, Cp_Clminus - Cp0_Clminus);
Cp0_Clminus, Cp_Clminus, Cp_Clminus-Cp0_Clminus);
printf(" NaCl(s)");
printf("%13.5g %13.5g %13.5g %13.5g\n", 1.0,
Cp0_NaCl , Cp_NaCl, Cp_NaCl - Cp0_NaCl);
Cp0_NaCl, Cp_NaCl, Cp_NaCl-Cp0_NaCl);
delete HMW;

View file

@ -90,7 +90,7 @@ double Cphi(double temp, int ifunc)
+ q13 / temp + q14;
} else if (ifunc == 2) {
retn = + 2.0 * q12 / (temp * temp * temp)
- q13 / (temp * temp) ;
- q13 / (temp * temp);
} else if (ifunc == 3) {
retn = 0.0;
} else {