@@ -14,48 +14,48 @@ library: os, sys, pickle, time, datetime, copy, re, numpy, matplotlib, itertools
To use it, download the TIRAMISU folder. Two example, one of a full merging and the other of a sub-mechanism extraction, are available in the EXAMPLE folder. The two code to use are Main_exe_1.py and Main_exe_2.py (in this order). You can either execute the code from a terminal by calling "python Main_exe_x.py input.txt" (with x=1 or 2) or by using an IDE and commenting line 10 & 11 and uncommenting line 12 & 13 (then replace "0.txt" in line 12 by your input file).
### Input file :
The input file is the same for the first and second part of the code (Main_exe_1.py and Main_exe_2.py).
"!" is used to comment line.
The input file is the same for the first and second part of the code (Main_exe_1.py and Main_exe_2.py).
"!" is used to comment line.
The first 3 lines should be the 3 necessary path (in the same order as below):
- The path to the first mechanism and each mech file. Example: C:/Users/mech1/ mech1.mech mech1.therm mech1.trans
If the NASA polynomial are in the mech file, put two time the mech file. Example: C:/Users/mech1/ LLNL.mech mech1.mech mech1.trans
If there is no transport, put only the mech and therm file. Example: C:/Users/mech1/ mech1.mech mech1.therm
The first 3 lines should be the 3 necessary path (in the same order as below):
- The path to the first mechanism and each mech file. Example: C:/Users/mech1/ mech1.mech mech1.therm mech1.trans
If the NASA polynomial are in the mech file, put two time the mech file. Example: C:/Users/mech1/ LLNL.mech mech1.mech mech1.trans
If there is no transport, put only the mech and therm file. Example: C:/Users/mech1/ mech1.mech mech1.therm
- The path to the second mechanism and each mech file. Example: C:/Users/mech2/ mech2.mech mech2.therm mech2.trans
If the NASA polynomials are in the mech file, put two time the mech file. Example: C:/Users/mech2/ mech2.mech mech2.mech mech2.trans
If there is no transport, put only the mech and therm file. Example: C:/Users/mech1/ mech2.mech mech2.therm
- The path to the second mechanism and each mech file. Example: C:/Users/mech2/ mech2.mech mech2.therm mech2.trans
If the NASA polynomials are in the mech file, put two time the mech file. Example: C:/Users/mech2/ mech2.mech mech2.mech mech2.trans
If there is no transport, put only the mech and therm file. Example: C:/Users/mech1/ mech2.mech mech2.therm
- The path to the output. C:/Users/output/
- The path to the output. C:/Users/output/
The mech1 is by default the core mechanism and mech2 the mechanism to translate.
The other lines can be in any order.
The mech1 is by default the core mechanism and mech2 the mechanism to translate.
The other lines can be in any order.
"task" is an optional keyword that controls whethe a full merging or a sub-mechanism extraction is wanted. Default is full merging. Example: task=full or task=extraction
"task" is an optional keyword that controls whethe a full merging or a sub-mechanism extraction is wanted. Default is full merging. Example: task=full or task=extraction
"depth" is an optional keyword for extraction task. It controls the maximum number of loop the extraction step does. Default is no maximum (1e10). Example: depth=3
"depth" is an optional keyword for extraction task. It controls the maximum number of loop the extraction step does. Default is no maximum (1e10). Example: depth=3
"mech_to_extract" is a MANDATORY keyword for the extraction task. It controls wich species sub-mechanism to extract. Example: mech_to_extract=ic8h18, nc7h16
"mech_to_extract" is a MANDATORY keyword for the extraction task. It controls wich species sub-mechanism to extract. Example: mech_to_extract=ic8h18, nc7h16
"translation" is an optional boolean used to enable or disable the translation step. It is only useful if there is already a tmp_species_traduction.tmp or .inp file generated previously.
If the two mechanisms have the same translation, it is also possible to disable the translation and create an empty tmp_species_traduction.inp. Example: translation=True
"translation" is an optional boolean used to enable or disable the translation step. It is only useful if there is already a tmp_species_traduction.tmp or .inp file generated previously.
If the two mechanisms have the same translation, it is also possible to disable the translation and create an empty tmp_species_traduction.inp. Example: translation=True
"n" is an optional keyword that controls the maximum number of permutations that are allowed in method 2. If the number of possible permutations in an isomer group is greater than n, then only method 1 will be used. Example: n=10000
"n" is an optional keyword that controls the maximum number of permutations that are allowed in method 2. If the number of possible permutations in an isomer group is greater than n, then only method 1 will be used. Example: n=10000
"introduction" is an optional keyword used to customize the first lines of the merged mechanism. Example: introduction=test!?!
"introduction" is an optional keyword used to customize the first lines of the merged mechanism. Example: introduction=test!?!
"string_to_del" is an optional keyword used to remove species containing a specific string. Example: string_to_del=bb, pb, c6h5c3, c6h5c4, cyc
"string_to_del" is an optional keyword used to remove species containing a specific string. Example: string_to_del=bb, pb, c6h5c3, c6h5c4, cyc
"list_to_del" is an optional keyword used to remove specific species. Example: list_to_del=a1c2hac, a1c2h3ac, a2-x, a2o
"list_to_del" is an optional keyword used to remove specific species. Example: list_to_del=a1c2hac, a1c2h3ac, a2-x, a2o
"order" is an optional keyword used to control which mechanism as priority on which part of the mechanism. Possible input are "kt", "k", "t", "n".
k = model_core main for kinetic data and model_to_translate main for thermo data.
t = model_to_translate main for kinetic data and core_mechanism main for thermo data.
kt = model_core main for kinetic and themo data.
n = model_to_translate main for kinetic and thermo data.
Default order task is kt. You can also specify a list of order to generate multiple mechanism in the form "order=order1, order2, order3, ..."
ORDER FOR EXTRACTION_MERGING IS ALWAYS SET TO "kt" !!!
Example: order=k
"order" is an optional keyword used to control which mechanism as priority on which part of the mechanism. Possible input are "kt", "k", "t", "n".
k = model_core main for kinetic data and model_to_translate main for thermo data.
t = model_to_translate main for kinetic data and core_mechanism main for thermo data.
kt = model_core main for kinetic and themo data.
n = model_to_translate main for kinetic and thermo data.
Default order task is kt. You can also specify a list of order to generate multiple mechanism in the form "order=order1, order2, order3, ..."
ORDER FOR EXTRACTION_MERGING IS ALWAYS SET TO "kt" !!!
Example: order=k
### How to use :
Once the input created, use "python Main_exe_1.py input". A tmp_species_traduction.tmp file will be created. This file contains all the temporary translation done by the code and also which translation needs to be done manually.