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 "Kmesh.H"
15 #include "kShellIntegration.H"
16 #include "volFields.H"
17 #include "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  (
35  (
37  K.nn()
38  ),
39  K
40  );
41 }
42 
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 } // End namespace Foam
47 
48 // ************************************************************************* //
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
Generic GeometricField class.
graph calcEk(const volVectorField &U, const Kmesh &K)
Definition: calcEk.C:27
CGAL::Exact_predicates_exact_constructions_kernel K
static tmp< complexField > forwardTransform(const tmp< complexField > &field, const labelList &nn)
Definition: fft.C:187
Calculate the wavenumber vector field corresponding to the space vector field of a finite volume mesh...
Definition: Kmesh.H:49
Integrate a multi-dimensional complexVectorField in k-shells to create the 1D.
graph kShellIntegration(const complexVectorField &Ek, const Kmesh &K)
complexField ReComplexField(const UList< scalar > &sf)
Definition: complexFields.C:56
const labelList & nn() const
Definition: Kmesh.H:94
U
Definition: pEqn.H:72
Namespace for OpenFOAM.