For the time being, we will use it for simple things (mostly flamelet calculations), but we will soon either write our own cleaner, more capable flamelet solver or add its features to Cantera, and leave FlameMaster only for kinetics-like things (soot and mechanism reductions).
To download a clear version of FlameMaster from the server, execute the command
git clone https://github.com/JIM-Combustion-Lab/FlameMaster.git -b Dezhi
To use FlameMaster, you will need the following files (for soot) which describe your combustion reaction: the desired branches of the S-curve, a FlameMaster input file, thermodynamic and transport data files, and a mechanism file. For example,
C2H4_p01_0chi00001tf0298to0298_upper C2H4_p01_0chi00001tf0298to0298_middle C2H4_p01_0chi00200tf0298to0298_lower FlameMaster.input thermo.dat trans.dat TheSoot.mech
Note: It’s very important that all the files are match/corresponding/compatible with each other, please double check!
Creation of Binary Files
Creation of two binary files from the thermodynamic/transport data files and the mechanism file requires a two step process. To generate a binary file from the thermodynamic/transport data files, you will execute:
CreateBinFile -i <thermo_data_file> -m <trans_data_file> -o <binary_thermo_file>
where you can name the generated binary file in the last argument (the extension
.bin is recommended).
To generate the binary mechanism file, you will need to run !ScanMan:
ScanMan -S -i <mechanism_file> -t <binary_thermo_file>
ScanMan will generate
.pre versions of your mechanism file along with
-S here is important to distinguish isomers, otherwise isomers will be considered as the same species.
For more details, see the User Manual.
Installing/Running FlameMaster Version 3.3
To generate a chemtable from FlameMaster, you will need to modify the FlameMaster input file for your reaction.
You must specify the path to the binary mechanism file (
<mechanism_file>.pre) as well as the path to the start profiles file (one of the branches of the S-curve) and the output path.
If FlameMaster is not installed on your account, obtain a copy (see instructions in Hello_gitlab for general information on how to obtain the source code using git) and follow the instructions in the
Installation file. Note that
flex is already installed on the Tiger cluster (step 6 in
Installation) and that the following instruction should be carried out before step 5 in
Very Important Remarks:
(1) the new version of
flex on the New Tiger (tigercpu) or from the Internet cannot correctly translate the alias type name
int when generating
ScanManSource/lex.yy.c, and the compiling of
lex.yy.c will fail due to inconsistent variable type. To solve this issue, follow the instructions of Step 4 and 6 in the
Installation file to install the old version
flex and use it.
(2) In SJTU Pi, if you have already installed our OpenFOAM following the instructions in /g/m-y-crfel/COMMON/openFoam-6-installation, you should have already installed flex-2.6.4 (there is a flex-2.6.4 tar inside). Set the flex path to this installed flex because it also works for FlameMaster.
(3) On workstation, you also need to install
yacc to compile
ScanMan. To do so (may need to log in as root):
yum install byacc
To take advantage of the Intel architecture, you will need to change the compiler options in
export FlameManMach=LINUXGXX export FlameManFF=g77 export FlameManF90=g90 export FlameManCC=gcc export FlameManCCOpts="-ansi -O3" export FlameManCXX=g++ export FlameManCXXOpts="-x c++ -O3" export FlameManF77Opts="-O3" export FlameManLIBF77="" export FlameManLDFortOpts="-lg2c" export FlameManLDCCOpts="" export FlameManRANLIB='ranlib $(LIBRARY)'
export FlameManMach=LINUXGXX export FlameManFF=ifort export FlameManF90=ifort export FlameManCC=icc export FlameManCCOpts="-O3 -xAVX -ip" export FlameManCXX=icpc export FlameManCXXOpts="-O3 -xAVX -ip" export FlameManF77Opts="-O3 -xAVX -ip" export FlameManLIBF77="" export FlameManLDFortOpts="-lifcore -limf -lsvml -lm -lipgo -lirc -lirc_s -ldl" export FlameManYACC="yacc" export FlameManLDCCOpts="" export FlameManRANLIB='ranlib $(LIBRARY)' export FlameManCVODEDIR="/home/suo-yang/$USER/opt/sundials/include" export FlameManCVODEVERSION="SUNDIALS27"
(1) Please make sure that the pathway of
FlameManCVODEDIR is consistent with
/FlameManSource/Makefile, otherwise the compiler will not be able to find CVODE library files.
(2) For some soot models (e.g., SECTION and ASM),
-O3 may result in
nan from the beginning for some cases, and you may only use up to
(3) Regarding Intel Compiler,
-xhost is favored over specific vectorization flags such as
-xhost will automatically generate instruction sets up to the highest that is supported by the compilation host (for both Intel and Intel-compatible host).
After changing the compiler options, make sure to execute
in the shell you are using (or add the command to
~/.bashrc then log out and in again). This corresponds to step 5 in
To run FlameMaster after setting up your input file, simply invoke the command
FlameMaster -i <name of input file>
(1) The output files from FlameMaster are not easily processed by common plotting software. To generate something more useful, run the command
LT <name of output file>
This will generate a
.kg file, which is in columnar form and easily processed by common plotting software.
(2) In input file,
maxgridpoints are better consistent with the initial data file.
(3) If you want to run with unity Lewis number, in input file, set ConstLewisNumber is TRUE, and set LewisNumberFile is Not-Exist-File. Then when you run it, it will say: Couldn’t open “Not-Exist-File”—all Lewis numbers will be set to 1.0. You cannot just comment out the line of LewisNumberFile, then FlameMaster will calculate the Lewis number for you, and will result in the summation of mass fraction not equal to one if you run it with unity Lewis setting of FlameMaster.
(4) Normally, you should never have #warning: maximum error in mass conservation at gridpoint no., otherwise you must have errors/bugs somewhere. The only exception is when chi is very small of O(1e-2) or smaller.