1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011-2011 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 externalWallHeatFluxTemperatureFvPatchScalarField
28 Heat flux boundary condition for temperature on external wall.
30 If h and Ta are specified then fixed_heat_transfer_coefficient mode is used
31 If q is specified then fixed_heat_flux is used.
36 type externalWallHeatFluxTemperature;
37 K solidThermo; // solidThermo or lookup
38 q uniform 1000; // Heat flux / [W/m2]
39 Ta uniform 300.0; // Tambient temperature /[K]
40 h uniform 10.0; // Heat transfer coeff /[W/Km2]
41 value uniform 300.0; // Initial temperature / [K]
46 Only the pair h, Ta or q can be specified in the dictionary.
50 externalWallHeatFluxTemperatureFvPatchScalarField.C
52 \*---------------------------------------------------------------------------*/
54 #ifndef solidWallHeatFluxTemperatureFvPatchScalarField_H
55 #define solidWallHeatFluxTemperatureFvPatchScalarField_H
57 #include "mixedFvPatchFields.H"
58 #include "temperatureCoupledBase.H"
60 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 /*---------------------------------------------------------------------------*\
66 Class externalWallHeatFluxTemperatureFvPatchScalarField Declaration
67 \*---------------------------------------------------------------------------*/
69 class externalWallHeatFluxTemperatureFvPatchScalarField
71 public mixedFvPatchScalarField,
72 public temperatureCoupledBase
78 //- Operation mode enumeration
82 fixedHeatTransferCoeff,
85 static const NamedEnum<operationMode, 3> operationModeNames;
93 operationMode oldMode_;
95 //- Heat flux / [W/m2]
98 //- Heat transfer coefficient / [W/m2K]
101 //- Ambient temperature / [K]
107 //- Runtime type information
108 TypeName("externalWallHeatFluxTemperature");
113 //- Construct from patch and internal field
114 externalWallHeatFluxTemperatureFvPatchScalarField
117 const DimensionedField<scalar, volMesh>&
120 //- Construct from patch, internal field and dictionary
121 externalWallHeatFluxTemperatureFvPatchScalarField
124 const DimensionedField<scalar, volMesh>&,
128 //- Construct by mapping given
129 // externalWallHeatFluxTemperatureFvPatchScalarField
131 externalWallHeatFluxTemperatureFvPatchScalarField
133 const externalWallHeatFluxTemperatureFvPatchScalarField&,
135 const DimensionedField<scalar, volMesh>&,
136 const fvPatchFieldMapper&
139 //- Construct as copy
140 externalWallHeatFluxTemperatureFvPatchScalarField
142 const externalWallHeatFluxTemperatureFvPatchScalarField&
145 //- Construct and return a clone
146 virtual tmp<fvPatchScalarField> clone() const
148 return tmp<fvPatchScalarField>
150 new externalWallHeatFluxTemperatureFvPatchScalarField(*this)
154 //- Construct as copy setting internal field reference
155 externalWallHeatFluxTemperatureFvPatchScalarField
157 const externalWallHeatFluxTemperatureFvPatchScalarField&,
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 externalWallHeatFluxTemperatureFvPatchScalarField(*this, iF)
176 // Evaluation functions
178 //- Update the coefficients associated with the patch field
179 virtual void updateCoeffs();
184 void write(Ostream&) const;
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 } // End namespace Foam
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196 // ************************************************************************* //