41 if (numPhSpecies[iph] <= 1) {
70 double* aw, *sa, *sm, *ss;
71 bool modifiedSoln =
false;
104 for (
size_t e = 0; e < eSize; e++) {
141 if (fabs(sum) < 1.0E-6) {
168 plogf(
"vcs_prep_oneTime: failed to get memory: global bailout\n");
174 retn =
vcs_basopt(
true, aw, sa, sm, ss, test, &conv);
176 plogf(
"vcs_prep_oneTime:");
177 plogf(
" Determination of number of components failed: %d\n",
179 plogf(
" Global Bailout!\n");
195 awSpace.resize(m_numElemConstraints + (m_numElemConstraints + 2)*(m_numElemConstraints), 0.0);
202 plogf(
"vcs_prep_oneTime:");
203 plogf(
" Determination of element reordering failed: %d\n",
205 plogf(
" Global Bailout!\n");
241 for (
size_t e = 0; e < vprob->
ne; e++) {
242 sum = sum + vprob->
gai[e];
245 plogf(
"vcs_wellPosed: Element abundance is close to zero\n");
std::vector< double > m_SSfeSpecies
Standard state chemical potentials for species K at the current temperature and pressure.
vcs_SpeciesProperties * speciesProperty(const size_t kindex)
Retrieve the kth Species structure for the species belonging to this phase.
size_t m_numRxnTot
Total number of non-component species in the problem.
size_t m_numComponents
Number of components calculated for the problem.
IntStarStar m_phaseParticipation
This is 1 if the phase, iphase, participates in the formation reaction irxn, and zero otherwise...
*std::vector< double > FormulaMatrixCol
Column of the formula matrix, comprising the element composition of the species.
void vcs_SSPhase(void)
Calculate the status of single species phases.
#define VCS_DATA_PTR(vvv)
Points to the data in a std::vector<> object.
std::vector< size_t > m_indexRxnToSpecies
Mapping between the species index for noncomponent species and the full species index.
std::vector< double > m_tPhaseMoles_new
total kmols of species in each phase in the tentative soln vector
void setExistence(const int existence)
Set the existence flag in the object.
int m_debug_print_lvl
Debug printing lvl.
double m_temperature
Temperature (Kelvin)
std::vector< double > m_feSpecies_old
Free energy vector from the start of the current iteration.
Properties of a single species.
bool vcs_wellPosed(VCS_PROB *vprob)
In this routine, we check for things that will cause the algorithm to fail.
int vcs_prep()
Prepare the object for solution.
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.
Header file for the internal object that holds the vcs equilibrium problem (see Class VCS_SOLVE and E...
Header for the object representing each phase within vcs.
#define VCS_SPECIES_TYPE_MOLNUM
Unknown refers to mole number of a single species.
Phase information and Phase calculations for vcs.
int m_doEstimateEquil
Setting for whether to do an initial estimate.
std::vector< double > m_molNumSpecies_new
Tentative value of the mole number vector.
Internal declarations for the VCSnonideal package.
std::vector< double > m_molNumSpecies_old
Total moles of the species.
size_t m_numSpeciesTot
Total number of species in the problems.
DoubleStarStar m_deltaMolNumPhase
Change in the number of moles of phase, iphase, due to the noncomponent formation reaction...
Header for the Interface class for the vcs thermo equilibrium solver package,.
size_t m_numElemConstraints
Number of element constraints in the problem.
std::vector< vcs_VolPhase * > m_VolPhaseList
Array of Phase Structures. Length = number of phases.
size_t m_numPhases
Number of Phases in the problem.
std::vector< size_t > m_phaseID
Mapping from the species number to the phase number.
std::vector< double > m_feSpecies_new
Dimensionless new free energy for all the species in the mechanism at the new tentatite T...
bool m_singleSpecies
If true, this phase consists of a single species.
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...
double vcs_tmoles()
Calculates the total number of moles of species in all phases.
std::vector< double > TPhInertMoles
Total kmoles of inert to add to each phase.
std::vector< char > m_SSPhase
Boolean indicating whether a species belongs to a single-species phase.
Interface class for the vcs thermo equilibrium solver package, which generally describes the problem ...
#define plogf
define this Cantera function to replace printf
std::vector< double > gai
Element abundances for jth element.
double m_pressurePA
Pressure (units are determined by m_VCS_UnitsFormat.
std::vector< int > m_speciesUnknownType
Specifies the species unknown type.
size_t ne
Number of element constraints in the equilibrium problem.
std::vector< size_t > m_speciesLocalPhaseIndex
Index that keeps track of the index of the species within the local phase.
int vcs_prep_oneTime(int printLvl)
This routine is mostly concerned with changing the private data to be consistent with what's needed f...
std::vector< double > m_spSize
total size of the species
size_t m_numRxnRdc
Current number of non-component species in the problem.
std::vector< double > m_deltaPhaseMoles
Change in the total moles in each phase.
size_t m_numSpeciesRdc
Current number of species in the problems.
int vcs_evalSS_TP(int ipr, int ip1, double Temp, double pres)