diff --git a/Cantera/src/transport/LiquidTransport.cpp b/Cantera/src/transport/LiquidTransport.cpp index 3cc327412..817492e69 100644 --- a/Cantera/src/transport/LiquidTransport.cpp +++ b/Cantera/src/transport/LiquidTransport.cpp @@ -36,9 +36,9 @@ namespace Cantera { m_nsp(0), m_tmin(-1.0), m_tmax(100000.), - m_viscMixModel(LTR_MIXMODEL_NOTSET), - m_lambdaMixModel(LTR_MIXMODEL_NOTSET), - m_diffMixModel(LTR_MIXMODEL_NOTSET), + m_viscMixModel(LTI_MODEL_NOTSET), + m_lambdaMixModel(LTI_MODEL_NOTSET), + m_diffMixModel(LTI_MODEL_NOTSET), m_iStateMF(-1), m_temp(-1.0), m_logt(0.0), @@ -373,19 +373,19 @@ namespace Cantera { /* We still need to implement interaction parameters */ /* This constant viscosity model has no input */ - if (m_viscMixModel == LTR_MIXMODEL_NOTSET) { + if (m_viscMixModel == LTI_MODEL_NOTSET) { err("A viscosity mixing model must be implemented for LiquidTransport."); //return m_viscmix; - } else if (m_viscMixModel == LTR_MIXMODEL_MOLEFRACS) { + } else if (m_viscMixModel == LTI_MODEL_MOLEFRACS) { m_viscmix = dot_product(m_viscSpecies, m_molefracs) ; for ( int i = 0; i < m_nsp; i++ ) for ( int j = 0; j < i; j++ ) m_viscmix += m_molefracs[i] * m_molefracs[j] * m_visc_Sij(i,j) ; - } else if (m_viscMixModel == LTR_MIXMODEL_LOG_MOLEFRACS) { + } else if (m_viscMixModel == LTI_MODEL_LOG_MOLEFRACS) { // log_visc_mix = sum_i (X_i log_visc_i) + sum_i sum_j X_i X_j G_ij double interaction = dot_product(m_logViscSpecies, m_molefracs); diff --git a/Cantera/src/transport/LiquidTransportData.cpp b/Cantera/src/transport/LiquidTransportData.cpp index baba4c142..b05bb3a72 100644 --- a/Cantera/src/transport/LiquidTransportData.cpp +++ b/Cantera/src/transport/LiquidTransportData.cpp @@ -79,11 +79,12 @@ namespace Cantera { LTPspecies& LTPspecies::operator=(const LTPspecies& right ) { if (&right != this) { - speciesName = right.speciesName; - property = right.property; - model = right.model; - coeffs = right.coeffs; - m_thermo = right.m_thermo; + m_speciesName = right.m_speciesName; + m_property = right.m_property; + m_model = right.m_model; + m_coeffs = right.m_coeffs; + m_thermo = right.m_thermo; + m_mixWeight = right.m_mixWeight; } return *this; } @@ -101,10 +102,10 @@ namespace Cantera { thermo_t* thermo ) : LTPspecies( propNode, name, tp_ind, thermo) { - model = LTR_MODEL_CONSTANT; + m_model = LTR_MODEL_CONSTANT; double A_k = getFloatCurrent(propNode, "toSI"); if (A_k > 0.0) { - coeffs.push_back(A_k); + m_coeffs.push_back(A_k); } else throw LTPError("negative or zero " + propNode.name() ); } @@ -120,18 +121,19 @@ namespace Cantera { { if (&right != this) { //LTPspecies::operator=(right); - speciesName = right.speciesName; - property = right.property; - model = right.model; - coeffs = right.coeffs; - m_thermo = right.m_thermo; + m_speciesName = right.m_speciesName; + m_property = right.m_property; + m_model = right.m_model; + m_coeffs = right.m_coeffs; + m_thermo = right.m_thermo; + m_mixWeight = right.m_mixWeight; } return *this; } //! Return the (constant) value for this transport property doublereal LTPspecies_Const::getSpeciesTransProp( ) { - return coeffs[0]; + return m_coeffs[0]; } /////////////////////////////////////////////////////////////// @@ -148,17 +150,17 @@ namespace Cantera { thermo_t* thermo ) : LTPspecies( propNode, name, tp_ind, thermo) { - model = LTR_MODEL_ARRHENIUS; + m_model = LTR_MODEL_ARRHENIUS; doublereal A_k, n_k, Tact_k; getArrhenius(propNode, A_k, n_k, Tact_k); if (A_k <= 0.0) { throw LTPError("negative or zero " + propNode.name() ); } - coeffs.push_back( A_k ); - coeffs.push_back( n_k ); - coeffs.push_back( Tact_k ); - coeffs.push_back( log( A_k ) ); + m_coeffs.push_back( A_k ); + m_coeffs.push_back( n_k ); + m_coeffs.push_back( Tact_k ); + m_coeffs.push_back( log( A_k ) ); } //! Copy constructor @@ -173,11 +175,12 @@ namespace Cantera { { if (&right != this) { // LTPspecies::operator=(right); - speciesName = right.speciesName; - property = right.property; - model = right.model; - coeffs = right.coeffs; - m_thermo = right.m_thermo; + m_speciesName = right.m_speciesName; + m_property = right.m_property; + m_model = right.m_model; + m_coeffs = right.m_coeffs; + m_thermo = right.m_thermo; + m_mixWeight = right.m_mixWeight; m_temp = right.m_temp; m_logt = right.m_logt; @@ -208,18 +211,18 @@ namespace Cantera { doublereal LTPspecies_Arrhenius::getSpeciesTransProp( ) { doublereal t = m_thermo->temperature(); - //coeffs[0] holds A - //coeffs[1] holds n - //coeffs[2] holds Tact - //coeffs[3] holds log(A) + //m_coeffs[0] holds A + //m_coeffs[1] holds n + //m_coeffs[2] holds Tact + //m_coeffs[3] holds log(A) if (t != m_temp) { m_temp = t; m_logt = log(m_temp); //For viscosity the sign convention on positive activation energy is swithced - if ( property == TP_VISCOSITY ) - m_logProp = coeffs[3] + coeffs[1] * m_logt + coeffs[2] / m_temp ; + if ( m_property == TP_VISCOSITY ) + m_logProp = m_coeffs[3] + m_coeffs[1] * m_logt + m_coeffs[2] / m_temp ; else - m_logProp = coeffs[3] + coeffs[1] * m_logt - coeffs[2] / m_temp ; + m_logProp = m_coeffs[3] + m_coeffs[1] * m_logt - m_coeffs[2] / m_temp ; m_prop = exp( m_logProp ); } return m_prop; @@ -244,12 +247,12 @@ namespace Cantera { thermo_t* thermo ) : LTPspecies( propNode, name, tp_ind, thermo) { - model = LTR_MODEL_POLY; + m_model = LTR_MODEL_POLY; - getFloatArray(propNode, coeffs, true); // if units labeled, convert Angstroms -> meters + getFloatArray(propNode, m_coeffs, true); // if units labeled, convert Angstroms -> meters - if (coeffs[0] <= 0.0) { + if (m_coeffs[0] <= 0.0) { throw LTPError("negative or zero " + propNode.name() ); } } @@ -266,11 +269,12 @@ namespace Cantera { { if (&right != this) { //LTPspecies::operator=(right); - speciesName = right.speciesName; - property = right.property; - model = right.model; - coeffs = right.coeffs; - m_thermo = right.m_thermo; + m_speciesName = right.m_speciesName; + m_property = right.m_property; + m_model = right.m_model; + m_coeffs = right.m_coeffs; + m_thermo = right.m_thermo; + m_mixWeight = right.m_mixWeight; m_temp = right.m_temp; m_prop = right.m_prop; @@ -285,8 +289,8 @@ namespace Cantera { doublereal t = m_thermo->temperature(); if (t != m_temp) { double tempN = 1.0; - for ( int i = 0; i < coeffs.size() ; i++ ) { - m_prop += coeffs[i] * tempN; + for ( int i = 0; i < m_coeffs.size() ; i++ ) { + m_prop += m_coeffs[i] * tempN; tempN *= m_temp; } } diff --git a/Cantera/src/transport/LiquidTransportData.h b/Cantera/src/transport/LiquidTransportData.h index eb9dfd87f..05de600b3 100644 --- a/Cantera/src/transport/LiquidTransportData.h +++ b/Cantera/src/transport/LiquidTransportData.h @@ -78,13 +78,15 @@ namespace Cantera { LTPspecies( const XML_Node &propNode = 0, std::string name = "-", TransportPropertyList tp_ind = TP_UNKNOWN, - thermo_t* thermo = 0 ) : - speciesName(name), - model(LTR_MODEL_NOTSET), - property(tp_ind), - m_thermo(thermo) + thermo_t* thermo = 0 ) : + m_speciesName(name), + m_model(LTR_MODEL_NOTSET), + m_property(tp_ind), + m_thermo(thermo), + m_mixWeight(1.0) { - + if ( propNode.hasChild("mixtureWeighting") ) + m_mixWeight = getFloat(propNode,"mixtureWeighting"); } //! Copy constructor @@ -104,23 +106,39 @@ namespace Cantera { */ virtual doublereal getSpeciesTransProp( ) { return 0.0; } - virtual bool checkPositive( ) { return ( coeffs[0] > 0 ); } + virtual bool checkPositive( ) { return ( m_coeffs[0] > 0 ); } + + doublereal getMixWeight( ) {return m_mixWeight; } protected: - std::string speciesName; + std::string m_speciesName; //! Model type for the temperature dependence - LiquidTR_Model model; + LiquidTR_Model m_model; //! enum indicating what property this is (i.e viscosity) - TransportPropertyList property; + TransportPropertyList m_property; //! Model temperature-dependence ceofficients - vector_fp coeffs; + vector_fp m_coeffs; //! pointer to thermo object to get current temperature thermo_t* m_thermo; + //! Weighting used for mixing. + /** + * This weighting can be employed to allow salt transport + * properties to be represented by specific ions. + * For example, to have Li+ and Ca+ represent the mixing + * transport properties of LiCl and CaCl2, the weightings for + * Li+ would be 2.0, for K+ would be 3.0 and for Cl- would be 0.0. + * The tranport properties for Li+ would be those for LiCl and + * the tranport properties for Ca+ would be those for CaCl2. + * The transport properties for Cl- should be something innoccuous like + * 1.0--note that 0.0 is not innocuous if there are logarithms involved. + */ + doublereal m_mixWeight; + //! Internal model to adjust species-specific properties for composition. /** Currently just a place holder, but this method could take * the composition from the thermo object and adjust coefficients diff --git a/Cantera/src/transport/LiquidTransportParams.cpp b/Cantera/src/transport/LiquidTransportParams.cpp new file mode 100644 index 000000000..43a8b510b --- /dev/null +++ b/Cantera/src/transport/LiquidTransportParams.cpp @@ -0,0 +1,112 @@ +/** + * @file LiquidTransportParams.cpp + * Source code for liquid mixture transport property evaluations. + */ +/* + * $Author: jchewso $ + * $Date: 2009-11-22 17:34:46 -0700 (Mon, 16 Nov 2009) $ + * $Revision: 261 $ + * + */ + +#include "LiquidTransportParams.h" + + +namespace Cantera { + + /** + * Exception thrown if an error is encountered while reading the + * transport database. + */ + class LTPError : public CanteraError { + public: + LTPError( std::string msg ) + : CanteraError("LTPspecies", + "error parsing transport data: " + + msg + "\n") {} + }; + + + + + LiquidTranInteraction::LiquidTranInteraction( + const XML_Node &compModelNode, + TransportPropertyList tp_ind, + thermo_t* thermo ) : + m_model(LTI_MODEL_NOTSET), + m_property(tp_ind), + m_thermo(thermo) + { + int nsp = thermo->nSpecies(); + Aij.resize(nsp,nsp); + Dij.resize(nsp,nsp); + Eij.resize(nsp,nsp); + Sij.resize(nsp,nsp); + + std::string speciesA; + std::string speciesB; + + int num = compModelNode.nChildren(); + for (int iChild = 0; iChild < num; iChild++) { + XML_Node &xmlChild = compModelNode.child(iChild); + std::string nodeName = lowercase( xmlChild.name() ); + if ( nodeName != "interaction" ) + throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", + "expected element and got <" + nodeName + ">" ); + speciesA = xmlChild.attrib("speciesA"); + speciesB = xmlChild.attrib("speciesB"); + int iSpecies = m_thermo->speciesIndex( speciesA ); + if ( iSpecies < 0 ) + throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", + "Unknown species " + speciesA ); + int jSpecies = m_thermo->speciesIndex( speciesB ); + if ( jSpecies < 0 ) + throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", + "Unknown species " + speciesB ); + Aij(iSpecies,jSpecies) = getFloat( xmlChild, "Aij", "toSI" ); + Aij(jSpecies,iSpecies) = Aij(iSpecies,jSpecies) ; + + Eij(iSpecies,jSpecies) = getFloat( xmlChild, "Eij", "actEnergy" ); + Eij(iSpecies,jSpecies) /= GasConstant; + Eij(jSpecies,iSpecies) = Eij(iSpecies,jSpecies) ; + + Sij(iSpecies,jSpecies) = getFloat( xmlChild, "Sij", "toSI" ); + Sij(iSpecies,jSpecies) /= GasConstant; + Sij(jSpecies,iSpecies) = Sij(iSpecies,jSpecies) ; + + Dij(iSpecies,jSpecies) = getFloat( xmlChild, "Dij", "toSI" ); + Dij(jSpecies,iSpecies) = Dij(iSpecies,jSpecies) ; + } + } + + //! Copy constructor + LiquidTranInteraction::LiquidTranInteraction( const LiquidTranInteraction &right ) { + *this = right; //use assignment operator to do other work + } + + //! Assignment operator + LiquidTranInteraction& LiquidTranInteraction::operator=( const LiquidTranInteraction &right ) + { + if (&right != this) { + m_model = right.m_model; + m_property = right.m_property; + m_thermo = right.m_thermo; + } + return *this; + } + + + + + LTI_MoleFracs::LTI_MoleFracs( const XML_Node &compModelNode, + TransportPropertyList tp_ind, + thermo_t* thermo ) : + LiquidTranInteraction( compModelNode, tp_ind, thermo ) + { + m_model = LTI_MODEL_MOLEFRACS; + } + + + + +} //namespace Cantera diff --git a/Cantera/src/transport/LiquidTransportParams.h b/Cantera/src/transport/LiquidTransportParams.h index 4e3dc934e..3bb859a30 100644 --- a/Cantera/src/transport/LiquidTransportParams.h +++ b/Cantera/src/transport/LiquidTransportParams.h @@ -75,90 +75,163 @@ namespace Cantera { * */ enum LiquidTranMixingModel { - LTR_MIXMODEL_NOTSET=-1, - LTR_MIXMODEL_NONE, - LTR_MIXMODEL_SOLVENT, - LTR_MIXMODEL_MOLEFRACS, - LTR_MIXMODEL_MASSFRACS, - LTR_MIXMODEL_LOG_MOLEFRACS, - LTR_MIXMODEL_PAIRWISE_INTERACTION + LTI_MODEL_NOTSET=-1, + LTI_MODEL_NONE, + LTI_MODEL_SOLVENT, + LTI_MODEL_MOLEFRACS, + LTI_MODEL_MASSFRACS, + LTI_MODEL_LOG_MOLEFRACS, + LTI_MODEL_PAIRWISE_INTERACTION }; - /** - * Holds transport model parameters relevant to transport in - * liquids for which activated jump processes limit transport - * (giving Arrhenius type transport properties). - * Used by TransportFactory. + class LiquidTranInteraction { + + public: + LiquidTranInteraction( const XML_Node &compModelNode = 0, + TransportPropertyList tp_ind = TP_UNKNOWN, + thermo_t* thermo = 0 ); + + //! Copy constructor + LiquidTranInteraction( const LiquidTranInteraction &right ); + + //! Assignment operator + LiquidTranInteraction& operator=( const LiquidTranInteraction &right ); + + //! destructor + virtual ~LiquidTranInteraction() { } + + //! Return the mixture transport property value. + //! (Must be implemented in subclasses.) + virtual doublereal getMixTransProp( ) { return 0.0; } + + protected: + //! Model for species interaction effects + //! Takes enum LiquidTranMixingModel + LiquidTranMixingModel m_model; + + //! enum indicating what property this is (i.e viscosity) + TransportPropertyList m_property; + + //! pointer to thermo object to get current temperature + thermo_t* m_thermo; + + //! Matrix of interactions (no temperature dependence, dimensionless) + DenseMatrix Aij; + + //! Matrix of interactions (in energy units, 1/RT temperature dependence) + DenseMatrix Eij; + + //! Matrix of interactions (in entropy units, divided by R) + DenseMatrix Sij; + + //! Matrix of interactions + DenseMatrix Dij; + + }; + + /** + * Holds transport model parameters relevant to transport in + * liquids for which activated jump processes limit transport + * (giving Arrhenius type transport properties). + * Used by TransportFactory. + */ + class LiquidTransportParams : public TransportParams { + + public: + + LiquidTransportParams() {} + ~LiquidTransportParams() {} + + //! Species transport parameters + std::vector LTData; + + //! Model for species interaction effects for viscosity + //! Takes enum LiquidTranMixingModel + LiquidTranMixingModel model_viscosity; + + + //! Energies of molecular interaction associated with viscosity. + /** + * These multiply the mixture viscosity by + * \f[ \exp( \sum_{i} \sum_{j} X_i X_j ( S_{i,j} + E_{i,j} / T ) ) \f]. + * + * The overall formula for the logarithm of the mixture viscosity is + * + * \f[ \ln \eta_{mix} = \sum_i X_i \ln \eta_i + * + \sum_i \sum_j X_i X_j ( S_{i,j} + E_{i,j} / T ) \f]. */ - class LiquidTransportParams :public TransportParams { + DenseMatrix visc_Eij; + + //! Entropies of molecular interaction associated with viscosity. + DenseMatrix visc_Sij; + + //! Model for species interaction effects for thermal conductivity + //! Takes enum LiquidTranMixingModel + LiquidTranMixingModel model_thermalCond; + + //! Interaction associated with linear weighting of + //! thermal conductivity. + /** + * This is used for either LTI_MODEL_MASSFRACS + * or LTI_MODEL_MOLEFRACS. + * The overall formula for the mixture viscosity is + * + * \f[ \eta_{mix} = \sum_i X_i \eta_i + * + \sum_i \sum_j X_i X_j A_{i,j} \f]. + */ + DenseMatrix thermalCond_Aij; + + //! Model for species interaction effects for mass diffusivity + //! Takes enum LiquidTranMixingModel + LiquidTranMixingModel model_speciesDiffusivity; + + //! Interaction associated with linear weighting of + //! thermal conductivity. + /** + * This is used for either LTI_MODEL_PAIRWISE_INTERACTION. + * These provide species interaction coefficients associated with + * the Stefan-Maxwell formulation. + */ + DenseMatrix diff_Dij; + + //! Model for species interaction effects for hydrodynamic radius + //! Takes enum LiquidTranMixingModel + LiquidTranMixingModel model_hydroradius; + + //! Interaction associated with hydrodynamic radius. + /** + * Not yet implemented + */ + DenseMatrix radius_Aij; + }; - public: + + class LTI_Solvent; + + class LTI_MoleFracs : public LiquidTranInteraction { - LiquidTransportParams() {} - ~LiquidTransportParams() {} + public: + LTI_MoleFracs( const XML_Node &compModelNode = 0, + TransportPropertyList tp_ind = TP_UNKNOWN, + thermo_t* thermo = 0 ) ; + + //! Copy constructor + LTI_MoleFracs( const LTI_MoleFracs &right ); + + //! Assignment operator + LTI_MoleFracs& operator=( const LTI_MoleFracs &right ); + + virtual ~LTI_MoleFracs( ) { } + + //! Return the mixture transport property value. + doublereal getMixTransProp( ); + protected: + + }; - //! Species transport parameters - std::vector LTData; - //! Model for species interaction effects for viscosity - //! Takes enum LiquidTranMixingModel - LiquidTranMixingModel model_viscosity; - //! Energies of molecular interaction associated with viscosity. - /** - * These multiply the mixture viscosity by - * \f[ \exp( \sum_{i} \sum_{j} X_i X_j ( S_{i,j} + E_{i,j} / T ) ) \f]. - * - * The overall formula for the logarithm of the mixture viscosity is - * - * \f[ \ln \eta_{mix} = \sum_i X_i \ln \eta_i - * + \sum_i \sum_j X_i X_j ( S_{i,j} + E_{i,j} / T ) \f]. - */ - DenseMatrix visc_Eij; - - //! Entropies of molecular interaction associated with viscosity. - DenseMatrix visc_Sij; - - //! Model for species interaction effects for thermal conductivity - //! Takes enum LiquidTranMixingModel - LiquidTranMixingModel model_thermalCond; - - //! Interaction associated with linear weighting of - //! thermal conductivity. - /** - * This is used for either LTR_MIXMODEL_MASSFRACS - * or LTR_MIXMODEL_MOLEFRACS. - * The overall formula for the mixture viscosity is - * - * \f[ \eta_{mix} = \sum_i X_i \eta_i - * + \sum_i \sum_j X_i X_j A_{i,j} \f]. - */ - DenseMatrix thermalCond_Aij; - - //! Model for species interaction effects for mass diffusivity - //! Takes enum LiquidTranMixingModel - LiquidTranMixingModel model_speciesDiffusivity; - - //! Interaction associated with linear weighting of - //! thermal conductivity. - /** - * This is used for either LTR_MIXMODEL_PAIRWISE_INTERACTION. - * These provide species interaction coefficients associated with - * the Stefan-Maxwell formulation. - */ - DenseMatrix diff_Dij; - - //! Model for species interaction effects for hydrodynamic radius - //! Takes enum LiquidTranMixingModel - LiquidTranMixingModel model_hydroradius; - - //! Interaction associated with hydrodynamic radius. - /** - * Not yet implemented - */ - DenseMatrix radius_Aij; - }; } #endif diff --git a/Cantera/src/transport/Makefile.in b/Cantera/src/transport/Makefile.in index 015f34a6f..6fa9b4734 100644 --- a/Cantera/src/transport/Makefile.in +++ b/Cantera/src/transport/Makefile.in @@ -36,7 +36,7 @@ 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 + SimpleTransport.o LiquidTransportData.o LiquidTransportParams.o TRAN_H = TransportFactory.h MultiTransport.h MixTransport.h \ MMCollisionInt.h SolidTransport.h DustyGasTransport.h \ diff --git a/Cantera/src/transport/TransportFactory.cpp b/Cantera/src/transport/TransportFactory.cpp index dc0735948..879ad4eb0 100644 --- a/Cantera/src/transport/TransportFactory.cpp +++ b/Cantera/src/transport/TransportFactory.cpp @@ -1017,22 +1017,22 @@ namespace Cantera { throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", "transport::viscosity XML node doesn't have a model string"); } else if ( compositionModel == "none"){ - trParam.model_viscosity = LTR_MIXMODEL_NONE; + trParam.model_viscosity = LTI_MODEL_NONE; throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", - "LTR_MIXMODEL_NONE interactions not implemented for viscosity"); + "LTI_MODEL_NONE interactions not implemented for viscosity"); } else if ( compositionModel == "solvent"){ throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", "solvent interactions not implemented"); } else if ( compositionModel == "moleFractions"){ - trParam.model_viscosity = LTR_MIXMODEL_MOLEFRACS; + trParam.model_viscosity = LTI_MODEL_MOLEFRACS; } else if ( compositionModel == "massFractions"){ - trParam.model_viscosity = LTR_MIXMODEL_MASSFRACS; + trParam.model_viscosity = LTI_MODEL_MASSFRACS; } else if ( compositionModel == "logMoleFractions"){ - trParam.model_viscosity = LTR_MIXMODEL_LOG_MOLEFRACS; + trParam.model_viscosity = LTI_MODEL_LOG_MOLEFRACS; } else if ( compositionModel == "pairwiseInteraction"){ - trParam.model_viscosity = LTR_MIXMODEL_PAIRWISE_INTERACTION; + trParam.model_viscosity = LTI_MODEL_PAIRWISE_INTERACTION; throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", - "LTR_MIXMODEL_PAIRWISE_INTERACTION interactions not implemented for viscosity"); + "LTI_MODEL_PAIRWISE_INTERACTION interactions not implemented for viscosity"); } int num = compositionNode.nChildren(); for (int iChild = 0; iChild < num; iChild++) { @@ -1072,24 +1072,24 @@ namespace Cantera { throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", "transport::thermalConductivity XML node doesn't have a model string"); } else if ( compositionModel == "none"){ - trParam.model_thermalCond = LTR_MIXMODEL_NONE; + trParam.model_thermalCond = LTI_MODEL_NONE; throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", - "LTR_MIXMODEL_NONE interactions not implemented for thermalConductivity"); + "LTI_MODEL_NONE interactions not implemented for thermalConductivity"); } else if ( compositionModel == "solvent"){ throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", "solvent interactions not implemented"); } else if ( compositionModel == "moleFractions"){ - trParam.model_thermalCond = LTR_MIXMODEL_MOLEFRACS; + trParam.model_thermalCond = LTI_MODEL_MOLEFRACS; } else if ( compositionModel == "massFractions"){ - trParam.model_thermalCond = LTR_MIXMODEL_MASSFRACS; + trParam.model_thermalCond = LTI_MODEL_MASSFRACS; } else if ( compositionModel == "logMoleFractions"){ - trParam.model_thermalCond = LTR_MIXMODEL_LOG_MOLEFRACS; + trParam.model_thermalCond = LTI_MODEL_LOG_MOLEFRACS; throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", - "LTR_MIXMODEL_LOG_MOLEFRACS interactions not implemented for thermalConductivity"); + "LTI_MODEL_LOG_MOLEFRACS interactions not implemented for thermalConductivity"); } else if ( compositionModel == "pairwiseInteraction"){ - trParam.model_thermalCond = LTR_MIXMODEL_PAIRWISE_INTERACTION; + trParam.model_thermalCond = LTI_MODEL_PAIRWISE_INTERACTION; throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", - "LTR_MIXMODEL_PAIRWISE_INTERACTION interactions not implemented for thermalConductivity"); + "LTI_MODEL_PAIRWISE_INTERACTION interactions not implemented for thermalConductivity"); } int num = compositionNode.nChildren(); for (int iChild = 0; iChild < num; iChild++) { @@ -1127,20 +1127,20 @@ namespace Cantera { throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", "transport::speciesDiffusivity XML node doesn't have a model string"); } else if ( compositionModel == "none"){ - trParam.model_speciesDiffusivity = LTR_MIXMODEL_NONE; + trParam.model_speciesDiffusivity = LTI_MODEL_NONE; throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", - "LTR_MIXMODEL_NONE interactions not implemented for speciesDiffusivity"); + "LTI_MODEL_NONE interactions not implemented for speciesDiffusivity"); } else if ( compositionModel == "solvent"){ throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", "solvent interactions not implemented"); } else if ( compositionModel == "moleFractions"){ - trParam.model_speciesDiffusivity = LTR_MIXMODEL_MOLEFRACS; + trParam.model_speciesDiffusivity = LTI_MODEL_MOLEFRACS; } else if ( compositionModel == "massFractions"){ - trParam.model_speciesDiffusivity = LTR_MIXMODEL_MASSFRACS; + trParam.model_speciesDiffusivity = LTI_MODEL_MASSFRACS; } else if ( compositionModel == "logMoleFractions"){ - trParam.model_speciesDiffusivity = LTR_MIXMODEL_LOG_MOLEFRACS; + trParam.model_speciesDiffusivity = LTI_MODEL_LOG_MOLEFRACS; } else if ( compositionModel == "pairwiseInteraction"){ - trParam.model_speciesDiffusivity = LTR_MIXMODEL_PAIRWISE_INTERACTION; + trParam.model_speciesDiffusivity = LTI_MODEL_PAIRWISE_INTERACTION; } int num = compositionNode.nChildren(); for (int iChild = 0; iChild < num; iChild++) { @@ -1177,26 +1177,26 @@ namespace Cantera { throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", "transport::hydrodynamicRadius XML node doesn't have a model string"); } else if ( compositionModel == "none"){ - trParam.model_thermalCond = LTR_MIXMODEL_NONE; + trParam.model_thermalCond = LTI_MODEL_NONE; } else if ( compositionModel == "solvent"){ throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", "solvent interactions not implemented"); } else if ( compositionModel == "moleFractions"){ - trParam.model_thermalCond = LTR_MIXMODEL_MOLEFRACS; + trParam.model_thermalCond = LTI_MODEL_MOLEFRACS; throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", - "LTR_MIXMODEL_MOLEFRACS interactions not implemented for hydrodynamicRadius"); + "LTI_MODEL_MOLEFRACS interactions not implemented for hydrodynamicRadius"); } else if ( compositionModel == "massFractions"){ - trParam.model_thermalCond = LTR_MIXMODEL_MASSFRACS; + trParam.model_thermalCond = LTI_MODEL_MASSFRACS; throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", - "LTR_MIXMODEL_MASSFRACS interactions not implemented for hydrodynamicRadius"); + "LTI_MODEL_MASSFRACS interactions not implemented for hydrodynamicRadius"); } else if ( compositionModel == "logMoleFractions"){ - trParam.model_thermalCond = LTR_MIXMODEL_LOG_MOLEFRACS; + trParam.model_thermalCond = LTI_MODEL_LOG_MOLEFRACS; throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", - "LTR_MIXMODEL_LOG_MOLEFRACS interactions not implemented for hydrodynamicRadius"); + "LTI_MODEL_LOG_MOLEFRACS interactions not implemented for hydrodynamicRadius"); } else if ( compositionModel == "pairwiseInteraction"){ - trParam.model_thermalCond = LTR_MIXMODEL_PAIRWISE_INTERACTION; + trParam.model_thermalCond = LTI_MODEL_PAIRWISE_INTERACTION; throw CanteraError("TransportFactory::getLiquidInteractionsTransportData", - "LTR_MIXMODEL_PAIRWISE_INTERACTION interactions not implemented for hydrodynamicRadius"); + "LTI_MODEL_PAIRWISE_INTERACTION interactions not implemented for hydrodynamicRadius"); } int num = compositionNode.nChildren(); for (int iChild = 0; iChild < num; iChild++) { diff --git a/Cantera/src/transport/TransportParams.h b/Cantera/src/transport/TransportParams.h index 7c1bc6817..5fe1ef3d8 100755 --- a/Cantera/src/transport/TransportParams.h +++ b/Cantera/src/transport/TransportParams.h @@ -7,6 +7,7 @@ #include "TransportBase.h" #include "xml.h" #include "XML_Writer.h" +#include "DenseMatrix.h" namespace Cantera {