Loading...
Searching...
No Matches
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 | postProcessing/<FO>/<time>/file
47 output field | volScalarField | <time>/outputField
48 \endtable
49
50Usage
51 Minimal example by using \c system/controlDict.functions:
52 \verbatim
53 DESModelRegionsFO
54 {
55 // Mandatory entries
56 type DESModelRegions;
57 libs (fieldFunctionObjects);
58
59 // Optional entries
60 result <word>; // DESField;
61
62 // Inherited entries
63 ...
64 }
65 \endverbatim
66
67 where the entries mean:
68 \table
69 Property | Description | Type | Reqd | Deflt
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
79Note
80 \c DESModelRegions function object can only be executed for DES simulations.
81
82SourceFiles
83 DESModelRegions.C
84
85\*---------------------------------------------------------------------------*/
86
87#ifndef Foam_functionObjects_DESModelRegions_H
88#define Foam_functionObjects_DESModelRegions_H
89
91#include "writeFile.H"
92#include "volFieldsFwd.H"
93#include "OFstream.H"
94
95// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
96
97namespace Foam
98{
99namespace functionObjects
100{
101
102/*---------------------------------------------------------------------------*\
103 Class DESModelRegions Declaration
104\*---------------------------------------------------------------------------*/
105
106class DESModelRegions
107:
109 public writeFile
110{
111protected:
112
113 // Protected Data
114
115 //- Name of DES indicator field
116 word resultName_;
117
118
119 // Protected Member Functions
120
121 //- File header information
122 virtual void writeFileHeader(Ostream& os) const;
123
124
125public:
126
127 //- Runtime type information
128 TypeName("DESModelRegions");
129
130
131 // Constructors
132
133 //- Construct from name, Time and dictionary
135 (
136 const word& name,
137 const Time& runTime,
138 const dictionary& dict
139 );
140
141 //- No copy construct
142 DESModelRegions(const DESModelRegions&) = delete;
143
144 //- No copy assignment
145 void operator=(const DESModelRegions&) = delete;
146
147
148 //- Destructor
149 virtual ~DESModelRegions() = default;
150
151
152 // Member Functions
154 //- Read the function-object dictionary
155 virtual bool read(const dictionary& dict);
156
157 //- Execute the function-object operations
158 virtual bool execute();
159
160 //- Write the function-object results
161 virtual bool write();
162};
163
164
165// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166
167} // End namespace functionObjects
168} // End namespace Foam
170// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171
172#endif
173
174// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition Time.H:75
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
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 name, Time and dictionary.
TypeName("DESModelRegions")
Runtime type information.
DESModelRegions(const DESModelRegions &)=delete
No copy construct.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
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 execute()
Execute the function-object operations.
virtual bool write()
Write the function-object results.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
fvMeshFunctionObject(const fvMeshFunctionObject &)=delete
No copy construct.
Base class for writing single files from the function objects.
Definition writeFile.H:113
writeFile(const objectRegistry &obr, const fileName &prefix, const word &name="undefined", const bool writeToFile=true, const string &ext=".dat")
Construct from objectRegistry, prefix, fileName.
Definition writeFile.C:200
A class for handling words, derived from Foam::string.
Definition word.H:66
engineTime & runTime
OBJstream os(runTime.globalPath()/outputName)
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
Namespace for OpenFOAM.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68
Forwards and collection of common volume field types.