limitTemperature.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) 2012-2017 OpenFOAM Foundation
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::limitTemperature
29
30Group
31 grpFvOptionsCorrections
32
33Description
34 Corrects temperature field (i.e. \c T) within a specified
35 region by applying limits between a given minimum and maximum.
36
37 Corrections applied to:
38 \verbatim
39 T | Temperature [K]
40 \endverbatim
41
42 Required fields:
43 \verbatim
44 T | Temperature [K]
45 e/h | Internal energy/Enthalphy [m2/s2]
46 \endverbatim
47
48Usage
49 Minimal example by using \c constant/fvOptions:
50 \verbatim
51 limitTemperature1
52 {
53 // Mandatory entries (unmodifiable)
54 type limitTemperature;
55
56 // Mandatory entries (runtime modifiable)
57 min <minValue>;
58 max <maxValue>;
59
60 // Optional entries (runtime modifiable)
61 phase <phaseName>;
62
63 // Mandatory/Optional (inherited) entries
64 ...
65 }
66 \endverbatim
67
68 where the entries mean:
69 \table
70 Property | Description | Type | Reqd | Dflt
71 type | Type name: limitTemperature | word | yes | -
72 min | Minimum temperature limit [K] | scalar | yes | -
73 max | Maximum temperature limit [K] | scalar | yes | -
74 phase | Name of operand phase field | word | no | ""
75 \endtable
76
77 The inherited entries are elaborated in:
78 - \link fvOption.H \endlink
79 - \link cellSetOption.H \endlink
80
81See also
82 - Foam::fv::fixedTemperatureConstraint
83
84SourceFiles
85 limitTemperature.C
86
87\*---------------------------------------------------------------------------*/
88
89#ifndef limitTemperature_H
90#define limitTemperature_H
91
92#include "cellSetOption.H"
93
94// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
95
96namespace Foam
97{
98namespace fv
99{
100
101/*---------------------------------------------------------------------------*\
102 Class limitTemperature Declaration
103\*---------------------------------------------------------------------------*/
104
105class limitTemperature
106:
107 public fv::cellSetOption
108{
109protected:
110
111 // Protected Data
112
113 //- Minimum temperature limit [K]
114 scalar Tmin_;
115
116 //- Maximum temperature limit [K]
117 scalar Tmax_;
118
119 //- Optional phase name [K]
120 word phase_;
121
122
123public:
124
125 //- Runtime type information
126 TypeName("limitTemperature");
127
128
129 // Constructors
130
131 //- Construct from components
133 (
134 const word& name,
135 const word& modelType,
136 const dictionary& dict,
137 const fvMesh& mesh
138 );
139
140 //- No copy construct
141 limitTemperature(const limitTemperature&) = delete;
142
143 //- No copy assignment
144 void operator=(const limitTemperature&) = delete;
145
147 //- Destructor
148 virtual ~limitTemperature() = default;
150
151 // Member Functions
152
153 //- Read dictionary
154 virtual bool read(const dictionary& dict);
156 //- Correct the energy field
157 virtual void correct(volScalarField& he);
158};
159
160
161// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162
163} // End namespace fv
164} // End namespace Foam
165
166// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167
168#endif
169
170// ************************************************************************* //
volScalarField & he
Definition: YEEqn.H:52
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
Intermediate abstract class for handling cell-set options for the derived fvOptions.
Corrects temperature field (i.e. T) within a specified region by applying limits between a given mini...
virtual ~limitTemperature()=default
Destructor.
word phase_
Optional phase name [K].
virtual bool read(const dictionary &dict)
Read dictionary.
limitTemperature(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
void operator=(const limitTemperature &)=delete
No copy assignment.
scalar Tmax_
Maximum temperature limit [K].
scalar Tmin_
Minimum temperature limit [K].
TypeName("limitTemperature")
Runtime type information.
limitTemperature(const limitTemperature &)=delete
No copy construct.
const word & name() const noexcept
Return const access to the source name.
Definition: fvOptionI.H:31
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()
Namespace for OpenFOAM.
labelList fv(nPoints)
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73