Ember is a quasi-one-dimensional, unsteady reacting flow solver. It can be used to simulate a number of fundamental flame configurations, including premixed laminar flames, opposed flow strained flames (premixed or diffusion), axisymmetric (tubular) flames with positive or negative curvature, and steady 2D flames in a prescribed velocity field (using the method of lines).
Ember integrates the governing equations using a variant on the standard Strang splitting method which eliminates steady-state errors.
Online documentation for Ember is located at https://speth.github.io/ember-doc.
The easiest way to compile and install Ember is to use conda-forge to provide all dependencies beyond the base C++ compiler. After installing a Conda distribution such as Miniforge, you can install these dependencies in a new environment named ember-build by running:
$ mamba env create -n ember-build -f environment.yaml
from the Ember source directory (that is, the directory containing this README).
Then, compile, test, and install Ember by running:
$ scons build $ scons test $ scons install
Further Installation Instructions are available in the Ember documentation.
Prepare your kinetics mechanism. If you're starting with a mechanism that's in the Chemkin format, it will need to be converted:
$ ck2yaml --input=<mech> --thermo=<thermo> --transport=<transport>
This will produce a``<mech>.yaml`` file that can be used by Cantera and Ember.
Prepare the input file, based on the one specified in:
python/ember/examples/example-premixed.py
A complete list of all available input parameters may be found in the HTML documentation. Alternatively, you look at the definitions in
python/ember/input.py
. Specify the path to your mechanism file as themechanismFile
. Other parameters you may want to change are in thePaths
,InitialCondition
, andStrainParameters
sections.Check the configuration for errors:
$ python myInputFile.py validate
If this prints "Validation completed successfully.", you're all set. Otherwise, try to correct the indicated error and try again.
Run the code:
$ python myInputFile.py &
This may take a while. You can watch the solver's progress as it is written to the file specified by
Paths.logFile
in the input file.Examine the output files. The files are HDF5 data files (file extension
.h5
), which can be read using the Pythonh5py
module or Matlab, or compressed NumPy data files (file extension.npz
), which can be read using NumPy.out.h5
orout.npz
contains integral flame properties (e.g. flame speed) as a function of timeprofNNNNNN.h5
orprofNNNNNN.npz
contain the temperature & species profiles output periodically.profNow.h5
orprofNow.npz
contains the most recently saved profiles.
Using the
ember.utils
module (and assuming you have IPython and matplotlib installed), either of these file types can be read using theload
function:$ ipython --pylab In [1]: import ember In [2]: prof = ember.utils.load('run/test/profNow.h5') In [3]: plot(prof.x, prof.T)