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::compressible::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 compressibleEpsilonWallFunctionFvPatchScalarField_H
00039 #define compressibleEpsilonWallFunctionFvPatchScalarField_H
00040 
00041 #include "fixedInternalValueFvPatchField.H"
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 namespace compressible
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 density field
00072         word rhoName_;
00073 
00074         //- Name of laminar viscosity field
00075         word muName_;
00076 
00077         //- Name of turbulent viscosity field
00078         word mutName_;
00079 
00080         //- Cmu coefficient
00081         scalar Cmu_;
00082 
00083         //- Von Karman constant
00084         scalar kappa_;
00085 
00086         //- E coefficient
00087         scalar E_;
00088 
00089 
00090     // Private member functions
00091 
00092         //- Check the type of the patch
00093         void checkType();
00094 
00095 
00096 public:
00097 
00098     //- Runtime type information
00099     TypeName("compressible::epsilonWallFunction");
00100 
00101 
00102     // Constructors
00103 
00104         //- Construct from patch and internal field
00105         epsilonWallFunctionFvPatchScalarField
00106         (
00107             const fvPatch&,
00108             const DimensionedField<scalar, volMesh>&
00109         );
00110 
00111         //- Construct from patch, internal field and dictionary
00112         epsilonWallFunctionFvPatchScalarField
00113         (
00114             const fvPatch&,
00115             const DimensionedField<scalar, volMesh>&,
00116             const dictionary&
00117         );
00118 
00119         //- Construct by mapping given
00120         //  epsilonWallFunctionFvPatchScalarField
00121         //  onto a new patch
00122         epsilonWallFunctionFvPatchScalarField
00123         (
00124             const epsilonWallFunctionFvPatchScalarField&,
00125             const fvPatch&,
00126             const DimensionedField<scalar, volMesh>&,
00127             const fvPatchFieldMapper&
00128         );
00129 
00130         //- Construct as copy
00131         epsilonWallFunctionFvPatchScalarField
00132         (
00133             const epsilonWallFunctionFvPatchScalarField&
00134         );
00135 
00136         //- Construct and return a clone
00137         virtual tmp<fvPatchScalarField> clone() const
00138         {
00139             return tmp<fvPatchScalarField>
00140             (
00141                 new epsilonWallFunctionFvPatchScalarField(*this)
00142             );
00143         }
00144 
00145         //- Construct as copy setting internal field reference
00146         epsilonWallFunctionFvPatchScalarField
00147         (
00148             const epsilonWallFunctionFvPatchScalarField&,
00149             const DimensionedField<scalar, volMesh>&
00150         );
00151 
00152         //- Construct and return a clone setting internal field reference
00153         virtual tmp<fvPatchScalarField> clone
00154         (
00155             const DimensionedField<scalar, volMesh>& iF
00156         ) const
00157         {
00158             return tmp<fvPatchScalarField>
00159             (
00160                 new epsilonWallFunctionFvPatchScalarField(*this, iF)
00161             );
00162         }
00163 
00164 
00165     // Member functions
00166 
00167         // Evaluation functions
00168 
00169             //- Update the coefficients associated with the patch field
00170             virtual void updateCoeffs();
00171 
00172             //- Evaluate the patchField
00173             virtual void evaluate(const Pstream::commsTypes);
00174 
00175 
00176         // I-O
00177 
00178             //- Write
00179             void write(Ostream&) const;
00180 };
00181 
00182 
00183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00184 
00185 } // End namespace RASModels
00186 } // End namespace compressible
00187 } // End namespace Foam
00188 
00189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00190 
00191 #endif
00192 
00193 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd