[1D] Add convenience functions for heat release rate
This commit is contained in:
parent
170d50676a
commit
6b5b8e7735
1 changed files with 20 additions and 0 deletions
|
|
@ -180,6 +180,26 @@ class FlameBase(Sim1D):
|
|||
for k in range(k0, k0 + self.gas.n_species)]
|
||||
self.gas.TPY = self.value(self.flame, 'T', point), self.P, Y
|
||||
|
||||
@property
|
||||
def heat_release_rate(self):
|
||||
"""
|
||||
Get the total volumetric heat release rate [W/m^3].
|
||||
"""
|
||||
return - np.sum(self.partial_molar_enthalpies *
|
||||
self.net_production_rates, 0)
|
||||
|
||||
@property
|
||||
def heat_production_rates(self):
|
||||
"""
|
||||
Get the volumetric heat production rates [W/m^3] on a per-reaction
|
||||
basis. The sum over all reactions results in the total volumetric heat
|
||||
release rate.
|
||||
Example: C. K. Law: Combustion Physics (2006), Fig. 7.8.6
|
||||
|
||||
>>> f.heat_production_rates[2] # heat production rate of the 2nd reaction
|
||||
"""
|
||||
return - self.net_rates_of_progress * self.delta_standard_enthalpy
|
||||
|
||||
def write_csv(self, filename, species='X', quiet=True):
|
||||
"""
|
||||
Write the velocity, temperature, density, and species profiles
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue