fixedTemperatureConstraint.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 | Copyright (C) 2012-2015 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::fixedTemperatureConstraint
26 
27 Description
28  Fixed temperature equation constraint
29 
30  Sources described by:
31 
32  fixedTemperatureConstraintCoeffs
33  {
34  mode uniform; // uniform or lookup
35 
36  // uniform option
37  temperature constant 500; // fixed temperature with time [K]
38 
39  // lookup option
40  // TName T; // optional temperature field name
41  }
42 
43 Note:
44  The 'uniform' option allows the use of a time-varying uniform temperature
45  by means of the DataEntry type.
46 
47 SourceFiles
48  fvOption.C
49 
50 \*---------------------------------------------------------------------------*/
51 
52 #ifndef fixedTemperatureConstraint_H
53 #define fixedTemperatureConstraint_H
54 
55 #include "cellSetOption.H"
56 #include "NamedEnum.H"
57 #include "DataEntry.H"
58 
59 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 
61 namespace Foam
62 {
63 namespace fv
64 {
65 
66 /*---------------------------------------------------------------------------*\
67  Class fixedTemperatureConstraint Declaration
68 \*---------------------------------------------------------------------------*/
69 
71 :
72  public cellSetOption
73 {
74 
75 public:
76 
77  //- Temperature mode
78  enum temperatureMode
79  {
81  tmLookup
82  };
83 
84 
85  //- String representation of temperatureMode enums
87 
88 
89 protected:
90 
91  // Protected data
92 
93  //- Operation mode
95 
96  //- Uniform temperature [K]
98 
99  //- Temperature field name
100  word TName_;
101 
102 
103 private:
104 
105  // Private Member Functions
106 
107  //- Disallow default bitwise copy construct
109 
110  //- Disallow default bitwise assignment
112 
113 
114 public:
115 
116  //- Runtime type information
117  TypeName("fixedTemperatureConstraint");
118 
119 
120  // Constructors
121 
122  //- Construct from components
124  (
125  const word& name,
126  const word& modelType,
127  const dictionary& dict,
128  const fvMesh& mesh
129  );
130 
131 
132  //- Destructor
134  {}
135 
136 
137  // Member Functions
138 
139  //- Constrain energy equation to fix the temperature
140  virtual void constrain(fvMatrix<scalar>& eqn, const label fieldI);
141 
142 
143  // IO
144 
145  //- Read dictionary
146  virtual bool read(const dictionary& dict);
147 };
148 
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 } // End namespace fv
153 } // End namespace Foam
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 #endif
158 
159 // ************************************************************************* //
Foam::fv::fixedTemperatureConstraint::tmLookup
@ tmLookup
Definition: fixedTemperatureConstraint.H:80
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::fv::cellSetOption
Cell-set options abtract base class. Provides a base set of controls, e.g.
Definition: cellSetOption.H:71
Foam::fv::option::name
const word & name() const
Return const access to the source name.
Definition: fvOptionI.H:28
NamedEnum.H
Foam::fv::fixedTemperatureConstraint::operator=
void operator=(const fixedTemperatureConstraint &)
Disallow default bitwise assignment.
Foam::fv::fixedTemperatureConstraint::~fixedTemperatureConstraint
virtual ~fixedTemperatureConstraint()
Destructor.
Definition: fixedTemperatureConstraint.H:132
cellSetOption.H
DataEntry.H
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::fv::fixedTemperatureConstraint::TypeName
TypeName("fixedTemperatureConstraint")
Runtime type information.
Foam::fv::fixedTemperatureConstraint::mode_
temperatureMode mode_
Operation mode.
Definition: fixedTemperatureConstraint.H:93
Foam::fv::fixedTemperatureConstraint::read
virtual bool read(const dictionary &dict)
Read dictionary.
Definition: fixedTemperatureConstraint.C:148
Foam::fv::fixedTemperatureConstraint::constrain
virtual void constrain(fvMatrix< scalar > &eqn, const label fieldI)
Constrain energy equation to fix the temperature.
Definition: fixedTemperatureConstraint.C:112
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::fv::fixedTemperatureConstraint::tmUniform
@ tmUniform
Definition: fixedTemperatureConstraint.H:79
fv
labelList fv(nPoints)
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::fv::fixedTemperatureConstraint::temperatureModeNames_
static const NamedEnum< temperatureMode, 2 > temperatureModeNames_
String representation of temperatureMode enums.
Definition: fixedTemperatureConstraint.H:85
Foam::fv::fixedTemperatureConstraint
Fixed temperature equation constraint.
Definition: fixedTemperatureConstraint.H:69
Foam::fv::fixedTemperatureConstraint::TName_
word TName_
Temperature field name.
Definition: fixedTemperatureConstraint.H:99
Foam::fv::option::mesh
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvOptionI.H:34
Foam::fvMatrix
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvPatchField.H:68
Foam::fv::fixedTemperatureConstraint::Tuniform_
autoPtr< DataEntry< scalar > > Tuniform_
Uniform temperature [K].
Definition: fixedTemperatureConstraint.H:96
Foam::fv::fixedTemperatureConstraint::fixedTemperatureConstraint
fixedTemperatureConstraint(const fixedTemperatureConstraint &)
Disallow default bitwise copy construct.
Foam::fv::fixedTemperatureConstraint::temperatureMode
temperatureMode
Temperature mode.
Definition: fixedTemperatureConstraint.H:77
Foam::NamedEnum< temperatureMode, 2 >