initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / turbulenceModels / incompressible / RAS / derivedFvPatchFields / wallFunctions / epsilonWallFunctions / epsilonWallFunction / epsilonWallFunctionFvPatchScalarField.H
blobbd98cced766d083197d6109c06e4363445ebf8df
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2008-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::incompressible::RASModels::epsilonWallFunctionFvPatchScalarField
28 Description
29     Boundary condition for epsilon when using wall functions
30     - calculates epsilon and G
31     - epsilon values added directly into the matrix to act as a constraint
33 SourceFiles
34     epsilonWallFunctionFvPatchScalarField.C
36 \*---------------------------------------------------------------------------*/
38 #ifndef epsilonWallFunctionFvPatchScalarField_H
39 #define epsilonWallFunctionFvPatchScalarField_H
41 #include "fixedInternalValueFvPatchField.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
47 namespace incompressible
49 namespace RASModels
52 /*---------------------------------------------------------------------------*\
53            Class epsilonWallFunctionFvPatchScalarField Declaration
54 \*---------------------------------------------------------------------------*/
56 class epsilonWallFunctionFvPatchScalarField
58     public fixedInternalValueFvPatchField<scalar>
60     // Private data
62         //- Name of velocity field
63         word UName_;
65         //- Name of turbulence kinetic energy field
66         word kName_;
68         //- Name of turbulence generation field
69         word GName_;
71         //- Name of laminar viscosity field
72         word nuName_;
74         //- Name of turbulent viscosity field
75         word nutName_;
77         //- Cmu coefficient
78         scalar Cmu_;
80         //- Von Karman constant
81         scalar kappa_;
83         //- E coefficient
84         scalar E_;
87     // Private member functions
89         //- Check the type of the patch
90         void checkType();
93 public:
95     //- Runtime type information
96     TypeName("epsilonWallFunction");
99     // Constructors
101         //- Construct from patch and internal field
102         epsilonWallFunctionFvPatchScalarField
103         (
104             const fvPatch&,
105             const DimensionedField<scalar, volMesh>&
106         );
108         //- Construct from patch, internal field and dictionary
109         epsilonWallFunctionFvPatchScalarField
110         (
111             const fvPatch&,
112             const DimensionedField<scalar, volMesh>&,
113             const dictionary&
114         );
116         //- Construct by mapping given
117         //  epsilonWallFunctionFvPatchScalarField
118         //  onto a new patch
119         epsilonWallFunctionFvPatchScalarField
120         (
121             const epsilonWallFunctionFvPatchScalarField&,
122             const fvPatch&,
123             const DimensionedField<scalar, volMesh>&,
124             const fvPatchFieldMapper&
125         );
127         //- Construct as copy
128         epsilonWallFunctionFvPatchScalarField
129         (
130             const epsilonWallFunctionFvPatchScalarField&
131         );
133         //- Construct and return a clone
134         virtual tmp<fvPatchScalarField> clone() const
135         {
136             return tmp<fvPatchScalarField>
137             (
138                 new epsilonWallFunctionFvPatchScalarField(*this)
139             );
140         }
142         //- Construct as copy setting internal field reference
143         epsilonWallFunctionFvPatchScalarField
144         (
145             const epsilonWallFunctionFvPatchScalarField&,
146             const DimensionedField<scalar, volMesh>&
147         );
149         //- Construct and return a clone setting internal field reference
150         virtual tmp<fvPatchScalarField> clone
151         (
152             const DimensionedField<scalar, volMesh>& iF
153         ) const
154         {
155             return tmp<fvPatchScalarField>
156             (
157                 new epsilonWallFunctionFvPatchScalarField(*this, iF)
158             );
159         }
162     // Member functions
164         // Evaluation functions
166             //- Update the coefficients associated with the patch field
167             virtual void updateCoeffs();
169             //- Evaluate the patchField
170             virtual void evaluate(const Pstream::commsTypes);
173         // I-O
175             //- Write
176             void write(Ostream&) const;
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 } // End namespace RASModels
183 } // End namespace incompressible
184 } // End namespace Foam
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 #endif
190 // ************************************************************************* //