limitTemperature.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::fv::limitTemperature
26 
27 Description
28  Correction for temperature to apply limits between minimum and maximum
29  values.
30 
31 Usage
32  Example usage:
33  \verbatim
34  limitT
35  {
36  type limitTemperature;
37  active yes;
38 
39  selectionMode all;
40  min 200;
41  max 500;
42  phase gas; // optional
43  }
44  \endverbatim
45 
46 SourceFiles
47  limitTemperature.C
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #ifndef limitTemperature_H
52 #define limitTemperature_H
53 
54 #include "cellSetOption.H"
55 
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 
58 namespace Foam
59 {
60 namespace fv
61 {
62 
63 /*---------------------------------------------------------------------------*\
64  Class limitTemperature Declaration
65 \*---------------------------------------------------------------------------*/
66 
67 class limitTemperature
68 :
69  public cellSetOption
70 {
71 protected:
72 
73  // Protected data
74 
75  //- Minimum temperature limit [K]
76  scalar Tmin_;
77 
78  //- Maximum temperature limit [K]
79  scalar Tmax_;
80 
81  //- Optional phase name [K]
82  word phase_;
83 
84 
85 public:
86 
87  //- Runtime type information
88  TypeName("limitTemperature");
89 
90 
91  // Constructors
92 
93  //- Construct from components
95  (
96  const word& name,
97  const word& modelType,
98  const dictionary& dict,
99  const fvMesh& mesh
100  );
101 
102  //- Disallow default bitwise copy construction
103  limitTemperature(const limitTemperature&) = delete;
104 
105 
106  //- Destructor
107  virtual ~limitTemperature()
108  {}
109 
110 
111  // Member Functions
112 
113  //- Read dictionary
114  virtual bool read(const dictionary& dict);
115 
116  //- Correct the energy field
117  virtual void correct(volScalarField& he);
118 
119 
120  // Member Operators
121 
122  //- Disallow default bitwise assignment
123  void operator=(const limitTemperature&) = delete;
124 };
125 
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace fv
130 } // End namespace Foam
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #endif
135 
136 // ************************************************************************* //
volScalarField & he
Definition: YEEqn.H:50
limitTemperature(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
dictionary dict
Correction for temperature to apply limits between minimum and maximum values.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
virtual void correct(volScalarField &he)
Correct the energy field.
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvOptionI.H:34
scalar Tmin_
Minimum temperature limit [K].
void operator=(const limitTemperature &)=delete
Disallow default bitwise assignment.
A class for handling words, derived from string.
Definition: word.H:59
labelList fv(nPoints)
scalar Tmax_
Maximum temperature limit [K].
const word & name() const
Return const access to the source name.
Definition: fvOptionI.H:28
word phase_
Optional phase name [K].
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Cell-set options abstract base class. Provides a base set of controls, e.g.:
Definition: cellSetOption.H:69
virtual bool read(const dictionary &dict)
Read dictionary.
TypeName("limitTemperature")
Runtime type information.
virtual ~limitTemperature()
Destructor.
Namespace for OpenFOAM.