turbGen.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::turbGen
28 
29 Description
30  Generate a turbulent velocity field conforming to a given
31  energy spectrum and being divergence free.
32 
33 SourceFiles
34  turbGen.C
35  turbGenIO.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef turbGen_H
40 #define turbGen_H
41 
42 #include "Random.H"
43 #include "primitiveFields.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 class Kmesh;
51 
52 /*---------------------------------------------------------------------------*\
53  Class turbGen Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class turbGen
57 {
58  // Private data
59 
60  const Kmesh& K;
61  const scalar Ea;
62  const scalar k0;
63  Random RanGen;
64 
65 
66 public:
67 
68  // Constructors
69 
70  //- Construct from components
71  turbGen(const Kmesh& k, const scalar EA, const scalar K0);
72 
73 
74  // Member Functions
75 
76  //- Generate and return a velocity field
77  vectorField U();
78 };
79 
80 
81 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82 
83 } // End namespace Foam
84 
85 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
86 
87 #endif
88 
89 // ************************************************************************* //
Foam::Random
Random number generator.
Definition: Random.H:59
Foam::turbGen
Generate a turbulent velocity field conforming to a given energy spectrum and being divergence free.
Definition: turbGen.H:55
Foam::turbGen::turbGen
turbGen(const Kmesh &k, const scalar EA, const scalar K0)
Construct from components.
Definition: turbGen.C:39
primitiveFields.H
Specialisations of Field<T> for scalar, vector and tensor.
Foam::Kmesh
Calculate the wavenumber vector field corresponding to the space vector field of a finite volume mesh...
Definition: Kmesh.H:51
K
CGAL::Exact_predicates_exact_constructions_kernel K
Definition: CGALTriangulation3DKernel.H:58
Foam::Field< vector >
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Random.H
Foam::turbGen::U
vectorField U()
Generate and return a velocity field.
Definition: turbGen.C:50
k
label k
Boltzmann constant.
Definition: LISASMDCalcMethod2.H:41