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.filter_favre(self, filter_size, filter_type='Gauss'):
  • Description
  • Parameters
  • Raises
  • Returns
  • Example
  1. API guide
  2. Field3D

Field3D.filter_favre

PreviousField3D.cutNextField3D.filter

Last updated 1 year ago

Field3D.filter_favre(self, filter_size, filter_type='Gauss'):


Description

Filter every scalar in the field object using Favre-averaging.

This method filters a field using the Favre-averaged filtering technique with the specified filter size and type. It creates a new folder to store the filtered data and grid files. If the folder already exists, it prompts the user for confirmation before overwriting the content. The chemical path and information file ('info.json') are copied to the new filtered folder. Each attribute of the field is filtered according to the specified filter size and type, and the resulting filtered sections are saved to files.

Parameters

  • filter_size (int): The size of the filter.

  • filter_type (str, optional): The type of filter to use. Default is 'gauss'.

Raises

  • TypeError: If filter_size is not an integer. If filter_type is not a string.

  • ValueError: If filter_type is not one of the valid options.

Returns

  • str: Path of the filtered field folder.

Example

>>> field = Field(folder_path='field1')
>>> filtered_folder_path = field.filter_favre(filter_size=5)