cantera/test_problems/VPsilane_test/silane_equil.cpp
Ray Speth b88846e5e0 Fixed C++ tests that were failing under Windows
Visual Studio defaults to 3-digit exponents when printing in scientific
notation. The tests now use a MSVC-specific function to change this
behavior when necessary.
2012-01-09 17:35:28 +00:00

38 lines
980 B
C++

/*
* Copyright 2002 California Institute of Technology
*/
#include "Cantera.h"
#include "IdealGasMix.h"
#include "equilibrium.h"
#include "kernel/IdealSolnGasVPSS.h"
#include "kernel/ThermoFactory.h"
#include "kernel/PrintCtrl.h"
using namespace std;
using namespace Cantera;
int main(int argc, char **argv) {
#ifdef _MSC_VER
_set_output_format(_TWO_DIGIT_EXPONENT);
#endif
try {
PrintCtrl::GlobalCrop = PrintCtrl::GCT_CROP;
Cantera::IdealSolnGasVPSS gg("silane.xml", "silane");
ThermoPhase *g = ≫
//ThermoPhase *g = newPhase("silane.xml", "silane");
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");
Cantera::ChemEquil_print_lvl = 40;
equilibrate(*g, "TP");
std::string r = Cantera::report(*g, true);
cout << r;
cout << endl;
return 0;
}
catch (CanteraError) {
showErrors(cerr);
cerr << "program terminating." << endl;
return -1;
}
}