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

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