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::compressible::LESModels::
26 muSgsUSpaldingWallFunctionFvPatchScalarField
29 Wall function boundary condition for walls, based on velocity, using
30 Spaldings law to give a continuous muSgs profile to the wall (y+ = 0).
33 muSgsUSpaldingWallFunctionFvPatchScalarField.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef muSgsUSpaldingWallFunctionFvPatchScalarField_H
38 #define muSgsUSpaldingWallFunctionFvPatchScalarField_H
40 #include "fixedValueFvPatchFields.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 namespace compressible
51 /*---------------------------------------------------------------------------*\
52 Class muSgsUSpaldingWallFunctionFvPatchScalarField Declaration
53 \*---------------------------------------------------------------------------*/
55 class muSgsUSpaldingWallFunctionFvPatchScalarField
57 public fixedValueFvPatchScalarField
61 //- Name of velocity field
64 //- Name of density field
67 //- Name of laminar viscosity field
70 //- Von Karman constant
79 //- Runtime type information
80 TypeName("muSgsUSpaldingWallFunction");
85 //- Construct from patch and internal field
86 muSgsUSpaldingWallFunctionFvPatchScalarField
89 const DimensionedField<scalar, volMesh>&
92 //- Construct from patch, internal field and dictionary
93 muSgsUSpaldingWallFunctionFvPatchScalarField
96 const DimensionedField<scalar, volMesh>&,
100 //- Construct by mapping given
101 // muSgsUSpaldingWallFunctionFvPatchScalarField
103 muSgsUSpaldingWallFunctionFvPatchScalarField
105 const muSgsUSpaldingWallFunctionFvPatchScalarField&,
107 const DimensionedField<scalar, volMesh>&,
108 const fvPatchFieldMapper&
111 //- Construct as copy
112 muSgsUSpaldingWallFunctionFvPatchScalarField
114 const muSgsUSpaldingWallFunctionFvPatchScalarField&
117 //- Construct and return a clone
118 virtual tmp<fvPatchScalarField> clone() const
120 return tmp<fvPatchScalarField>
122 new muSgsUSpaldingWallFunctionFvPatchScalarField(*this)
126 //- Construct as copy setting internal field reference
127 muSgsUSpaldingWallFunctionFvPatchScalarField
129 const muSgsUSpaldingWallFunctionFvPatchScalarField&,
130 const DimensionedField<scalar, volMesh>&
133 //- Construct and return a clone setting internal field reference
134 virtual tmp<fvPatchScalarField> clone
136 const DimensionedField<scalar, volMesh>& iF
139 return tmp<fvPatchScalarField>
141 new muSgsUSpaldingWallFunctionFvPatchScalarField(*this, iF)
148 // Evaluation functions
150 //- Evaluate the patchField
151 virtual void evaluate
153 const Pstream::commsTypes commsType=Pstream::blocking
159 void write(Ostream&) const;
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 } // End namespace LESModels
166 } // End namespace compressible
167 } // End namespace Foam
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 // ************************************************************************* //