Skip to content
Snippets Groups Projects
Commit d3854bf9 authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

Merge branch 'bugfix/average-Uint' into 'develop'

Compute Uint from time-averaged energy

See merge request !68
parents c8007e2c 267b5cf0
Branches
Tags 4.7.1
2 merge requests!70Feature/update branching rules,!68Compute Uint from time-averaged energy
Pipeline #184694 passed
......@@ -415,16 +415,28 @@ class DNS(_code):
R_{\\lambda} = \\frac{U_{\\textrm{int}} \\lambda}{\\nu}
D = \\frac{\\varepsilon L_{\\textrm{int}}}{U_{\\textrm{int}}^3}
Note: the "time-averaged" integral-scale velocity is obtained from the
time-averaged energy. This is nominally different from time-averaging
the time-dependent integral-scale velocity, but in practice the
differences are not very large for data we've looked at so far.
For future reference, it seems advisable to compute energy and
dissipation as "primary" quantities (nice because they are L2 norms),
to which temporal averaging can be applied; other "time-averaged"
derived quantities (Rlambda, Taylor micro-scale itself, etc) should be
computed from the time-averaged energy and dissipation.
This is consistent with the integral length-scale, which is computed
from the time-averaged energy spectrum.
"""
self.statistics['Uint(t)'] = np.sqrt(2*self.statistics['energy(t)'] / 3)
for key in ['energy',
'enstrophy',
'mean_trS2',
'Uint']:
'mean_trS2']:
if key + '(t)' in self.statistics.keys():
self.statistics[key] = np.average(self.statistics[key + '(t)'], axis = 0)
self.statistics['vel_max'] = np.max(self.statistics['vel_max(t)'])
for suffix in ['', '(t)']:
self.statistics['Uint' + suffix] = np.sqrt(2*self.statistics['energy' + suffix] / 3)
self.statistics['diss' + suffix] = (self.parameters['nu'] *
self.statistics['enstrophy' + suffix]*2)
self.statistics['etaK' + suffix] = (self.parameters['nu']**3 /
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment