Added following members in LiquidTransport.cpp and LiquidTransport.h
associated with transport coefficient mixing properties: + LiquidTranMixingModel m_viscMixModel; + LiquidTranMixingModel m_lambdaMixModel; + DenseMatrix m_lambda_Aij; + LiquidTranMixingModel m_diffMixModel; + DenseMatrix m_diff_Dij; + LiquidTranMixingModel m_radiusMixModel; Removed - int m_compositionDepType; since it is replaced by the above property-dependent model specifications. Similarly in LiquidTransportParams.h added following + LiquidTranMixingModel model_viscosity; + LiquidTranMixingModel model_thermalCond; + DenseMatrix thermalCond_Aij; + LiquidTranMixingModel model_speciesDiffusivity; + DenseMatrix diff_Dij; + LiquidTranMixingModel model_hydroradius; Added some processing of the above variables from the XML file in LiquidTransport::getLiquidInteractionsTransportData.
This commit is contained in:
parent
cc07e10207
commit
a4b9fd56c4
4 changed files with 117 additions and 29 deletions
|
|
@ -36,7 +36,9 @@ namespace Cantera {
|
|||
m_nsp(0),
|
||||
m_tmin(-1.0),
|
||||
m_tmax(100000.),
|
||||
m_compositionDepType(-1),
|
||||
m_viscMixModel(LTR_MIXMODEL_NOTSET),
|
||||
m_lambdaMixModel(LTR_MIXMODEL_NOTSET),
|
||||
m_diffMixModel(LTR_MIXMODEL_NOTSET),
|
||||
m_iStateMF(-1),
|
||||
m_temp(-1.0),
|
||||
m_logt(0.0),
|
||||
|
|
@ -63,7 +65,6 @@ namespace Cantera {
|
|||
m_nsp(0),
|
||||
m_tmin(-1.0),
|
||||
m_tmax(100000.),
|
||||
m_compositionDepType(-1),
|
||||
m_iStateMF(-1),
|
||||
m_temp(-1.0),
|
||||
m_logt(0.0),
|
||||
|
|
@ -118,6 +119,9 @@ namespace Cantera {
|
|||
m_logViscSpecies = right.m_logViscSpecies;
|
||||
m_hydrodynamic_radius = right.m_hydrodynamic_radius;
|
||||
m_lambdaSpecies = right.m_lambdaSpecies;
|
||||
m_viscMixModel = right.m_viscMixModel;
|
||||
m_lambdaMixModel = right.m_lambdaMixModel;
|
||||
m_diffMixModel = right.m_diffMixModel;
|
||||
m_iStateMF = -1;
|
||||
m_molefracs = right.m_molefracs;
|
||||
m_molefracs_tran = right.m_molefracs_tran;
|
||||
|
|
@ -330,6 +334,28 @@ namespace Cantera {
|
|||
|
||||
//HERE WE NEED TO GET THINGS FROM
|
||||
//TransportFactory::getLiquidInteractionsTransportData
|
||||
/*
|
||||
* Viscosity mixing rules
|
||||
*/
|
||||
m_viscMixModel = tr.model_viscosity;
|
||||
m_visc_Eij.resize(m_nsp,m_nsp);
|
||||
m_visc_Sij.resize(m_nsp,m_nsp);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Thermal conductivity mixing rules
|
||||
*/
|
||||
m_lambdaMixModel = tr.model_viscosity;
|
||||
m_lambda_Aij.resize(m_nsp,m_nsp);
|
||||
|
||||
/*
|
||||
* Species Diffusivity binary diffusion coefficients
|
||||
* for Stefan Maxwell equation or "mixing rules"
|
||||
*/
|
||||
m_diffMixModel = tr.model_viscosity;
|
||||
m_diff_Dij.resize(m_nsp,m_nsp);
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -514,6 +514,15 @@ namespace Cantera {
|
|||
//! Pure species viscosities in temperature-dependent form.
|
||||
std::vector<Coeff_T_> m_coeffVisc_Ns;
|
||||
|
||||
//! Viscosity mixing model type
|
||||
/*!
|
||||
* Types of mixing models supported:
|
||||
* 2 - Mole fraction weighting of species viscosities
|
||||
* 3 - Mass fraction weighting of species viscosities
|
||||
* 4 - Mole fraction weighting of logarithms of species viscosities
|
||||
*/
|
||||
LiquidTranMixingModel m_viscMixModel;
|
||||
|
||||
//! Molecular interaction energies associated with viscosity
|
||||
/**
|
||||
* These multiply the viscosity according to
|
||||
|
|
@ -528,8 +537,6 @@ namespace Cantera {
|
|||
*/
|
||||
DenseMatrix m_visc_Sij;
|
||||
|
||||
|
||||
|
||||
//! Thermal conductivity temperature dependence type
|
||||
/*!
|
||||
* Types of temperature dependencies:
|
||||
|
|
@ -542,6 +549,21 @@ namespace Cantera {
|
|||
//! Pure species thermal conductivities in temperature-dependent form.
|
||||
std::vector<Coeff_T_> m_coeffLambda_Ns;
|
||||
|
||||
//! Thermal conductivity mixing model type
|
||||
/*!
|
||||
* Types of mixing models supported:
|
||||
* 2 - Mole fraction weighting of species viscosities
|
||||
* 3 - Mass fraction weighting of species viscosities
|
||||
*/
|
||||
LiquidTranMixingModel m_lambdaMixModel;
|
||||
|
||||
//! Molecular interaction associated with thermal conductivity
|
||||
/**
|
||||
* These multiply the viscosity according to
|
||||
* \f[ exp( \sum_{i} \sum{j} X_i X_j S_{i,j} \f].
|
||||
*/
|
||||
DenseMatrix m_lambda_Aij;
|
||||
|
||||
//! Diffusion coefficient temperature dependence type
|
||||
/*!
|
||||
* Types of temperature dependencies:
|
||||
|
|
@ -555,6 +577,16 @@ namespace Cantera {
|
|||
//! Not currently used since we get diffusivity from hydrodynamic radius.
|
||||
std::vector<Coeff_T_> m_coeffDiff_Ns;
|
||||
|
||||
//! Species diffusivity mixing model type
|
||||
/*!
|
||||
* Types of mixing models supported:
|
||||
* 5 - Pairwise interactions -- Setfan-Maxwell diffusion coefficients
|
||||
*/
|
||||
LiquidTranMixingModel m_diffMixModel;
|
||||
|
||||
//! Setfan-Maxwell diffusion coefficients
|
||||
DenseMatrix m_diff_Dij;
|
||||
|
||||
|
||||
vector<bool> useHydroRadius_;
|
||||
|
||||
|
|
@ -573,21 +605,13 @@ namespace Cantera {
|
|||
//! Species hydrodynamic radius
|
||||
vector_fp m_hydrodynamic_radius;
|
||||
|
||||
|
||||
|
||||
//! Composition dependence of the transport properties
|
||||
//! Hydrodynamic radius mixing model type
|
||||
/*!
|
||||
* The following coefficients are allowed to have simple
|
||||
* composition dependencies
|
||||
* mixture viscosity
|
||||
* mixture thermal conductivity
|
||||
*
|
||||
*
|
||||
* Types of composition dependencies
|
||||
* 0 - Solvent values (i.e., species 0) contributes only
|
||||
* 1 - linear combination of mole fractions;
|
||||
* Types of mixing models supported:
|
||||
* 0 - No mixing model allowed
|
||||
*/
|
||||
int m_compositionDepType;
|
||||
LiquidTranMixingModel m_radiusMixModel;
|
||||
|
||||
|
||||
//! Polynomial coefficients of the binary diffusion coefficients
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -16,11 +16,12 @@ namespace Cantera {
|
|||
//! Composition dependence type for liquid mixture transport properties
|
||||
/*!
|
||||
* Types of temperature dependencies:
|
||||
* 0 - Use solvent (species 0) properties
|
||||
* 1 - Properties weighted linearly by mole fractions
|
||||
* 2 - Properties weighted linearly by mass fractions
|
||||
* 3 - Properties weighted logarithmically by mole fractions (interaction energy weighting)
|
||||
* 4 - Interactions given pairwise between each possible species (i.e. D_ij)
|
||||
* 0 - Mixture calculations with this property are not allowed
|
||||
* 1 - Use solvent (species 0) properties
|
||||
* 2 - Properties weighted linearly by mole fractions
|
||||
* 3 - Properties weighted linearly by mass fractions
|
||||
* 4 - Properties weighted logarithmically by mole fractions (interaction energy weighting)
|
||||
* 5 - Interactions given pairwise between each possible species (i.e. D_ij)
|
||||
*
|
||||
* <transport model="Liquid">
|
||||
* <viscosity>
|
||||
|
|
@ -68,7 +69,7 @@ namespace Cantera {
|
|||
LTR_MIXMODEL_MOLEFRACS,
|
||||
LTR_MIXMODEL_MASSFRACS,
|
||||
LTR_MIXMODEL_LOG_MOLEFRACS,
|
||||
LTR_PAIRWISE_INTERACTION
|
||||
LTR_MIXMODEL_PAIRWISE_INTERACTION
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -85,6 +86,13 @@ namespace Cantera {
|
|||
LiquidTransportParams() {}
|
||||
~LiquidTransportParams() {}
|
||||
|
||||
//! Species transport parameters
|
||||
std::vector<Cantera::LiquidTransportData> 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
|
||||
|
|
@ -100,8 +108,38 @@ namespace Cantera {
|
|||
//! Entropies of molecular interaction associated with viscosity.
|
||||
DenseMatrix visc_Sij;
|
||||
|
||||
std::vector<Cantera::LiquidTransportData> LTData;
|
||||
//! 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;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1133,18 +1133,18 @@ namespace Cantera {
|
|||
throw CanteraError("LiquidTransport::getLiquidInteractionsTransportData",
|
||||
"transport::viscosity XML node doesn't have a model string");
|
||||
} else if ( compositionModel == "none"){
|
||||
;
|
||||
trParam.model_viscosity = LTR_MIXMODEL_NONE;
|
||||
} else if ( compositionModel == "solvent"){
|
||||
throw CanteraError("LiquidTransport::getLiquidInteractionsTransportData",
|
||||
"solvent interactions not implemented");
|
||||
} else if ( compositionModel == "moleFractions"){
|
||||
;
|
||||
trParam.model_viscosity = LTR_MIXMODEL_MOLEFRACS;
|
||||
} else if ( compositionModel == "massFractions"){
|
||||
;
|
||||
trParam.model_viscosity = LTR_MIXMODEL_MASSFRACS;
|
||||
} else if ( compositionModel == "logMoleFractions"){
|
||||
;
|
||||
trParam.model_viscosity = LTR_MIXMODEL_LOG_MOLEFRACS;
|
||||
} else if ( compositionModel == "pairwiseInteractionEnergy"){
|
||||
;
|
||||
trParam.model_viscosity = LTR_MIXMODEL_PAIRWISE_INTERACTION;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue