These changes make it unnecessary to copy header files around during the build process, which tends to confuse IDEs and debuggers. The headers which comprise Cantera's external C++ interface are now in the 'include' directory. All of the samples and demos are now in the 'samples' subdirectory.
22 lines
379 B
C++
22 lines
379 B
C++
|
|
#include <cantera/Cantera.h>
|
|
#include <cantera/equilibrium.h>
|
|
|
|
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");
|
|
equilibrate(*gas, "TP");
|
|
cout << report(*gas) << endl;
|
|
}
|
|
|
|
int main()
|
|
{
|
|
|
|
try {
|
|
equil_demo();
|
|
} catch (CanteraError) {
|
|
showErrors();
|
|
}
|
|
}
|
|
|