Loading...
Searching...
No Matches
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
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
106
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 );
131
132 //- Construct as copy
134 (
136 );
137
138 //- Construct as copy setting internal field reference
140 (
143 );
144
145 //- Return a clone
146 virtual tmp<fvPatchField<scalar>> clone() const
147 {
148 return fvPatchField<scalar>::Clone(*this);
149 }
150
151 //- Clone with an internal field reference
153 (
155 ) const
156 {
157 return fvPatchField<scalar>::Clone(*this, iF);
158 }
159
160
161 // Member functions
162
163 // Access
164
165 //- Return the total pressure
166 const scalarField& T0() const
167 {
168 return T0_;
169 }
170
171 //- Return reference to the total pressure to allow adjustment
172 scalarField& T0()
173 {
174 return T0_;
175 }
176
177
178 // Mapping functions
179
180 //- Map (and resize as needed) from self given a mapping object
181 virtual void autoMap
182 (
183 const fvPatchFieldMapper&
184 );
185
186 //- Reverse map the given fvPatchField onto this fvPatchField
187 virtual void rmap
188 (
189 const fvPatchScalarField&,
190 const labelList&
191 );
192
193
194 // Evaluation functions
195
196 //- Update the coefficients associated with the patch field
197 virtual void updateCoeffs();
198
199
200 //- Write
201 virtual void write(Ostream&) const;
202};
203
205// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206
207} // End namespace Foam
208
209// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210
211#endif
212
213// ************************************************************************* //
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:59
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A FieldMapper for finite-volume patch fields.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
A class for managing temporary objects.
Definition tmp.H:75
This boundary condition provides a total temperature condition.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
totalTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual tmp< fvPatchField< scalar > > clone(const DimensionedField< scalar, volMesh > &iF) const
Clone with an internal field reference.
virtual tmp< fvPatchField< scalar > > clone() const
Return a clone.
TypeName("totalTemperature")
Runtime type information.
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:66
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
fvPatchField< scalar > fvPatchScalarField
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68