FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

nutSpalartAllmarasWallFunctionFvPatchScalarField.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::incompressible::RASModels::nutSpalartAllmarasWallFunctionFvPatchScalarField
00026 
00027 Description
00028     Wall function boundary condition for walls
00029 
00030 SourceFiles
00031     nutSpalartAllmarasWallFunctionFvPatchScalarField.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef nutSpalartAllmarasWallFunctionFvPatchScalarField_H
00036 #define nutSpalartAllmarasWallFunctionFvPatchScalarField_H
00037 
00038 #include <incompressibleRASModels/nutWallFunctionFvPatchScalarField.H>
00039 
00040 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00041 
00042 namespace Foam
00043 {
00044 namespace incompressible
00045 {
00046 namespace RASModels
00047 {
00048 
00049 /*---------------------------------------------------------------------------*\
00050            Class nutSpalartAllmarasWallFunctionFvPatch Declaration
00051 \*---------------------------------------------------------------------------*/
00052 
00053 class nutSpalartAllmarasWallFunctionFvPatchScalarField
00054 :
00055     public nutWallFunctionFvPatchScalarField
00056 {
00057 protected:
00058 
00059     // Protected member functions
00060 
00061         //- Calculate the turbulence viscosity
00062         virtual tmp<scalarField> calcNut() const;
00063 
00064         //- Calculate the friction velocity
00065         virtual tmp<scalarField> calcUTau(const scalarField& magGradU) const;
00066 
00067 
00068 public:
00069 
00070     //- Runtime type information
00071     TypeName("nutSpalartAllmarasWallFunction");
00072 
00073 
00074     // Constructors
00075 
00076         //- Construct from patch and internal field
00077         nutSpalartAllmarasWallFunctionFvPatchScalarField
00078         (
00079             const fvPatch&,
00080             const DimensionedField<scalar, volMesh>&
00081         );
00082 
00083         //- Construct from patch, internal field and dictionary
00084         nutSpalartAllmarasWallFunctionFvPatchScalarField
00085         (
00086             const fvPatch&,
00087             const DimensionedField<scalar, volMesh>&,
00088             const dictionary&
00089         );
00090 
00091         //- Construct by mapping given
00092         //  nutSpalartAllmarasWallFunctionFvPatchScalarField
00093         //  onto a new patch
00094         nutSpalartAllmarasWallFunctionFvPatchScalarField
00095         (
00096             const nutSpalartAllmarasWallFunctionFvPatchScalarField&,
00097             const fvPatch&,
00098             const DimensionedField<scalar, volMesh>&,
00099             const fvPatchFieldMapper&
00100         );
00101 
00102         //- Construct as copy
00103         nutSpalartAllmarasWallFunctionFvPatchScalarField
00104         (
00105             const nutSpalartAllmarasWallFunctionFvPatchScalarField&
00106         );
00107 
00108         //- Construct and return a clone
00109         virtual tmp<fvPatchScalarField> clone() const
00110         {
00111             return tmp<fvPatchScalarField>
00112             (
00113                 new nutSpalartAllmarasWallFunctionFvPatchScalarField(*this)
00114             );
00115         }
00116 
00117         //- Construct as copy setting internal field reference
00118         nutSpalartAllmarasWallFunctionFvPatchScalarField
00119         (
00120             const nutSpalartAllmarasWallFunctionFvPatchScalarField&,
00121             const DimensionedField<scalar, volMesh>&
00122         );
00123 
00124         //- Construct and return a clone setting internal field reference
00125         virtual tmp<fvPatchScalarField> clone
00126         (
00127             const DimensionedField<scalar, volMesh>& iF
00128         ) const
00129         {
00130             return tmp<fvPatchScalarField>
00131             (
00132                 new nutSpalartAllmarasWallFunctionFvPatchScalarField(*this, iF)
00133             );
00134         }
00135 
00136 
00137     // Member functions
00138 
00139         // Evaluation functions
00140 
00141             //- Calculate and return the yPlus at the boundary
00142             virtual tmp<scalarField> yPlus() const;
00143 
00144 
00145         // I-O
00146 
00147             //- Write
00148             virtual void write(Ostream& os) const;
00149 };
00150 
00151 
00152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00153 
00154 } // End namespace RASModels
00155 } // End namespace incompressible
00156 } // End namespace Foam
00157 
00158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00159 
00160 #endif
00161 
00162 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines