Cantera
2.0
|
Stefan Maxwell Diffusion Coefficients can be solved for given ion conductivity, mobility ratios, and self diffusion coeffs. More...
#include <LiquidTranInteraction.h>
Public Member Functions | |
LTI_StefanMaxwell_PPN (TransportPropertyType tp_ind=TP_UNKNOWN) | |
virtual | ~LTI_StefanMaxwell_PPN () |
Copy constructor. | |
void | setParameters (LiquidTransportParams &trParam) |
doublereal | getMixTransProp (doublereal *valueSpecies, doublereal *weightSpecies=0) |
Return the mixture transport property value. | |
doublereal | getMixTransProp (std::vector< LTPspecies * > LTPptrs) |
void | getMatrixTransProp (DenseMatrix &mat, doublereal *speciesValues=0) |
Return the matrix of binary interaction parameters. | |
virtual void | init (const XML_Node &compModelNode=0, thermo_t *thermo=0) |
initialize LiquidTranInteraction objects with thermo and XML node | |
Protected Types | |
typedef std::vector< LTPspecies * > | LTPvector |
Protected Attributes | |
doublereal | m_ionCondMix |
LiquidTranInteraction * | m_ionCondMixModel |
std::vector< LTPspecies * > | m_ionCondSpecies |
DenseMatrix | m_mobRatMix |
std::vector < LiquidTranInteraction * > | m_mobRatMixModel |
std::vector< LTPvector > | m_mobRatSpecies |
std::vector < LiquidTranInteraction * > | m_selfDiffMixModel |
vector_fp | m_selfDiffMix |
std::vector< LTPvector > | m_selfDiffSpecies |
LiquidTranMixingModel | m_model |
Model for species interaction effects Takes enum LiquidTranMixingModel. | |
TransportPropertyType | m_property |
enum indicating what property this is (i.e viscosity) | |
thermo_t * | m_thermo |
pointer to thermo object to get current temperature | |
std::vector< DenseMatrix * > | m_Aij |
Matrix of interaction coefficients for polynomial in molefraction*weight of speciesA (no temperature dependence, dimensionless) | |
std::vector< DenseMatrix * > | m_Bij |
Matrix of interaction coefficients for polynomial in molefraction*weight of speciesA (linear temperature dependence, units 1/K) | |
DenseMatrix | m_Eij |
Matrix of interactions (in energy units, 1/RT temperature dependence) | |
std::vector< DenseMatrix * > | m_Hij |
Matrix of interaction coefficients for polynomial in molefraction*weight of speciesA (in energy units, 1/RT temperature dependence) | |
std::vector< DenseMatrix * > | m_Sij |
Matrix of interaction coefficients for polynomial in molefraction*weight of speciesA (in entropy units, divided by R) | |
DenseMatrix | m_Dij |
Matrix of interactions. | |
Stefan Maxwell Diffusion Coefficients can be solved for given ion conductivity, mobility ratios, and self diffusion coeffs.
This class is only valid for a common anion mixture of two salts with cations of equal charge. Hence the name _PPN.
This class requres you specify
1 - ion conductivity
2 - mobility ratio of the two cations (set all other ratios to zero)
3 - Self diffusion coefficients of the cations (set others to zero) is used to calculate the "mutual diffusion coefficient". The approximation needed to do so requires the cations have equal charge.
We than calculate the Stefan Maxwell Diffusion Coefficients by
\[ \frac{1}{D_{12}} = (1-\epsilon X_A)(1+\epsilon X_B) \frac{\nu_- + \nu_+}{\nu_-\nu_+^2D} + \frac{z_-z_+ F^2}{\kappa V R T} \]
\[ \frac{1}{D_{12}} = -\epsilon X_B(1-\epsilon X_A) \frac{\nu_- + \nu_+}{\nu_-^2\nu_+D} - \frac{z_-z_+ F^2}{\kappa V R T} \]
\[ \frac{1}{D_{23}} = \epsilon X_A(1+\epsilon X_B) \frac{\nu_- + \nu_+}{\nu_-^2\nu_+D} - \frac{z_-z_+ F^2}{\kappa V R T} \]
where F is Faraday's constant, RT is the gas constant times the tempurature, and V is the molar volume (basis is moles of ions) that is calculated by the thermophase member. X_A and X_B are the mole fractions of the salts composed of cation(1) and cation(2), respectively, that share a common anion(3). \(\nu_{+,-}\) are the stoichiometric coefficients in the dissociation reaction of the salts to the ions with charges of \(z_{+,-}\). Assuming that the cations have equal charge, the "mutual diffusion coefficient" is calculated using the cation self diffusion coefficients.
\[ \frac{1}{\nu_-\nu_+D} = \left(1+\frac{\partial \gamma_B}{\partial N_B} \right)\frac{X_A}{D_2^*}+\left(1+\frac{\partial \gamma_A}{\partial N_A} \right)\frac{X_B}{D_1^*} \]
where the self diffusion coefficients, \(D_i^*\), are temperature and composition parameterized inputs and the derivative of the activity coefficient, \(\frac{\partial \gamma_B}{\partial N_B}\), is calculated by the thermophase member using the excess enthalpy and entropy upon mixing.
Finally, the deviation of the transferrence numbers from ideality, \(\epsilon\), is calculated from the mobility ratio of the cations.
\[ \epsilon = \frac{1-b_2/b_1}{X_A+X_Bb_2/b_1} \]
Where \(b_i\) are the mobilities of the two cations. Everywhere, cation 1 corresponds with salt A and cation 2 with salt B.
Sample input for this method is
* <transport model="Liquid"> * <speciesDiffusivity> * <compositionDependence model="stefanMaxwell_PPN"> * </compositionDependence> * </speciesDiffusivity> * </transport> *
Definition at line 545 of file LiquidTranInteraction.h.
|
inlinevirtual |
|
virtual |
Return the mixture transport property value.
Takes the separate species transport properties as input (this method does not know what transport property it is at this point.
Reimplemented from LiquidTranInteraction.
Definition at line 660 of file LiquidTranInteraction.cpp.
References Phase::getMoleFractions(), LiquidTranInteraction::m_thermo, and Phase::nSpecies().
|
virtual |
Return the matrix of binary interaction parameters.
Takes the proper mixing rule for the binary interaction parameters and calculates them
Reimplemented from LiquidTranInteraction.
Definition at line 689 of file LiquidTranInteraction.cpp.
References Cantera::eps(), Cantera::GasConstant, IonsFromNeutralVPSSTP::getAnionList(), IonsFromNeutralVPSSTP::getCationList(), IonsFromNeutralVPSSTP::getDissociationCoeffs(), MargulesVPSSTP::getdlnActCoeffdlnN_diag(), LiquidTranInteraction::getMixTransProp(), Phase::getMoleFractions(), IonsFromNeutralVPSSTP::getNeutralMolecMoleFractions(), LiquidTranInteraction::m_thermo, ckr::max(), Phase::molarVolume(), IonsFromNeutralVPSSTP::neutralMoleculePhase_, Phase::nSpecies(), DenseMatrix::resize(), and Phase::temperature().
initialize LiquidTranInteraction objects with thermo and XML node
compModelNode | <compositionDependence>XML node |
thermo | Pointer to thermo object |
Definition at line 86 of file LiquidTranInteraction.cpp.
References XML_Node::attrib(), XML_Node::child(), Cantera::GasConstant, ctml::getFloat(), ctml::getFloatArray(), XML_Node::hasChild(), Cantera::lowercase(), LiquidTranInteraction::m_Aij, LiquidTranInteraction::m_Bij, LiquidTranInteraction::m_Dij, LiquidTranInteraction::m_Eij, LiquidTranInteraction::m_Hij, LiquidTranInteraction::m_Sij, LiquidTranInteraction::m_thermo, XML_Node::name(), XML_Node::nChildren(), Cantera::npos, Phase::nSpecies(), DenseMatrix::resize(), and Phase::speciesIndex().
Referenced by TransportFactory::newLTI().
|
protectedinherited |
Model for species interaction effects Takes enum LiquidTranMixingModel.
Definition at line 159 of file LiquidTranInteraction.h.
Referenced by LiquidTranInteraction::operator=().
|
protectedinherited |
enum indicating what property this is (i.e viscosity)
Definition at line 162 of file LiquidTranInteraction.h.
Referenced by LiquidTranInteraction::operator=().
|
protectedinherited |
pointer to thermo object to get current temperature
Definition at line 165 of file LiquidTranInteraction.h.
Referenced by LTI_Pairwise_Interaction::getMatrixTransProp(), LTI_StefanMaxwell_PPN::getMatrixTransProp(), LTI_MoleFracs::getMixTransProp(), LTI_MassFracs::getMixTransProp(), LTI_Log_MoleFracs::getMixTransProp(), LTI_Pairwise_Interaction::getMixTransProp(), LTI_StefanMaxwell_PPN::getMixTransProp(), LTI_MoleFracs_ExpT::getMixTransProp(), LiquidTranInteraction::init(), and LiquidTranInteraction::operator=().
|
protectedinherited |
Matrix of interaction coefficients for polynomial in molefraction*weight of speciesA (no temperature dependence, dimensionless)
Definition at line 171 of file LiquidTranInteraction.h.
Referenced by LTI_MoleFracs::getMatrixTransProp(), LTI_MassFracs::getMatrixTransProp(), LTI_MoleFracs_ExpT::getMatrixTransProp(), LTI_MoleFracs::getMixTransProp(), LTI_MassFracs::getMixTransProp(), LTI_MoleFracs_ExpT::getMixTransProp(), LiquidTranInteraction::init(), LiquidTranInteraction::operator=(), and LiquidTranInteraction::~LiquidTranInteraction().
|
protectedinherited |
Matrix of interaction coefficients for polynomial in molefraction*weight of speciesA (linear temperature dependence, units 1/K)
Definition at line 175 of file LiquidTranInteraction.h.
Referenced by LTI_MoleFracs::getMixTransProp(), LTI_MassFracs::getMixTransProp(), LTI_MoleFracs_ExpT::getMixTransProp(), LiquidTranInteraction::init(), LiquidTranInteraction::operator=(), and LiquidTranInteraction::~LiquidTranInteraction().
|
protectedinherited |
Matrix of interactions (in energy units, 1/RT temperature dependence)
Definition at line 178 of file LiquidTranInteraction.h.
Referenced by LTI_Log_MoleFracs::getMatrixTransProp(), LTI_Pairwise_Interaction::getMatrixTransProp(), LiquidTranInteraction::init(), and LiquidTranInteraction::operator=().
|
protectedinherited |
Matrix of interaction coefficients for polynomial in molefraction*weight of speciesA (in energy units, 1/RT temperature dependence)
Definition at line 182 of file LiquidTranInteraction.h.
Referenced by LTI_Log_MoleFracs::getMixTransProp(), LiquidTranInteraction::init(), LiquidTranInteraction::operator=(), and LiquidTranInteraction::~LiquidTranInteraction().
|
protectedinherited |
Matrix of interaction coefficients for polynomial in molefraction*weight of speciesA (in entropy units, divided by R)
Definition at line 186 of file LiquidTranInteraction.h.
Referenced by LTI_Log_MoleFracs::getMixTransProp(), LiquidTranInteraction::init(), LiquidTranInteraction::operator=(), and LiquidTranInteraction::~LiquidTranInteraction().
|
protectedinherited |
Matrix of interactions.
Definition at line 189 of file LiquidTranInteraction.h.
Referenced by LTI_Pairwise_Interaction::getMatrixTransProp(), LiquidTranInteraction::init(), and LiquidTranInteraction::operator=().