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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::fv::atmNutSource
29
30Group
31 grpFvOptionsSources
32
33Description
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
48Usage
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
81SourceFiles
82 atmNutSource.C
83
84\*---------------------------------------------------------------------------*/
85
86#ifndef fv_atmNutSource_H
87#define fv_atmNutSource_H
88
89#include "cellSetOption.H"
91
92// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93
94namespace Foam
95{
96namespace fv
97{
98
99/*---------------------------------------------------------------------------*\
100 Class atmNutSource Declaration
101\*---------------------------------------------------------------------------*/
102
103class 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
119public:
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};
155
156// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158} // End namespace fv
159} // End namespace Foam
160
161// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162
163#endif
164
165// ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Adds/subtracts a given artificial turbulent viscosity field to/from nut for atmospheric boundary laye...
Definition: atmNutSource.H:123
virtual bool read(const dictionary &dict)
Read source dictionary (effectively no-op)
Definition: atmNutSource.H:166
TypeName("atmNutSource")
Runtime type information.
atmNutSource(const atmNutSource &)=delete
No copy construct.
void operator=(const atmNutSource &)=delete
No copy assignment.
Intermediate abstract class for handling cell-set options for the derived fvOptions.
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
Definition: fvOptionI.H:37
A class for handling words, derived from Foam::string.
Definition: word.H:68
thermo correct()
rDeltaTY field()
Namespace for OpenFOAM.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:82
labelList fv(nPoints)
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73