00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 2008-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::RASModels::omegaWallFunctionFvPatchScalarField 00026 00027 Description 00028 Provides a wall function boundary condition/constraint on omega 00029 00030 Computed value is: 00031 00032 omega = sqrt(omega_vis^2 + omega_log^2) 00033 00034 where 00035 omega_vis = omega in viscous region 00036 omega_log = omega in logarithmic region 00037 00038 Model described by Eq.(15) of: 00039 @verbatim 00040 Menter, F., Esch, T. 00041 "Elements of Industrial Heat Transfer Prediction" 00042 16th Brazilian Congress of Mechanical Engineering (COBEM), 00043 Nov. 2001 00044 @endverbatim 00045 00046 SourceFiles 00047 omegaWallFunctionFvPatchScalarField.C 00048 00049 \*---------------------------------------------------------------------------*/ 00050 00051 #ifndef compressibleOmegaWallFunctionFvPatchScalarField_H 00052 #define compressibleOmegaWallFunctionFvPatchScalarField_H 00053 00054 #include <finiteVolume/fixedInternalValueFvPatchField.H> 00055 00056 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00057 00058 namespace Foam 00059 { 00060 namespace compressible 00061 { 00062 namespace RASModels 00063 { 00064 00065 /*---------------------------------------------------------------------------*\ 00066 Class omegaWallFunctionFvPatchScalarField Declaration 00067 \*---------------------------------------------------------------------------*/ 00068 00069 class omegaWallFunctionFvPatchScalarField 00070 : 00071 public fixedInternalValueFvPatchField<scalar> 00072 { 00073 // Private data 00074 00075 //- Name of velocity field 00076 word UName_; 00077 00078 //- Name of density field 00079 word rhoName_; 00080 00081 //- Name of turbulence kinetic energy field 00082 word kName_; 00083 00084 //- Name of turbulence generation field 00085 word GName_; 00086 00087 //- Name of laminar viscosity field 00088 word muName_; 00089 00090 //- Name of turbulent viscosity field 00091 word mutName_; 00092 00093 //- Cmu coefficient 00094 scalar Cmu_; 00095 00096 //- Von Karman constant 00097 scalar kappa_; 00098 00099 //- E coefficient 00100 scalar E_; 00101 00102 //- beta1 coefficient 00103 scalar beta1_; 00104 00105 00106 // Private member functions 00107 00108 //- Check the type of the patch 00109 void checkType(); 00110 00111 00112 public: 00113 00114 //- Runtime type information 00115 TypeName("compressible::omegaWallFunction"); 00116 00117 00118 // Constructors 00119 00120 //- Construct from patch and internal field 00121 omegaWallFunctionFvPatchScalarField 00122 ( 00123 const fvPatch&, 00124 const DimensionedField<scalar, volMesh>& 00125 ); 00126 00127 //- Construct from patch, internal field and dictionary 00128 omegaWallFunctionFvPatchScalarField 00129 ( 00130 const fvPatch&, 00131 const DimensionedField<scalar, volMesh>&, 00132 const dictionary& 00133 ); 00134 00135 //- Construct by mapping given 00136 // omegaWallFunctionFvPatchScalarField 00137 // onto a new patch 00138 omegaWallFunctionFvPatchScalarField 00139 ( 00140 const omegaWallFunctionFvPatchScalarField&, 00141 const fvPatch&, 00142 const DimensionedField<scalar, volMesh>&, 00143 const fvPatchFieldMapper& 00144 ); 00145 00146 //- Construct as copy 00147 omegaWallFunctionFvPatchScalarField 00148 ( 00149 const omegaWallFunctionFvPatchScalarField& 00150 ); 00151 00152 //- Construct and return a clone 00153 virtual tmp<fvPatchScalarField> clone() const 00154 { 00155 return tmp<fvPatchScalarField> 00156 ( 00157 new omegaWallFunctionFvPatchScalarField(*this) 00158 ); 00159 } 00160 00161 //- Construct as copy setting internal field reference 00162 omegaWallFunctionFvPatchScalarField 00163 ( 00164 const omegaWallFunctionFvPatchScalarField&, 00165 const DimensionedField<scalar, volMesh>& 00166 ); 00167 00168 //- Construct and return a clone setting internal field reference 00169 virtual tmp<fvPatchScalarField> clone 00170 ( 00171 const DimensionedField<scalar, volMesh>& iF 00172 ) const 00173 { 00174 return tmp<fvPatchScalarField> 00175 ( 00176 new omegaWallFunctionFvPatchScalarField(*this, iF) 00177 ); 00178 } 00179 00180 00181 // Member functions 00182 00183 // Evaluation functions 00184 00185 //- Update the coefficients associated with the patch field 00186 virtual void updateCoeffs(); 00187 00188 00189 // I-O 00190 00191 //- Write 00192 void write(Ostream&) const; 00193 }; 00194 00195 00196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00197 00198 } // End namespace RASModels 00199 } // End namespace compressible 00200 } // End namespace Foam 00201 00202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00203 00204 #endif 00205 00206 // ************************ vim: set sw=4 sts=4 et: ************************ //