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

omegaWallFunctionFvPatchScalarField.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) 2008-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::omegaWallFunctionFvPatchScalarField
00026 
00027 Description
00028     Provides a wall function boundary condition/constraint on omega
00029 
00030     Computed value is:
00031 
00032         omega = sqrt(omega_vis^2 + omega_log^2)
00033 
00034     where
00035         omega_vis = omega in viscous region
00036         omega_log = omega in logarithmic region
00037 
00038     Model described by Eq.(15) of:
00039     @verbatim
00040         Menter, F., Esch, T.
00041         "Elements of Industrial Heat Transfer Prediction"
00042         16th Brazilian Congress of Mechanical Engineering (COBEM),
00043         Nov. 2001
00044     @endverbatim
00045 
00046 SourceFiles
00047     omegaWallFunctionFvPatchScalarField.C
00048 
00049 \*---------------------------------------------------------------------------*/
00050 
00051 #ifndef omegaWallFunctionFvPatchScalarField_H
00052 #define omegaWallFunctionFvPatchScalarField_H
00053 
00054 #include <finiteVolume/fixedInternalValueFvPatchField.H>
00055 
00056 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00057 
00058 namespace Foam
00059 {
00060 namespace incompressible
00061 {
00062 namespace RASModels
00063 {
00064 
00065 /*---------------------------------------------------------------------------*\
00066            Class omegaWallFunctionFvPatchScalarField Declaration
00067 \*---------------------------------------------------------------------------*/
00068 
00069 class omegaWallFunctionFvPatchScalarField
00070 :
00071     public fixedInternalValueFvPatchField<scalar>
00072 {
00073     // Private data
00074 
00075         //- Name of velocity field
00076         word UName_;
00077 
00078         //- Name of turbulence kinetic energy field
00079         word kName_;
00080 
00081         //- Name of turbulence generation field
00082         word GName_;
00083 
00084         //- Name of laminar viscosity field
00085         word nuName_;
00086 
00087         //- Name of turbulent viscosity field
00088         word nutName_;
00089 
00090         //- Cmu coefficient
00091         scalar Cmu_;
00092 
00093         //- Von Karman constant
00094         scalar kappa_;
00095 
00096         //- E coefficient
00097         scalar E_;
00098 
00099         //- beta1 coefficient
00100         scalar beta1_;
00101 
00102 
00103     // Private member functions
00104 
00105         //- Check the type of the patch
00106         void checkType();
00107 
00108 
00109 public:
00110 
00111     //- Runtime type information
00112     TypeName("omegaWallFunction");
00113 
00114 
00115     // Constructors
00116 
00117         //- Construct from patch and internal field
00118         omegaWallFunctionFvPatchScalarField
00119         (
00120             const fvPatch&,
00121             const DimensionedField<scalar, volMesh>&
00122         );
00123 
00124         //- Construct from patch, internal field and dictionary
00125         omegaWallFunctionFvPatchScalarField
00126         (
00127             const fvPatch&,
00128             const DimensionedField<scalar, volMesh>&,
00129             const dictionary&
00130         );
00131 
00132         //- Construct by mapping given
00133         // omegaWallFunctionFvPatchScalarField
00134         //  onto a new patch
00135         omegaWallFunctionFvPatchScalarField
00136         (
00137             const omegaWallFunctionFvPatchScalarField&,
00138             const fvPatch&,
00139             const DimensionedField<scalar, volMesh>&,
00140             const fvPatchFieldMapper&
00141         );
00142 
00143         //- Construct as copy
00144         omegaWallFunctionFvPatchScalarField
00145         (
00146             const omegaWallFunctionFvPatchScalarField&
00147         );
00148 
00149         //- Construct and return a clone
00150         virtual tmp<fvPatchScalarField> clone() const
00151         {
00152             return tmp<fvPatchScalarField>
00153             (
00154                 new omegaWallFunctionFvPatchScalarField(*this)
00155             );
00156         }
00157 
00158         //- Construct as copy setting internal field reference
00159         omegaWallFunctionFvPatchScalarField
00160         (
00161             const omegaWallFunctionFvPatchScalarField&,
00162             const DimensionedField<scalar, volMesh>&
00163         );
00164 
00165         //- Construct and return a clone setting internal field reference
00166         virtual tmp<fvPatchScalarField> clone
00167         (
00168             const DimensionedField<scalar, volMesh>& iF
00169         ) const
00170         {
00171             return tmp<fvPatchScalarField>
00172             (
00173                 new omegaWallFunctionFvPatchScalarField(*this, iF)
00174             );
00175         }
00176 
00177 
00178     // Member functions
00179 
00180         // Evaluation functions
00181 
00182             //- Update the coefficients associated with the patch field
00183             virtual void updateCoeffs();
00184 
00185 
00186         // I-O
00187 
00188             //- Write
00189             void write(Ostream&) const;
00190 };
00191 
00192 
00193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00194 
00195 } // End namespace RASModels
00196 } // End namespace incompressible
00197 } // End namespace Foam
00198 
00199 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00200 
00201 #endif
00202 
00203 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines