Field3D.compute_reaction_rates
Last updated
Last updated
Computes the source terms for a given chemical reaction system.
This function performs several steps:
Checks that all the mass fractions are in the folder.
Determines if the reaction rates to be computed are in DNS or LFR mode based on the filter size.
Builds a list with reaction rates paths and one with the species' Mass fractions paths.
Checks that the files of the reaction rates do not exist yet. If they do, asks the user if they want to overwrite them.
Computes the reaction rates in chunks to handle large data sets efficiently.
Saves the computed reaction rates, heat release rate, and dynamic viscosity to files.
Updates the object's state.
n_chunks
(int, optional): The number of chunks to divide the data into for efficient computation. Default is 5000.
None
SystemExit
: If the user chooses not to overwrite existing reaction rate files, or if there is a mismatch in the number of species and the length of the species paths list.
This function uses the Cantera library to compute the reaction rates, heat release rate, and dynamic viscosity. It assumes that the object has the following attributes: attr_list
, bool_list
, folder_path
, filter_size
, species
, shape
, kinetic_mechanism
, T
, P
, and paths_list
. It also assumes that the object has the following methods: find_path
and update
.