Update to (in)compressible omegaWallFunction
[OpenFOAM-1.6.x.git] / src / turbulenceModels / incompressible / RAS / derivedFvPatchFields / wallFunctions / omegaWallFunctions / omegaWallFunction / omegaWallFunctionFvPatchScalarField.H
blob7555b377cb9a6e21012400232fcc4ed1fb011e87
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::omegaWallFunctionFvPatchScalarField
28 Description
29     Provides a wall function boundary condition/constraint on omega
31     Computed value is:
33         omega = sqrt(omega_vis^2 + omega_log^2)
35     where
36         omega_vis = omega in viscous region
37         omega_log = omega in logarithmic region
39     Model described by Eq.(15) of:
40     @verbatim
41         Menter, F., Esch, T.
42         "Elements of Industrial Heat Transfer Prediction"
43         16th Brazilian Congress of Mechanical Engineering (COBEM),
44         Nov. 2001
45     @endverbatim
47 SourceFiles
48     omegaWallFunctionFvPatchScalarField.C
50 \*---------------------------------------------------------------------------*/
52 #ifndef omegaWallFunctionFvPatchScalarField_H
53 #define omegaWallFunctionFvPatchScalarField_H
55 #include "fixedInternalValueFvPatchField.H"
57 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 namespace Foam
61 namespace incompressible
63 namespace RASModels
66 /*---------------------------------------------------------------------------*\
67            Class omegaWallFunctionFvPatchScalarField Declaration
68 \*---------------------------------------------------------------------------*/
70 class omegaWallFunctionFvPatchScalarField
72     public fixedInternalValueFvPatchField<scalar>
74     // Private data
76         //- Name of velocity field
77         word UName_;
79         //- Name of turbulence kinetic energy field
80         word kName_;
82         //- Name of turbulence generation field
83         word GName_;
85         //- Name of laminar viscosity field
86         word nuName_;
88         //- Name of turbulent viscosity field
89         word nutName_;
91         //- Cmu coefficient
92         scalar Cmu_;
94         //- Von Karman constant
95         scalar kappa_;
97         //- E coefficient
98         scalar E_;
100         //- beta1 coefficient
101         scalar beta1_;
104     // Private member functions
106         //- Check the type of the patch
107         void checkType();
110 public:
112     //- Runtime type information
113     TypeName("omegaWallFunction");
116     // Constructors
118         //- Construct from patch and internal field
119         omegaWallFunctionFvPatchScalarField
120         (
121             const fvPatch&,
122             const DimensionedField<scalar, volMesh>&
123         );
125         //- Construct from patch, internal field and dictionary
126         omegaWallFunctionFvPatchScalarField
127         (
128             const fvPatch&,
129             const DimensionedField<scalar, volMesh>&,
130             const dictionary&
131         );
133         //- Construct by mapping given
134         // omegaWallFunctionFvPatchScalarField
135         //  onto a new patch
136         omegaWallFunctionFvPatchScalarField
137         (
138             const omegaWallFunctionFvPatchScalarField&,
139             const fvPatch&,
140             const DimensionedField<scalar, volMesh>&,
141             const fvPatchFieldMapper&
142         );
144         //- Construct as copy
145         omegaWallFunctionFvPatchScalarField
146         (
147             const omegaWallFunctionFvPatchScalarField&
148         );
150         //- Construct and return a clone
151         virtual tmp<fvPatchScalarField> clone() const
152         {
153             return tmp<fvPatchScalarField>
154             (
155                 new omegaWallFunctionFvPatchScalarField(*this)
156             );
157         }
159         //- Construct as copy setting internal field reference
160         omegaWallFunctionFvPatchScalarField
161         (
162             const omegaWallFunctionFvPatchScalarField&,
163             const DimensionedField<scalar, volMesh>&
164         );
166         //- Construct and return a clone setting internal field reference
167         virtual tmp<fvPatchScalarField> clone
168         (
169             const DimensionedField<scalar, volMesh>& iF
170         ) const
171         {
172             return tmp<fvPatchScalarField>
173             (
174                 new omegaWallFunctionFvPatchScalarField(*this, iF)
175             );
176         }
179     // Member functions
181         // Evaluation functions
183             //- Update the coefficients associated with the patch field
184             virtual void updateCoeffs();
187         // I-O
189             //- Write
190             void write(Ostream&) const;
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196 } // End namespace RASModels
197 } // End namespace incompressible
198 } // End namespace Foam
200 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 #endif
204 // ************************************************************************* //