initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / turbulenceModels / compressible / RAS / derivedFvPatchFields / wallFunctions / epsilonWallFunctions / epsilonWallFunction / epsilonWallFunctionFvPatchScalarField.H
blob5d5865e11edceb1df7ebbdc8509031d74799f907
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::compressible::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 compressibleEpsilonWallFunctionFvPatchScalarField_H
39 #define compressibleEpsilonWallFunctionFvPatchScalarField_H
41 #include "fixedInternalValueFvPatchField.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
47 namespace compressible
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 density field
72         word rhoName_;
74         //- Name of laminar viscosity field
75         word muName_;
77         //- Name of turbulent viscosity field
78         word mutName_;
80         //- Cmu coefficient
81         scalar Cmu_;
83         //- Von Karman constant
84         scalar kappa_;
86         //- E coefficient
87         scalar E_;
90     // Private member functions
92         //- Check the type of the patch
93         void checkType();
96 public:
98     //- Runtime type information
99     TypeName("compressible::epsilonWallFunction");
102     // Constructors
104         //- Construct from patch and internal field
105         epsilonWallFunctionFvPatchScalarField
106         (
107             const fvPatch&,
108             const DimensionedField<scalar, volMesh>&
109         );
111         //- Construct from patch, internal field and dictionary
112         epsilonWallFunctionFvPatchScalarField
113         (
114             const fvPatch&,
115             const DimensionedField<scalar, volMesh>&,
116             const dictionary&
117         );
119         //- Construct by mapping given
120         //  epsilonWallFunctionFvPatchScalarField
121         //  onto a new patch
122         epsilonWallFunctionFvPatchScalarField
123         (
124             const epsilonWallFunctionFvPatchScalarField&,
125             const fvPatch&,
126             const DimensionedField<scalar, volMesh>&,
127             const fvPatchFieldMapper&
128         );
130         //- Construct as copy
131         epsilonWallFunctionFvPatchScalarField
132         (
133             const epsilonWallFunctionFvPatchScalarField&
134         );
136         //- Construct and return a clone
137         virtual tmp<fvPatchScalarField> clone() const
138         {
139             return tmp<fvPatchScalarField>
140             (
141                 new epsilonWallFunctionFvPatchScalarField(*this)
142             );
143         }
145         //- Construct as copy setting internal field reference
146         epsilonWallFunctionFvPatchScalarField
147         (
148             const epsilonWallFunctionFvPatchScalarField&,
149             const DimensionedField<scalar, volMesh>&
150         );
152         //- Construct and return a clone setting internal field reference
153         virtual tmp<fvPatchScalarField> clone
154         (
155             const DimensionedField<scalar, volMesh>& iF
156         ) const
157         {
158             return tmp<fvPatchScalarField>
159             (
160                 new epsilonWallFunctionFvPatchScalarField(*this, iF)
161             );
162         }
165     // Member functions
167         // Evaluation functions
169             //- Update the coefficients associated with the patch field
170             virtual void updateCoeffs();
172             //- Evaluate the patchField
173             virtual void evaluate(const Pstream::commsTypes);
176         // I-O
178             //- Write
179             void write(Ostream&) const;
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 } // End namespace RASModels
186 } // End namespace compressible
187 } // End namespace Foam
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 #endif
193 // ************************************************************************* //