18 for (
size_t kspec = 0; kspec <
m_nsp; ++kspec) {
39 for (
size_t kspec = 0; kspec <
m_nsp; kspec++) {
72 for (
size_t kspec = 0; kspec <
m_nsp; ++kspec) {
79 for (
size_t e = 0; e < eSize; e++) {
103 double test = -1.0e-10;
104 bool modifiedSoln =
false;
107 for (
size_t kspec = 0; kspec <
m_nsp; ++kspec) {
112 if (fabs(sum) < 1.0E-6) {
116 for (
size_t kspec = 0; kspec <
m_nsp; ++kspec) {
130 double* aw = &awSpace[0];
132 plogf(
"vcs_prep_oneTime: failed to get memory: global bailout\n");
135 double* sa = aw +
m_nsp;
139 retn =
vcs_basopt(
true, aw, sa, sm, ss, test, &conv);
141 plogf(
"vcs_prep_oneTime:");
142 plogf(
" Determination of number of components failed: %d\n",
144 plogf(
" Global Bailout!\n");
165 plogf(
"vcs_prep_oneTime:");
166 plogf(
" Determination of element reordering failed: %d\n",
168 plogf(
" Global Bailout!\n");
175 for (
size_t kspec = 0; kspec <
m_nsp; ++kspec) {
194 for (
size_t e = 0; e < m_mix->
nElements(); e++) {
199 plogf(
"vcs has determined the problem is not well posed: Bailing\n");
Headers for the MultiPhase object that is used to set up multiphase equilibrium problems (see Equilfu...
void zero()
Set all of the entries to zero.
doublereal elementMoles(size_t m) const
Total moles of global element m, summed over all phases.
size_t nElements() const
Number of elements.
size_t m_numPhases
Number of Phases in the problem.
int m_doEstimateEquil
Setting for whether to do an initial estimate.
int vcs_evalSS_TP(int ipr, int ip1, double Temp, double pres)
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...
size_t m_nelem
Number of element constraints in the problem.
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.
int vcs_prep(int printLvl)
This routine is mostly concerned with changing the private data to be consistent with what's needed f...
vector_fp m_molNumSpecies_old
Total moles of the species.
Array2D m_phaseParticipation
This is 1 if the phase, iphase, participates in the formation reaction irxn, and zero otherwise.
vector_fp m_molNumSpecies_new
Tentative value of the mole number vector.
vector_int m_speciesUnknownType
Specifies the species unknown type.
vector_fp m_tPhaseMoles_new
total kmols of species in each phase in the tentative soln vector
vector_fp m_feSpecies_new
Dimensionless new free energy for all the species in the mechanism at the new tentative T,...
size_t m_numSpeciesRdc
Current number of species in the problems.
int m_debug_print_lvl
Debug printing lvl.
vector_fp TPhInertMoles
Total kmoles of inert to add to each phase.
std::vector< size_t > m_phaseID
Mapping from the species number to the phase number.
std::vector< size_t > m_indexRxnToSpecies
Mapping between the species index for noncomponent species and the full species index.
vector_fp m_deltaPhaseMoles
Change in the total moles in each phase.
std::vector< size_t > m_speciesLocalPhaseIndex
Index that keeps track of the index of the species within the local phase.
size_t m_numRxnRdc
Current number of non-component species in the problem.
size_t m_numComponents
Number of components calculated for the problem.
double m_pressurePA
Pressure.
void vcs_SSPhase()
Calculate the status of single species phases.
vector_fp m_feSpecies_old
Free energy vector from the start of the current iteration.
std::vector< char > m_SSPhase
Boolean indicating whether a species belongs to a single-species phase.
size_t m_nsp
Total number of species in the problems.
std::vector< std::unique_ptr< vcs_VolPhase > > m_VolPhaseList
Array of Phase Structures. Length = number of phases.
vector_fp m_spSize
total size of the species
vector_fp m_SSfeSpecies
Standard state chemical potentials for species K at the current temperature and pressure.
Array2D m_deltaMolNumPhase
Change in the number of moles of phase, iphase, due to the noncomponent formation reaction,...
double vcs_tmoles()
Calculates the total number of moles of species in all phases.
size_t m_numRxnTot
Total number of non-component species in the problem.
double m_temperature
Temperature (Kelvin)
Properties of a single species.
vector_fp FormulaMatrixCol
Column of the formula matrix, comprising the element composition of the species.
Phase information and Phase calculations for vcs.
vcs_SpeciesProperties * speciesProperty(const size_t kindex)
Retrieve the kth Species structure for the species belonging to this phase.
bool m_singleSpecies
If true, this phase consists of a single species.
void setExistence(const int existence)
Set the existence flag in the object.
std::vector< int > vector_int
Vector of ints.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Namespace for the Cantera kernel.
Header for the object representing each phase within vcs.
#define VCS_SPECIES_TYPE_MOLNUM
Unknown refers to mole number of a single species.
#define plogf
define this Cantera function to replace printf
Header file for the internal object that holds the vcs equilibrium problem (see Class VCS_SOLVE and E...