1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 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 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
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
26 solidWallHeatFluxTemperatureFvPatchScalarField
29 Heat flux boundary condition for temperature on solid region
34 type solidWallHeatFluxTemperature;
35 K K; // Name of K field
36 q uniform 1000; // Heat flux / [W/m2]
37 value 300.0; // Initial temperature / [K]
42 solidWallHeatFluxTemperatureFvPatchScalarField.C
44 \*---------------------------------------------------------------------------*/
46 #ifndef solidWallHeatFluxTemperatureFvPatchScalarField_H
47 #define solidWallHeatFluxTemperatureFvPatchScalarField_H
49 #include "fixedValueFvPatchFields.H"
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 /*---------------------------------------------------------------------------*\
57 Class solidWallHeatFluxTemperatureFvPatchScalarField Declaration
58 \*---------------------------------------------------------------------------*/
60 class solidWallHeatFluxTemperatureFvPatchScalarField
62 public fixedValueFvPatchScalarField
66 //- Heat flux / [W/m2]
69 //- Name of thermal conductivity field
75 //- Runtime type information
76 TypeName("solidWallHeatFluxTemperature");
81 //- Construct from patch and internal field
82 solidWallHeatFluxTemperatureFvPatchScalarField
85 const DimensionedField<scalar, volMesh>&
88 //- Construct from patch, internal field and dictionary
89 solidWallHeatFluxTemperatureFvPatchScalarField
92 const DimensionedField<scalar, volMesh>&,
96 //- Construct by mapping given
97 // solidWallHeatFluxTemperatureFvPatchScalarField
99 solidWallHeatFluxTemperatureFvPatchScalarField
101 const solidWallHeatFluxTemperatureFvPatchScalarField&,
103 const DimensionedField<scalar, volMesh>&,
104 const fvPatchFieldMapper&
107 //- Construct as copy
108 solidWallHeatFluxTemperatureFvPatchScalarField
110 const solidWallHeatFluxTemperatureFvPatchScalarField&
113 //- Construct and return a clone
114 virtual tmp<fvPatchScalarField> clone() const
116 return tmp<fvPatchScalarField>
118 new solidWallHeatFluxTemperatureFvPatchScalarField(*this)
122 //- Construct as copy setting internal field reference
123 solidWallHeatFluxTemperatureFvPatchScalarField
125 const solidWallHeatFluxTemperatureFvPatchScalarField&,
126 const DimensionedField<scalar, volMesh>&
129 //- Construct and return a clone setting internal field reference
130 virtual tmp<fvPatchScalarField> clone
132 const DimensionedField<scalar, volMesh>& iF
135 return tmp<fvPatchScalarField>
137 new solidWallHeatFluxTemperatureFvPatchScalarField(*this, iF)
144 // Evaluation functions
146 //- Update the coefficients associated with the patch field
147 virtual void updateCoeffs();
152 //- Map (and resize as needed) from self given a mapping object
155 const fvPatchFieldMapper&
158 //- Reverse map the given fvPatchField onto this fvPatchField
161 const fvPatchScalarField&,
169 void write(Ostream&) const;
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 } // End namespace Foam
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 // ************************************************************************* //