OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H

Go 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) 1991-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::compressible::RASModels::
00027         mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
00028 
00029 Description
00030     Wall function boundary condition for rough walls
00031 
00032 SourceFiles
00033     mutSpalartAllamarasStandardWallFunctionFvPatchScalarField.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef compressibleMutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H
00038 #define compressibleMutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H
00039 
00040 #include "mutWallFunctionFvPatchScalarField.H"
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 namespace compressible
00047 {
00048 namespace RASModels
00049 {
00050 
00051 /*---------------------------------------------------------------------------*\
00052 Class mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField Declaration
00053 \*---------------------------------------------------------------------------*/
00054 
00055 class mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
00056 :
00057     public mutWallFunctionFvPatchScalarField
00058 {
00059 protected:
00060 
00061     // Protected data
00062 
00063         // Roughness parameters
00064 
00065             //- Height
00066             scalar roughnessHeight_;
00067 
00068             //- Constant
00069             scalar roughnessConstant_;
00070 
00071             //- Scale factor
00072             scalar roughnessFudgeFactor_;
00073 
00074 
00075     // Protected member functions
00076 
00077         //- Calculate yPLus
00078         virtual tmp<scalarField> calcYPlus(const scalarField& magUp) const;
00079 
00080         //- Calculate the turbulence viscosity
00081         virtual tmp<scalarField> calcMut() const;
00082 
00083 
00084 public:
00085 
00086     //- Runtime type information
00087     TypeName("mutSpalartAllmarasStandardRoughWallFunction");
00088 
00089 
00090     // Constructors
00091 
00092         //- Construct from patch and internal field
00093         mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
00094         (
00095             const fvPatch&,
00096             const DimensionedField<scalar, volMesh>&
00097         );
00098 
00099         //- Construct from patch, internal field and dictionary
00100         mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
00101         (
00102             const fvPatch&,
00103             const DimensionedField<scalar, volMesh>&,
00104             const dictionary&
00105         );
00106 
00107         //- Construct by mapping given
00108         //  mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
00109         //  onto a new patch
00110         mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
00111         (
00112             const mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField&,
00113             const fvPatch&,
00114             const DimensionedField<scalar, volMesh>&,
00115             const fvPatchFieldMapper&
00116         );
00117 
00118         //- Construct as copy
00119         mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
00120         (
00121             const mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField&
00122         );
00123 
00124         //- Construct and return a clone
00125         virtual tmp<fvPatchScalarField> clone() const
00126         {
00127             return tmp<fvPatchScalarField>
00128             (
00129                 new mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
00130                 (
00131                     *this
00132                 )
00133             );
00134         }
00135 
00136         //- Construct as copy setting internal field reference
00137         mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
00138         (
00139             const mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField&,
00140             const DimensionedField<scalar, volMesh>&
00141         );
00142 
00143         //- Construct and return a clone setting internal field reference
00144         virtual tmp<fvPatchScalarField> clone
00145         (
00146             const DimensionedField<scalar, volMesh>& iF
00147         ) const
00148         {
00149             return tmp<fvPatchScalarField>
00150             (
00151                 new mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
00152                 (
00153                    *this,
00154                     iF
00155                 )
00156             );
00157         }
00158 
00159 
00160     // Member functions
00161 
00162         // Access
00163 
00164             //- Return the roughness height scale
00165             const scalar& roughnessHeight() const
00166             {
00167                 return roughnessHeight_;
00168             }
00169 
00170             //- Return reference to the roughness height to allow adjustment
00171             scalar& roughnessHeight()
00172             {
00173                 return roughnessHeight_;
00174             }
00175 
00176             //- Return the roughness constant scale
00177             const scalar& roughnessConstant() const
00178             {
00179                 return roughnessConstant_;
00180             }
00181 
00182             //- Return reference to the roughness constant to allow adjustment
00183             scalar& roughnessConstant()
00184             {
00185                 return roughnessConstant_;
00186             }
00187 
00188             //- Return the roughness scale factor
00189             const scalar& roughnessFudgeFactor() const
00190             {
00191                 return roughnessFudgeFactor_;
00192             }
00193 
00194             //- Return reference to the roughness scale factor to allow
00195             //  adjustment
00196             scalar& roughnessFudgeFactor()
00197             {
00198                 return roughnessFudgeFactor_;
00199             }
00200 
00201 
00202         // Evaluation functions
00203 
00204             //- Calculate and return the yPlus at the boundary
00205             virtual tmp<scalarField> yPlus() const;
00206 
00207 
00208         // I-O
00209 
00210             //- Write
00211             virtual void write(Ostream& os) const;
00212 };
00213 
00214 
00215 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00216 
00217 } // End namespace RASModels
00218 } // End namespace compressible
00219 } // End namespace Foam
00220 
00221 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00222 
00223 #endif
00224 
00225 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd