aPriori Documentation
  • 👋Welcome to aPriori
  • Getting started
    • What is aPriori?
    • Installation
    • Quickstart
  • Fundamentals and usage
    • aPriori Fundamentals
      • Data Formatting
      • Cut a 3D scalar
      • Filter a 3D scalar field
      • Initialize a DNS field
      • Data visualization
      • Cut a DNS field
      • Filter a DNS field
    • Machine Learning Tutorials
      • Data-Driven Closure for Turbulence-Chemistry interaction
      • Dynamic Data-Driven Smagorinky Closure for LES
  • API guide
    • Field3D
      • Field3D.build_attributes_list
      • Field3D.check_valid_attribute
      • Field3D.compute_chemical_timescale
      • Field3D.compute_kinetic_energy
      • Field3D.compute_mixing_timescale
      • Field3D.compute_residual_kinetic_energy
      • Field3D.compute_residual_dissipation_rate
      • Field3D.compute_reaction_rates
      • Field3D.compute_reaction_rates_batch
      • Field3D.compute_strain_rate
      • Field3D.compute_tau_r
      • Field3D.compute_velocity_module
      • Field3D.cut
      • Field3D.filter_favre
      • Field3D.filter
      • Field3D.find_path
      • Field3D.plot_x_midplane
      • Field3D.plot_y_midplane
      • Field3D.plot_z_midplane
      • Field3D.print_attributes
      • Field3D.update
    • Scalar3D
      • Scalar3D.is_light_mode
      • Scalar3D.reshape_3d
      • Scalar3D.reshape_column
      • Scalar3D.reshape_line
      • Scalar3D.cut
      • Scalar3D.filter_gauss
      • Scalar3D.plot_x_midplane
      • Scalar3D.plot_y_midplane
      • Scalar3D.plot_z_midplane
    • Mesh3D
  • BIBLIOGRAPHY
Powered by GitBook
On this page
  • Field3D.compute_chemical_timescale(self, mode='SFR', verbose=False):
  • Description
  • Parameters
  • Raises
  • Workflow
  • Returns
  1. API guide
  2. Field3D

Field3D.compute_chemical_timescale

PreviousField3D.check_valid_attributeNextField3D.compute_kinetic_energy

Last updated 1 year ago

Field3D.compute_chemical_timescale(self, mode='SFR', verbose=False):


Computes the chemical timescale for the field, useful in Partially Stirred Reactor (PaSR) modeling.

Description

This method calculates the chemical timescale for the field using different modes. The available modes are 'SFR' (Slowest Fastest Reaction), 'FFR' (Fastest Fastest Reaction), and 'Ch' (Chomiak timescale). The computation is valid only for filtered fields, and it leverages reaction rates and species molar concentrations.

Parameters

  • mode (str, optional): The mode of timescale computation. Valid options are 'SFR', 'FFR', and 'Ch'. Default is 'SFR'.

  • verbose (bool, optional): If True, prints detailed information during the computation. Default is False.

Raises

  • ValueError: If the field is not a filtered field or if the length of species and reaction rates lists do not match the number of species.

  • AttributeError: If the required attributes 'fuel' and 'ox' are not defined when mode is 'Ch'.

Workflow

  1. Validation

    • Checks if mode is valid and if the field is filtered.

    • Ensures species and reaction rates lists match the number of species.

  2. Mode: 'SFR' or 'FFR'

    • Collects paths to reaction rates and species concentrations.

    • Computes the timescales (\tau_c^{SFR}) and (\tau_c^{FFR}).

    • Saves the computed timescales to files.

  3. Mode: 'Ch'

    • Validates the presence of 'fuel' and 'ox' attributes.

    • Computes the Chomiak timescale.

    • Saves the computed timescale to a file.

Returns

None