diff --git a/Cantera/cxx/demos/flamespeed.cpp b/Cantera/cxx/demos/flamespeed.cpp index 6fa1d4a50..44d98c800 100644 --- a/Cantera/cxx/demos/flamespeed.cpp +++ b/Cantera/cxx/demos/flamespeed.cpp @@ -11,10 +11,19 @@ // precompiled headers #include "stdafx.h" +#else +#include +#include +#include +#include +#include + +using namespace Cantera; + #endif -void demo() { +int demo() { try { int i; IdealGasMix gas("gri30.cti","gri30_mix"); @@ -32,7 +41,6 @@ void demo() { doublereal phi=1.1; cout << "Enter phi: "; cin >> phi; - cout << endl; doublereal C_atoms=1.0; doublereal H_atoms=4.0; @@ -44,6 +52,7 @@ void demo() { else if(k==gas.speciesIndex("N2")){ x[k]=0.79/phi/fa_stoic; } else{ x[k]=0.0; } } + gas.setState_TPX(temp,pressure,x.begin()); doublereal rho_in=gas.density(); @@ -66,6 +75,7 @@ void demo() { double Tout=Tad; double breakpt=0.2; + //============= build each domain ======================== @@ -176,6 +186,7 @@ void demo() { location will then be fixed for remainder of calculation.*/ + flow.solveEnergyEqn(); refine_grid=true; flame.setFixedTemperature(900.0); @@ -198,12 +209,12 @@ void demo() { cout << endl<<"Adiabatic flame temperature from equilibrium is: "<