|
|
|
nutRoughWallFunctionFvPatchScalarField.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::nutRoughWallFunctionFvPatchScalarField 00027 00028 Description 00029 Boundary condition for turbulent (kinematic) viscosity when using wall 00030 functions for rough walls. 00031 00032 Manipulates the E parameter to account for roughness effects, based on 00033 KsPlus. 00034 00035 - roughness height = sand-grain roughness (0 for smooth walls) 00036 - roughness constant = 0.5-1.0 (0.5 default) 00037 00038 SourceFiles 00039 nutRoughWallFunctionFvPatchScalarField.C 00040 00041 \*---------------------------------------------------------------------------*/ 00042 00043 #ifndef nutRoughWallFunctionFvPatchScalarField_H 00044 #define nutRoughWallFunctionFvPatchScalarField_H 00045 00046 #include "nutWallFunctionFvPatchScalarField.H" 00047 00048 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00049 00050 namespace Foam 00051 { 00052 namespace incompressible 00053 { 00054 namespace RASModels 00055 { 00056 00057 /*---------------------------------------------------------------------------*\ 00058 Class nutRoughWallFunctionFvPatchScalarField Declaration 00059 \*---------------------------------------------------------------------------*/ 00060 00061 class nutRoughWallFunctionFvPatchScalarField 00062 : 00063 public nutWallFunctionFvPatchScalarField 00064 { 00065 protected: 00066 00067 // Protected data 00068 00069 //- Roughness height 00070 scalarField Ks_; 00071 00072 //- Roughness constant 00073 scalarField Cs_; 00074 00075 00076 // Protected member functions 00077 00078 //- Compute the roughness function 00079 virtual scalar fnRough(const scalar KsPlus, const scalar Cs) const; 00080 00081 //- Calculate the turbulence viscosity 00082 virtual tmp<scalarField> calcNut() const; 00083 00084 00085 public: 00086 00087 //- Runtime type information 00088 TypeName("nutRoughWallFunction"); 00089 00090 00091 // Constructors 00092 00093 //- Construct from patch and internal field 00094 nutRoughWallFunctionFvPatchScalarField 00095 ( 00096 const fvPatch&, 00097 const DimensionedField<scalar, volMesh>& 00098 ); 00099 00100 //- Construct from patch, internal field and dictionary 00101 nutRoughWallFunctionFvPatchScalarField 00102 ( 00103 const fvPatch&, 00104 const DimensionedField<scalar, volMesh>&, 00105 const dictionary& 00106 ); 00107 00108 //- Construct by mapping given 00109 // nutRoughWallFunctionFvPatchScalarField 00110 // onto a new patch 00111 nutRoughWallFunctionFvPatchScalarField 00112 ( 00113 const nutRoughWallFunctionFvPatchScalarField&, 00114 const fvPatch&, 00115 const DimensionedField<scalar, volMesh>&, 00116 const fvPatchFieldMapper& 00117 ); 00118 00119 //- Construct as copy 00120 nutRoughWallFunctionFvPatchScalarField 00121 ( 00122 const nutRoughWallFunctionFvPatchScalarField& 00123 ); 00124 00125 //- Construct and return a clone 00126 virtual tmp<fvPatchScalarField> clone() const 00127 { 00128 return tmp<fvPatchScalarField> 00129 ( 00130 new nutRoughWallFunctionFvPatchScalarField(*this) 00131 ); 00132 } 00133 00134 //- Construct as copy setting internal field reference 00135 nutRoughWallFunctionFvPatchScalarField 00136 ( 00137 const nutRoughWallFunctionFvPatchScalarField&, 00138 const DimensionedField<scalar, volMesh>& 00139 ); 00140 00141 //- Construct and return a clone setting internal field reference 00142 virtual tmp<fvPatchScalarField> clone 00143 ( 00144 const DimensionedField<scalar, volMesh>& iF 00145 ) const 00146 { 00147 return tmp<fvPatchScalarField> 00148 ( 00149 new nutRoughWallFunctionFvPatchScalarField(*this, iF) 00150 ); 00151 } 00152 00153 00154 // Member functions 00155 00156 // Mapping functions 00157 00158 //- Map (and resize as needed) from self given a mapping object 00159 virtual void autoMap(const fvPatchFieldMapper&); 00160 00161 //- Reverse map the given fvPatchField onto this fvPatchField 00162 virtual void rmap 00163 ( 00164 const fvPatchScalarField&, 00165 const labelList& 00166 ); 00167 00168 00169 // I-O 00170 00171 //- Write 00172 virtual void write(Ostream&) const; 00173 }; 00174 00175 00176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00177 00178 } // End namespace RASModels 00179 } // End namespace incompressible 00180 } // End namespace Foam 00181 00182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00183 00184 #endif 00185 00186 // ************************************************************************* // |