DESModelRegions.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) 2013-2015 OpenFOAM Foundation
9 Copyright (C) 2016-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::functionObjects::DESModelRegions
29
30Group
31 grpFieldFunctionObjects
32
33Description
34 Computes an indicator field for detached eddy simulation (DES) turbulence
35 calculations, where the values of the indicator mean:
36
37 \verbatim
38 0 = Reynolds-averaged Navier-Stokes (RAS) regions
39 1 = Large eddy simulation (LES) regions
40 \endverbatim
41
42 Operands:
43 \table
44 Operand | Type | Location
45 input | - | -
46 output file | dat | $FOAM_CASE/postProcessing/<FO>/<time>/<file>
47 output field | volScalarField | $FOAM_CASE/<time>/<outField>
48 \endtable
49
50Usage
51 Minimal example by using \c system/controlDict.functions:
52 \verbatim
53 DESModelRegions1
54 {
55 // Mandatory entries (unmodifiable)
56 type DESModelRegions;
57 libs (fieldFunctionObjects);
58
59 // Optional entries (runtime modifiable)
60 result DESField;
61
62 // Optional (inherited) entries
63 ...
64 }
65 \endverbatim
66
67 where the entries mean:
68 \table
69 Property | Description | Type | Req'd | Dflt
70 type | Type name: DESModelRegions | word | yes | -
71 libs | Library name: fieldFunctionObjects | word | yes | -
72 result | Name of DES indicator field | word | no | <FO>
73 \endtable
74
75 The inherited entries are elaborated in:
76 - \link functionObject.H \endlink
77 - \link writeFile.H \endlink
78
79 Usage by the \c postProcess utility is not available.
80
81Note
82 \c DESModelRegions function object can only be executed for DES simulations.
83
84See also
85 - Foam::functionObject
86 - Foam::functionObjects::fvMeshFunctionObject
87 - Foam::functionObjects::writeFile
88 - ExtendedCodeGuide::functionObjects::field::DESModelRegions
89
90SourceFiles
91 DESModelRegions.C
92
93\*---------------------------------------------------------------------------*/
94
95#ifndef functionObjects_DESModelRegions_H
96#define functionObjects_DESModelRegions_H
97
99#include "writeFile.H"
100#include "volFieldsFwd.H"
101#include "OFstream.H"
102
103// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104
105namespace Foam
106{
107namespace functionObjects
108{
109
110/*---------------------------------------------------------------------------*\
111 Class DESModelRegions Declaration
112\*---------------------------------------------------------------------------*/
113
114class DESModelRegions
115:
116 public fvMeshFunctionObject,
117 public writeFile
118{
119protected:
120
121 // Protected Data
122
123 //- Name of DES indicator field
124 word resultName_;
125
126
127 // Protected Member Functions
128
129 //- File header information
130 virtual void writeFileHeader(Ostream& os) const;
131
132
133public:
134
135 //- Runtime type information
136 TypeName("DESModelRegions");
137
138
139 // Constructors
140
141 //- Construct from Time and dictionary
143 (
144 const word& name,
145 const Time& runTime,
146 const dictionary& dict
147 );
148
149 //- No copy construct
150 DESModelRegions(const DESModelRegions&) = delete;
151
152 //- No copy assignment
153 void operator=(const DESModelRegions&) = delete;
154
155
156 //- Destructor
157 virtual ~DESModelRegions() = default;
158
159
160 // Member Functions
161
162 //- Read the DESModelRegions data
163 virtual bool read(const dictionary&);
164
165 //- Execute
166 virtual bool execute();
167
168 //- Calculate the DESModelRegions and write
169 virtual bool write();
170};
171
172
173// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174
175} // End namespace functionObjects
176} // End namespace Foam
177
178// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179
180#endif
181
182// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const word & name() const noexcept
Return the name of this functionObject.
Computes an indicator field for detached eddy simulation (DES) turbulence calculations,...
DESModelRegions(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
TypeName("DESModelRegions")
Runtime type information.
DESModelRegions(const DESModelRegions &)=delete
No copy construct.
word resultName_
Name of DES indicator field.
void operator=(const DESModelRegions &)=delete
No copy assignment.
virtual void writeFileHeader(Ostream &os) const
File header information.
virtual ~DESModelRegions()=default
Destructor.
virtual bool write()
Calculate the DESModelRegions and write.
virtual bool read(const dictionary &)
Read the DESModelRegions data.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Base class for writing single files from the function objects.
Definition: writeFile.H:120
A class for handling words, derived from Foam::string.
Definition: word.H:68
engineTime & runTime
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73