atmNutSource.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) 2020 ENERCON GmbH
9  Copyright (C) 2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::fv::atmNutSource
29 
30 Group
31  grpFvOptionsSources
32 
33 Description
34  Adds/subtracts a given artificial turbulent viscosity field to/from \c nut
35  for atmospheric boundary layer modelling.
36 
37  Corrections applied to:
38  \verbatim
39  nut | Turbulent viscosity [m2/s]
40  \endverbatim
41 
42  Required fields:
43  \verbatim
44  nut | Turbulent viscosity [m2/s]
45  artNut | Artificial turbulent viscosity [m2/s]
46  \endverbatim
47 
48 Usage
49  Example by using \c constant/fvOptions:
50  \verbatim
51  atmNutSource1
52  {
53  // Mandatory entries (unmodifiable)
54  type atmNutSource;
55 
56  atmNutSourceCoeffs
57  {
58  // Mandatory (inherited) entries (unmodifiable)
59  selectionMode all;
60 
61  // Optional entries (unmodifiable)
62  nut artNut;
63  }
64 
65  // Optional (inherited) entries
66  ...
67  }
68  \endverbatim
69 
70  where the entries mean:
71  \table
72  Property | Description | Type | Req'd | Dflt
73  type | Type name: atmNutSource | word | yes | -
74  nut | Field name of artificial nut | word | no | artNut
75  \endtable
76 
77  The inherited entries are elaborated in:
78  - \link fvOption.H \endlink
79  - \link cellSetOption.H \endlink
80 
81 SourceFiles
82  atmNutSource.C
83 
84 \*---------------------------------------------------------------------------*/
85 
86 #ifndef fv_atmNutSource_H
87 #define fv_atmNutSource_H
88 
89 #include "cellSetOption.H"
91 
92 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93 
94 namespace Foam
95 {
96 namespace fv
97 {
98 
99 /*---------------------------------------------------------------------------*\
100  Class atmNutSource Declaration
101 \*---------------------------------------------------------------------------*/
102 
103 class atmNutSource
104 :
105  public fv::cellSetOption
106 {
107  // Private Data
108 
109  //- Name of the artificial turbulent viscosity field
110  const word artNutName_;
111 
112 
113  // Fields
114 
115  //- Artificial turbulent viscosity field [m2/s]
116  volScalarField artNut_;
117 
118 
119 public:
120 
121  //- Runtime type information
122  TypeName("atmNutSource");
123 
124 
125  // Constructors
126 
127  //- Construct from explicit source name and mesh
129  (
130  const word& sourceName,
131  const word& modelType,
132  const dictionary& dict,
133  const fvMesh& mesh
134  );
135 
136  //- No copy construct
137  atmNutSource(const atmNutSource&) = delete;
138 
139  //- No copy assignment
140  void operator=(const atmNutSource&) = delete;
141 
142 
143  // Member Functions
144 
145  //- Correct the turbulent viscosity
146  virtual void correct(volScalarField& field);
147 
148  //- Read source dictionary (effectively no-op)
149  virtual bool read(const dictionary& dict)
150  {
151  return true;
152  }
153 };
154 
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 } // End namespace fv
159 } // End namespace Foam
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 #endif
164 
165 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::fv::cellSetOption
Intermediate abstract class for handling cell-set options for the derived fvOptions.
Definition: cellSetOption.H:163
Foam::fv::atmNutSource
Adds/subtracts a given artificial turbulent viscosity field to/from nut for atmospheric boundary laye...
Definition: atmNutSource.H:120
turbulentTransportModel.H
Foam::fv::atmNutSource::read
virtual bool read(const dictionary &dict)
Read source dictionary (effectively no-op)
Definition: atmNutSource.H:166
cellSetOption.H
field
rDeltaTY field()
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::fv::atmNutSource::operator=
void operator=(const atmNutSource &)=delete
No copy assignment.
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
fv
labelList fv(nPoints)
Foam::fv::atmNutSource::atmNutSource
atmNutSource(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
Definition: atmNutSource.C:47
Foam::fv::option::mesh
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
Definition: fvOptionI.H:37
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::fv::atmNutSource::correct
virtual void correct(volScalarField &field)
Correct the turbulent viscosity.
Definition: atmNutSource.C:115
Foam::fv::atmNutSource::TypeName
TypeName("atmNutSource")
Runtime type information.