|
|
|
nutWallFunctionFvPatchScalarField.HGo to the documentation of this file.00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 2008-2009 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 the 00013 Free Software Foundation; either version 2 of the License, or (at your 00014 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, write to the Free Software Foundation, 00023 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00024 00025 Class 00026 Foam::incompressible::RASModels::nutWallFunctionFvPatchScalarField 00027 00028 Description 00029 Boundary condition for turbulent (kinematic) viscosity when using wall 00030 functions 00031 - replicates OpenFOAM v1.5 (and earlier) behaviour 00032 00033 SourceFiles 00034 nutWallFunctionFvPatchScalarField.C 00035 00036 \*---------------------------------------------------------------------------*/ 00037 00038 #ifndef nutWallFunctionFvPatchScalarField_H 00039 #define nutWallFunctionFvPatchScalarField_H 00040 00041 #include "fixedValueFvPatchFields.H" 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 namespace incompressible 00048 { 00049 namespace RASModels 00050 { 00051 00052 /*---------------------------------------------------------------------------*\ 00053 Class nutWallFunctionFvPatchScalarField Declaration 00054 \*---------------------------------------------------------------------------*/ 00055 00056 class nutWallFunctionFvPatchScalarField 00057 : 00058 public fixedValueFvPatchScalarField 00059 { 00060 protected: 00061 00062 // Protected data 00063 00064 //- Cmu coefficient 00065 scalar Cmu_; 00066 00067 //- Von Karman constant 00068 scalar kappa_; 00069 00070 //- E coefficient 00071 scalar E_; 00072 00073 //- Y+ at the edge of the laminar sublayer 00074 scalar yPlusLam_; 00075 00076 00077 // Protected member functions 00078 00079 //- Check the type of the patch 00080 virtual void checkType(); 00081 00082 //- Calculate the Y+ at the edge of the laminar sublayer 00083 virtual scalar calcYPlusLam(const scalar kappa, const scalar E) const; 00084 00085 //- Calculate the turbulence viscosity 00086 virtual tmp<scalarField> calcNut() const; 00087 00088 //- Write local wall function variables 00089 virtual void writeLocalEntries(Ostream&) const; 00090 00091 00092 public: 00093 00094 //- Runtime type information 00095 TypeName("nutWallFunction"); 00096 00097 00098 // Constructors 00099 00100 //- Construct from patch and internal field 00101 nutWallFunctionFvPatchScalarField 00102 ( 00103 const fvPatch&, 00104 const DimensionedField<scalar, volMesh>& 00105 ); 00106 00107 //- Construct from patch, internal field and dictionary 00108 nutWallFunctionFvPatchScalarField 00109 ( 00110 const fvPatch&, 00111 const DimensionedField<scalar, volMesh>&, 00112 const dictionary& 00113 ); 00114 00115 //- Construct by mapping given 00116 // nutWallFunctionFvPatchScalarField 00117 // onto a new patch 00118 nutWallFunctionFvPatchScalarField 00119 ( 00120 const nutWallFunctionFvPatchScalarField&, 00121 const fvPatch&, 00122 const DimensionedField<scalar, volMesh>&, 00123 const fvPatchFieldMapper& 00124 ); 00125 00126 //- Construct as copy 00127 nutWallFunctionFvPatchScalarField 00128 ( 00129 const nutWallFunctionFvPatchScalarField& 00130 ); 00131 00132 //- Construct and return a clone 00133 virtual tmp<fvPatchScalarField> clone() const 00134 { 00135 return tmp<fvPatchScalarField> 00136 ( 00137 new nutWallFunctionFvPatchScalarField(*this) 00138 ); 00139 } 00140 00141 //- Construct as copy setting internal field reference 00142 nutWallFunctionFvPatchScalarField 00143 ( 00144 const nutWallFunctionFvPatchScalarField&, 00145 const DimensionedField<scalar, volMesh>& 00146 ); 00147 00148 //- Construct and return a clone setting internal field reference 00149 virtual tmp<fvPatchScalarField> clone 00150 ( 00151 const DimensionedField<scalar, volMesh>& iF 00152 ) const 00153 { 00154 return tmp<fvPatchScalarField> 00155 ( 00156 new nutWallFunctionFvPatchScalarField(*this, iF) 00157 ); 00158 } 00159 00160 00161 // Member functions 00162 00163 // Evaluation functions 00164 00165 //- Calculate and return the yPlus at the boundary 00166 virtual tmp<scalarField> yPlus() const; 00167 00168 //- Update the coefficients associated with the patch field 00169 virtual void updateCoeffs(); 00170 00171 00172 // I-O 00173 00174 //- Write 00175 virtual void write(Ostream&) const; 00176 }; 00177 00178 00179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00180 00181 } // End namespace RASModels 00182 } // End namespace incompressible 00183 } // End namespace Foam 00184 00185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00186 00187 #endif 00188 00189 // ************************************************************************* // |