1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 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
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::nutUWallFunctionFvPatchScalarField
28 Wall function boundary condition for walls, based on velocity.
31 nutUWallFunctionFvPatchScalarField.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef nutUWallFunctionFvPatchScalarField_H
36 #define nutUWallFunctionFvPatchScalarField_H
38 #include "nutkWallFunctionFvPatchScalarField.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace incompressible
49 /*---------------------------------------------------------------------------*\
50 Class nutUWallFunctionFvPatchScalarField Declaration
51 \*---------------------------------------------------------------------------*/
53 class nutUWallFunctionFvPatchScalarField
55 public nutkWallFunctionFvPatchScalarField
59 // Protected Member Functions
62 virtual tmp<scalarField> calcYPlus(const scalarField& magUp) const;
64 //- Calculate the turbulence viscosity
65 virtual tmp<scalarField> calcNut() const;
70 //- Runtime type information
71 TypeName("nutUWallFunction");
76 //- Construct from patch and internal field
77 nutUWallFunctionFvPatchScalarField
80 const DimensionedField<scalar, volMesh>&
83 //- Construct from patch, internal field and dictionary
84 nutUWallFunctionFvPatchScalarField
87 const DimensionedField<scalar, volMesh>&,
91 //- Construct by mapping given
92 // nutUWallFunctionFvPatchScalarField
94 nutUWallFunctionFvPatchScalarField
96 const nutUWallFunctionFvPatchScalarField&,
98 const DimensionedField<scalar, volMesh>&,
99 const fvPatchFieldMapper&
102 //- Construct as copy
103 nutUWallFunctionFvPatchScalarField
105 const nutUWallFunctionFvPatchScalarField&
108 //- Construct and return a clone
109 virtual tmp<fvPatchScalarField> clone() const
111 return tmp<fvPatchScalarField>
113 new nutUWallFunctionFvPatchScalarField(*this)
117 //- Construct as copy setting internal field reference
118 nutUWallFunctionFvPatchScalarField
120 const nutUWallFunctionFvPatchScalarField&,
121 const DimensionedField<scalar, volMesh>&
124 //- Construct and return a clone setting internal field reference
125 virtual tmp<fvPatchScalarField> clone
127 const DimensionedField<scalar, volMesh>& iF
130 return tmp<fvPatchScalarField>
132 new nutUWallFunctionFvPatchScalarField(*this, iF)
139 // Evaluation functions
141 //- Calculate and return the yPlus at the boundary
142 virtual tmp<scalarField> yPlus() const;
148 virtual void write(Ostream& os) const;
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 } // End namespace RASModels
155 } // End namespace incompressible
156 } // End namespace Foam
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 // ************************************************************************* //