[1D/Python] Fix spurious 'divide by zero' warning
This commit is contained in:
parent
46231379c1
commit
1e2ba1f0d2
1 changed files with 2 additions and 2 deletions
|
|
@ -543,8 +543,8 @@ class CounterflowDiffusionFlame(FlameBase):
|
|||
stoich += self.gas.n_atoms(fuel, 'C')
|
||||
|
||||
d_u_d_z = np.gradient(self.u) / np.gradient(self.grid)
|
||||
phi = (self.X[self.gas.species_index(fuel)]
|
||||
/ self.X[self.gas.species_index(oxidizer)] * stoich)
|
||||
phi = (self.X[self.gas.species_index(fuel)] * stoich /
|
||||
np.maximum(self.X[self.gas.species_index(oxidizer)], 1e-20))
|
||||
z_stoich = np.interp(-1., -phi, self.grid)
|
||||
return np.abs(np.interp(z_stoich, self.grid, d_u_d_z))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue