inletOutletTotalTemperatureFvPatchScalarField.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::inletOutletTotalTemperatureFvPatchScalarField
28
29Group
30 grpOutletBoundaryConditions
31
32Description
33 This boundary condition provides an outflow condition for total
34 temperature for use with supersonic cases, where a user-specified
35 value is applied in the case of reverse flow.
36
37Usage
38 \table
39 Property | Description | Required | Default value
40 U | velocity field name | no | U
41 phi | flux field name | no | phi
42 psi | compressibility field name | no | thermo:psi
43 gamma | heat capacity ration (Cp/Cv) | yes |
44 inletValue | reverse flow (inlet) value | yes |
45 T0 | static temperature [K] | yes |
46 \endtable
47
48 Example of the boundary condition specification:
49 \verbatim
50 <patchName>
51 {
52 type inletOutletTotalTemperature;
53 U U;
54 phi phi;
55 psi psi;
56 gamma gamma;
57 inletValue uniform 0;
58 T0 uniform 0;
59 value uniform 0;
60 }
61 \endverbatim
62
63See also
64 Foam::inletOutletFvPatchField
65
66SourceFiles
67 inletOutletTotalTemperatureFvPatchScalarField.C
68
69\*---------------------------------------------------------------------------*/
70
71#ifndef inletOutletTotalTemperatureFvPatchScalarField_H
72#define inletOutletTotalTemperatureFvPatchScalarField_H
73
75
76// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77
78namespace Foam
79{
80
81/*---------------------------------------------------------------------------*\
82 Class inletOutletTotalTemperatureFvPatchScalarField Declaration
83\*---------------------------------------------------------------------------*/
84
85class inletOutletTotalTemperatureFvPatchScalarField
86:
87 public inletOutletFvPatchScalarField
88{
89 // Private data
90
91 //- Name of the velocity field
92 word UName_;
93
94 //- Name of the compressibility field used to calculate the wave speed
95 word psiName_;
96
97 //- Heat capacity ratio
98 scalar gamma_;
99
100 //- Total pressure
101 scalarField T0_;
102
103
104public:
105
106 //- Runtime type information
107 TypeName("inletOutletTotalTemperature");
108
109
110 // Constructors
111
112 //- Construct from patch and internal field
114 (
115 const fvPatch&,
116 const DimensionedField<scalar, volMesh>&
117 );
118
119 //- Construct from patch, internal field and dictionary
121 (
122 const fvPatch&,
124 const dictionary&
125 );
126
127 //- Construct by mapping given
128 // inletOutletTotalTemperatureFvPatchScalarField onto a new patch
130 (
132 const fvPatch&,
134 const fvPatchFieldMapper&
135 );
136
137 //- Construct as copy
139 (
141 );
142
143 //- Construct and return a clone
144 virtual tmp<fvPatchScalarField> clone() const
145 {
147 (
149 );
150 }
151
152 //- Construct as copy setting internal field reference
154 (
157 );
158
159 //- Construct and return a clone setting internal field reference
161 (
163 ) const
164 {
166 (
168 );
169 }
170
171
172 // Member functions
173
174 // Access
175
176 //- Return the total pressure
177 const scalarField& T0() const
179 return T0_;
180 }
181
182 //- Return reference to the total pressure to allow adjustment
183 scalarField& T0()
184 {
185 return T0_;
186 }
187
188
189 // Mapping functions
190
191 //- Map (and resize as needed) from self given a mapping object
192 virtual void autoMap
193 (
195 );
196
197 //- Reverse map the given fvPatchField onto this fvPatchField
198 virtual void rmap
199 (
200 const fvPatchScalarField&,
201 const labelList&
202 );
203
204
205 // Evaluation functions
206
207 //- Update the coefficients associated with the patch field
208 virtual void updateCoeffs();
209
210
211 //- Write
212 virtual void write(Ostream&) const;
213};
214
215
216// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218} // End namespace Foam
219
220// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
221
222#endif
223
224// ************************************************************************* //
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
This boundary condition provides an outflow condition for total temperature for use with supersonic c...
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.
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.
TypeName("inletOutletTotalTemperature")
Runtime type information.
inletOutletTotalTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A class for managing temporary objects.
Definition: tmp.H:65
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