initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / finiteVolume / fields / fvPatchFields / derived / totalTemperature / totalTemperatureFvPatchScalarField.H
blobbd834de3ee094dea9a038d14da1025c408e19099
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
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.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::totalTemperatureFvPatchScalarField
28 Description
29     Foam::totalTemperatureFvPatchScalarField
31 SourceFiles
32     totalTemperatureFvPatchScalarField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef totalTemperatureFvPatchScalarField_H
37 #define totalTemperatureFvPatchScalarField_H
39 #include "fixedValueFvPatchFields.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 /*---------------------------------------------------------------------------*\
47                            Class totalTemperatureFvPatch Declaration
48 \*---------------------------------------------------------------------------*/
50 class totalTemperatureFvPatchScalarField
52     public fixedValueFvPatchScalarField
54     // Private data
56         //- Name of the velocity field
57         word UName_;
59         //- Name of the flux transporting the field
60         word phiName_;
62         //- Name of the compressibility field used to calculate the wave speed
63         word psiName_;
65         //- Heat capacity ratio
66         scalar gamma_;
68         //- Total pressure
69         scalarField T0_;
72 public:
74     //- Runtime type information
75     TypeName("totalTemperature");
78     // Constructors
80         //- Construct from patch and internal field
81         totalTemperatureFvPatchScalarField
82         (
83             const fvPatch&,
84             const DimensionedField<scalar, volMesh>&
85         );
87         //- Construct from patch, internal field and dictionary
88         totalTemperatureFvPatchScalarField
89         (
90             const fvPatch&,
91             const DimensionedField<scalar, volMesh>&,
92             const dictionary&
93         );
95         //- Construct by mapping given totalTemperatureFvPatchScalarField 
96         //  onto a new patch
97         totalTemperatureFvPatchScalarField
98         (
99             const totalTemperatureFvPatchScalarField&,
100             const fvPatch&,
101             const DimensionedField<scalar, volMesh>&,
102             const fvPatchFieldMapper&
103         );
105         //- Construct as copy
106         totalTemperatureFvPatchScalarField
107         (
108             const totalTemperatureFvPatchScalarField&
109         );
111         //- Construct and return a clone
112         virtual tmp<fvPatchScalarField> clone() const
113         {
114             return tmp<fvPatchScalarField>
115             (
116                 new totalTemperatureFvPatchScalarField(*this)
117             );
118         }
120         //- Construct as copy setting internal field reference
121         totalTemperatureFvPatchScalarField
122         (
123             const totalTemperatureFvPatchScalarField&,
124             const DimensionedField<scalar, volMesh>&
125         );
127         //- Construct and return a clone setting internal field reference
128         virtual tmp<fvPatchScalarField> clone
129         (
130             const DimensionedField<scalar, volMesh>& iF
131         ) const
132         {
133             return tmp<fvPatchScalarField>
134             (
135                 new totalTemperatureFvPatchScalarField(*this, iF)
136             );
137         }
140     // Member functions
142         // Access
144             //- Return the total pressure
145             const scalarField& T0() const
146             {
147                 return T0_;
148             }
150             //- Return reference to the total pressure to allow adjustment
151             scalarField& T0()
152             {
153                 return T0_;
154             }
157         // Mapping functions
159             //- Map (and resize as needed) from self given a mapping object
160             virtual void autoMap
161             (
162                 const fvPatchFieldMapper&
163             );
165             //- Reverse map the given fvPatchField onto this fvPatchField
166             virtual void rmap
167             (
168                 const fvPatchScalarField&,
169                 const labelList&
170             );
173         // Evaluation functions
175             //- Update the coefficients associated with the patch field
176             virtual void updateCoeffs();
179         //- Write
180         virtual void write(Ostream&) const;
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 } // End namespace Foam
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 #endif
192 // ************************************************************************* //