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