cantera/test_problems/VPsilane_test/silane_equil.cpp
Ray Speth ea3f74eb27 [Thermo] 'report' only prints species with non-trivial mole fractions
The threshold for printing species is a new, optional parameter to the
'report' function. If any species are excluded, the total number of
minor species and their aggregate mass and mole fraction are printed.
2014-06-03 16:54:15 +00:00

33 lines
933 B
C++

/*
* Copyright 2002 California Institute of Technology
*/
#include "cantera/IdealGasMix.h"
#include "cantera/equilibrium.h"
#include "cantera/thermo/IdealSolnGasVPSS.h"
#include "cantera/thermo/ThermoFactory.h"
using namespace std;
using namespace Cantera;
int main(int argc, char** argv)
{
#ifdef _MSC_VER
_set_output_format(_TWO_DIGIT_EXPONENT);
#endif
try {
Cantera::IdealSolnGasVPSS gg("silane.xml", "silane");
ThermoPhase* g = ≫
//ThermoPhase *g = newPhase("silane.xml", "silane");
cout.precision(4);
g->setState_TPX(1500.0, 100.0, "SIH4:0.01, H2:0.99");
//g.setState_TPX(1500.0, 1.0132E5, "SIH4:0.01, H2:0.99");
equilibrate(*g, "TP");
cout << g->report(true, 0.0) << endl;
return 0;
} catch (CanteraError& err) {
std::cerr << err.what() << std::endl;
cerr << "program terminating." << endl;
return -1;
}
}