From 6f564e6101541b5368b64b64e96eac4b64f366c7 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Sat, 2 Dec 2017 17:35:25 -0500 Subject: [PATCH] [Examples] Fix error in IC Engine example CO calculation --- interfaces/cython/cantera/examples/reactors/ic_engine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interfaces/cython/cantera/examples/reactors/ic_engine.py b/interfaces/cython/cantera/examples/reactors/ic_engine.py index 19816b0885..212af22446 100644 --- a/interfaces/cython/cantera/examples/reactors/ic_engine.py +++ b/interfaces/cython/cantera/examples/reactors/ic_engine.py @@ -245,7 +245,7 @@ def piston_speed(t): W = trapz(d_W_v_d_t, t) eta = W / Q MW = states.mean_molecular_weight -CO_emission = trapz(MW * mdot_out * states('CO').X, t) / trapz(MW * mdot_out, t) +CO_emission = trapz(MW * mdot_out * states('CO').X[:,0], t) / trapz(MW * mdot_out, t) print('Heat release rate per cylinder (estimate):\t' + format(Q / t_sim / 1000., ' 2.1f') + ' kW') print('Expansion power per cylinder (estimate):\t' +