Skip to content

Commit

Permalink
[1D] Retain negative species when retrieving solution state
Browse files Browse the repository at this point in the history
This can be useful when debugging issues with the 1D solver.
  • Loading branch information
speth committed Mar 27, 2016
1 parent 318fa04 commit 2d82c78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion interfaces/cython/cantera/onedim.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 2d82c78

Please sign in to comment.