Field3D.compute_reaction_rates_batch
Last updated
Last updated
Computes the reaction rates in batches for a filtered field.
This method calculates reaction rates in chunks for a filtered field, suitable for large datasets. The reaction rates can be computed in different modes specified by tau_c
and tau_m
.
n_chunks
(int, optional): Number of chunks to divide the field into for batch processing. Default is 5000.
tau_c
(str, optional): Mode for computing the chemical timescale. Default is 'SFR'.
tau_m
(str, optional): Mode for computing the mixing timescale. Default is 'Kolmo'.
ValueError
: If the field is not filtered or if the species' molar concentrations and reaction rates are not in the data folder.
AttributeError
: If required attributes (attr_list
, bool_list
, folder_path
) are not defined.
Validation:
Ensures all mass fractions are in the folder.
Confirms the field is filtered and sets the mode to 'Batch'.
Paths Preparation:
Builds lists for reaction rates paths and species' mass fractions paths.
Checks if the reaction rates files already exist and prompts the user for confirmation to overwrite them.
Reaction Rates Computation:
Initializes chunk generators for temperature, pressure, density, and timescales.
Computes reaction rates and heat release rates in chunks using the Cantera library.
Saves computed chunks to respective files.
None