Updates to compressible turbulent heat flux boundary condition
[OpenFOAM-1.6.x.git] / src / turbulenceModels / compressible / RAS / derivedFvPatchFields / turbulentHeatFluxTemperature / turbulentHeatFluxTemperatureFvPatchScalarField.H
blob2ad3c4eeeee6c649e73eff5ae3e3f31e2f814599
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 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::turbulentHeatFluxTemperatureFvPatchScalarField
28 Description
29     Fixed heat flux boundary condition for temperature.
31 SourceFiles
32     turbulentHeatFluxTemperatureFvPatchScalarField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef turbulentHeatFluxTemperatureFvPatchScalarFields_H
37 #define turbulentHeatFluxTemperatureFvPatchScalarFields_H
39 #include "fvPatchFields.H"
40 #include "fixedGradientFvPatchFields.H"
41 #include "NamedEnum.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
47 namespace compressible
50 /*---------------------------------------------------------------------------*\
51      Class turbulentHeatFluxTemperatureFvPatchScalarField Declaration
52 \*---------------------------------------------------------------------------*/
54 class turbulentHeatFluxTemperatureFvPatchScalarField
56     public fixedGradientFvPatchScalarField
58 public:
60     // Data types
62         //- Enumeration listing the possible hest source input modes
63         enum heatSourceType
64         {
65             hsPower,
66             hsFlux
67         };
70 private:
72     // Private data
74         //- Heat source type names
75         static const NamedEnum<heatSourceType, 2> heatSourceTypeNames_;
77         //- Heat source type
78         heatSourceType heatSource_;
80         //- Heat power [W] or flux [W/m2]
81         scalarField q_;
85 public:
87     //- Runtime type information
88     TypeName("compressible::turbulentHeatFluxTemperature");
91     // Constructors
93         //- Construct from patch and internal field
94         turbulentHeatFluxTemperatureFvPatchScalarField
95         (
96             const fvPatch&,
97             const DimensionedField<scalar, volMesh>&
98         );
100         //- Construct from patch, internal field and dictionary
101         turbulentHeatFluxTemperatureFvPatchScalarField
102         (
103             const fvPatch&,
104             const DimensionedField<scalar, volMesh>&,
105             const dictionary&
106         );
108         //- Construct by mapping given
109         //  turbulentHeatFluxTemperatureFvPatchScalarField onto
110         //  a new patch
111         turbulentHeatFluxTemperatureFvPatchScalarField
112         (
113             const turbulentHeatFluxTemperatureFvPatchScalarField&,
114             const fvPatch&,
115             const DimensionedField<scalar, volMesh>&,
116             const fvPatchFieldMapper&
117         );
119         //- Construct as copy
120         turbulentHeatFluxTemperatureFvPatchScalarField
121         (
122             const turbulentHeatFluxTemperatureFvPatchScalarField&
123         );
125         //- Construct and return a clone
126         virtual tmp<fvPatchScalarField> clone() const
127         {
128             return tmp<fvPatchScalarField>
129             (
130                 new turbulentHeatFluxTemperatureFvPatchScalarField(*this)
131             );
132         }
134         //- Construct as copy setting internal field reference
135         turbulentHeatFluxTemperatureFvPatchScalarField
136         (
137             const turbulentHeatFluxTemperatureFvPatchScalarField&,
138             const DimensionedField<scalar, volMesh>&
139         );
141         //- Construct and return a clone setting internal field reference
142         virtual tmp<fvPatchScalarField> clone
143         (
144             const DimensionedField<scalar, volMesh>& iF
145         ) const
146         {
147             return tmp<fvPatchScalarField>
148             (
149                 new turbulentHeatFluxTemperatureFvPatchScalarField
150                 (
151                     *this,
152                     iF
153                 )
154             );
155         }
158     // Member functions
160         // Mapping functions
162             //- Map (and resize as needed) from self given a mapping object
163             virtual void autoMap(const fvPatchFieldMapper&);
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         // I-O
181             //- Write
182             virtual void write(Ostream&) const;
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 } // End namespace compressible
189 } // End namespace Foam
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 #endif
195 // ************************************************************************* //