Skip to content

Commit f468aa0

Browse files
committed
Docs: explain the auto-db feature
1 parent 0b0f68d commit f468aa0

1 file changed

Lines changed: 73 additions & 5 deletions

File tree

documentation/source/users/rmg/input.rst

Lines changed: 73 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,17 +204,85 @@ The last section is specifying that RMG is estimating kinetics of reactions from
204204
kineticsEstimator = 'rate rules'
205205

206206

207-
The following is an example of a database block, based on above chosen libraries and options::
207+
.. _auto_library_selection:
208+
209+
Automatic Library and Family Selection
210+
--------------------------------------
211+
Instead of manually listing every library, you can let RMG choose the appropriate
212+
thermo libraries, kinetics libraries, transport libraries, seed mechanisms, and
213+
kinetics families automatically based on the species and reactor conditions in your
214+
input file. Use the ``'auto'`` keyword in any library field::
208215

209216
database(
210-
thermoLibraries = ['primaryThermoLibrary', 'GRI-Mech3.0'],
211-
reactionLibraries = [('Glarborg/C3',False)],
212-
seedMechanisms = ['GRI-Mech3.0'],
217+
thermoLibraries = 'auto',
218+
reactionLibraries = 'auto',
219+
transportLibraries = 'auto',
220+
seedMechanisms = 'auto',
221+
kineticsFamilies = 'auto',
213222
kineticsDepositories = ['training'],
214-
kineticsFamilies = 'defult',
215223
kineticsEstimator = 'rate rules',
216224
)
217225

226+
When ``'auto'`` is specified, RMG analyzes the initial species and reactor
227+
conditions to detect the chemistry present (e.g., nitrogen, sulfur, oxygen,
228+
halogens, surface, liquid phase) and selects the relevant library sets.
229+
The triggered sets and their corresponding libraries are logged at the start
230+
of the RMG run.
231+
232+
**Mixing manual and auto selection.** You can combine user-specified libraries
233+
with ``'auto'`` in a list. The position of ``'auto'`` controls the priority:
234+
libraries before it have higher priority, libraries after it have lower::
235+
236+
thermoLibraries = ['myCustomLib', 'auto']
237+
238+
thermoLibraries = ['auto', 'myFallbackLib']
239+
240+
If a library you listed manually also appears in the auto-selected set, it will
241+
not be added twice. It keeps the position you gave it, and the auto-selected
242+
copy is skipped.
243+
244+
**PAH libraries and the ``<PAH_libs>`` keyword.**
245+
The auto-selection splits high-temperature C/H chemistry into two tiers:
246+
247+
* **CH_pyrolysis_core** — fundamental high-T radical and small-molecule chemistry
248+
(e.g., acetylene initiation, alkane cracking). Always included when carbon is
249+
present and the maximum reactor temperature is at least 800 K.
250+
* **PAH_formation** — aromatic ring formation, naphthalene pathways (CPD + HACA),
251+
and larger PAH growth. This is a large set (~70 kinetics libraries) that can
252+
significantly increase model size and generation time.
253+
254+
For **pure C/H pyrolysis** (no oxygen in any input species), both tiers are
255+
included automatically — PAH formation is expected in such systems.
256+
257+
For **oxygenated systems** (any species contains O, including oxygenated fuels
258+
like ethanol or DME), only CH_pyrolysis_core is included by default because
259+
PAH chemistry is typically a minor pathway. If you know your system forms
260+
significant amounts of aromatics (e.g., fuel-rich partial oxidation), you can
261+
explicitly request the PAH libraries by adding the ``'<PAH_libs>'`` keyword
262+
to any library field::
263+
264+
database(
265+
thermoLibraries = ['auto', '<PAH_libs>'],
266+
reactionLibraries = ['auto', '<PAH_libs>'],
267+
seedMechanisms = 'auto',
268+
transportLibraries = 'auto',
269+
kineticsFamilies = 'auto',
270+
)
271+
272+
The ``'<PAH_libs>'`` keyword is consumed during processing (it does not appear
273+
in the final library list) — it only serves as a signal to include the
274+
PAH_formation set. It can be placed anywhere in the list; its position does
275+
not affect library priority.
276+
277+
**Previewing the selection.** A Jupyter notebook is provided at
278+
:file:`ipython/auto_library_selection.ipynb` that lets you preview exactly which
279+
libraries and families RMG would choose for a given input file, without running
280+
the full job.
281+
282+
.. note::
283+
The ``'auto'`` keyword is opt-in. If you do not use it you must list every library explicitly.
284+
285+
218286
.. _species_list:
219287

220288
List of species

0 commit comments

Comments
 (0)