Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
randomProcesses
fft
calcEk.C
Go to the documentation of this file.
1
/*======================================================================*/
2
3
// This routine evaluates q(k) (McComb, p61) by summing all wavevectors
4
// in a k-shell. Then we divide through by the volume of the box
5
// - to be accurate, by the volume of the ellipsoid enclosing the
6
// box (assume cells even in each direction). Finally, multiply the
7
// q(k) values by k^2 to give the full power spectrum E(k). Integrating
8
// this over the whole range gives the energy in turbulence.
9
10
/*======================================================================*/
11
12
#include "
calcEk.H
"
13
#include "
fft.H
"
14
#include <
randomProcesses/Kmesh.H
>
15
#include "
kShellIntegration.H
"
16
#include <
finiteVolume/volFields.H
>
17
#include <
OpenFOAM/graph.H
>
18
19
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
20
21
namespace
Foam
22
{
23
24
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
25
26
graph
calcEk
27
(
28
const
volVectorField
&
U
,
29
const
Kmesh
&
K
30
)
31
{
32
return
kShellIntegration
33
(
34
fft::forwardTransform
35
(
36
ReComplexField
(U.
internalField
()),
37
K.
nn
()
38
),
39
K
40
);
41
}
42
43
44
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46
}
// End namespace Foam
47
48
// ************************ vim: set sw=4 sts=4 et: ************************ //