Field3D.compute_mixing_timescale
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
Validation
Checks if
mode
is valid.
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.
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')
Last updated