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-2018 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 
72 protected:
73 
74  // Protected data
75 
76  //- Minimum temperature limit [K]
77  scalar Tmin_;
78 
79  //- Maximum temperature limit [K]
80  scalar Tmax_;
81 
82  //- Optional phase name [K]
83  word phase_;
84 
85 
86 private:
87 
88  // Private Member Functions
89 
90  //- Disallow default bitwise copy construct
92 
93  //- Disallow default bitwise assignment
94  void operator=(const limitTemperature&);
95 
96 
97 public:
98 
99  //- Runtime type information
100  TypeName("limitTemperature");
101 
102 
103  // Constructors
104 
105  //- Construct from components
107  (
108  const word& name,
109  const word& modelType,
110  const dictionary& dict,
111  const fvMesh& mesh
112  );
113 
114 
115  //- Destructor
116  virtual ~limitTemperature()
117  {}
118 
119 
120  // Member Functions
121 
122  //- Read dictionary
123  virtual bool read(const dictionary& dict);
124 
125  //- Correct the energy field
126  virtual void correct(volScalarField& he);
127 };
128 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 } // End namespace fv
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
volScalarField & he
Definition: YEEqn.H:51
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:137
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].
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 abtract 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.