totalTemperatureFvPatchScalarField.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) 2011-2023 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::totalTemperatureFvPatchScalarField
26 
27 Description
28  This boundary condition provides a total temperature condition.
29 
30 Usage
31  \table
32  Property | Description | Required | Default value
33  U | Velocity field name | no | U
34  phi | Flux field name | no | phi
35  psi | Compressibility field name | no | psi
36  gamma | ratio of specific heats (Cp/Cv) | yes |
37  T0 | reference temperature | yes |
38  \endtable
39 
40  Example of the boundary condition specification:
41  \verbatim
42  <patchName>
43  {
44  type totalTemperature;
45  T0 uniform 300;
46  }
47  \endverbatim
48 
49 SourceFiles
50  totalTemperatureFvPatchScalarField.C
51 
52 See also
53  Foam::fixedValueFvPatchField
54 
55 \*---------------------------------------------------------------------------*/
56 
57 #ifndef totalTemperatureFvPatchScalarField_H
58 #define totalTemperatureFvPatchScalarField_H
59 
61 
62 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 
64 namespace Foam
65 {
66 
67 /*---------------------------------------------------------------------------*\
68  Class totalTemperatureFvPatchScalarField Declaration
69 \*---------------------------------------------------------------------------*/
70 
71 class totalTemperatureFvPatchScalarField
72 :
73  public fixedValueFvPatchScalarField
74 {
75  // Private Data
76 
77  //- Name of the velocity field
78  word UName_;
79 
80  //- Name of the flux transporting the field
81  word phiName_;
82 
83  //- Name of the compressibility field used to calculate the wave speed
84  word psiName_;
85 
86  //- Heat capacity ratio
87  scalar gamma_;
88 
89  //- Reference temperature
90  scalarField T0_;
91 
92 
93 public:
94 
95  //- Runtime type information
96  TypeName("totalTemperature");
97 
98 
99  // Constructors
100 
101  //- Construct from patch, internal field and dictionary
103  (
104  const fvPatch&,
106  const dictionary&
107  );
108 
109  //- Construct by mapping given totalTemperatureFvPatchScalarField
110  // onto a new patch
112  (
114  const fvPatch&,
116  const fvPatchFieldMapper&
117  );
118 
119  //- Disallow copy without setting internal field reference
121  (
123  ) = delete;
124 
125  //- Copy constructor setting internal field reference
127  (
130  );
131 
132  //- Construct and return a clone setting internal field reference
134  (
136  ) const
137  {
139  (
141  );
142  }
143 
144 
145  // Member Functions
146 
147  // Access
148 
149  //- Return the reference temperature
150  const scalarField& T0() const
151  {
152  return T0_;
153  }
154 
155  //- Return reference to the temperature to allow adjustment
156  scalarField& T0()
157  {
158  return T0_;
159  }
160 
161 
162  // Mapping functions
163 
164  //- Map the given fvPatchField onto this fvPatchField
165  virtual void map
166  (
167  const fvPatchScalarField&,
168  const fvPatchFieldMapper&
169  );
170 
171  //- Reset the fvPatchField to the given fvPatchField
172  // Used for mesh to mesh mapping
173  virtual void reset(const fvPatchScalarField&);
174 
175 
176  // Evaluation functions
177 
178  //- Update the coefficients associated with the patch field
179  virtual void updateCoeffs();
180 
181 
182  //- Write
183  virtual void write(Ostream&) const;
184 };
185 
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 } // End namespace Foam
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 #endif
194 
195 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Foam::fvPatchFieldMapper.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:87
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:64
A class for managing temporary objects.
Definition: tmp.H:55
This boundary condition provides a total temperature condition.
const scalarField & T0() const
Return the reference temperature.
virtual void reset(const fvPatchScalarField &)
Reset the fvPatchField to the given fvPatchField.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
TypeName("totalTemperature")
Runtime type information.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void map(const fvPatchScalarField &, const fvPatchFieldMapper &)
Map the given fvPatchField onto this fvPatchField.
totalTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
Namespace for OpenFOAM.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.