OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

epsilonWallFunctionFvPatchScalarField.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-2009 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     Foam::incompressible::RASModels::epsilonWallFunctionFvPatchScalarField
00027 
00028 Description
00029     Boundary condition for epsilon when using wall functions
00030     - calculates epsilon and G
00031     - epsilon values added directly into the matrix to act as a constraint
00032 
00033 SourceFiles
00034     epsilonWallFunctionFvPatchScalarField.C
00035 
00036 \*---------------------------------------------------------------------------*/
00037 
00038 #ifndef epsilonWallFunctionFvPatchScalarField_H
00039 #define epsilonWallFunctionFvPatchScalarField_H
00040 
00041 #include "fixedInternalValueFvPatchField.H"
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 namespace incompressible
00048 {
00049 namespace RASModels
00050 {
00051 
00052 /*---------------------------------------------------------------------------*\
00053            Class epsilonWallFunctionFvPatchScalarField Declaration
00054 \*---------------------------------------------------------------------------*/
00055 
00056 class epsilonWallFunctionFvPatchScalarField
00057 :
00058     public fixedInternalValueFvPatchField<scalar>
00059 {
00060     // Private data
00061 
00062         //- Name of velocity field
00063         word UName_;
00064 
00065         //- Name of turbulence kinetic energy field
00066         word kName_;
00067 
00068         //- Name of turbulence generation field
00069         word GName_;
00070 
00071         //- Name of laminar viscosity field
00072         word nuName_;
00073 
00074         //- Name of turbulent viscosity field
00075         word nutName_;
00076 
00077         //- Cmu coefficient
00078         scalar Cmu_;
00079 
00080         //- Von Karman constant
00081         scalar kappa_;
00082 
00083         //- E coefficient
00084         scalar E_;
00085 
00086 
00087     // Private member functions
00088 
00089         //- Check the type of the patch
00090         void checkType();
00091 
00092 
00093 public:
00094 
00095     //- Runtime type information
00096     TypeName("epsilonWallFunction");
00097 
00098 
00099     // Constructors
00100 
00101         //- Construct from patch and internal field
00102         epsilonWallFunctionFvPatchScalarField
00103         (
00104             const fvPatch&,
00105             const DimensionedField<scalar, volMesh>&
00106         );
00107 
00108         //- Construct from patch, internal field and dictionary
00109         epsilonWallFunctionFvPatchScalarField
00110         (
00111             const fvPatch&,
00112             const DimensionedField<scalar, volMesh>&,
00113             const dictionary&
00114         );
00115 
00116         //- Construct by mapping given
00117         //  epsilonWallFunctionFvPatchScalarField
00118         //  onto a new patch
00119         epsilonWallFunctionFvPatchScalarField
00120         (
00121             const epsilonWallFunctionFvPatchScalarField&,
00122             const fvPatch&,
00123             const DimensionedField<scalar, volMesh>&,
00124             const fvPatchFieldMapper&
00125         );
00126 
00127         //- Construct as copy
00128         epsilonWallFunctionFvPatchScalarField
00129         (
00130             const epsilonWallFunctionFvPatchScalarField&
00131         );
00132 
00133         //- Construct and return a clone
00134         virtual tmp<fvPatchScalarField> clone() const
00135         {
00136             return tmp<fvPatchScalarField>
00137             (
00138                 new epsilonWallFunctionFvPatchScalarField(*this)
00139             );
00140         }
00141 
00142         //- Construct as copy setting internal field reference
00143         epsilonWallFunctionFvPatchScalarField
00144         (
00145             const epsilonWallFunctionFvPatchScalarField&,
00146             const DimensionedField<scalar, volMesh>&
00147         );
00148 
00149         //- Construct and return a clone setting internal field reference
00150         virtual tmp<fvPatchScalarField> clone
00151         (
00152             const DimensionedField<scalar, volMesh>& iF
00153         ) const
00154         {
00155             return tmp<fvPatchScalarField>
00156             (
00157                 new epsilonWallFunctionFvPatchScalarField(*this, iF)
00158             );
00159         }
00160 
00161 
00162     // Member functions
00163 
00164         // Evaluation functions
00165 
00166             //- Update the coefficients associated with the patch field
00167             virtual void updateCoeffs();
00168 
00169             //- Evaluate the patchField
00170             virtual void evaluate(const Pstream::commsTypes);
00171 
00172 
00173         // I-O
00174 
00175             //- Write
00176             void write(Ostream&) const;
00177 };
00178 
00179 
00180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00181 
00182 } // End namespace RASModels
00183 } // End namespace incompressible
00184 } // End namespace Foam
00185 
00186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00187 
00188 #endif
00189 
00190 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd