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::compressible::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 compressibleEpsilonWallFunctionFvPatchScalarField_H
39 #define compressibleEpsilonWallFunctionFvPatchScalarField_H
41 #include "fixedInternalValueFvPatchField.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 namespace compressible
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 density field
74 //- Name of laminar viscosity field
77 //- Name of turbulent viscosity field
83 //- Von Karman constant
90 // Private member functions
92 //- Check the type of the patch
98 //- Runtime type information
99 TypeName("compressible::epsilonWallFunction");
104 //- Construct from patch and internal field
105 epsilonWallFunctionFvPatchScalarField
108 const DimensionedField<scalar, volMesh>&
111 //- Construct from patch, internal field and dictionary
112 epsilonWallFunctionFvPatchScalarField
115 const DimensionedField<scalar, volMesh>&,
119 //- Construct by mapping given
120 // epsilonWallFunctionFvPatchScalarField
122 epsilonWallFunctionFvPatchScalarField
124 const epsilonWallFunctionFvPatchScalarField&,
126 const DimensionedField<scalar, volMesh>&,
127 const fvPatchFieldMapper&
130 //- Construct as copy
131 epsilonWallFunctionFvPatchScalarField
133 const epsilonWallFunctionFvPatchScalarField&
136 //- Construct and return a clone
137 virtual tmp<fvPatchScalarField> clone() const
139 return tmp<fvPatchScalarField>
141 new epsilonWallFunctionFvPatchScalarField(*this)
145 //- Construct as copy setting internal field reference
146 epsilonWallFunctionFvPatchScalarField
148 const epsilonWallFunctionFvPatchScalarField&,
149 const DimensionedField<scalar, volMesh>&
152 //- Construct and return a clone setting internal field reference
153 virtual tmp<fvPatchScalarField> clone
155 const DimensionedField<scalar, volMesh>& iF
158 return tmp<fvPatchScalarField>
160 new epsilonWallFunctionFvPatchScalarField(*this, iF)
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);
179 void write(Ostream&) const;
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 } // End namespace RASModels
186 } // End namespace compressible
187 } // End namespace Foam
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 // ************************************************************************* //