diff --git a/Cantera/python/Makefile.in b/Cantera/python/Makefile.in index cad4377a5..f4f268608 100755 --- a/Cantera/python/Makefile.in +++ b/Cantera/python/Makefile.in @@ -91,7 +91,7 @@ endif clean: @PYTHON_CMD@ setup.py clean rm -f _build; rm -f _winbuild - (cd build; rm -fR *) + (if test -d build ; then cd build; rm -fR * ; fi ) cd src; rm -f *.o depends: diff --git a/Cantera/src/base/ctml.cpp b/Cantera/src/base/ctml.cpp index 1a00220d7..d11ad58a6 100755 --- a/Cantera/src/base/ctml.cpp +++ b/Cantera/src/base/ctml.cpp @@ -630,6 +630,11 @@ namespace ctml { parent.name() + "\"): ", "no child XML element named \"" + name + "\" exists"); const XML_Node& node = parent.child(name); + return getFloatCurrent(node, type); + } + + doublereal getFloatCurrent(const Cantera::XML_Node& node, + const std::string type) { doublereal x, x0, x1, fctr = 1.0; string units, vmin, vmax; x = atof(node().c_str()); @@ -758,6 +763,15 @@ namespace ctml { return val; } + bool getOptionalModel(const Cantera::XML_Node& parent, const std::string nodeName, + std::string &modelName) { + if (parent.hasChild(nodeName)) { + const XML_Node& node = parent.child(nodeName); + modelName = node["model"]; + return true; + } + return false; + } // Get an integer value from a child element. /* diff --git a/Cantera/src/base/ctml.h b/Cantera/src/base/ctml.h index 79ba4bed6..4b3d4ebd9 100755 --- a/Cantera/src/base/ctml.h +++ b/Cantera/src/base/ctml.h @@ -563,6 +563,41 @@ namespace ctml { doublereal getFloat(const Cantera::XML_Node& parent, const std::string &name, const std::string type=""); + //! Get a floating-point value from the current XML element + /*! + * Returns a doublereal value from the current element. If + * 'type' is supplied and matches a known unit type, unit + * conversion to SI will be done if the child element has an attribute + * 'units'. + * + * Note, it's an error for the child element not to exist. + * + * Example: + * + * Code snipet: + * @verbatim + const XML_Node &State_XMLNode; + doublereal pres = OneAtm; + if (state_XMLNode.hasChild("pressure")) { + XML_Node *pres_XMLNode = State_XMLNode.getChild("pressure"); + pres = getFloatCurrent(pres_XMLNode, "toSI"); + } + @endverbatim + * + * reads the corresponding XML file: + * @verbatim + + 101325.0 + <\state> + @endverbatim + * + * @param currXML reference to the current XML_Node object + * @param type String type. Currently known types are "toSI" and "actEnergy", + * and "" , for no conversion. The default value is "", + * which implies that no conversion is allowed. + */ + doublereal getFloatCurrent(const Cantera::XML_Node& currXML, const std::string type=""); + //! Get an optional floating-point value from a child element. /*! * Returns a doublereal value for the child named 'name' of element 'parent'. If @@ -647,6 +682,34 @@ namespace ctml { void getFloats(const Cantera::XML_Node& node, std::map& v, const bool convert=true); + //! Get an integer value from a child element. + /*! + * Returns an integer value for the child named 'name' of element 'parent'. + * + * Note, it's an error for the child element not to exist. + * + * Example: + * + * Code snipet: + * @verbatim + const XML_Node &State_XMLNode; + int number = 1; + if (state_XMLNode.hasChild("NumProcs")) { + number = getInteger(State_XMLNode, "numProcs"); + } + @endverbatim + * + * reads the corresponding XML file: + * @verbatim + + 10 + <\state> + @endverbatim + * + * @param parent reference to the XML_Node object of the parent XML element + * @param name Name of the XML child element + */ + int getInteger(const Cantera::XML_Node& parent, std::string name); //! Get a floating-point value from a child element with a defined units field /*! @@ -685,34 +748,37 @@ namespace ctml { doublereal getFloatDefaultUnits(const Cantera::XML_Node& parent, std::string name, std::string defaultUnits, std::string type="toSI"); - //! Get an integer value from a child element. + //! Get an optional model name from a named child node. /*! - * Returns an integer value for the child named 'name' of element 'parent'. - * - * Note, it's an error for the child element not to exist. + * Returns the model name attribute for the child named 'nodeName' of element 'parent'. + * Note, it's optional for the child node to exist * * Example: * * Code snipet: * @verbatim - const XML_Node &State_XMLNode; - int number = 1; - if (state_XMLNode.hasChild("NumProcs")) { - number = getInteger(State_XMLNode, "numProcs"); - } + std::string modelName = ""; + bool exists = getOptionalModel(transportNode, "compositionDependence", + modelName); @endverbatim * * reads the corresponding XML file: * @verbatim - - 10 - <\state> + + + @endverbatim * + * On return modelName is set to "Solvent_Only". + * * @param parent reference to the XML_Node object of the parent XML element - * @param name Name of the XML child element + * @param nodeName Name of the XML child element + * @param modelName On return this contains the contents of the model attribute + * + * @return True if the nodeName XML node exists. False otherwise */ - int getInteger(const Cantera::XML_Node& parent, std::string name); + bool getOptionalModel(const Cantera::XML_Node& parent, const std::string nodeName, + std::string &modelName); //! This function reads a child node with the default name, "floatArray", with a value //! consisting of a comma separated list of floats diff --git a/Cantera/src/base/units.h b/Cantera/src/base/units.h index 86ba5409c..81be47535 100644 --- a/Cantera/src/base/units.h +++ b/Cantera/src/base/units.h @@ -232,6 +232,10 @@ namespace Cantera { m_u["m-1"] = m_u["m^-1"]; m_u["wavenumbers"] = m_u["cm^-1"]; + // viscosity + m_u["poise"] = 0.1; + m_u["centipoise"] = 0.001; + m_act_u["eV"] = m_u["eV"]; // /m_u["molec"]; m_act_u["K"] = GasConstant; m_act_u["Kelvin"] = GasConstant; diff --git a/Cantera/src/base/xml.cpp b/Cantera/src/base/xml.cpp index 5c6396fbc..ad52226e8 100755 --- a/Cantera/src/base/xml.cpp +++ b/Cantera/src/base/xml.cpp @@ -441,6 +441,7 @@ namespace Cantera { m_nchildren(0), m_iscomment(false) { + m_root = this; right.copy(this); } @@ -1150,6 +1151,7 @@ namespace Cantera { XML_Node *sc, *dc; int ndc; node_dest->addValue(m_value); + node_dest->setName(m_name); if (m_name == "") return; map::const_iterator b = m_attribs.begin(); for (; b != m_attribs.end(); ++b) { diff --git a/Cantera/src/base/xml.h b/Cantera/src/base/xml.h index db4d6ed51..392da867d 100755 --- a/Cantera/src/base/xml.h +++ b/Cantera/src/base/xml.h @@ -443,6 +443,14 @@ namespace Cantera { */ std::string name() const { return m_name; } + //! Sets the name of the XML node + /*! + * @param name The name of the XML node + */ + void setName(std::string name) { + m_name = name; + } + //! Return the id attribute, if present /*! * Returns the id attribute if present. If not diff --git a/Cantera/src/thermo/ThermoFactory.cpp b/Cantera/src/thermo/ThermoFactory.cpp index 70ad4164d..1cc0d6889 100644 --- a/Cantera/src/thermo/ThermoFactory.cpp +++ b/Cantera/src/thermo/ThermoFactory.cpp @@ -426,7 +426,7 @@ namespace Cantera { * be able to resurrect the information later by calling xml(). */ XML_Node &phaseNode_XML = th->xml(); - phaseNode_XML.clear(); + //phaseNode_XML.clear(); phase.copy(&phaseNode_XML); // set the id attribute of the phase to the 'id' attribute diff --git a/Cantera/src/thermo/ThermoPhase.cpp b/Cantera/src/thermo/ThermoPhase.cpp index ac060e27d..1e6e1fddd 100644 --- a/Cantera/src/thermo/ThermoPhase.cpp +++ b/Cantera/src/thermo/ThermoPhase.cpp @@ -48,8 +48,14 @@ namespace Cantera { ThermoPhase::~ThermoPhase() { + for (int k = 0; k < m_kk; k++) { + if (!m_speciesData[k]) { + delete m_speciesData[k]; + } + } delete m_spthermo; } + /** * Copy Constructor for the ThermoPhase object. * @@ -84,6 +90,19 @@ namespace Cantera { * Check for self assignment. */ if (this == &right) return *this; + + /* + * We need to destruct first + */ + for (int k = 0; k < m_kk; k++) { + if (!m_speciesData[k]) { + delete m_speciesData[k]; + } + } + if (m_spthermo) { + delete m_spthermo; + } + /* * Call the base class assignment operator */ @@ -93,13 +112,15 @@ namespace Cantera { * Pointer to the species thermodynamic property manager * We own this, so we need to do a deep copy */ - if (m_spthermo) { - delete m_spthermo; - } m_spthermo = (right.m_spthermo)->duplMyselfAsSpeciesThermo(); - // We don't do a deep copy here, because we don't own this - m_speciesData = right.m_speciesData; + /* + * Do a deep copy of species Data, because we own this + */ + m_speciesData.resize(m_kk); + for (int k = 0; k < m_kk; k++) { + m_speciesData[k] = new XML_Node(*(right.m_speciesData[k])); + } m_index = right.m_index; m_phi = right.m_phi; @@ -921,7 +942,7 @@ namespace Cantera { if ((int) m_speciesData.size() < (k + 1)) { m_speciesData.resize(k+1, 0); } - m_speciesData[k] = data; + m_speciesData[k] = new XML_Node(*data); } //! Return a pointer to the XML tree containing the species diff --git a/Cantera/src/thermo/ThermoPhase.h b/Cantera/src/thermo/ThermoPhase.h index c95beb37d..9df05133b 100755 --- a/Cantera/src/thermo/ThermoPhase.h +++ b/Cantera/src/thermo/ThermoPhase.h @@ -2029,9 +2029,11 @@ namespace Cantera { //! Vector of pointers to the species databases. /*! - * This is used to access data needed to + * This is used to access data needed to * construct the transport manager and other properties * later in the initialization process. + * We create a copy of the XML_Node data read in here. Therefore, we own this + * data. */ std::vector m_speciesData; diff --git a/Cantera/src/transport/LiquidTransportParams.h b/Cantera/src/transport/LiquidTransportParams.h index 9b0d98c94..713ab1c52 100644 --- a/Cantera/src/transport/LiquidTransportParams.h +++ b/Cantera/src/transport/LiquidTransportParams.h @@ -60,7 +60,7 @@ namespace Cantera { DenseMatrix visc_Sij; //Hydrodynamic radius of transported molecule - vector_fp hydroRadius; + vector_fp hydroRadius; //! Coefficients for the limiting conductivity of ions //! in solution: A_k diff --git a/Cantera/src/transport/SimpleTransport.cpp b/Cantera/src/transport/SimpleTransport.cpp index eafaa02fe..4af3173b9 100644 --- a/Cantera/src/transport/SimpleTransport.cpp +++ b/Cantera/src/transport/SimpleTransport.cpp @@ -151,6 +151,39 @@ namespace Cantera { m_tmin = m_thermo->minTemp(); m_tmax = m_thermo->maxTemp(); + /* + * Read the transport block in the phase XML Node + * It's not an error if this block doesn't exist. Just use the defaults + */ + XML_Node &phaseNode = m_thermo->xml(); + if (phaseNode.hasChild("transport")) { + XML_Node& transportNode = phaseNode.child("transport"); + string transportModel = transportNode.attrib("model"); + if (transportModel == "Simple") { + /* + * + * or + * + */ + std::string modelName = ""; + if (getOptionalModel(transportNode, "compositionDependence", + modelName)) { + modelName = lowercase(modelName); + if (modelName == "solvent_only") { + compositionDepType_ = 0; + } else if (modelName == "mixture_averaged") { + compositionDepType_ = 1; + } else { + throw CanteraError("SimpleTransport::initLiquid", "Unknown compositionDependence Model: " + modelName); + } + } + + + + + } + } + // make a local copy of the molecular weights m_mw.resize(m_nsp); copy(m_thermo->molecularWeights().begin(), @@ -165,24 +198,29 @@ namespace Cantera { Cantera::LiquidTransportData <d0 = tr.LTData[0]; LiquidTR_Model vm0 = ltd0.model_viscosity; + std::string spName0 = m_thermo->speciesName(0); + std::string spName = m_thermo->speciesName(0); if (vm0 == LTR_MODEL_CONSTANT) { tempDepType_ = 0; } else if (vm0 == LTR_MODEL_ARRHENIUS) { tempDepType_ = 1; } else if (vm0 == LTR_MODEL_NOTSET) { throw CanteraError("SimpleTransport::initLiquid", - "Viscosity Model is not set in the input file"); + "Viscosity Model is not set for species " + spName0 + " in the input file"); } else { throw CanteraError("SimpleTransport::initLiquid", - "Viscosity Model is not handled by this object"); + "Viscosity Model for species " + spName0 + " is not handled by this object"); } for (k = 0; k < m_nsp; k++) { + spName = m_thermo->speciesName(k); Cantera::LiquidTransportData <d = tr.LTData[k]; LiquidTR_Model vm = ltd.model_viscosity; if (vm != vm0) { - throw CanteraError(" SimpleTransport::initLiquid", - "different viscosity models"); + if (compositionDepType_ != 0) { + throw CanteraError(" SimpleTransport::initLiquid", + "different viscosity models for species " + spName + " and " + spName0 ); + } } vector_fp &kentry = m_coeffVisc_Ns[k]; kentry = ltd.viscCoeffs; @@ -197,15 +235,18 @@ namespace Cantera { LiquidTR_Model cm0 = ltd0.model_thermalCond; if (cm0 != vm0) { throw CanteraError("SimpleTransport::initLiquid", - "Conductivity model is not the same as the viscosity model"); + "Conductivity model is not the same as the viscosity model for species " + spName0); } for (k = 0; k < m_nsp; k++) { + spName = m_thermo->speciesName(k); Cantera::LiquidTransportData <d = tr.LTData[k]; LiquidTR_Model cm = ltd.model_thermalCond; if (cm != cm0) { - throw CanteraError(" SimpleTransport::initLiquid", - "different thermal conductivity models"); + if (compositionDepType_ != 0) { + throw CanteraError(" SimpleTransport::initLiquid", + "different thermal conductivity models for species " + spName + " and " + spName0); + } } vector_fp &kentry = m_coeffLambda_Ns[k]; kentry = ltd.thermalCondCoeffs; @@ -221,42 +262,48 @@ namespace Cantera { m_coeffDiff_Ns.resize(m_nsp); LiquidTR_Model dm0 = ltd0.model_speciesDiffusivity; if (dm0 != vm0) { - if (dm0 == LTR_MODEL_NOTSET) { + if (dm0 == LTR_MODEL_NOTSET) { LiquidTR_Model rm0 = ltd0.model_hydroradius; if (rm0 != vm0) { throw CanteraError("SimpleTransport::initLiquid", - "hydroradius model is not the same as the viscosity model"); + "hydroradius model is not the same as the viscosity model for species " + spName0); } else { useHydroRadius_ = true; } } - - for (k = 0; k < m_nsp; k++) { - Cantera::LiquidTransportData <d = tr.LTData[k]; - LiquidTR_Model dm = ltd.model_speciesDiffusivity; - if (dm == LTR_MODEL_NOTSET) { - LiquidTR_Model rm = ltd.model_hydroradius; - if (rm != vm0) { - throw CanteraError("SimpleTransport::initLiquid", - "hydroradius model is not the same as the viscosity model"); - } - if (rm != LTR_MODEL_CONSTANT) { - throw CanteraError("SimpleTransport::initLiquid", - "hydroradius model is not constant"); - } - vector_fp &kentry = m_coeffHydroRadius_Ns[k]; - kentry.push_back(ltd.hydroradius); - } else { - if (dm != dm0) { - throw CanteraError(" SimpleTransport::initLiquid", - "different thermal conductivity models"); - } - vector_fp &kentry = m_coeffDiff_Ns[k]; - kentry = ltd.speciesDiffusivityCoeffs; - } - } - } + + for (k = 0; k < m_nsp; k++) { + spName = m_thermo->speciesName(k); + Cantera::LiquidTransportData <d = tr.LTData[k]; + LiquidTR_Model dm = ltd.model_speciesDiffusivity; + if (dm == LTR_MODEL_NOTSET) { + LiquidTR_Model rm = ltd.model_hydroradius; + if (rm == LTR_MODEL_NOTSET) { + throw CanteraError("SimpleTransport::initLiquid", + "Neither diffusivity nor hydroradius is set for species " + spName); + } + if (rm != vm0) { + throw CanteraError("SimpleTransport::initLiquid", + "hydroradius model is not the same as the viscosity model for species " + spName); + } + if (rm != LTR_MODEL_CONSTANT) { + throw CanteraError("SimpleTransport::initLiquid", + "hydroradius model is not constant for species " + spName0); + } + vector_fp &kentry = m_coeffHydroRadius_Ns[k]; + kentry.push_back(ltd.hydroradius); + } else { + if (dm != dm0) { + throw CanteraError(" SimpleTransport::initLiquid", + "different diffusivity models for species " + spName + " and " + spName0 ); + } + vector_fp &kentry = m_coeffDiff_Ns[k]; + kentry = ltd.speciesDiffusivityCoeffs; + } + } + + m_molefracs.resize(m_nsp); diff --git a/Cantera/src/transport/TransportFactory.cpp b/Cantera/src/transport/TransportFactory.cpp index 3f409b8db..3fce58ea3 100644 --- a/Cantera/src/transport/TransportFactory.cpp +++ b/Cantera/src/transport/TransportFactory.cpp @@ -531,113 +531,30 @@ namespace Cantera { trParam.tmin = thermo->minTemp(); trParam.tmax = thermo->maxTemp(); - trParam.mw.resize(nsp); trParam.log_level = log_level; + // Get the molecular weights and load them into trParam + trParam.mw.resize(nsp); copy(trParam.thermo->molecularWeights().begin(), trParam.thermo->molecularWeights().end(), trParam.mw.begin()); - //trParam.epsilon.resize(nsp, nsp, 0.0); - //trParam.delta.resize(nsp, nsp, 0.0); - //trParam.reducedMass.resize(nsp, nsp, 0.0); - //trParam.dipole.resize(nsp, nsp, 0.0); - //trParam.diam.resize(nsp, nsp, 0.0); - //trParam.polar.resize(nsp, false); - //trParam.poly.resize(nsp); - //trParam.sigma.resize(nsp); - //trParam.eps.resize(nsp); + // Resize all other vectors in trParam + trParam.visc_A.resize(nsp, 0.0); + trParam.visc_n.resize(nsp, 0.0); + trParam.visc_Tact.resize(nsp, 0.0); + trParam.thermCond_A.resize(nsp, 0.0); + trParam.thermCond_n.resize(nsp, 0.0); + trParam.thermCond_Tact.resize(nsp, 0.0); + trParam.visc_Eij.resize(nsp, nsp, 0.0); + trParam.visc_Sij.resize(nsp, nsp, 0.0); + trParam.hydroRadius.resize(nsp, 0.0); + trParam.A_k_cond.resize(nsp, 0.0); + trParam.B_k_cond.resize(nsp, 0.0); + trParam.LTData.resize(nsp); XML_Node root, log; getLiquidTransportData(transport_database, log, - trParam.thermo->speciesNames(), trParam); - - //int i, j; - //for (i = 0; i < nsp; i++) trParam.poly[i].resize(nsp); - - //doublereal ts1, ts2, tstar_min = 1.e8, tstar_max = 0.0; - //doublereal f_eps, f_sigma; - - //DenseMatrix& diam = trParam.diam; - //DenseMatrix& epsilon = trParam.epsilon; - - //for (i = 0; i < nsp; i++) - // { - // for (j = i; j < nsp; j++) - // { - // // the reduced mass - // trParam.reducedMass(i,j) = - // trParam.mw[i] * trParam.mw[j] / (Avogadro * (trParam.mw[i] + trParam.mw[j])); - // - // // hard-sphere diameter for (i,j) collisions - // diam(i,j) = 0.5*(trParam.sigma[i] + trParam.sigma[j]); - // - // // the effective well depth for (i,j) collisions - // epsilon(i,j) = sqrt(trParam.eps[i]*trParam.eps[j]); - // - // // The polynomial fits of collision integrals vs. T* - // // will be done for the T* from tstar_min to tstar_max - // ts1 = Boltzmann * trParam.tmin/epsilon(i,j); - // ts2 = Boltzmann * trParam.tmax/epsilon(i,j); - // if (ts1 < tstar_min) tstar_min = ts1; - // if (ts2 > tstar_max) tstar_max = ts2; - // - // // the effective dipole moment for (i,j) collisions - // trParam.dipole(i,j) = sqrt(trParam.dipole(i,i)*trParam.dipole(j,j)); - // - // // reduced dipole moment delta* (nondimensional) - // doublereal d = diam(i,j); - // trParam.delta(i,j) = 0.5 * trParam.dipole(i,j)*trParam.dipole(i,j) - // / (epsilon(i,j) * d * d * d); - // - // makePolarCorrections(i, j, trParam, f_eps, f_sigma); - // trParam.diam(i,j) *= f_sigma; - // epsilon(i,j) *= f_eps; - // - // // properties are symmetric - // trParam.reducedMass(j,i) = trParam.reducedMass(i,j); - // diam(j,i) = diam(i,j); - // epsilon(j,i) = epsilon(i,j); - // trParam.dipole(j,i) = trParam.dipole(i,j); - // trParam.delta(j,i) = trParam.delta(i,j); - // } - // } - - // Chemkin fits the entire T* range in the Monchick and Mason tables, - // so modify tstar_min and tstar_max if in Chemkin compatibility mode - - //if (mode == CK_Mode) { - // tstar_min = 0.101; - // tstar_max = 99.9; - //} - - - // initialize the collision integral calculator for the desired - // T* range - //#ifdef DEBUG_MODE - // if (m_verbose) { - // trParam.xml->XML_open(flog, "collision_integrals"); - // } - //#endif - // m_integrals = new MMCollisionInt; - // m_integrals->init(trParam.xml, tstar_min, tstar_max, log_level); - // fitCollisionIntegrals(flog, trParam); - //#ifdef DEBUG_MODE - // if (m_verbose) { - // trParam.xml->XML_close(flog, "collision_integrals"); - // } - //#endif - // // make polynomial fits - //#ifdef DEBUG_MODE - // if (m_verbose) { - // trParam.xml->XML_open(flog, "property fits"); - // } - //#endif - // fitProperties(trParam, flog); - //#ifdef DEBUG_MODE - // if (m_verbose) { - // trParam.xml->XML_close(flog, "property fits"); - // } - //#endif + trParam.thermo->speciesNames(), trParam); } @@ -1004,7 +921,7 @@ namespace Cantera { XML_Node& vnode = trNode.child("viscosity"); std::string model = lowercase(vnode["model"]); if (model == "" || model == "constant") { - A_visc = vnode.fp_value(); + A_visc = ctml::getFloatCurrent(vnode, "toSI"); if (A_visc > 0.0) (data.viscCoeffs).push_back(A_visc); else throw TransportDBError(linenum, "negative or zero viscosity"); @@ -1030,35 +947,35 @@ namespace Cantera { } /* - * thermal_conductivity + * thermalConductivity * * format: - * 3.0 - * 3.0 - * + * 3.0 + * 3.0 + * * 1.0 * 2.0 * 3.0 - * + * * - * + * * 0.0. 1.0, 2.0, 3.0, 4.0 - * + * * */ - if (trNode.hasChild("thermal_conductivity")) { - XML_Node& tnode = trNode.child("thermal_conductivity"); + if (trNode.hasChild("thermalConductivity")) { + XML_Node& tnode = trNode.child("thermalConductivity"); std::string model = lowercase(tnode["model"]); if (model == "" || model == "constant") { - A_thcond = tnode.fp_value(); + A_thcond = ctml::getFloatCurrent(tnode, "toSI"); if (A_thcond > 0.0) (data.thermalCondCoeffs).push_back(A_thcond); else throw TransportDBError(linenum, - "negative or zero thermal_conductivity"); + "negative or zero thermalConductivity"); data.model_thermalCond = LTR_MODEL_CONSTANT; } else if (model == "arrhenius") { getArrhenius(tnode, A_thcond, n_thcond, Tact_thcond); if (A_thcond <= 0.0) { - throw TransportDBError(linenum, "negative or zero thermal_conductivity"); + throw TransportDBError(linenum, "negative or zero thermalConductivity"); } (data.thermalCondCoeffs).push_back(A_thcond); (data.thermalCondCoeffs).push_back(n_thcond); @@ -1071,7 +988,7 @@ namespace Cantera { data.model_thermalCond = LTR_MODEL_COEFF; } else { throw CanteraError(" TransportFactory::getLiquidTransportData", - "Unknown model for thermal_conductivity:" + tnode["model"]); + "Unknown model for thermalConductivity:" + tnode["model"]); } } @@ -1097,7 +1014,7 @@ namespace Cantera { XML_Node& dnode = trNode.child("speciesDiffusivity"); std::string model = lowercase(dnode["model"]); if (model == "" || model == "constant") { - A_spdiff = dnode.fp_value(); + A_spdiff = ctml::getFloatCurrent(dnode, "toSI"); if (A_spdiff > 0.0) (data.speciesDiffusivityCoeffs).push_back(A_spdiff); else throw TransportDBError(linenum, "negative or zero speciesDiffusivity"); @@ -1172,7 +1089,7 @@ namespace Cantera { // Need to identify a method to obtain interaction matrices. // This will fill LiquidTransportParams members visc_Eij, visc_Sij trParam.visc_Eij.resize(trParam.nsp_,trParam.nsp_); - cout << "No support for species viscosity interactions in TransportFactory.cpp" << endl; + //cout << "No support for species viscosity interactions in TransportFactory.cpp" << endl; } diff --git a/configure b/configure index b8e9c815c..9473d7c46 100755 --- a/configure +++ b/configure @@ -10672,7 +10672,7 @@ fi - ac_config_files="$ac_config_files Makefile Cantera/Makefile Cantera/src/Makefile Cantera/src/base/Makefile Cantera/src/zeroD/Makefile Cantera/src/oneD/Makefile Cantera/src/converters/Makefile Cantera/src/transport/Makefile Cantera/src/thermo/Makefile Cantera/src/kinetics/Makefile Cantera/src/numerics/Makefile Cantera/src/spectra/Makefile Cantera/src/equil/Makefile Cantera/clib/src/Makefile Cantera/fortran/src/Makefile Cantera/fortran/f77demos/f77demos.mak Cantera/fortran/f77demos/Makefile Cantera/matlab/Makefile Cantera/matlab/setup_matlab.py Cantera/python/Makefile Cantera/python/setup.py Cantera/cxx/Makefile Cantera/cxx/src/Makefile Cantera/cxx/demos/Makefile Cantera/cxx/demos/combustor/Makefile Cantera/cxx/demos/combustor/Makefile.install Cantera/cxx/demos/flamespeed/Makefile Cantera/cxx/demos/flamespeed/Makefile.install Cantera/cxx/demos/kinetics1/Makefile Cantera/cxx/demos/kinetics1/Makefile.install Cantera/cxx/demos/NASA_coeffs/Makefile Cantera/cxx/demos/NASA_coeffs/Makefile.install Cantera/cxx/demos/rankine/Makefile Cantera/cxx/demos/rankine/Makefile.install Cantera/cxx/include/Cantera.mak Cantera/cxx/include/Cantera_bt.mak Cantera/user/Makefile Cantera/python/src/Makefile Cantera/python/examples/Makefile Cantera/python/examples/equilibrium/Makefile Cantera/python/examples/equilibrium/adiabatic_flame/Makefile Cantera/python/examples/equilibrium/multiphase_plasma/Makefile Cantera/python/examples/equilibrium/simple_test/Makefile Cantera/python/examples/equilibrium/stoich_flame/Makefile Cantera/python/examples/gasdynamics/isentropic/Makefile Cantera/python/examples/gasdynamics/soundSpeed/Makefile Cantera/python/examples/flames/adiabatic_flame/Makefile Cantera/python/examples/flames/flame1/Makefile Cantera/python/examples/flames/flame2/Makefile Cantera/python/examples/flames/flame_fixed_T/Makefile Cantera/python/examples/flames/free_h2_air/Makefile Cantera/python/examples/flames/npflame1/Makefile Cantera/python/examples/flames/stflame1/Makefile Cantera/python/examples/fuel_cells/Makefile Cantera/python/examples/liquid_vapor/critProperties/Makefile Cantera/python/examples/liquid_vapor/rankine/Makefile Cantera/python/examples/kinetics/Makefile Cantera/python/examples/misc/Makefile Cantera/python/examples/reactors/combustor_sim/Makefile Cantera/python/examples/reactors/functors_sim/Makefile Cantera/python/examples/reactors/mix1_sim/Makefile Cantera/python/examples/reactors/mix2_sim/Makefile Cantera/python/examples/reactors/piston_sim/Makefile Cantera/python/examples/reactors/reactor1_sim/Makefile Cantera/python/examples/reactors/reactor2_sim/Makefile Cantera/python/examples/reactors/sensitivity_sim/Makefile Cantera/python/examples/reactors/surf_pfr_sim/Makefile Cantera/python/examples/surface_chemistry/diamond_cvd/Makefile Cantera/python/examples/surface_chemistry/catcomb_stagflow/Makefile Cantera/python/examples/transport/Makefile Cantera/python/examples/flames/Makefile Cantera/python/examples/gasdynamics/Makefile Cantera/python/examples/liquid_vapor/Makefile Cantera/python/examples/reactors/Makefile Cantera/python/examples/surface_chemistry/Makefile ext/lapack/Makefile ext/blas/Makefile ext/cvode/Makefile ext/math/Makefile ext/recipes/Makefile ext/tpx/Makefile ext/Makefile ext/f2c_libs/Makefile ext/f2c_blas/Makefile ext/f2c_lapack/Makefile ext/f2c_math/Makefile examples/Makefile examples/cxx/Makefile tools/Makefile tools/doc/Cantera.cfg tools/doc/Makefile tools/src/Makefile tools/src/sample.mak tools/src/finish_install.py tools/src/package4mac tools/templates/f77/demo.mak tools/templates/f90/demo.mak tools/templates/cxx/demo.mak tools/testtools/Makefile data/inputs/Makefile data/inputs/mkxml test_problems/Makefile test_problems/cxx_ex/Makefile test_problems/silane_equil/Makefile test_problems/surfkin/Makefile test_problems/spectroscopy/Makefile test_problems/surfSolverTest/Makefile test_problems/diamondSurf/Makefile test_problems/diamondSurf_dupl/Makefile test_problems/ChemEquil_gri_matrix/Makefile test_problems/ChemEquil_gri_pairs/Makefile test_problems/ChemEquil_ionizedGas/Makefile test_problems/ChemEquil_red1/Makefile test_problems/CpJump/Makefile test_problems/mixGasTransport/Makefile test_problems/multiGasTransport/Makefile test_problems/printUtilUnitTest/Makefile test_problems/fracCoeff/Makefile test_problems/negATest/Makefile test_problems/NASA9poly_test/Makefile test_problems/ck2cti_test/Makefile test_problems/ck2cti_test/runtest test_problems/nasa9_reader/Makefile test_problems/nasa9_reader/runtest test_problems/min_python/Makefile test_problems/min_python/minDiamond/Makefile test_problems/min_python/negATest/Makefile test_problems/pureFluidTest/Makefile test_problems/rankine_democxx/Makefile test_problems/python/Makefile test_problems/cathermo/Makefile test_problems/cathermo/issp/Makefile test_problems/cathermo/ims/Makefile test_problems/cathermo/stoichSubSSTP/Makefile test_problems/cathermo/testIAPWS/Makefile test_problems/cathermo/testIAPWSPres/Makefile test_problems/cathermo/testIAPWSTripP/Makefile test_problems/cathermo/testWaterPDSS/Makefile test_problems/cathermo/testWaterTP/Makefile test_problems/cathermo/HMW_test_1/Makefile test_problems/cathermo/HMW_test_3/Makefile test_problems/cathermo/HMW_graph_GvT/Makefile test_problems/cathermo/HMW_graph_GvI/Makefile test_problems/cathermo/HMW_graph_HvT/Makefile test_problems/cathermo/HMW_graph_CpvT/Makefile test_problems/cathermo/HMW_graph_VvT/Makefile test_problems/cathermo/DH_graph_1/Makefile test_problems/cathermo/DH_graph_acommon/Makefile test_problems/cathermo/DH_graph_NM/Makefile test_problems/cathermo/DH_graph_Pitzer/Makefile test_problems/cathermo/DH_graph_bdotak/Makefile test_problems/cathermo/HMW_dupl_test/Makefile test_problems/cathermo/VPissp/Makefile test_problems/VCSnonideal/Makefile test_problems/VPsilane_test/Makefile test_problems/VPsilane_test/runtest test_problems/VCSnonideal/NaCl_equil/Makefile bin/install_tsc" + ac_config_files="$ac_config_files Makefile Cantera/Makefile Cantera/src/Makefile Cantera/src/base/Makefile Cantera/src/zeroD/Makefile Cantera/src/oneD/Makefile Cantera/src/converters/Makefile Cantera/src/transport/Makefile Cantera/src/thermo/Makefile Cantera/src/kinetics/Makefile Cantera/src/numerics/Makefile Cantera/src/spectra/Makefile Cantera/src/equil/Makefile Cantera/clib/src/Makefile Cantera/fortran/src/Makefile Cantera/fortran/f77demos/f77demos.mak Cantera/fortran/f77demos/Makefile Cantera/matlab/Makefile Cantera/matlab/setup_matlab.py Cantera/python/Makefile Cantera/python/setup.py Cantera/cxx/Makefile Cantera/cxx/src/Makefile Cantera/cxx/demos/Makefile Cantera/cxx/demos/combustor/Makefile Cantera/cxx/demos/combustor/Makefile.install Cantera/cxx/demos/flamespeed/Makefile Cantera/cxx/demos/flamespeed/Makefile.install Cantera/cxx/demos/kinetics1/Makefile Cantera/cxx/demos/kinetics1/Makefile.install Cantera/cxx/demos/NASA_coeffs/Makefile Cantera/cxx/demos/NASA_coeffs/Makefile.install Cantera/cxx/demos/rankine/Makefile Cantera/cxx/demos/rankine/Makefile.install Cantera/cxx/include/Cantera.mak Cantera/cxx/include/Cantera_bt.mak Cantera/user/Makefile Cantera/python/src/Makefile Cantera/python/examples/Makefile Cantera/python/examples/equilibrium/Makefile Cantera/python/examples/equilibrium/adiabatic_flame/Makefile Cantera/python/examples/equilibrium/multiphase_plasma/Makefile Cantera/python/examples/equilibrium/simple_test/Makefile Cantera/python/examples/equilibrium/stoich_flame/Makefile Cantera/python/examples/gasdynamics/isentropic/Makefile Cantera/python/examples/gasdynamics/soundSpeed/Makefile Cantera/python/examples/flames/adiabatic_flame/Makefile Cantera/python/examples/flames/flame1/Makefile Cantera/python/examples/flames/flame2/Makefile Cantera/python/examples/flames/flame_fixed_T/Makefile Cantera/python/examples/flames/free_h2_air/Makefile Cantera/python/examples/flames/npflame1/Makefile Cantera/python/examples/flames/stflame1/Makefile Cantera/python/examples/fuel_cells/Makefile Cantera/python/examples/liquid_vapor/critProperties/Makefile Cantera/python/examples/liquid_vapor/rankine/Makefile Cantera/python/examples/kinetics/Makefile Cantera/python/examples/misc/Makefile Cantera/python/examples/reactors/combustor_sim/Makefile Cantera/python/examples/reactors/functors_sim/Makefile Cantera/python/examples/reactors/mix1_sim/Makefile Cantera/python/examples/reactors/mix2_sim/Makefile Cantera/python/examples/reactors/piston_sim/Makefile Cantera/python/examples/reactors/reactor1_sim/Makefile Cantera/python/examples/reactors/reactor2_sim/Makefile Cantera/python/examples/reactors/sensitivity_sim/Makefile Cantera/python/examples/reactors/surf_pfr_sim/Makefile Cantera/python/examples/surface_chemistry/diamond_cvd/Makefile Cantera/python/examples/surface_chemistry/catcomb_stagflow/Makefile Cantera/python/examples/transport/Makefile Cantera/python/examples/flames/Makefile Cantera/python/examples/gasdynamics/Makefile Cantera/python/examples/liquid_vapor/Makefile Cantera/python/examples/reactors/Makefile Cantera/python/examples/surface_chemistry/Makefile ext/lapack/Makefile ext/blas/Makefile ext/cvode/Makefile ext/math/Makefile ext/recipes/Makefile ext/tpx/Makefile ext/Makefile ext/f2c_libs/Makefile ext/f2c_blas/Makefile ext/f2c_lapack/Makefile ext/f2c_math/Makefile examples/Makefile examples/cxx/Makefile tools/Makefile tools/doc/Cantera.cfg tools/doc/Makefile tools/src/Makefile tools/src/sample.mak tools/src/finish_install.py tools/src/package4mac tools/templates/f77/demo.mak tools/templates/f90/demo.mak tools/templates/cxx/demo.mak tools/testtools/Makefile data/inputs/Makefile data/inputs/mkxml test_problems/Makefile test_problems/cxx_ex/Makefile test_problems/silane_equil/Makefile test_problems/surfkin/Makefile test_problems/spectroscopy/Makefile test_problems/surfSolverTest/Makefile test_problems/diamondSurf/Makefile test_problems/diamondSurf_dupl/Makefile test_problems/ChemEquil_gri_matrix/Makefile test_problems/ChemEquil_gri_pairs/Makefile test_problems/ChemEquil_ionizedGas/Makefile test_problems/ChemEquil_red1/Makefile test_problems/CpJump/Makefile test_problems/mixGasTransport/Makefile test_problems/multiGasTransport/Makefile test_problems/printUtilUnitTest/Makefile test_problems/fracCoeff/Makefile test_problems/negATest/Makefile test_problems/NASA9poly_test/Makefile test_problems/ck2cti_test/Makefile test_problems/ck2cti_test/runtest test_problems/nasa9_reader/Makefile test_problems/nasa9_reader/runtest test_problems/min_python/Makefile test_problems/min_python/minDiamond/Makefile test_problems/min_python/negATest/Makefile test_problems/pureFluidTest/Makefile test_problems/rankine_democxx/Makefile test_problems/python/Makefile test_problems/cathermo/Makefile test_problems/cathermo/issp/Makefile test_problems/cathermo/ims/Makefile test_problems/cathermo/stoichSubSSTP/Makefile test_problems/cathermo/testIAPWS/Makefile test_problems/cathermo/testIAPWSPres/Makefile test_problems/cathermo/testIAPWSTripP/Makefile test_problems/cathermo/testWaterPDSS/Makefile test_problems/cathermo/testWaterTP/Makefile test_problems/cathermo/HMW_test_1/Makefile test_problems/cathermo/HMW_test_3/Makefile test_problems/cathermo/HMW_graph_GvT/Makefile test_problems/cathermo/HMW_graph_GvI/Makefile test_problems/cathermo/HMW_graph_HvT/Makefile test_problems/cathermo/HMW_graph_CpvT/Makefile test_problems/cathermo/HMW_graph_VvT/Makefile test_problems/cathermo/DH_graph_1/Makefile test_problems/cathermo/DH_graph_acommon/Makefile test_problems/cathermo/DH_graph_NM/Makefile test_problems/cathermo/DH_graph_Pitzer/Makefile test_problems/cathermo/DH_graph_bdotak/Makefile test_problems/cathermo/HMW_dupl_test/Makefile test_problems/cathermo/VPissp/Makefile test_problems/cathermo/wtWater/Makefile test_problems/VCSnonideal/Makefile test_problems/VPsilane_test/Makefile test_problems/VPsilane_test/runtest test_problems/VCSnonideal/NaCl_equil/Makefile bin/install_tsc" test "x$prefix" = xNONE && prefix=$ac_default_prefix @@ -11298,6 +11298,7 @@ do "test_problems/cathermo/DH_graph_bdotak/Makefile" ) CONFIG_FILES="$CONFIG_FILES test_problems/cathermo/DH_graph_bdotak/Makefile" ;; "test_problems/cathermo/HMW_dupl_test/Makefile" ) CONFIG_FILES="$CONFIG_FILES test_problems/cathermo/HMW_dupl_test/Makefile" ;; "test_problems/cathermo/VPissp/Makefile" ) CONFIG_FILES="$CONFIG_FILES test_problems/cathermo/VPissp/Makefile" ;; + "test_problems/cathermo/wtWater/Makefile" ) CONFIG_FILES="$CONFIG_FILES test_problems/cathermo/wtWater/Makefile" ;; "test_problems/VCSnonideal/Makefile" ) CONFIG_FILES="$CONFIG_FILES test_problems/VCSnonideal/Makefile" ;; "test_problems/VPsilane_test/Makefile" ) CONFIG_FILES="$CONFIG_FILES test_problems/VPsilane_test/Makefile" ;; "test_problems/VPsilane_test/runtest" ) CONFIG_FILES="$CONFIG_FILES test_problems/VPsilane_test/runtest" ;;