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