Post-Processing

class ember.utils.Struct(*args, **kwargs)[source]

A dictionary-like data structure where fields are accessible as both attributes and dictionary keys:

>>> s = Struct()
>>> s['foo'] = 6
>>> s.foo
6
>>> s.bar = 'x'
>>> 'bar' in s:
True
>>> s['bar']
'x'
>>> s.keys()
['foo', 'bar']

Valid methods of initialization, equivalent to the above:

>>> s = Struct(foo=6, bar='x')
>>> s = Struct({'foo': 6, 'bar': 'x'})
class ember.utils.HDFStruct(filename)[source]

Like Struct, but converts HDF5 structs to numpy arrays.

ember.utils.load(filename)[source]

Generate an Struct object from a saved profile.

ember.utils.get_qdot(gas, profile, pressure=101325)[source]

Calculate the heat release rate along the flame coordinate.

Parameters:
  • gas – A Cantera Solution object made using the same mechanism file used for the simulation.

  • profile – An HDFStruct object created by loading a profNNNNNN.h5 file.

  • pressure – The pressure at which the simulation was run.

ember.utils.expandProfile(prof, gas, diffusion=True, reaction_rates=True)[source]

Reconstruct derived data associated with a flame profile.

Parameters:
  • prof – An HDFStruct object created by loading a profNNNNNN.h5 file

  • gas – A Cantera Solution object made using the same mechanism file used for the simulation.

  • diffusion – Set to False to disable calculating diffusion properties (which can be slow for large mechanisms)

  • reaction_rates – Set to False to disable detailed reaction rates (creation / destruction / rates-of-progress)

Arrays which are reconstructed:

  • grid properties: hh, cfp, cf, cfm, rphalf, dlj

  • thermodynamic properties: rho, cp, Wmx, W

  • kinetic properties: wdot, q, creation_rates, destruction_rates, forward_rates_of_progress, reverse_rates_of_progress, net_rates_of_progress

  • transport properties: rhoD, k, mu, Dkt, jFick, jSoret, jCorr

  • other: X (mole fractions)