1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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
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/>.
25 Foam::turbulentHeatFluxTemperatureFvPatchScalarField
28 Fixed heat boundary condition to specify temperature gradient. Input
29 heat source either specified in terms of an absolute power [W], or as a
36 type compressible::turbulentHeatFluxTemperature;
37 heatSource flux; // power [W]; flux [W/m2]
38 q uniform 10; // heat power or flux
39 K basicThermo; // calculate K by alphaEff*thermo.Cp
40 value uniform 300; // initial temperature value
45 turbulentHeatFluxTemperatureFvPatchScalarField.C
47 \*---------------------------------------------------------------------------*/
49 #ifndef turbulentHeatFluxTemperatureFvPatchScalarFields_H
50 #define turbulentHeatFluxTemperatureFvPatchScalarFields_H
52 #include "fixedGradientFvPatchFields.H"
53 #include "temperatureCoupledBase.H"
55 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 namespace compressible
62 /*---------------------------------------------------------------------------*\
63 Class turbulentHeatFluxTemperatureFvPatchScalarField Declaration
64 \*---------------------------------------------------------------------------*/
66 class turbulentHeatFluxTemperatureFvPatchScalarField
68 public fixedGradientFvPatchScalarField,
69 public temperatureCoupledBase
75 //- Enumeration listing the possible hest source input modes
87 //- Heat source type names
88 static const NamedEnum<heatSourceType, 2> heatSourceTypeNames_;
91 heatSourceType heatSource_;
93 //- Heat power [W] or flux [W/m2]
99 //- Runtime type information
100 TypeName("compressible::turbulentHeatFluxTemperature");
105 //- Construct from patch and internal field
106 turbulentHeatFluxTemperatureFvPatchScalarField
109 const DimensionedField<scalar, volMesh>&
112 //- Construct from patch, internal field and dictionary
113 turbulentHeatFluxTemperatureFvPatchScalarField
116 const DimensionedField<scalar, volMesh>&,
120 //- Construct by mapping given
121 // turbulentHeatFluxTemperatureFvPatchScalarField onto
123 turbulentHeatFluxTemperatureFvPatchScalarField
125 const turbulentHeatFluxTemperatureFvPatchScalarField&,
127 const DimensionedField<scalar, volMesh>&,
128 const fvPatchFieldMapper&
131 //- Construct as copy
132 turbulentHeatFluxTemperatureFvPatchScalarField
134 const turbulentHeatFluxTemperatureFvPatchScalarField&
137 //- Construct and return a clone
138 virtual tmp<fvPatchScalarField> clone() const
140 return tmp<fvPatchScalarField>
142 new turbulentHeatFluxTemperatureFvPatchScalarField(*this)
146 //- Construct as copy setting internal field reference
147 turbulentHeatFluxTemperatureFvPatchScalarField
149 const turbulentHeatFluxTemperatureFvPatchScalarField&,
150 const DimensionedField<scalar, volMesh>&
153 //- Construct and return a clone setting internal field reference
154 virtual tmp<fvPatchScalarField> clone
156 const DimensionedField<scalar, volMesh>& iF
159 return tmp<fvPatchScalarField>
161 new turbulentHeatFluxTemperatureFvPatchScalarField
174 //- Map (and resize as needed) from self given a mapping object
175 virtual void autoMap(const fvPatchFieldMapper&);
177 //- Reverse map the given fvPatchField onto this fvPatchField
180 const fvPatchScalarField&,
185 // Evaluation functions
187 //- Update the coefficients associated with the patch field
188 virtual void updateCoeffs();
194 virtual void write(Ostream&) const;
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
200 } // End namespace compressible
201 } // End namespace Foam
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207 // ************************************************************************* //