cantera/doc/sphinx/cxx-guide/demoequil.cpp
Ray Speth 39b751d655 [Equil] Always use the member function versions of 'equilibrate'
The various free functions are deprecated, along with the now unnecessary
headers 'equil.h' and 'equilibrium.h'.
2014-11-08 00:53:45 +00:00

22 lines
409 B
C++

#include "cantera/thermo.h"
using namespace Cantera;
void equil_demo()
{
ThermoPhase* gas = newPhase("h2o2.cti","ohmech");
gas->setState_TPX(1500.0, 2.0*OneAtm, "O2:1.0, H2:3.0, AR:1.0");
gas->equilibrate("TP");
std::cout << gas->report() << std::endl;
}
int main()
{
try {
equil_demo();
} catch (CanteraError& err) {
std::cout << err.what() << std::endl;
}
}