00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. 00006 \\/ M anipulation | 00007 ------------------------------------------------------------------------------- 00008 License 00009 This file is part of OpenFOAM. 00010 00011 OpenFOAM is free software: you can redistribute it and/or modify it 00012 under the terms of the GNU General Public License as published by 00013 the Free Software Foundation, either version 3 of the License, or 00014 (at your option) any later version. 00015 00016 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00019 for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. 00023 00024 Class 00025 solidWallHeatFluxTemperatureFvPatchScalarField 00026 00027 Description 00028 Heat flux boundary condition for temperature on solid region 00029 00030 Example usage: 00031 myWallPatch 00032 { 00033 type solidWallHeatFluxTemperature; 00034 K Kcond; // Name of K field 00035 q uniform 1000; // Heat flux / [W/m2] 00036 value 300.0; // Initial temperature / [K] 00037 } 00038 00039 00040 SourceFiles 00041 solidWallHeatFluxTemperatureFvPatchScalarField.C 00042 00043 \*---------------------------------------------------------------------------*/ 00044 00045 #ifndef solidWallHeatFluxTemperatureFvPatchScalarField_H 00046 #define solidWallHeatFluxTemperatureFvPatchScalarField_H 00047 00048 #include <finiteVolume/fixedGradientFvPatchFields.H> 00049 00050 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00051 00052 namespace Foam 00053 { 00054 00055 /*---------------------------------------------------------------------------*\ 00056 Class solidWallHeatFluxTemperatureFvPatchScalarField Declaration 00057 \*---------------------------------------------------------------------------*/ 00058 00059 class solidWallHeatFluxTemperatureFvPatchScalarField 00060 : 00061 public fixedGradientFvPatchScalarField 00062 { 00063 // Private data 00064 00065 //- Heat flux / [W/m2] 00066 scalarField q_; 00067 00068 //- Name of thermal conductivity field 00069 word KName_; 00070 00071 00072 public: 00073 00074 //- Runtime type information 00075 TypeName("solidWallHeatFluxTemperature"); 00076 00077 00078 // Constructors 00079 00080 //- Construct from patch and internal field 00081 solidWallHeatFluxTemperatureFvPatchScalarField 00082 ( 00083 const fvPatch&, 00084 const DimensionedField<scalar, volMesh>& 00085 ); 00086 00087 //- Construct from patch, internal field and dictionary 00088 solidWallHeatFluxTemperatureFvPatchScalarField 00089 ( 00090 const fvPatch&, 00091 const DimensionedField<scalar, volMesh>&, 00092 const dictionary& 00093 ); 00094 00095 //- Construct by mapping given 00096 // solidWallHeatFluxTemperatureFvPatchScalarField 00097 // onto a new patch 00098 solidWallHeatFluxTemperatureFvPatchScalarField 00099 ( 00100 const solidWallHeatFluxTemperatureFvPatchScalarField&, 00101 const fvPatch&, 00102 const DimensionedField<scalar, volMesh>&, 00103 const fvPatchFieldMapper& 00104 ); 00105 00106 //- Construct as copy 00107 solidWallHeatFluxTemperatureFvPatchScalarField 00108 ( 00109 const solidWallHeatFluxTemperatureFvPatchScalarField& 00110 ); 00111 00112 //- Construct and return a clone 00113 virtual tmp<fvPatchScalarField> clone() const 00114 { 00115 return tmp<fvPatchScalarField> 00116 ( 00117 new solidWallHeatFluxTemperatureFvPatchScalarField(*this) 00118 ); 00119 } 00120 00121 //- Construct as copy setting internal field reference 00122 solidWallHeatFluxTemperatureFvPatchScalarField 00123 ( 00124 const solidWallHeatFluxTemperatureFvPatchScalarField&, 00125 const DimensionedField<scalar, volMesh>& 00126 ); 00127 00128 //- Construct and return a clone setting internal field reference 00129 virtual tmp<fvPatchScalarField> clone 00130 ( 00131 const DimensionedField<scalar, volMesh>& iF 00132 ) const 00133 { 00134 return tmp<fvPatchScalarField> 00135 ( 00136 new solidWallHeatFluxTemperatureFvPatchScalarField(*this, iF) 00137 ); 00138 } 00139 00140 00141 // Member functions 00142 00143 // Evaluation functions 00144 00145 //- Update the coefficients associated with the patch field 00146 virtual void updateCoeffs(); 00147 00148 00149 // Mapping functions 00150 00151 //- Map (and resize as needed) from self given a mapping object 00152 virtual void autoMap 00153 ( 00154 const fvPatchFieldMapper& 00155 ); 00156 00157 //- Reverse map the given fvPatchField onto this fvPatchField 00158 virtual void rmap 00159 ( 00160 const fvPatchScalarField&, 00161 const labelList& 00162 ); 00163 00164 00165 // I-O 00166 00167 //- Write 00168 void write(Ostream&) const; 00169 }; 00170 00171 00172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00173 00174 } // End namespace Foam 00175 00176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00177 00178 #endif 00179 00180 // ************************ vim: set sw=4 sts=4 et: ************************ //