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::nutUSpaldingWallFunctionFvPatchScalarField
28 Wall function boundary condition for walls, based on velocity, using
29 Spaldings law to give a continuous nut profile to the wall (y+ = 0)
32 nutUSpaldingWallFunctionFvPatchScalarField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef nutUSpaldingWallFunctionFvPatchScalarField_H
37 #define nutUSpaldingWallFunctionFvPatchScalarField_H
39 #include "nutkWallFunctionFvPatchScalarField.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace incompressible
50 /*---------------------------------------------------------------------------*\
51 Class nutUSpaldingWallFunctionFvPatch Declaration
52 \*---------------------------------------------------------------------------*/
54 class nutUSpaldingWallFunctionFvPatchScalarField
56 public nutkWallFunctionFvPatchScalarField
60 // Protected Member Functions
62 //- Calculate the turbulence viscosity
63 virtual tmp<scalarField> calcNut() const;
65 //- Calculate the friction velocity
66 virtual tmp<scalarField> calcUTau(const scalarField& magGradU) const;
71 //- Runtime type information
72 TypeName("nutUSpaldingWallFunction");
77 //- Construct from patch and internal field
78 nutUSpaldingWallFunctionFvPatchScalarField
81 const DimensionedField<scalar, volMesh>&
84 //- Construct from patch, internal field and dictionary
85 nutUSpaldingWallFunctionFvPatchScalarField
88 const DimensionedField<scalar, volMesh>&,
92 //- Construct by mapping given
93 // nutUSpaldingWallFunctionFvPatchScalarField
95 nutUSpaldingWallFunctionFvPatchScalarField
97 const nutUSpaldingWallFunctionFvPatchScalarField&,
99 const DimensionedField<scalar, volMesh>&,
100 const fvPatchFieldMapper&
103 //- Construct as copy
104 nutUSpaldingWallFunctionFvPatchScalarField
106 const nutUSpaldingWallFunctionFvPatchScalarField&
109 //- Construct and return a clone
110 virtual tmp<fvPatchScalarField> clone() const
112 return tmp<fvPatchScalarField>
114 new nutUSpaldingWallFunctionFvPatchScalarField(*this)
118 //- Construct as copy setting internal field reference
119 nutUSpaldingWallFunctionFvPatchScalarField
121 const nutUSpaldingWallFunctionFvPatchScalarField&,
122 const DimensionedField<scalar, volMesh>&
125 //- Construct and return a clone setting internal field reference
126 virtual tmp<fvPatchScalarField> clone
128 const DimensionedField<scalar, volMesh>& iF
131 return tmp<fvPatchScalarField>
133 new nutUSpaldingWallFunctionFvPatchScalarField(*this, iF)
140 // Evaluation functions
142 //- Calculate and return the yPlus at the boundary
143 virtual tmp<scalarField> yPlus() const;
149 virtual void write(Ostream& os) const;
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 } // End namespace RASModels
156 } // End namespace incompressible
157 } // End namespace Foam
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 // ************************************************************************* //