vcs_solve.cpp Source File#
vcs_solve.cpp
Go to the documentation of this file.
32 plogf(" -------------------------------------------------------------------------------------\n");
584 if (m_stoichCoeffRxnMatrix(kcomp,jrxn) < 0.0 && m_molNumSpecies_old[kcomp] <= VCS_DELETE_ELEMENTABS_CUTOFF*0.5) {
603 if (m_stoichCoeffRxnMatrix(kcomp,jrxn) > 0.0 && m_molNumSpecies_old[kcomp] <= VCS_DELETE_ELEMENTABS_CUTOFF*0.5) {
910 ANOTE = fmt::sprintf("MultSpec (%s): Species not born due to STOICH/PHASEPOP even though DG = %11.3E",
923 ANOTE = fmt::sprintf("MultSpec (%s): birthed species because it was zero in a small existing phase with DG = %11.3E",
1071 ANOTE = fmt::sprintf("Delta damped from %g to %g due to delete %s", m_deltaMolNumSpecies[kspec],
1266 m_stoichCoeffRxnMatrix(kc_spec,irxn) * (feSpecies_Deficient[kc_spec]- m_feSpecies_old[kc_spec]);
1817 s += sc_irxn[j] * (m_np_dLnActCoeffdMolNum(j,kspec) + m_np_dLnActCoeffdMolNum(kspec,j)) / np_kspec;
2149 if (m_elementActive[i] && fabs(m_elemAbundances[i] - m_elemAbundancesGoal[i]) > fabs(m_elemAbundancesGoal[i]) * 1.0e-12) {
2201 if (m_speciesUnknownType[i] != VCS_SPECIES_TYPE_INTERFACIALVOLTAGE && m_phaseID[i] == iphase) {
2815 if (m_phaseID[kspec] == iphase && m_speciesUnknownType[kspec] != VCS_SPECIES_TYPE_INTERFACIALVOLTAGE) {
Headers for the MultiPhase object that is used to set up multiphase equilibrium problems (see Chemica...
Header file for class ThermoPhase, the base class for phases with thermodynamic properties,...
A class for 2D arrays stored in column-major (Fortran-compatible) form.
Definition Array.h:32
double * ptrColumn(size_t j)
Return a pointer to the top of column j, columns are contiguous in memory.
Definition Array.h:203
virtual void resize(size_t n, size_t m, double v=0.0)
Resize the array, and fill the new entries with 'v'.
Definition Array.cpp:47
Base class for exceptions thrown by Cantera classes.
Definition ctexceptions.h:66
A class for full (non-sparse) matrices with Fortran-compatible data storage, which adds matrix operat...
Definition DenseMatrix.h:55
double speciesMoles(size_t kGlob) const
Returns the moles of global species k. units = kmol.
Definition MultiPhase.cpp:174
string speciesName(const size_t kGlob) const
Name of species with global index kGlob.
Definition MultiPhase.cpp:746
void uploadMoleFractionsFromPhases()
Update the locally-stored composition within this object to match the current compositions of the pha...
Definition MultiPhase.cpp:801
void setPhaseMoles(const size_t n, const double moles)
Set the number of moles of phase with index n.
Definition MultiPhase.cpp:781
double elementMoles(size_t m) const
Total moles of global element m, summed over all phases.
Definition MultiPhase.cpp:180
A species thermodynamic property manager for a phase.
Definition MultiSpeciesThermo.h:47
virtual int reportType(size_t index) const
This utility function reports the type of parameterization used for the species with index number ind...
Definition MultiSpeciesThermo.cpp:108
virtual void reportParams(size_t index, int &type, double *const c, double &minTemp, double &maxTemp, double &refPressure) const
This utility function reports back the type of parameterization and all of the parameters for the spe...
Definition MultiSpeciesThermo.cpp:117
double charge(size_t k) const
Dimensionless electrical charge of a single molecule of species k The charge is normalized by the the...
Definition Phase.h:538
Base class for a phase with thermodynamic properties.
Definition ThermoPhase.h:390
double electricPotential() const
Returns the electric potential of this phase (V).
Definition ThermoPhase.h:621
string type() const override
String indicating the thermodynamic model implemented.
Definition ThermoPhase.h:399
virtual int activityConvention() const
This method returns the convention used in specification of the activities, of which there are curren...
Definition ThermoPhase.cpp:39
virtual MultiSpeciesThermo & speciesThermo(int k=-1)
Return a changeable reference to the calculation manager for species reference-state thermodynamic pr...
Definition ThermoPhase.cpp:984
int Its
Current number of iterations in the main loop of vcs_TP() to solve for thermo equilibrium.
Definition vcs_internal.h:41
int T_Calls_Inest
Current number of times the initial thermo equilibrium estimator has been called.
Definition vcs_internal.h:51
int T_Basis_Opts
Total number of optimizations of the components basis set done.
Definition vcs_internal.h:44
int T_Its
Total number of iterations in the main loop of vcs_TP() to solve for thermo equilibrium.
Definition vcs_internal.h:37
size_t vcs_popPhaseID(vector< size_t > &phasePopPhaseIDs)
Decision as to whether a phase pops back into existence.
Definition vcs_solve.cpp:617
vector< double > m_deltaPhaseMoles
Change in the total moles in each phase.
Definition vcs_solve.h:1268
vector< double > m_deltaMolNumSpecies
Reaction Adjustments for each species during the current step.
Definition vcs_solve.h:1214
VCS_SOLVE(MultiPhase *mphase, int printLvl=0)
Initialize the sizes within the VCS_SOLVE object.
Definition vcs_solve.cpp:44
vector< double > m_scSize
Absolute size of the stoichiometric coefficients.
Definition vcs_solve.h:1105
int vcs_evalSS_TP(int ipr, int ip1, double Temp, double pres)
Evaluate the standard state free energies at the current temperature and pressure.
Definition vcs_solve.cpp:1431
vector< size_t > m_indexRxnToSpecies
Mapping between the species index for noncomponent species and the full species index.
Definition vcs_solve.h:1347
int vcs_inest_TP()
Create an initial estimate of the solution to the thermodynamic equilibrium problem.
Definition vcs_solve.cpp:2550
vector< size_t > m_phaseID
Mapping from the species number to the phase number.
Definition vcs_solve.h:1358
void vcs_deltag(const int L, const bool doDeleted, const int vcsState, const bool alterZeroedPhases=true)
This subroutine calculates reaction free energy changes for all noncomponent formation reactions.
Definition vcs_solve_TP.cpp:3073
double vcs_VolTotal(const double tkelvin, const double pres, const double w[], double volPM[])
Calculation of the total volume and the partial molar volumes.
Definition vcs_solve.cpp:1458
int vcs_elem_rearrange(double *const aw, double *const sa, double *const sm, double *const ss)
Rearrange the constraint equations represented by the Formula Matrix so that the operational ones are...
Definition vcs_solve.cpp:1627
vector< double > m_deltaGRxn_new
Delta G(irxn) for the noncomponent species in the mechanism.
Definition vcs_solve.h:1194
Array2D m_np_dLnActCoeffdMolNum
Change in the log of the activity coefficient with respect to the mole number multiplied by the phase...
Definition vcs_solve.h:1441
vector< int > m_elementActive
Specifies whether an element constraint is active.
Definition vcs_solve.h:1392
vector< size_t > m_speciesLocalPhaseIndex
Index that keeps track of the index of the species within the local phase.
Definition vcs_solve.h:1321
int vcs_basopt(const bool doJustComponents, double aw[], double sa[], double sm[], double ss[], double test, bool *const usedZeroedSpecies)
Choose the optimum species basis for the calculations.
Definition vcs_solve_TP.cpp:2015
int vcs_prep(int printLvl)
This routine is mostly concerned with changing the private data to be consistent with what's needed f...
Definition vcs_solve.cpp:1472
vector< string > m_elementName
Vector of strings containing the element names.
Definition vcs_solve.h:1371
int vcs_elcorr(double aa[], double x[])
This subroutine corrects for element abundances.
Definition vcs_solve.cpp:2208
vector< size_t > m_speciesMapIndex
Index vector that keeps track of the species vector rearrangement.
Definition vcs_solve.h:1307
void vcs_TCounters_report(int timing_print_lvl=1)
Create a report on the plog file containing timing and its information.
Definition vcs_solve.cpp:3259
Array2D m_phaseParticipation
This is 1 if the phase, iphase, participates in the formation reaction irxn, and zero otherwise.
Definition vcs_solve.h:1177
vector< int > m_actConventionSpecies
specifies the activity convention of the phase containing the species
Definition vcs_solve.h:1404
double vcs_phaseStabilityTest(const size_t iph)
Main program to test whether a deleted phase should be brought back into existence.
Definition vcs_solve.cpp:1136
vector< double > m_tPhaseMoles_new
total kmols of species in each phase in the tentative soln vector
Definition vcs_solve.h:1256
void vcs_inest(double *const aw, double *const sa, double *const sm, double *const ss, double test)
Estimate equilibrium compositions.
Definition vcs_solve.cpp:2935
vector< double > m_actCoeffSpecies_old
Molar-based Activity Coefficients for Species based on old mole numbers.
Definition vcs_solve.h:1431
vector< double > m_SSfeSpecies
Standard state chemical potentials for species K at the current temperature and pressure.
Definition vcs_solve.h:1120
bool vcs_popPhasePossible(const size_t iphasePop) const
Utility function that evaluates whether a phase can be popped into existence.
Definition vcs_solve.cpp:528
int vcs_TP(int ipr, int ip1, int maxit, double T, double pres)
Solve an equilibrium problem at a particular fixed temperature and pressure.
Definition vcs_solve.cpp:1399
vector< double > m_lnMnaughtSpecies
specifies the ln(Mnaught) used to calculate the chemical potentials
Definition vcs_solve.h:1420
void prob_report(int print_lvl)
Print out the problem specification in all generality as it currently exists in the VCS_SOLVE object.
Definition vcs_solve.cpp:3285
int vcs_setMolesLinProg()
Estimate the initial mole numbers by constrained linear programming.
Definition vcs_solve.cpp:2647
vector< double > TPhInertMoles
Total kmoles of inert to add to each phase.
Definition vcs_solve.h:1281
double vcs_Total_Gibbs(double *w, double *fe, double *tPhMoles)
Calculate the total dimensionless Gibbs free energy.
Definition vcs_solve.cpp:2784
void vcs_CalcLnActCoeffJac(const double *const moleSpeciesVCS)
Recalculate all of the activity coefficients in all of the phases based on input mole numbers.
Definition vcs_solve.cpp:1824
vector< size_t > m_elementMapIndex
Index vector that keeps track of the rearrangement of the elements.
Definition vcs_solve.h:1334
void vcs_elabPhase(size_t iphase, double *const elemAbundPhase)
Computes the elemental abundances vector for a single phase, elemAbundPhase[], and returns it through...
Definition vcs_solve.cpp:2196
vector< double > m_feSpecies_old
Free energy vector from the start of the current iteration.
Definition vcs_solve.h:1127
void vcs_reinsert_deleted(size_t kspec)
We make decisions on the initial mole number, and major-minor status here.
Definition vcs_solve_TP.cpp:1572
vector< double > m_chargeSpecies
Charge of each species. Length = number of species.
Definition vcs_solve.h:1452
void addPhaseElements(vcs_VolPhase *volPhase)
Add elements to the local element list.
Definition vcs_solve.cpp:3382
int vcs_solve_TP(int print_lvl, int printDetails, int maxit)
Main routine that solves for equilibrium at constant T and P using a variant of the VCS method.
Definition vcs_solve_TP.cpp:49
size_t addOnePhaseSpecies(vcs_VolPhase *volPhase, size_t k, size_t kT)
This routines adds entries for the formula matrix for one species.
Definition vcs_solve.cpp:3408
Array2D m_stoichCoeffRxnMatrix
Stoichiometric coefficient matrix for the reaction mechanism expressed in Reduced Canonical Form.
Definition vcs_solve.h:1096
size_t m_numRxnRdc
Current number of non-component species in the problem.
Definition vcs_solve.h:1062
vector< double > m_deltaGRxn_Deficient
Last deltag[irxn] from the previous step with additions for possible births of zeroed phases.
Definition vcs_solve.h:1201
vector< unique_ptr< vcs_VolPhase > > m_VolPhaseList
Array of Phase Structures. Length = number of phases.
Definition vcs_solve.h:1395
double vcs_Hessian_diag_adj(size_t irxn, double hessianDiag_Ideal)
Calculates the diagonal contribution to the Hessian due to the dependence of the activity coefficient...
Definition vcs_solve.cpp:1776
double vcs_GibbsPhase(size_t iphase, const double *const w, const double *const fe)
Calculate the total dimensionless Gibbs free energy of a single phase.
Definition vcs_solve.cpp:2809
int vcs_report(int iconv)
Print out a report on the state of the equilibrium problem to standard output.
Definition vcs_solve.cpp:1842
vector< double > m_feSpecies_new
Dimensionless new free energy for all the species in the mechanism at the new tentative T,...
Definition vcs_solve.h:1136
double m_Faraday_dim
dimensionless value of Faraday's constant, F / RT (1/volt)
Definition vcs_solve.h:1482
vector< double > m_actCoeffSpecies_new
Molar-based Activity Coefficients for Species.
Definition vcs_solve.h:1424
bool vcs_elabcheck(int ibound)
Checks to see if the element abundances are in compliance.
Definition vcs_solve.cpp:2140
vector< unique_ptr< VCS_SPECIES_THERMO > > m_speciesThermoList
Vector of pointers to thermo structures which identify the model and parameters for evaluating the th...
Definition vcs_solve.h:1462
vector< char > m_SSPhase
Boolean indicating whether a species belongs to a single-species phase.
Definition vcs_solve.h:1362
void vcs_delete_memory()
Delete memory that isn't just resizable STL containers.
Definition vcs_solve.cpp:3230
double vcs_Hessian_actCoeff_diag(size_t irxn)
Calculates the diagonal contribution to the Hessian due to the dependence of the activity coefficient...
Definition vcs_solve.cpp:1794
void vcs_prob_update()
Transfer the results of the equilibrium calculation back from VCS_SOLVE.
Definition vcs_solve.cpp:2833
size_t vcs_RxnStepSizes(int &forceComponentCalc, size_t &kSpecial)
Calculates formation reaction step sizes.
Definition vcs_solve.cpp:857
Array2D m_deltaMolNumPhase
Change in the number of moles of phase, iphase, due to the noncomponent formation reaction,...
Definition vcs_solve.h:1173
vector< int > m_phaseActConvention
specifies the activity convention of the phase.
Definition vcs_solve.h:1413
vector< int > m_speciesStatus
Major -Minor status vector for the species in the problem.
Definition vcs_solve.h:1355
void vcs_switch_elem_pos(size_t ipos, size_t jpos)
Swaps the indices for all of the global data for two elements, ipos and jpos.
Definition vcs_solve.cpp:1743
double vcs_tmoles()
Calculates the total number of moles of species in all phases.
Definition vcs_solve_TP.cpp:2945
void vcs_dfe(const int stateCalc, const int ll, const size_t lbot, const size_t ltop)
Calculate the dimensionless chemical potentials of all species or of certain groups of species,...
Definition vcs_solve_TP.cpp:2703
int vcs_popPhaseRxnStepSizes(const size_t iphasePop)
Calculates the deltas of the reactions due to phases popping into existence.
Definition vcs_solve.cpp:708
vector< double > m_molNumSpecies_new
Tentative value of the mole number vector.
Definition vcs_solve.h:1184
void vcs_fePrep_TP()
Initialize the chemical potential of single species phases.
Definition vcs_solve.cpp:1445
vector< double > m_deltaGRxn_old
Last deltag[irxn] from the previous step.
Definition vcs_solve.h:1197
size_t addElement(const char *elNameNew, int elType, int elactive)
This routine resizes the number of elements in the VCS_SOLVE object by adding a new element to the en...
Definition vcs_solve.cpp:3428
Identifies the thermo model for the species.
Definition vcs_species_thermo.h:33
size_t IndexSpeciesPhase
Index of this species in the current phase.
Definition vcs_species_thermo.h:44
int SSStar_Vol_Model
Models for the standard state volume of each species.
Definition vcs_species_thermo.h:80
double SS0_Cp0
Base heat capacity used in the VCS_SS0_CONSTANT_CP model.
Definition vcs_species_thermo.h:71
double SSStar_Vol0
parameter that is used in the VCS_SSVOL_CONSTANT model.
Definition vcs_species_thermo.h:83
double SS0_T0
Base temperature used in the VCS_SS0_CONSTANT_CP model.
Definition vcs_species_thermo.h:62
double SS0_TSave
Internal storage of the last temperature used in the calculation of the reference naught Gibbs free e...
Definition vcs_species_thermo.h:59
int SS0_Model
Integer representing the models for the species standard state Naught temperature dependence.
Definition vcs_species_thermo.h:51
double SS0_feSave
Internal storage of the last calculation of the reference naught Gibbs free energy at SS0_TSave.
Definition vcs_species_thermo.h:55
double secondsWC()
Returns the wall clock time in seconds since the last reset.
Definition clockWC.cpp:32
int SurfaceSpecies
True if this species belongs to a surface phase.
Definition vcs_SpeciesProperties.h:44
VCS_SPECIES_THERMO * SpeciesThermo
Pointer to the thermo structure for this species.
Definition vcs_SpeciesProperties.h:30
vector< double > FormulaMatrixCol
Column of the formula matrix, comprising the element composition of the species.
Definition vcs_SpeciesProperties.h:37
double Charge
Charge state of the species -> This may be duplication of what's in the FormulaMatrixCol entries.
Definition vcs_SpeciesProperties.h:41
void setCreationMoleNumbers(const double *const n_k, const vector< size_t > &creationGlobalRxnNumbers)
Sets the creationMoleNum's within the phase object.
Definition vcs_VolPhase.cpp:594
void setElectricPotential(const double phi)
set the electric potential of the phase
Definition vcs_VolPhase.cpp:398
int speciesUnknownType(const size_t k) const
Returns the type of the species unknown.
Definition vcs_VolPhase.cpp:900
size_t elemGlobalIndex(const size_t e) const
Returns the global index of the local element index for the phase.
Definition vcs_VolPhase.cpp:739
void setMoleFractionsState(const double molNum, const double *const moleFracVec, const int vcsStateStatus)
Set the moles and/or mole fractions within the phase.
Definition vcs_VolPhase.cpp:205
const Array2D & getFormulaMatrix() const
Get a constant form of the Species Formula Matrix.
Definition vcs_VolPhase.cpp:895
vcs_SpeciesProperties * speciesProperty(const size_t kindex)
Retrieve the kth Species structure for the species belonging to this phase.
Definition vcs_VolPhase.cpp:665
size_t phiVarIndex() const
Return the index of the species that represents the the voltage of the phase.
Definition vcs_VolPhase.cpp:651
double totalMolesInert() const
Returns the value of the total kmol of inert in the phase.
Definition vcs_VolPhase.cpp:734
void setMolesFromVCS(const int stateCalc, const double *molesSpeciesVCS=0)
Set the moles within the phase.
Definition vcs_VolPhase.cpp:255
void setElemGlobalIndex(const size_t eLocal, const size_t eGlobal)
sets a local phase element to a global index value
Definition vcs_VolPhase.cpp:745
void resize(const size_t phaseNum, const size_t numSpecies, const size_t numElem, const char *const phaseName, const double molesInert=0.0)
The resize() function fills in all of the initial information if it is not given in the constructor.
Definition vcs_VolPhase.cpp:32
size_t nElemConstraints() const
Returns the number of element constraints.
Definition vcs_VolPhase.cpp:752
size_t spGlobalIndexVCS(const size_t spIndex) const
Return the Global VCS index of the kth species in the phase.
Definition vcs_VolPhase.cpp:695
size_t transferElementsFM(const ThermoPhase *const tPhase)
Transfer all of the element information from the ThermoPhase object to the vcs_VolPhase object.
Definition vcs_VolPhase.cpp:786
double GStar_calc_one(size_t kspec) const
Gibbs free energy calculation for standard state of one species.
Definition vcs_VolPhase.cpp:158
void setTotalMoles(const double totalMols)
Sets the total moles in the phase.
Definition vcs_VolPhase.cpp:610
void sendToVCS_GStar(double *const gstar) const
Fill in the standard state Gibbs free energy vector for VCS.
Definition vcs_VolPhase.cpp:387
void sendToVCS_ActCoeff(const int stateCalc, double *const AC)
Fill in an activity coefficients vector within a VCS_SOLVE object.
Definition vcs_VolPhase.cpp:362
double sendToVCS_VolPM(double *const VolPM) const
Fill in the partial molar volume vector for VCS.
Definition vcs_VolPhase.cpp:375
void sendToVCS_LnActCoeffJac(Array2D &LnACJac_VCS)
Downloads the ln ActCoeff Jacobian into the VCS version of the ln ActCoeff Jacobian.
Definition vcs_VolPhase.cpp:535
double G0_calc_one(size_t kspec) const
Gibbs free energy calculation at a temperature for the reference state of a species,...
Definition vcs_VolPhase.cpp:144
void setState_TP(const double temperature_Kelvin, const double pressure_PA)
Sets the temperature and pressure in this object and underlying ThermoPhase objects.
Definition vcs_VolPhase.cpp:414
string eos_name() const
Return the name corresponding to the equation of state.
Definition vcs_VolPhase.cpp:915
int elementType(const size_t e) const
Type of the element constraint with index e.
Definition vcs_VolPhase.cpp:890
void setSpGlobalIndexVCS(const size_t spIndex, const size_t spGlobalIndex)
set the Global VCS index of the kth species in the phase
Definition vcs_VolPhase.cpp:700
void setExistence(const int existence)
Set the existence flag in the object.
Definition vcs_VolPhase.cpp:675
const vector< double > & creationMoleNumbers(vector< size_t > &creationGlobalRxnNumbers) const
Return a const reference to the creationMoleNumbers stored in the object.
Definition vcs_VolPhase.cpp:603
string elementName(const size_t e) const
Name of the element constraint with index e.
Definition vcs_VolPhase.cpp:757
bool isIdealSoln() const
Returns whether the phase is an ideal solution phase.
Definition vcs_VolPhase.cpp:646
void setPtrThermoPhase(ThermoPhase *tp_ptr)
Set the pointer for Cantera's ThermoPhase parameter.
Definition vcs_VolPhase.cpp:551
Declarations for a simple class that implements an Ansi C wall clock timer (see Cantera::clockWC).
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
#define AssertThrowMsg(expr, procedure,...)
Assertion must be true or an error is thrown.
Definition ctexceptions.h:278
void debuglog(const string &msg, int loglevel)
Write a message to the log only if loglevel > 0.
Definition global.h:158
void writelog(const string &fmt, const Args &... args)
Write a formatted message to the screen.
Definition global.h:175
void writelogendl()
Write an end of line character to the screen and flush output.
Definition global.cpp:41
void scale(InputIter begin, InputIter end, OutputIter out, S scale_factor)
Multiply elements of an array by a scale factor.
Definition utilities.h:104
T clip(const T &value, const T &lower, const T &upper)
Clip value such that lower <= value <= upper.
Definition global.h:329
int vcs_timing_print_lvl
Global hook for turning on and off time printing.
Definition vcs_solve.cpp:42
const char * vcs_speciesType_string(int speciesStatus, int length)
Returns a const char string representing the type of the species given by the first argument.
Definition vcs_util.cpp:31
bool vcs_doubleEqual(double d1, double d2)
Simple routine to check whether two doubles are equal up to roundoff error.
Definition vcs_util.cpp:89
double vcs_l2norm(const vector< double > &vec)
determine the l2 norm of a vector of doubles
Definition vcs_util.cpp:19
int solve(DenseMatrix &A, double *b, size_t nrhs, size_t ldb)
Solve Ax = b. Array b is overwritten on exit with x.
Definition DenseMatrix.cpp:133
Contains const definitions for types of species reference-state thermodynamics managers (see Species ...
Contains declarations for string manipulation functions within Cantera.
Header for the object representing each phase within vcs.
#define VCS_SPECIES_INTERFACIALVOLTAGE
Species refers to an electron in the metal.
Definition vcs_defs.h:147
#define VCS_SPECIES_TYPE_INTERFACIALVOLTAGE
Unknown refers to the voltage level of a phase.
Definition vcs_defs.h:286
#define VCS_STATECALC_OLD
State Calculation based on the old or base mole numbers.
Definition vcs_defs.h:297
#define VCS_DELETE_MINORSPECIES_CUTOFF
Cutoff relative mole number value, below which species are deleted from the equilibrium problem.
Definition vcs_defs.h:46
#define VCS_SSVOL_IDEALGAS
Models for the standard state volume of each species.
Definition vcs_defs.h:29
#define VCS_SPECIES_STOICHZERO
Species lies in a multicomponent phase that is active, but species concentration is zero due to stoic...
Definition vcs_defs.h:177
#define VCS_ELEM_TYPE_ABSPOS
Normal element constraint consisting of positive coefficients for the formula matrix.
Definition vcs_defs.h:226
#define VCS_STATECALC_NEW
State Calculation based on the new or tentative mole numbers.
Definition vcs_defs.h:300
#define VCS_SPECIES_TYPE_MOLNUM
Unknown refers to mole number of a single species.
Definition vcs_defs.h:278
#define VCS_SPECIES_ZEROEDPHASE
Species lies in a multicomponent phase that is zeroed atm.
Definition vcs_defs.h:155
#define VCS_ELEM_TYPE_LATTICERATIO
Constraint associated with maintaining a fixed lattice stoichiometry in the solids.
Definition vcs_defs.h:246
#define VCS_SPECIES_ACTIVEBUTZERO
Species lies in a multicomponent phase that is active, but species concentration is zero.
Definition vcs_defs.h:165
#define VCS_ELEM_TYPE_ELECTRONCHARGE
This refers to conservation of electrons.
Definition vcs_defs.h:232
#define VCS_SPECIES_ZEROEDSS
Species is a SS phase, that is currently zeroed out.
Definition vcs_defs.h:131
#define VCS_DELETE_PHASE_CUTOFF
Cutoff relative moles below which a phase is deleted from the equilibrium problem.
Definition vcs_defs.h:58
#define VCS_SMALL_MULTIPHASE_SPECIES
Relative value of multiphase species mole number for a multiphase species which is small.
Definition vcs_defs.h:52
#define VCS_ELEM_TYPE_CHARGENEUTRALITY
This refers to a charge neutrality of a single phase.
Definition vcs_defs.h:238
#define VCS_DELETE_ELEMENTABS_CUTOFF
Cutoff moles below which a phase or species which comprises the bulk of an element's total concentrat...
Definition vcs_defs.h:72
#define VCS_STATECALC_PHASESTABILITY
State Calculation based on tentative mole numbers for a phase which is currently zeroed,...
Definition vcs_defs.h:305
Header file for the internal object that holds the vcs equilibrium problem (see Class VCS_SOLVE and C...
Generated by