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