Removed parsing for old Liquid Transport Interaction models
This commit is contained in:
parent
b4032c9d9a
commit
cb5e85ed5c
1 changed files with 0 additions and 222 deletions
|
|
@ -1133,229 +1133,7 @@ namespace Cantera {
|
||||||
catch(CanteraError) {
|
catch(CanteraError) {
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::string type;
|
|
||||||
std::string speciesA;
|
|
||||||
std::string speciesB;
|
|
||||||
/*
|
|
||||||
* Viscosity
|
|
||||||
*/
|
|
||||||
if ( transportNode.hasChild("viscosity")) {
|
|
||||||
XML_Node& viscosityNode = transportNode.child("viscosity");
|
|
||||||
if ( viscosityNode.hasChild("compositionDependence") ) {
|
|
||||||
XML_Node& compositionNode = viscosityNode.child("compositionDependence");
|
|
||||||
std::string compositionModel = compositionNode.attrib("model");
|
|
||||||
if ( compositionModel == "" ) {
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"transport::viscosity XML node doesn't have a model string");
|
|
||||||
} else if ( compositionModel == "none"){
|
|
||||||
trParam.model_viscosity = LTI_MODEL_NONE;
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"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 = LTI_MODEL_MOLEFRACS;
|
|
||||||
} else if ( compositionModel == "massFractions"){
|
|
||||||
trParam.model_viscosity = LTI_MODEL_MASSFRACS;
|
|
||||||
} else if ( compositionModel == "logMoleFractions"){
|
|
||||||
trParam.model_viscosity = LTI_MODEL_LOG_MOLEFRACS;
|
|
||||||
} else if ( compositionModel == "pairwiseInteraction"){
|
|
||||||
trParam.model_viscosity = LTI_MODEL_PAIRWISE_INTERACTION;
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"LTI_MODEL_PAIRWISE_INTERACTION interactions not implemented for viscosity");
|
|
||||||
}
|
|
||||||
int num = compositionNode.nChildren();
|
|
||||||
for (int iChild = 0; iChild < num; iChild++) {
|
|
||||||
XML_Node &xmlChild = compositionNode.child(iChild);
|
|
||||||
std::string nodeName = lowercase( xmlChild.name() );
|
|
||||||
if ( nodeName != "interaction" )
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"expected <interaction> element and got " + nodeName );
|
|
||||||
speciesA = xmlChild.attrib("speciesA");
|
|
||||||
speciesB = xmlChild.attrib("speciesB");
|
|
||||||
int iSpecies = trParam.thermo->speciesIndex( speciesA );
|
|
||||||
if ( iSpecies < 0 )
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"Unknown species " + speciesA );
|
|
||||||
int jSpecies = trParam.thermo->speciesIndex( speciesB );
|
|
||||||
if ( jSpecies < 0 )
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"Unknown species " + speciesB );
|
|
||||||
trParam.visc_Eij(iSpecies,jSpecies) = getFloat( xmlChild, "Eij", "toSI" );
|
|
||||||
trParam.visc_Eij(jSpecies,iSpecies) = trParam.visc_Eij(iSpecies,jSpecies) ;
|
|
||||||
trParam.visc_Sij(iSpecies,jSpecies) = getFloat( xmlChild, "Sij", "toSI" );
|
|
||||||
trParam.visc_Sij(jSpecies,iSpecies) = trParam.visc_Sij(iSpecies,jSpecies) ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Thermal conductivity
|
|
||||||
*/
|
|
||||||
if ( transportNode.hasChild("thermalConductivity")) {
|
|
||||||
XML_Node& thermCondNode = transportNode.child("thermalConductivity");
|
|
||||||
if ( thermCondNode.hasChild("compositionDependence") ) {
|
|
||||||
XML_Node& compositionNode = thermCondNode.child("compositionDependence");
|
|
||||||
std::string compositionModel = compositionNode.attrib("model");
|
|
||||||
if ( compositionModel == "" ) {
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"transport::thermalConductivity XML node doesn't have a model string");
|
|
||||||
} else if ( compositionModel == "none"){
|
|
||||||
trParam.model_thermalCond = LTI_MODEL_NONE;
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"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 = LTI_MODEL_MOLEFRACS;
|
|
||||||
} else if ( compositionModel == "massFractions"){
|
|
||||||
trParam.model_thermalCond = LTI_MODEL_MASSFRACS;
|
|
||||||
} else if ( compositionModel == "logMoleFractions"){
|
|
||||||
trParam.model_thermalCond = LTI_MODEL_LOG_MOLEFRACS;
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"LTI_MODEL_LOG_MOLEFRACS interactions not implemented for thermalConductivity");
|
|
||||||
} else if ( compositionModel == "pairwiseInteraction"){
|
|
||||||
trParam.model_thermalCond = LTI_MODEL_PAIRWISE_INTERACTION;
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"LTI_MODEL_PAIRWISE_INTERACTION interactions not implemented for thermalConductivity");
|
|
||||||
}
|
|
||||||
int num = compositionNode.nChildren();
|
|
||||||
for (int iChild = 0; iChild < num; iChild++) {
|
|
||||||
XML_Node &xmlChild = compositionNode.child(iChild);
|
|
||||||
std::string nodeName = lowercase( xmlChild.name() );
|
|
||||||
if ( nodeName != "interaction" )
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"expected <interaction> element and got <" + nodeName + ">" );
|
|
||||||
speciesA = xmlChild.attrib("speciesA");
|
|
||||||
speciesB = xmlChild.attrib("speciesB");
|
|
||||||
int iSpecies = trParam.thermo->speciesIndex( speciesA );
|
|
||||||
if ( iSpecies < 0 )
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"Unknown species " + speciesA );
|
|
||||||
int jSpecies = trParam.thermo->speciesIndex( speciesB );
|
|
||||||
if ( jSpecies < 0 )
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"Unknown species " + speciesB );
|
|
||||||
trParam.thermalCond_Aij(iSpecies,jSpecies) = getFloat( xmlChild, "Aij", "toSI" );
|
|
||||||
trParam.thermalCond_Aij(jSpecies,iSpecies) = trParam.thermalCond_Aij(iSpecies,jSpecies) ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Species Diffusivity
|
|
||||||
*/
|
|
||||||
if ( transportNode.hasChild("speciesDiffusivity")) {
|
|
||||||
XML_Node& diffusivityNode = transportNode.child("speciesDiffusivity");
|
|
||||||
if ( diffusivityNode.hasChild("compositionDependence") ) {
|
|
||||||
XML_Node& compositionNode = diffusivityNode.child("compositionDependence");
|
|
||||||
std::string compositionModel = compositionNode.attrib("model");
|
|
||||||
if ( compositionModel == "" ) {
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"transport::speciesDiffusivity XML node doesn't have a model string");
|
|
||||||
} else if ( compositionModel == "none"){
|
|
||||||
trParam.model_speciesDiffusivity = LTI_MODEL_NONE;
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"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 = LTI_MODEL_MOLEFRACS;
|
|
||||||
} else if ( compositionModel == "massFractions"){
|
|
||||||
trParam.model_speciesDiffusivity = LTI_MODEL_MASSFRACS;
|
|
||||||
} else if ( compositionModel == "logMoleFractions"){
|
|
||||||
trParam.model_speciesDiffusivity = LTI_MODEL_LOG_MOLEFRACS;
|
|
||||||
} else if ( compositionModel == "pairwiseInteraction"){
|
|
||||||
trParam.model_speciesDiffusivity = LTI_MODEL_PAIRWISE_INTERACTION;
|
|
||||||
}
|
|
||||||
int num = compositionNode.nChildren();
|
|
||||||
for (int iChild = 0; iChild < num; iChild++) {
|
|
||||||
XML_Node &xmlChild = compositionNode.child(iChild);
|
|
||||||
std::string nodeName = lowercase( xmlChild.name() );
|
|
||||||
if ( nodeName != "interaction" )
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"expected <interaction> element and got " + nodeName );
|
|
||||||
speciesA = xmlChild.attrib("speciesA");
|
|
||||||
speciesB = xmlChild.attrib("speciesB");
|
|
||||||
int iSpecies = trParam.thermo->speciesIndex( speciesA );
|
|
||||||
if ( iSpecies < 0 )
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"Unknown species " + speciesA );
|
|
||||||
int jSpecies = trParam.thermo->speciesIndex( speciesB );
|
|
||||||
if ( jSpecies < 0 )
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"Unknown species " + speciesB );
|
|
||||||
trParam.diff_Dij(iSpecies,jSpecies) = getFloat( xmlChild, "Dij", "toSI" );
|
|
||||||
trParam.diff_Dij(jSpecies,iSpecies) = trParam.diff_Dij(iSpecies,jSpecies) ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Hydrodynamic radius
|
|
||||||
*/
|
|
||||||
if ( transportNode.hasChild("hydrodynamicRadius")) {
|
|
||||||
XML_Node& radiusNode = transportNode.child("hydrodynamicRadius");
|
|
||||||
if ( radiusNode.hasChild("compositionDependence") ) {
|
|
||||||
XML_Node& compositionNode = radiusNode.child("compositionDependence");
|
|
||||||
std::string compositionModel = compositionNode.attrib("model");
|
|
||||||
if ( compositionModel == "" ) {
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"transport::hydrodynamicRadius XML node doesn't have a model string");
|
|
||||||
} else if ( compositionModel == "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 = LTI_MODEL_MOLEFRACS;
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"LTI_MODEL_MOLEFRACS interactions not implemented for hydrodynamicRadius");
|
|
||||||
} else if ( compositionModel == "massFractions"){
|
|
||||||
trParam.model_thermalCond = LTI_MODEL_MASSFRACS;
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"LTI_MODEL_MASSFRACS interactions not implemented for hydrodynamicRadius");
|
|
||||||
} else if ( compositionModel == "logMoleFractions"){
|
|
||||||
trParam.model_thermalCond = LTI_MODEL_LOG_MOLEFRACS;
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"LTI_MODEL_LOG_MOLEFRACS interactions not implemented for hydrodynamicRadius");
|
|
||||||
} else if ( compositionModel == "pairwiseInteraction"){
|
|
||||||
trParam.model_thermalCond = LTI_MODEL_PAIRWISE_INTERACTION;
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"LTI_MODEL_PAIRWISE_INTERACTION interactions not implemented for hydrodynamicRadius");
|
|
||||||
}
|
|
||||||
int num = compositionNode.nChildren();
|
|
||||||
for (int iChild = 0; iChild < num; iChild++) {
|
|
||||||
XML_Node &xmlChild = compositionNode.child(iChild);
|
|
||||||
std::string nodeName = lowercase( xmlChild.name() );
|
|
||||||
if ( nodeName != "interaction" )
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"expected <interaction> element and got <" + nodeName + ">" );
|
|
||||||
speciesA = xmlChild.attrib("speciesA");
|
|
||||||
speciesB = xmlChild.attrib("speciesB");
|
|
||||||
int iSpecies = trParam.thermo->speciesIndex( speciesA );
|
|
||||||
if ( iSpecies < 0 )
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"Unknown species " + speciesA );
|
|
||||||
int jSpecies = trParam.thermo->speciesIndex( speciesB );
|
|
||||||
if ( jSpecies < 0 )
|
|
||||||
throw CanteraError("TransportFactory::getLiquidInteractionsTransportData",
|
|
||||||
"Unknown species " + speciesB );
|
|
||||||
trParam.radius_Aij(iSpecies,jSpecies) = getFloat( xmlChild, "Aij", "toSI" );
|
|
||||||
trParam.radius_Aij(jSpecies,iSpecies) = trParam.radius_Aij(iSpecies,jSpecies) ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************
|
/*********************************************************
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue