Skip to content

Commit

Permalink
[Examples] Fix error in IC Engine example CO calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Dec 2, 2017
1 parent 8312396 commit 6f564e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion interfaces/cython/cantera/examples/reactors/ic_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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' +
Expand Down

0 comments on commit 6f564e6

Please sign in to comment.