17 int VCS_SOLVE::vcs_PS(VCS_PROB* vprob,
int iphase,
int printLvl,
double& feStable)
30 size_t nspecies0 = vprob->nspecies + 10;
31 size_t nelements0 = vprob->ne;
32 size_t nphase0 = vprob->NPhase;
34 vcs_initSizes(nspecies0, nelements0, nphase0);
37 if (ifunc < 0 || ifunc > 2) {
38 plogf(
"vcs: Unrecognized value of ifunc, %d: bailing!\n",
48 int retn = vcs_prob_specifyFully(vprob);
50 plogf(
"vcs_pub_to_priv returned a bad status, %d: bailing!\n",
59 retn = vcs_prep_oneTime(printLvl);
61 plogf(
"vcs_prep_oneTime returned a bad status, %d: bailing!\n",
71 retn = vcs_prob_specify(vprob);
73 plogf(
"vcs_prob_specify returned a bad status, %d: bailing!\n",
85 plogf(
"vcs_prep returned a bad status, %d: bailing!\n", retn);
91 if (!vcs_wellPosed(vprob)) {
92 plogf(
"vcs has determined the problem is not well posed: Bailing\n");
99 m_temperature = vprob->T;
100 m_pressurePA = vprob->PresPA;
105 vcs_evalSS_TP(printLvl, printLvl, m_temperature, m_pressurePA);
123 iStab = vcs_solve_phaseStability(iphase, ifunc, feStable, printLvl);
132 vcs_prob_update(vprob);
139 int VCS_SOLVE::vcs_solve_phaseStability(
const int iph,
const int ifunc,
143 double test = -1.0E-10;
144 bool usedZeroedSpecies;
147 std::vector<double> sm(m_numElemConstraints*m_numElemConstraints, 0.0);
148 std::vector<double> ss(m_numElemConstraints, 0.0);
149 std::vector<double> sa(m_numElemConstraints, 0.0);
151 std::vector<double> aw(m_numSpeciesTot, 0.0);
152 std::vector<double> wx(m_numElemConstraints, 0.0);
156 test, &usedZeroedSpecies);
157 vcs_evaluate_speciesType();
168 m_deltaGRxn_Deficient = m_deltaGRxn_old;
169 funcVal = vcs_phaseStabilityTest(iph);
#define VCS_DATA_PTR(vvv)
Points to the data in a std::vector<> object.
Header file for the internal object that holds the vcs equilibrium problem (see Class VCS_SOLVE and E...
Header for the Interface class for the vcs thermo equilibrium solver package,.
#define VCS_STATECALC_OLD
State Calculation based on the old or base mole numbers.
#define plogf
define this Cantera function to replace printf