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_mixing_timescale(self, mode='Kolmo'):
  • Description
  • Parameters
  • Raises
  • Workflow
  • Returns
  • Example
  1. API guide
  2. Field3D

Field3D.compute_mixing_timescale

PreviousField3D.compute_kinetic_energyNextField3D.compute_residual_kinetic_energy

Last updated 1 year ago

Field3D.compute_mixing_timescale(self, mode='Kolmo'):


Description

Computes the mixing timescale for the field, useful for turbulence modeling.

This method calculates the mixing timescale using either the Kolmogorov model or the integral length scale model. The computation relies on residual kinetic energy and residual dissipation rate fields.

Parameters

  • mode (str, optional): The mode of timescale computation. Valid options are 'Kolmo' (Kolmogorov) or 'Int' (Integral length scale). Default is 'Kolmo'.

Raises

  • ValueError: If the specified mode is not valid.

  • Warning: If the 'C_mix' attribute is not defined for the integral length scale model.

Workflow

  1. Validation

    • Checks if mode is valid.

  2. Mode: 'Kolmo'

    • Computes the Kolmogorov timescale: [ \tau_m^{Kolmo} = \sqrt{\frac{k_r}{\epsilon_r} \sqrt{\frac{\mu}{\rho \epsilon_r}}} ]

    • Saves the computed timescale to a file.

  3. Mode: 'Int'

    • Ensures C_mix is defined, initializes to 0.1 if not.

    • Computes the integral length scale timescale: [ \tau_m^{Int} = \frac{C_{mix} k_r}{\epsilon_r} ]

    • Saves the computed timescale and C_mix value to files.

Returns

None

Example

>>> field = Field3D('your_folder_path')
>>> field.compute_mixing_timescale(mode='Kolmo')