26 case VCS_UNITS_KCALMOL:
28 case VCS_UNITS_UNITLESS:
30 case VCS_UNITS_KELVIN:
31 return ElectronCharge * Avogadro/ TKelvin;
34 "unknown units: " +
int2str(mu_units));
44 case VCS_UNITS_KCALMOL:
46 case VCS_UNITS_UNITLESS:
50 case VCS_UNITS_KELVIN:
56 "unknown units: " +
int2str(mu_units));
102 if (tmole_orig < 1.0E-200 || tmole_orig > 1.0E200) {
104 "Total input moles ," +
fp2str(tmole_orig) +
105 "is outside the range handled by vcs.\n");
109 if (tmole_orig > 1.0E4) {
111 }
else if (tmole_orig < 1.0E-4) {
120 plogf(
" --- vcs_nondim_TP() called: USING A MOLE SCALE OF %g until further notice",
m_totalMoleScale);
191 switch (unitsFormat) {
192 case VCS_UNITS_KCALMOL:
195 case VCS_UNITS_UNITLESS:
196 plogf(
"dimensionless");
198 case VCS_UNITS_KJMOL:
201 case VCS_UNITS_KELVIN:
208 throw CanteraError(
"VCS_SOLVE::vcs_printChemPotUnits",
"unknown units!");
double vcs_nondimMult_TP(int mu_units, double TKelvin) const
Returns the multiplier for the nondimensionalization of the equations.
std::string int2str(const int n, const std::string &fmt)
Convert an int to a string using a format converter.
std::vector< int > m_elType
Type of the element constraint.
double vcs_nondim_Farad(int mu_units, double TKelvin) const
Returns the multiplier for electric charge terms.
double m_Faraday_dim
dimensionless value of Faraday's constant, F / RT (1/volt)
std::vector< vcs_VolPhase * > m_VolPhaseList
Array of Phase Structures. Length = number of phases.
void vcs_nondim_TP()
Nondimensionalize the problem data.
double vcs_tmoles()
Calculates the total number of moles of species in all phases.
void vcs_redim_TP()
Redimensionalize the problem data.
void vcs_printChemPotUnits(int unitsFormat) const
Print the string representing the Chemical potential units.
int m_VCS_UnitsFormat
Units for the chemical potential data.
std::vector< double > m_molNumSpecies_old
Total moles of the species.
#define VCS_NONDIMENSIONAL_G
nondimensional
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_ELEM_TYPE_ABSPOS
Normal element constraint consisting of positive coefficients for the formula matrix.
std::string fp2str(const double x, const std::string &fmt)
Convert a double into a c++ string.
size_t m_numElemConstraints
Number of element constraints in the problem.
size_t m_numSpeciesTot
Total number of species in the problems.
std::vector< int > m_speciesUnknownType
Specifies the species unknown type.
Base class for exceptions thrown by Cantera classes.
int m_debug_print_lvl
Debug printing lvl.
std::vector< double > m_SSfeSpecies
Standard state chemical potentials for species K at the current temperature and pressure.
double m_temperature
Temperature (Kelvin)
Phase information and Phase calculations for vcs.
#define VCS_DIMENSIONAL_G
dimensioned
const doublereal Avogadro
Avogadro's Number [number/kmol].
#define plogendl()
define this Cantera function to replace cout << endl;
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
Contains declarations for string manipulation functions within Cantera.
const doublereal GasConst_cal_mol_K
Universal gas constant in cal/mol/K.
#define plogf
define this Cantera function to replace printf
#define VCS_SPECIES_TYPE_INTERFACIALVOLTAGE
Unknown refers to the voltage level of a phase.
char m_unitsState
This specifies the current state of units for the Gibbs free energy properties in the program...
size_t m_numPhases
Number of Phases in the problem.
double m_totalMoleScale
Multiplier for the mole numbers within the nondimensionless formulation.
std::vector< double > TPhInertMoles
Total kmoles of inert to add to each phase.
std::vector< double > m_elemAbundancesGoal
Element abundances vector Goals.
std::vector< double > m_feSpecies_old
Free energy vector from the start of the current iteration.
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
std::vector< double > m_deltaGRxn_new
Delta G(irxn) for the noncomponent species in the mechanism.
void setTotalMolesInert(const double tMolesInert)
Sets the total moles of inert in the phase.
std::vector< double > m_deltaGRxn_old
Last deltag[irxn] from the previous step.