1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 Foam::incompressible::RASModels::omegaWallFunctionFvPatchScalarField
28 Provides a wall function boundary condition/constraint on omega
32 omega = sqrt(omega_vis^2 + omega_log^2)
35 omega_vis = omega in viscous region
36 omega_log = omega in logarithmic region
38 Model described by Eq.(15) of:
41 "Elements of Industrial Heat Transfer Prediction"
42 16th Brazilian Congress of Mechanical Engineering (COBEM),
47 omegaWallFunctionFvPatchScalarField.C
49 \*---------------------------------------------------------------------------*/
51 #ifndef omegaWallFunctionFvPatchScalarField_H
52 #define omegaWallFunctionFvPatchScalarField_H
54 #include "fixedInternalValueFvPatchField.H"
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 namespace incompressible
65 /*---------------------------------------------------------------------------*\
66 Class omegaWallFunctionFvPatchScalarField Declaration
67 \*---------------------------------------------------------------------------*/
69 class omegaWallFunctionFvPatchScalarField
71 public fixedInternalValueFvPatchField<scalar>
77 //- Name of turbulence generation field
83 //- Von Karman constant
92 //- Y+ at the edge of the laminar sublayer
96 // Protected Member Functions
98 //- Check the type of the patch
99 virtual void checkType();
101 //- Calculate the Y+ at the edge of the laminar sublayer
102 virtual scalar calcYPlusLam(const scalar kappa, const scalar E) const;
104 //- Write local wall function variables
105 virtual void writeLocalEntries(Ostream&) const;
110 //- Runtime type information
111 TypeName("omegaWallFunction");
116 //- Construct from patch and internal field
117 omegaWallFunctionFvPatchScalarField
120 const DimensionedField<scalar, volMesh>&
123 //- Construct from patch, internal field and dictionary
124 omegaWallFunctionFvPatchScalarField
127 const DimensionedField<scalar, volMesh>&,
131 //- Construct by mapping given
132 // omegaWallFunctionFvPatchScalarField
134 omegaWallFunctionFvPatchScalarField
136 const omegaWallFunctionFvPatchScalarField&,
138 const DimensionedField<scalar, volMesh>&,
139 const fvPatchFieldMapper&
142 //- Construct as copy
143 omegaWallFunctionFvPatchScalarField
145 const omegaWallFunctionFvPatchScalarField&
148 //- Construct and return a clone
149 virtual tmp<fvPatchScalarField> clone() const
151 return tmp<fvPatchScalarField>
153 new omegaWallFunctionFvPatchScalarField(*this)
157 //- Construct as copy setting internal field reference
158 omegaWallFunctionFvPatchScalarField
160 const omegaWallFunctionFvPatchScalarField&,
161 const DimensionedField<scalar, volMesh>&
164 //- Construct and return a clone setting internal field reference
165 virtual tmp<fvPatchScalarField> clone
167 const DimensionedField<scalar, volMesh>& iF
170 return tmp<fvPatchScalarField>
172 new omegaWallFunctionFvPatchScalarField(*this, iF)
179 // Evaluation functions
181 //- Update the coefficients associated with the patch field
182 virtual void updateCoeffs();
188 virtual void write(Ostream&) const;
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 } // End namespace RASModels
195 } // End namespace incompressible
196 } // End namespace Foam
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 // ************************************************************************* //