The Flamelet Table Tool
The Flamelet Table Tool has evolved to have more options that previous versions, and so this section serves to document the various options that can be enabled via the input control file to the Flamelet Table Tool.
For compressible tables (FPVC
, FPIC
), the critical elements are the following:
A Cantera formatted
yaml
mechanism file for the mechanism that was used to generate the flamelet solutions.A simple text file that maps the names of the species in the Cantera mechanism file to those in the flamelet solution files if there are any. Only the species that have different names in the flamelet solution files need to be included in this file.
A version of Cantera installed in the local Python environment (A Python virtual environment is the easiest way to set this up).
Python Virtual Environment with Cantera
Cantera can be compiled from scratch and installed to a virtual environment if a user has a custom version of Cantera. Cantera also maintains Python pip installation option where a user can install Cantera by simply using:
pip install cantera
A tutorial for installing from the source code is here
To create a python virtual environment, do the following:
python3 -m venv cantera-env
Enter environment:
source cantera-env/bin/activate
Leave environment:
deactivate
The build method requires a separate source and build directory. Place the downloaded Cantera source into a directory
such as cantera/``and create an empty directory called ``cantera_build
.
Enter the Python Cantera environment before compiling. Use the following Scons options when configuring the Cantera installation:
scons build prefix = '<path>/cantera_build/' python_package = 'full'
python_prefix = '<path_to_python_venv>/lib/python3.4/site-packages'
python3_package = 'full'
python3_prefix = '<path_to_python_venv>/'
Then run scons install
, which should install the Cantera package into
the Python virtual environment.
Compressible Flamelet Tables
The compressible flamelet tables require a few additional inputs from non-compressible tables. Namely the following options:
MECHANISM
- Name of the Cantera formatted mechanismSPECIESNAMEREMAPFILE
- Map between flamelet species names & Cantera mechanism species names (only ones that are different need to be included)EOS
- The type of equation of state to use for encoding EOS data into the compressible flamelet table
The file contents below show a sample input file for generating a compressible diffusion flamelet table.
# Author name to appear in flamelet table
AUTHOR Christopher Robbin
# Path to the flamelet calculations
PREFIX <path_to_flamelets>
# Describes the folders and name of files of the flamelets. Multiple folders
# can be added
FLAMELETPATHS H2*
# Type of flamelet table (FPV, FPVT, FPVC, FPIC)
TABLETYPE FPVC
CLOSURETYPE ThickenedFlame
MECHANISM burke.cti
#Map between flamelet species name & Cantera mechanism species names
SPECIESNAMEREMAPFILE cantera_burke_species_names.txt
EOS ideal #ideal or pengrobinson
# Type of flamelet file to use for creating table (FlameMaster, Cantera)
FLAMELETTYPE Flamemaster
# Characteristics of the flamelet table
NZMEAN 401
NCMEAN 401
ZST 0.22858
ZSPACING zst
CSPACING homogeneous
# Desired outputs
OUTPUTNAME burke_fpvc_ideal
OUTPUTVARIABLES W_OH W_H2O2
OUTPUTTYPE hdf5 vtk
DEFINEPROGVAR Y_H2O
TABLE_VERIFICATION TRUE
Useful Concepts in the Flamelet Table Tool
The following are some helpful general concepts and hints to aid users in using the Flamelet Table Tool.
For all flamelet table types, the value of the
OUTPUTVARIABLES
option does not need to be specified as all the required output variables that are needed for that flamelet table type are automatically included in the output. However, if the user wants to include additional variables from the flamelet solutions, they can be specified in theOUTPUTVARIABLES
option.The
TABLE_VERIFICATION
option is used to trigger a few sanity checks on the data within the flamelet table to ensure that the data is consistent and that the table is usable. This option is useful for debugging purposes. It’s value can beTRUE
orFALSE
.The
GENERATE_DIAGNOSTICS
option can be used to generate additional diagnostic information about the flamelet table generation process. This option can generate a lot of output, so it is recommended to use this option only when debugging the flamelet table generation process. The outputs that are generated however are very useful in visualizing the set of flamelets that have been provided to the flamelet table tool and seeing how well the table approximates the data from the flamelets.There are some cases where the GENERATE_DIAGNOSTICS option generates a great deal of data and slows down the table generation process. If a user still wants to get a subset of the diagnostic information, they can use the
DIAGNOSTIC_OUTPUTS
option to specify the type of diagnostic information that they want to generate. Valid values for this variable arespecial
andvariables
. Thespecial
option generates various plots that give a user an idea of the state of the flamelet table. Thevariables
option generates plots of the flamelet data that is used to generate the table, and is useful for getting a feel for what data is being provided to the flamelet table tool.