1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
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 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
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
26 Foam::incompressible::RASModels::epsilonWallFunctionFvPatchScalarField
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
34 epsilonWallFunctionFvPatchScalarField.C
36 \*---------------------------------------------------------------------------*/
38 #ifndef epsilonWallFunctionFvPatchScalarField_H
39 #define epsilonWallFunctionFvPatchScalarField_H
41 #include "fixedInternalValueFvPatchField.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 namespace incompressible
52 /*---------------------------------------------------------------------------*\
53 Class epsilonWallFunctionFvPatchScalarField Declaration
54 \*---------------------------------------------------------------------------*/
56 class epsilonWallFunctionFvPatchScalarField
58 public fixedInternalValueFvPatchField<scalar>
62 //- Name of velocity field
65 //- Name of turbulence kinetic energy field
68 //- Name of turbulence generation field
71 //- Name of laminar viscosity field
74 //- Name of turbulent viscosity field
80 //- Von Karman constant
87 // Private member functions
89 //- Check the type of the patch
95 //- Runtime type information
96 TypeName("epsilonWallFunction");
101 //- Construct from patch and internal field
102 epsilonWallFunctionFvPatchScalarField
105 const DimensionedField<scalar, volMesh>&
108 //- Construct from patch, internal field and dictionary
109 epsilonWallFunctionFvPatchScalarField
112 const DimensionedField<scalar, volMesh>&,
116 //- Construct by mapping given
117 // epsilonWallFunctionFvPatchScalarField
119 epsilonWallFunctionFvPatchScalarField
121 const epsilonWallFunctionFvPatchScalarField&,
123 const DimensionedField<scalar, volMesh>&,
124 const fvPatchFieldMapper&
127 //- Construct as copy
128 epsilonWallFunctionFvPatchScalarField
130 const epsilonWallFunctionFvPatchScalarField&
133 //- Construct and return a clone
134 virtual tmp<fvPatchScalarField> clone() const
136 return tmp<fvPatchScalarField>
138 new epsilonWallFunctionFvPatchScalarField(*this)
142 //- Construct as copy setting internal field reference
143 epsilonWallFunctionFvPatchScalarField
145 const epsilonWallFunctionFvPatchScalarField&,
146 const DimensionedField<scalar, volMesh>&
149 //- Construct and return a clone setting internal field reference
150 virtual tmp<fvPatchScalarField> clone
152 const DimensionedField<scalar, volMesh>& iF
155 return tmp<fvPatchScalarField>
157 new epsilonWallFunctionFvPatchScalarField(*this, iF)
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);
176 void write(Ostream&) const;
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 } // End namespace RASModels
183 } // End namespace incompressible
184 } // End namespace Foam
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 // ************************************************************************* //