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 Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField 00026 00027 Description 00028 Mixed boundary condition for temperature, to be used for heat-transfer 00029 on back-to-back baffles. 00030 00031 Specifies gradient and temperature such that the equations are the same 00032 on both sides: 00033 - refGradient = zero gradient 00034 - refValue = neighbour value 00035 - mixFraction = nbrKDelta / (nbrKDelta + myKDelta()) 00036 00037 where KDelta is heat-transfer coefficient K * deltaCoeffs 00038 00039 00040 Example usage: 00041 myInterfacePatchName 00042 { 00043 type compressible::turbulentTemperatureCoupledBaffleMixed; 00044 neighbourFieldName T; 00045 K K; // or none 00046 value uniform 300; 00047 } 00048 00049 Needs to be on underlying directMapped(Wall)FvPatch. 00050 00051 Note: if K is "none" looks up RASModel and basicThermo, otherwise expects 00052 the solver to calculate a 'K' field. 00053 00054 Note: runs in parallel with arbitrary decomposition. Uses directMapped 00055 functionality to calculate exchange. 00056 00057 SourceFiles 00058 turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C 00059 00060 \*---------------------------------------------------------------------------*/ 00061 00062 #ifndef turbulentTemperatureCoupledBaffleMixedFvPatchScalarField_H 00063 #define turbulentTemperatureCoupledBaffleMixedFvPatchScalarField_H 00064 00065 #include <finiteVolume/mixedFvPatchFields.H> 00066 00067 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00068 00069 namespace Foam 00070 { 00071 namespace compressible 00072 { 00073 00074 /*---------------------------------------------------------------------------*\ 00075 Class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField Declaration 00076 \*---------------------------------------------------------------------------*/ 00077 00078 class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField 00079 : 00080 public mixedFvPatchScalarField 00081 { 00082 // Private data 00083 00084 //- Name of field on the neighbour region 00085 const word neighbourFieldName_; 00086 00087 //- Name of thermal conductivity field 00088 const word KName_; 00089 00090 00091 public: 00092 00093 //- Runtime type information 00094 TypeName("compressible::turbulentTemperatureCoupledBaffleMixed"); 00095 00096 00097 // Constructors 00098 00099 //- Construct from patch and internal field 00100 turbulentTemperatureCoupledBaffleMixedFvPatchScalarField 00101 ( 00102 const fvPatch&, 00103 const DimensionedField<scalar, volMesh>& 00104 ); 00105 00106 //- Construct from patch, internal field and dictionary 00107 turbulentTemperatureCoupledBaffleMixedFvPatchScalarField 00108 ( 00109 const fvPatch&, 00110 const DimensionedField<scalar, volMesh>&, 00111 const dictionary& 00112 ); 00113 00114 //- Construct by mapping given 00115 // turbulentTemperatureCoupledBaffleMixedFvPatchScalarField onto a 00116 // new patch 00117 turbulentTemperatureCoupledBaffleMixedFvPatchScalarField 00118 ( 00119 const turbulentTemperatureCoupledBaffleMixedFvPatchScalarField&, 00120 const fvPatch&, 00121 const DimensionedField<scalar, volMesh>&, 00122 const fvPatchFieldMapper& 00123 ); 00124 00125 //- Construct and return a clone 00126 virtual tmp<fvPatchScalarField> clone() const 00127 { 00128 return tmp<fvPatchScalarField> 00129 ( 00130 new turbulentTemperatureCoupledBaffleMixedFvPatchScalarField 00131 ( 00132 *this 00133 ) 00134 ); 00135 } 00136 00137 //- Construct as copy setting internal field reference 00138 turbulentTemperatureCoupledBaffleMixedFvPatchScalarField 00139 ( 00140 const turbulentTemperatureCoupledBaffleMixedFvPatchScalarField&, 00141 const DimensionedField<scalar, volMesh>& 00142 ); 00143 00144 //- Construct and return a clone setting internal field reference 00145 virtual tmp<fvPatchScalarField> clone 00146 ( 00147 const DimensionedField<scalar, volMesh>& iF 00148 ) const 00149 { 00150 return tmp<fvPatchScalarField> 00151 ( 00152 new turbulentTemperatureCoupledBaffleMixedFvPatchScalarField 00153 ( 00154 *this, 00155 iF 00156 ) 00157 ); 00158 } 00159 00160 00161 // Member functions 00162 00163 //- Get corresponding K field 00164 tmp<scalarField> K() const; 00165 00166 //- Update the coefficients associated with the patch field 00167 virtual void updateCoeffs(); 00168 00169 //- Write 00170 virtual void write(Ostream&) const; 00171 }; 00172 00173 00174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00175 00176 } // End namespace compressible 00177 } // End namespace Foam 00178 00179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00180 00181 #endif 00182 00183 // ************************ vim: set sw=4 sts=4 et: ************************ //