OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

mutStandardRoughWallFunctionFvPatchScalarField.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-2007 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     mutStandardWallFunctionFvPatchScalarField
00027 
00028 Description
00029 
00030 SourceFiles
00031     mutStandardWallFunctionFvPatchScalarField.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef mutStandardRoughWallFunctionFvPatchScalarField_H
00036 #define mutStandardRoughWallFunctionFvPatchScalarField_H
00037 
00038 #include "fixedValueFvPatchFields.H"
00039 
00040 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00041 
00042 namespace Foam
00043 {
00044 namespace compressible
00045 {
00046 namespace turbulenceModels
00047 {
00048 
00049 /*---------------------------------------------------------------------------*\
00050                     Class mutWallFunctionFvPatch Declaration
00051 \*---------------------------------------------------------------------------*/
00052 
00053 class mutStandardRoughWallFunctionFvPatchScalarField
00054 :
00055     public fixedValueFvPatchScalarField
00056 {
00057     // Private data
00058 
00059         scalar roughnessHeight_;
00060         scalar roughnessConstant_;
00061         scalar roughnessFudgeFactor_;
00062 
00063 
00064 public:
00065 
00066     //- Runtime type information
00067     TypeName("mutStandardRoughWallFunction");
00068 
00069 
00070     // Constructors
00071 
00072         //- Construct from patch and internal field
00073         mutStandardRoughWallFunctionFvPatchScalarField
00074         (
00075             const fvPatch&,
00076             const DimensionedField<scalar, volMesh>&
00077         );
00078 
00079         //- Construct from patch, internal field and dictionary
00080         mutStandardRoughWallFunctionFvPatchScalarField
00081         (
00082             const fvPatch&,
00083             const DimensionedField<scalar, volMesh>&,
00084             const dictionary&
00085         );
00086 
00087         //- Construct by mapping given 
00088         //  mutStandardRoughWallFunctionFvPatchScalarField
00089         //  onto a new patch
00090         mutStandardRoughWallFunctionFvPatchScalarField
00091         (
00092             const mutStandardRoughWallFunctionFvPatchScalarField&,
00093             const fvPatch&,
00094             const DimensionedField<scalar, volMesh>&,
00095             const fvPatchFieldMapper&
00096         );
00097 
00098         //- Construct as copy
00099         mutStandardRoughWallFunctionFvPatchScalarField
00100         (
00101             const mutStandardRoughWallFunctionFvPatchScalarField&
00102         );
00103 
00104         //- Construct and return a clone
00105         virtual tmp<fvPatchScalarField> clone() const
00106         {
00107             return tmp<fvPatchScalarField>
00108             (
00109                 new mutStandardRoughWallFunctionFvPatchScalarField(*this)
00110             );
00111         }
00112 
00113         //- Construct as copy setting internal field reference
00114         mutStandardRoughWallFunctionFvPatchScalarField
00115         (
00116             const mutStandardRoughWallFunctionFvPatchScalarField&,
00117             const DimensionedField<scalar, volMesh>&
00118         );
00119 
00120         //- Construct and return a clone setting internal field reference
00121         virtual tmp<fvPatchScalarField> clone
00122         (
00123             const DimensionedField<scalar, volMesh>& iF
00124         ) const
00125         {
00126             return tmp<fvPatchScalarField>
00127             (
00128                 new mutStandardRoughWallFunctionFvPatchScalarField(*this, iF)
00129             );
00130         }
00131 
00132 
00133     // Member functions
00134 
00135         // Access
00136 
00137             //- Return the fluctuation scale
00138             const scalar& roughnessHeight() const
00139             {
00140                 return roughnessHeight_;
00141             }
00142 
00143             //- Return reference to the fluctuation scale to allow adjustment
00144             scalar& roughnessHeight()
00145             {
00146                 return roughnessHeight_;
00147             }
00148 
00149 
00150             //- Return the fluctuation scale
00151             const scalar& roughnessConstant() const
00152             {
00153                 return roughnessConstant_;
00154             }
00155 
00156             //- Return reference to the fluctuation scale to allow adjustment
00157             scalar& roughnessConstant()
00158             {
00159                 return roughnessConstant_;
00160             }
00161 
00162             //- Return the fluctuation scale
00163             const scalar& roughnessFudgeFactor() const
00164             {
00165                 return roughnessFudgeFactor_;
00166             }
00167 
00168             //- Return reference to the fluctuation scale to allow adjustment
00169             scalar& roughnessFudgeFactor()
00170             {
00171                 return roughnessFudgeFactor_;
00172             }
00173 
00174 
00175         // Evaluation functions
00176 
00177             //- Evaluate the patchField
00178             virtual void evaluate();
00179 
00180 
00181         //- Write
00182         virtual void write(Ostream& os) const;
00183 };
00184 
00185 
00186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00187 
00188 } // End namespace turbulenceModels
00189 } // End namespace compressible
00190 } // End namespace Foam
00191 
00192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00193 
00194 #endif
00195 
00196 // ************************************************************************* //
Copyright © 2000-2007 OpenCFD Ltd