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

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