diff --git a/interfaces/cython/cantera/examples/reactors/custom.py b/interfaces/cython/cantera/examples/reactors/custom.py index d0412e63de..48e5128a6e 100644 --- a/interfaces/cython/cantera/examples/reactors/custom.py +++ b/interfaces/cython/cantera/examples/reactors/custom.py @@ -40,7 +40,8 @@ def __call__(self, t, y): gas = ct.Solution('gri30.xml') # Initial condition -gas.TPX = 1001, ct.one_atm, 'H2:2,O2:1,N2:4' +P = ct.one_atm +gas.TPX = 1001, P, 'H2:2,O2:1,N2:4' y0 = np.hstack((gas.T, gas.Y)) # Set up objects representing the ODE and the solver @@ -57,6 +58,7 @@ def __call__(self, t, y): while solver.successful() and solver.t < t_end: solver.integrate(solver.t + dt) t_out.append(solver.t) + gas.TPY = solver.y[0], P, solver.y[1:] states.append(gas.state) # Plot the results