The member function getActivityConcentration() calculated the
standard concentrations for solute species incorrectly. This
caused the reaction rates of progress for kinetics operations
involving HMWSoln to be calculated incorrectly. In particular,
equilibrium constants (which were and are correct)
were not compatible with forward vs.
reverse ROP's.
I fixed this error, and worked on more documentation of
generalized activity concentrations.
This mainly involved fixing the copy and assignment operators
for the IonsFromNeutralVPSSTP operator.
Added docs for PDSS_SSVol
Turned on keyword substitution
<transport>
<speciesDiffusivity>
<velocityBasis basis="mass">
Other valid values are "mole" or a species name.
This is loaded into LiquidTransportParams and then copied into
LiquidTransport in the initLiquidTransport() method.
velocity. This allows selection of a mass-averaged, mole-averaged or
solvent specified reference velocity using the member m_velocityBasis
or the methods setVelocityBasis() and getVelocityBasis(). Parsing of
input needs to be added for this still. An enum has been added
enum VelocityBasis {
VB_MOLEAVG = -2,
VB_MASSAVG = -1 };
Other values can correspond to species indices.
In LiquidTransport, the Stefan Maxwell solve now checks to see what
the m_velocityBasis member says the reference velocity should be and
fills the matrix accordingly. To allow mass averaged we have added
members m_massfracs and m_massfracs_tran.
Added methods to extract the diffusion velocity in a similar manner to
the diffusive fluxes. The diffusion velocity will be needed to not
force the porosity/tortuosity into the Transport classes for
porous flow. These methods are getSpeciesVdiff() and
getSpeciesVdiffES().
mixing. Previously there was a LiquidTranMixingModel specification
and one or more matrices to describe interactions. For example, we had
the following for viscosity:
LiquidTranMixingModel viscMixModel;
DenseMatrix m_visc_Eij;
DenseMatrix m_visc_Sij;
The new model puts all of this into a new class
LiquidTranInteraction. This class is built in the TransportFactory
and loaded into LiquidTransport Params. In
LiquidTransport::initLiquid() pointers to these objects are
transferred to the following members:
LiquidTranInteraction *m_viscMixModel;
LiquidTranInteraction *m_lambdaMixModel;
LiquidTranInteraction *m_diffMixModel;
LiquidTranInteraction *m_radiusMixModel;
With these, the structure of methods that compute the mixture
transport properties is greatly simplified. It should be possible to
only call these interaction models (they take as arguments the vectors
of individual species models that were previously added), but I need
to check this still.
I have also removed all binary diffusion coefficient matrices except
for m_bdiff. Mainly this means that I removed the m_DiffCoeff_StefMax
member. Also removed is m_logViscSpecies[k] which was used only in the
mixture viscosity computation now handles outside.
model name.
Added new method to build LiquidTranInteraction objects.
virtual LiquidTranInteraction* newLTI( const XML_Node &trNode,
TransportPropertyList tp_ind,
LiquidTransportParams& trParam) ;
This methods calls teh new operator and the init() method for those
objects. It also call the setParameters() method for those objects
that require additional trParam access.
In TransportFactory::getLiquidInteractionsTransportData() the majority
of the work is done by a switch statement that fills the different
LiquidTranInteraction* in LiquidTransportParams by calling newLTI().
The switch statement is over the type of transport property
(i.e. viscosity). After some debugging checks we can remove the rest
of that method. (all of the XML node parsing is moved to the
LiquidTranInteraction constructor.
objects for each of the transport properties: viscosity, thermalCond,
speciesDiffusivity, electCond, hydroRadius. This should allow us to
remove the members like visc_Eij, visc_Sij, thermalCond_Aij,
diff_Dij. Also should be able to remove LiquidTranMixingModel model_*
members. This removal is pending some testing.
class LiquidTranInteraction has been further developed along with
subclasses. The list of subclasses that should be in reasonable shape
is (all should be tested)
class LTI_Solvent;
class LTI_MoleFracs;
class LTI_MassFracs;
class LTI_Log_MoleFracs;
class LTI_Pairwise_Interaction;
class LTI_StokesEinstein;
The constructor takes only the TransportPropertyList enum. The init:
virtual void init( const XML_Node &compModelNode = 0,
thermo_t* thermo = 0 );
takes the thermo object along with the XML node
<compositionDependence> which it parses. The major methods for
LiquidTranInteraction are:
virtual void setParameters( LiquidTransportParams& trParam )
that sets additional things required from trParam for some
subclasses.
virtual doublereal getMixTransProp( doublereal* speciesValues, doublereal *weightSpecies = 0 )
virtual doublereal getMixTransProp( std::vector<LTPspecies*> LTPptrs )
that get a mixture averaged transport property.
virtual DenseMatrix getMatrixTransProp( doublereal* speciesValues = 0 ) { return m_Dij; }
that get a matrix of interaction transport properties.
class LiquidTranInteraction holds members for various types of
interactions. Some documentation of the purpose of each of these is
still required.
derivatives of the log activity coefficients as used for computing
the transport coefficients. These methods are
IonsFromNeutralVPSSTP::getdlnActCoeffdlnC()
and the internal method
IonsFromNeutralVPSSTP::s_update_dlnActCoeff_dlnC()