1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-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::
27 mutSpalartAllmarasWallFunctionFvPatchScalarField
30 Wall function boundary condition for walls
33 mutSpalartAllmarasWallFunctionFvPatchScalarField.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef compressibleMutSpalartAllmarasWallFunctionFvPatchScalarField_H
38 #define compressibleMutSpalartAllmarasWallFunctionFvPatchScalarField_H
40 #include "mutWallFunctionFvPatchScalarField.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 namespace compressible
51 /*---------------------------------------------------------------------------*\
52 Class mutSpalartAllmarasWallFunctionFvPatchScalarField Declaration
53 \*---------------------------------------------------------------------------*/
55 class mutSpalartAllmarasWallFunctionFvPatchScalarField
57 public mutWallFunctionFvPatchScalarField
61 // Protected member functions
63 //- Calculate the turbulence viscosity
64 virtual tmp<scalarField> calcMut() const;
66 //- Calculate the friction velocity
67 virtual tmp<scalarField> calcUTau(const scalarField& magGradU) const;
72 //- Runtime type information
73 TypeName("mutSpalartAllmarasWallFunction");
78 //- Construct from patch and internal field
79 mutSpalartAllmarasWallFunctionFvPatchScalarField
82 const DimensionedField<scalar, volMesh>&
85 //- Construct from patch, internal field and dictionary
86 mutSpalartAllmarasWallFunctionFvPatchScalarField
89 const DimensionedField<scalar, volMesh>&,
93 //- Construct by mapping given
94 // mutSpalartAllmarasWallFunctionFvPatchScalarField
96 mutSpalartAllmarasWallFunctionFvPatchScalarField
98 const mutSpalartAllmarasWallFunctionFvPatchScalarField&,
100 const DimensionedField<scalar, volMesh>&,
101 const fvPatchFieldMapper&
104 //- Construct as copy
105 mutSpalartAllmarasWallFunctionFvPatchScalarField
107 const mutSpalartAllmarasWallFunctionFvPatchScalarField&
110 //- Construct and return a clone
111 virtual tmp<fvPatchScalarField> clone() const
113 return tmp<fvPatchScalarField>
115 new mutSpalartAllmarasWallFunctionFvPatchScalarField(*this)
119 //- Construct as copy setting internal field reference
120 mutSpalartAllmarasWallFunctionFvPatchScalarField
122 const mutSpalartAllmarasWallFunctionFvPatchScalarField&,
123 const DimensionedField<scalar, volMesh>&
126 //- Construct and return a clone setting internal field reference
127 virtual tmp<fvPatchScalarField> clone
129 const DimensionedField<scalar, volMesh>& iF
132 return tmp<fvPatchScalarField>
134 new mutSpalartAllmarasWallFunctionFvPatchScalarField(*this, iF)
141 // Evaluation functions
143 //- Calculate and return the yPlus at the boundary
144 virtual tmp<scalarField> yPlus() const;
150 virtual void write(Ostream& os) const;
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 } // End namespace RASModels
157 } // End namespace compressible
158 } // End namespace Foam
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 // ************************************************************************* //