From 2d82c78c37707a666046c98e6dcc99f4c29d02c6 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 23 Feb 2016 18:36:57 -0500 Subject: [PATCH] [1D] Retain negative species when retrieving solution state This can be useful when debugging issues with the 1D solver. --- interfaces/cython/cantera/onedim.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/interfaces/cython/cantera/onedim.py b/interfaces/cython/cantera/onedim.py index 11da4d2df6..f4a19e8552 100644 --- a/interfaces/cython/cantera/onedim.py +++ b/interfaces/cython/cantera/onedim.py @@ -226,7 +226,8 @@ def set_gas_state(self, point): k0 = self.flame.component_index(self.gas.species_name(0)) Y = [self.solution(k, point) for k in range(k0, k0 + self.gas.n_species)] - self.gas.TPY = self.value(self.flame, 'T', point), self.P, Y + self.gas.set_unnormalized_mass_fractions(Y) + self.gas.TP = self.value(self.flame, 'T', point), self.P @property def heat_release_rate(self):