22 int VCS_SOLVE::vcs_PS(VCS_PROB* vprob,
int iphase,
int printLvl,
double& feStable)
35 size_t nspecies0 = vprob->nspecies + 10;
36 size_t nelements0 = vprob->ne;
37 size_t nphase0 = vprob->NPhase;
39 vcs_initSizes(nspecies0, nelements0, nphase0);
42 if (ifunc < 0 || ifunc > 2) {
43 plogf(
"vcs: Unrecognized value of ifunc, %d: bailing!\n",
53 int retn = vcs_prob_specifyFully(vprob);
55 plogf(
"vcs_pub_to_priv returned a bad status, %d: bailing!\n",
64 retn = vcs_prep_oneTime(printLvl);
66 plogf(
"vcs_prep_oneTime returned a bad status, %d: bailing!\n",
76 retn = vcs_prob_specify(vprob);
78 plogf(
"vcs_prob_specify returned a bad status, %d: bailing!\n",
90 plogf(
"vcs_prep returned a bad status, %d: bailing!\n", retn);
96 if (!vcs_wellPosed(vprob)) {
97 plogf(
"vcs has determined the problem is not well posed: Bailing\n");
104 m_temperature = vprob->T;
105 m_pressurePA = vprob->PresPA;
110 vcs_evalSS_TP(printLvl, printLvl, m_temperature, m_pressurePA);
128 iStab = vcs_solve_phaseStability(iphase, ifunc, feStable, printLvl);
152 vcs_prob_update(vprob);
159 int VCS_SOLVE::vcs_solve_phaseStability(
const int iph,
const int ifunc,
163 double test = -1.0E-10;
164 bool usedZeroedSpecies;
168 std::vector<double> sm(m_numElemConstraints*m_numElemConstraints, 0.0);
169 std::vector<double> ss(m_numElemConstraints, 0.0);
170 std::vector<double> sa(m_numElemConstraints, 0.0);
172 std::vector<double> aw(m_numSpeciesTot, 0.0);
173 std::vector<double> wx(m_numElemConstraints, 0.0);
177 test, &usedZeroedSpecies);
178 vcs_evaluate_speciesType();
192 funcVal = vcs_phaseStabilityTest(iph);
Declarations for a simple class that implements an Ansi C wall clock timer (see Cantera::clockWC).
#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 object representing each phase within vcs.
Internal declarations for the VCSnonideal package.
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