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 turbulentHeatFluxTemperature;
37 heatSource flux; // power [W]; flux [W/m2]
38 q uniform 10; // heat power or flux
39 alphaEff alphaEff; // alphaEff field name;
40 // alphaEff in [kg/m/s]
41 Cp Cp; // Cp field name; Cp in [J/kg/K]
42 value uniform 300; // initial temperature value
46 turbulentHeatFluxTemperatureFvPatchScalarField.C
48 \*---------------------------------------------------------------------------*/
50 #ifndef turbulentHeatFluxTemperatureFvPatchScalarFields_H
51 #define turbulentHeatFluxTemperatureFvPatchScalarFields_H
53 #include "fvPatchFields.H"
54 #include "fixedGradientFvPatchFields.H"
55 #include "NamedEnum.H"
57 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 namespace incompressible
64 /*---------------------------------------------------------------------------*\
65 Class turbulentHeatFluxTemperatureFvPatchScalarField Declaration
66 \*---------------------------------------------------------------------------*/
68 class turbulentHeatFluxTemperatureFvPatchScalarField
70 public fixedGradientFvPatchScalarField
76 //- Enumeration listing the possible hest source input modes
88 //- Heat source type names
89 static const NamedEnum<heatSourceType, 2> heatSourceTypeNames_;
92 heatSourceType heatSource_;
94 //- Heat power [W] or flux [W/m2]
95 // NOTE: to be divided by density, rho, if used in kinematic form
98 //- Name of effective thermal diffusivity field
101 //- Name of specific heat capacity field
107 //- Runtime type information
108 TypeName("turbulentHeatFluxTemperature");
113 //- Construct from patch and internal field
114 turbulentHeatFluxTemperatureFvPatchScalarField
117 const DimensionedField<scalar, volMesh>&
120 //- Construct from patch, internal field and dictionary
121 turbulentHeatFluxTemperatureFvPatchScalarField
124 const DimensionedField<scalar, volMesh>&,
128 //- Construct by mapping given
129 // turbulentHeatFluxTemperatureFvPatchScalarField onto
131 turbulentHeatFluxTemperatureFvPatchScalarField
133 const turbulentHeatFluxTemperatureFvPatchScalarField&,
135 const DimensionedField<scalar, volMesh>&,
136 const fvPatchFieldMapper&
139 //- Construct as copy
140 turbulentHeatFluxTemperatureFvPatchScalarField
142 const turbulentHeatFluxTemperatureFvPatchScalarField&
145 //- Construct and return a clone
146 virtual tmp<fvPatchScalarField> clone() const
148 return tmp<fvPatchScalarField>
150 new turbulentHeatFluxTemperatureFvPatchScalarField(*this)
154 //- Construct as copy setting internal field reference
155 turbulentHeatFluxTemperatureFvPatchScalarField
157 const turbulentHeatFluxTemperatureFvPatchScalarField&,
158 const DimensionedField<scalar, volMesh>&
161 //- Construct and return a clone setting internal field reference
162 virtual tmp<fvPatchScalarField> clone
164 const DimensionedField<scalar, volMesh>& iF
167 return tmp<fvPatchScalarField>
169 new turbulentHeatFluxTemperatureFvPatchScalarField
182 //- Map (and resize as needed) from self given a mapping object
183 virtual void autoMap(const fvPatchFieldMapper&);
185 //- Reverse map the given fvPatchField onto this fvPatchField
188 const fvPatchScalarField&,
193 // Evaluation functions
195 //- Update the coefficients associated with the patch field
196 virtual void updateCoeffs();
202 virtual void write(Ostream&) const;
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208 } // End namespace incompressible
209 } // End namespace Foam
211 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215 // ************************************************************************* //