FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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