initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / turbulenceModels / compressible / RAS / derivedFvPatchFields / wallFunctions / mutWallFunctions / mutSpalartAllmarasStandardWallFunction / mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H
blob409bc0b9eb2ea5c84f879d3b7de76d216a72f824
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::compressible::RASModels::
27     mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
29 Description
30     Wall function boundary condition for walls
32 SourceFiles
33     mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef compressibleMutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H
38 #define compressibleMutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H
40 #include "mutWallFunctionFvPatchScalarField.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
46 namespace compressible
48 namespace RASModels
51 /*---------------------------------------------------------------------------*\
52   Class mutSpalartAllmarasStandardWallFunctionFvPatchScalarField Declaration
53 \*---------------------------------------------------------------------------*/
55 class mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
57     public mutWallFunctionFvPatchScalarField
59 protected:
61     // Protected member functions
63         //- Calculate yPLus
64         virtual tmp<scalarField> calcYPlus(const scalarField& magUp) const;
66         //- Calculate the turbulence viscosity
67         virtual tmp<scalarField> calcMut() const;
70 public:
72     //- Runtime type information
73     TypeName("mutSpalartAllmarasStandardWallFunction");
76     // Constructors
78         //- Construct from patch and internal field
79         mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
80         (
81             const fvPatch&,
82             const DimensionedField<scalar, volMesh>&
83         );
85         //- Construct from patch, internal field and dictionary
86         mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
87         (
88             const fvPatch&,
89             const DimensionedField<scalar, volMesh>&,
90             const dictionary&
91         );
93         //- Construct by mapping given
94         //  mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
95         //  onto a new patch
96         mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
97         (
98             const mutSpalartAllmarasStandardWallFunctionFvPatchScalarField&,
99             const fvPatch&,
100             const DimensionedField<scalar, volMesh>&,
101             const fvPatchFieldMapper&
102         );
104         //- Construct as copy
105         mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
106         (
107             const mutSpalartAllmarasStandardWallFunctionFvPatchScalarField&
108         );
110         //- Construct and return a clone
111         virtual tmp<fvPatchScalarField> clone() const
112         {
113             return tmp<fvPatchScalarField>
114             (
115                 new mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
116                 (
117                     *this
118                 )
119             );
120         }
122         //- Construct as copy setting internal field reference
123         mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
124         (
125             const mutSpalartAllmarasStandardWallFunctionFvPatchScalarField&,
126             const DimensionedField<scalar, volMesh>&
127         );
129         //- Construct and return a clone setting internal field reference
130         virtual tmp<fvPatchScalarField> clone
131         (
132             const DimensionedField<scalar, volMesh>& iF
133         ) const
134         {
135             return tmp<fvPatchScalarField>
136             (
137                 new mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
138                 (
139                     *this,
140                     iF
141                 )
142             );
143         }
146     // Member functions
148         // Evaluation functions
150             //- Calculate and return the yPlus at the boundary
151             virtual tmp<scalarField> yPlus() const;
154         // I-O
156             //- Write
157             virtual void write(Ostream& os) const;
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 } // End namespace RASModels
164 } // End namespace compressible
165 } // End namespace Foam
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 #endif
171 // ************************************************************************* //