totalTemperatureFvPatchScalarField.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) 2011-2016 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::totalTemperatureFvPatchScalarField
28
29Group
30 grpInletBoundaryConditions grpOutletBoundaryConditions
31
32Description
33 This boundary condition provides a total temperature condition.
34
35Usage
36 \table
37 Property | Description | Required | Default value
38 U | Velocity field name | no | U
39 phi | Flux field name | no | phi
40 psi | Compressibility field name | no | thermo:psi
41 gamma | ratio of specific heats (Cp/Cv) | yes |
42 T0 | total temperature | yes |
43 \endtable
44
45 Example of the boundary condition specification:
46 \verbatim
47 <patchName>
48 {
49 type totalTemperature;
50 gamma 1.4;
51 T0 uniform 800;
52 }
53 \endverbatim
54
55SourceFiles
56 totalTemperatureFvPatchScalarField.C
57
58See also
59 Foam::fixedValueFvPatchField
60
61\*---------------------------------------------------------------------------*/
62
63#ifndef totalTemperatureFvPatchScalarField_H
64#define totalTemperatureFvPatchScalarField_H
65
67
68// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69
70namespace Foam
71{
72
73/*---------------------------------------------------------------------------*\
74 Class totalTemperatureFvPatchScalarField Declaration
75\*---------------------------------------------------------------------------*/
76
77class totalTemperatureFvPatchScalarField
78:
79 public fixedValueFvPatchScalarField
80{
81 // Private data
82
83 //- Name of the velocity field
84 word UName_;
85
86 //- Name of the flux transporting the field
87 word phiName_;
88
89 //- Name of the compressibility field used to calculate the wave speed
90 word psiName_;
91
92 //- Heat capacity ratio
93 scalar gamma_;
94
95 //- Total temperature
96 scalarField T0_;
97
98
99public:
100
101 //- Runtime type information
102 TypeName("totalTemperature");
103
104
105 // Constructors
107 //- Construct from patch and internal field
109 (
110 const fvPatch&,
112 );
113
114 //- Construct from patch, internal field and dictionary
116 (
117 const fvPatch&,
119 const dictionary&
120 );
121
122 //- Construct by mapping given totalTemperatureFvPatchScalarField
123 // onto a new patch
125 (
127 const fvPatch&,
129 const fvPatchFieldMapper&
130 );
132 //- Construct as copy
134 (
136 );
137
138 //- Construct and return a clone
139 virtual tmp<fvPatchScalarField> clone() const
140 {
142 (
144 );
145 }
146
147 //- Construct as copy setting internal field reference
149 (
152 );
153
154 //- Construct and return a clone setting internal field reference
156 (
158 ) const
159 {
161 (
163 );
164 }
165
166
167 // Member functions
169 // Access
170
171 //- Return the total pressure
172 const scalarField& T0() const
173 {
174 return T0_;
175 }
176
177 //- Return reference to the total pressure to allow adjustment
178 scalarField& T0()
179 {
180 return T0_;
181 }
182
183
184 // Mapping functions
185
186 //- Map (and resize as needed) from self given a mapping object
187 virtual void autoMap
188 (
189 const fvPatchFieldMapper&
190 );
191
192 //- Reverse map the given fvPatchField onto this fvPatchField
193 virtual void rmap
194 (
195 const fvPatchScalarField&,
196 const labelList&
197 );
198
199
200 // Evaluation functions
202 //- Update the coefficients associated with the patch field
203 virtual void updateCoeffs();
204
205
206 //- Write
207 virtual void write(Ostream&) const;
208};
209
210
211// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212
213} // End namespace Foam
214
215// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
216
217#endif
218
219// ************************************************************************* //
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:62
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
A class for managing temporary objects.
Definition: tmp.H:65
This boundary condition provides a total temperature condition.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
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 tmp< fvPatchScalarField > clone() const
Construct and return a clone.
scalarField & T0()
Return reference to the total pressure to allow adjustment.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
const scalarField & T0() const
Return the total pressure.
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73