OUprocess.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::OUprocess
26 
27 Description
28  Random Ornstein-Uhlenbeck process
29 
30 SourceFiles
31  OUprocess.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef OUprocess_H
36 #define OUprocess_H
37 
38 #include "complexFields.H"
39 #include "scalar.H"
40 #include "standardNormal.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 class Kmesh;
48 
49 /*---------------------------------------------------------------------------*\
50  Class OUprocess Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class OUprocess
54 {
55  // Private Data
56 
57  const distributions::standardNormal stdNormal_;
58 
59  const Kmesh& Kmesh_;
60  mutable complexVectorField OUfield_;
61 
62  // Ornstein-Uhlenbeck process coefficients
63  scalar alpha_;
64  scalar sigma_;
65  scalar kUpper_;
66  scalar kLower_;
67  scalar scale_;
68 
69 
70  // Private Member Functions
71 
72  //- Return the Weiner process field
73  complexVector WeinerProcess(const scalar deltaT) const;
74 
75 
76 public:
77 
78  // Constructors
79 
80  //- Construct from wavenumber mesh, timestep and coefficients dict
81  OUprocess
82  (
83  const Kmesh& kmesh,
84  const scalar deltaT,
85  const dictionary&
86  );
87 
88 
89  // Member Functions
90 
91  //- Return the current random Ornstein-Uhlenbeck process field
92  const complexVectorField& newField(const scalar deltaT) const;
93 };
94 
95 
96 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
97 
98 } // End namespace Foam
99 
100 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101 
102 #endif
103 
104 // ************************************************************************* //
Calculate the wavenumber vector field corresponding to the space vector field of a finite volume mesh...
Definition: Kmesh.H:52
Random Ornstein-Uhlenbeck process.
Definition: OUprocess.H:53
OUprocess(const Kmesh &kmesh, const scalar deltaT, const dictionary &)
Construct from wavenumber mesh, timestep and coefficients dict.
Definition: OUprocess.C:50
const complexVectorField & newField(const scalar deltaT) const
Return the current random Ornstein-Uhlenbeck process field.
Definition: OUprocess.C:93
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
Definition: Vector.H:60
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
Standard normal distribution. Not selectable.
Namespace for OpenFOAM.