Forward compatibility: flex
[foam-extend-3.2.git] / src / turbulenceModels / incompressible / RAS / SpalartAllmaras / SpalartAllmaras.H
blobe1bc435403163cdaade3f877d03a54f431ca765a
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend 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 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::incompressible::RASModels::SpalartAllmaras
27 Description
28     Spalart-Allmaras 1-eqn mixing-length model for incompressible external
29     flows.
31     References:
32     @verbatim
33         "A One-Equation Turbulence Model for Aerodynamic Flows"
34         P.R. Spalart,
35         S.R. Allmaras,
36         La Recherche A´rospatiale, No. 1, 1994, pp. 5–21.
38         Extended according to:
40         "An Unstructured Grid Generation and Adaptive Solution Technique
41         for High Reynolds Number Compressible Flows"
42         G.A. Ashford,
43         Ph.D. thesis, University of Michigan, 1996.
44     @endverbatim
46     The default model coefficients correspond to the following:
47     @verbatim
48         SpalartAllmarasCoeffs
49         {
50             Cb1         0.1355;
51             Cb2         0.622;
52             Cw2         0.3;
53             Cw3         2.0;
54             Cv1         7.1;
55             Cv2         5.0;
56             sigmaNut    0.66666;
57             kappa       0.41;
58         }
59     @endverbatim
61 SourceFiles
62     SpalartAllmaras.C
64 \*---------------------------------------------------------------------------*/
66 #ifndef SpalartAllmaras_H
67 #define SpalartAllmaras_H
69 #include "RASModel.H"
70 #include "wallDist.H"
72 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
74 namespace Foam
76 namespace incompressible
78 namespace RASModels
81 /*---------------------------------------------------------------------------*\
82                            Class SpalartAllmaras Declaration
83 \*---------------------------------------------------------------------------*/
85 class SpalartAllmaras
87     public RASModel
89     // Private data
91         // Model coefficients
93             dimensionedScalar sigmaNut_;
94             dimensionedScalar kappa_;
96             dimensionedScalar Cb1_;
97             dimensionedScalar Cb2_;
98             dimensionedScalar Cw1_;
99             dimensionedScalar Cw2_;
100             dimensionedScalar Cw3_;
101             dimensionedScalar Cv1_;
102             dimensionedScalar Cv2_;
105         // Fields
107             volScalarField nuTilda_;
108             volScalarField nut_;
110             wallDist d_;
113     // Private member functions
115         tmp<volScalarField> chi() const;
117         tmp<volScalarField> fv1(const volScalarField& chi) const;
119         tmp<volScalarField> fv2
120         (
121             const volScalarField& chi,
122             const volScalarField& fv1
123         ) const;
125         tmp<volScalarField> fv3
126         (
127             const volScalarField& chi,
128             const volScalarField& fv1
129         ) const;
131         tmp<volScalarField> fw(const volScalarField& Stilda) const;
134 public:
136     //- Runtime type information
137     TypeName("SpalartAllmaras");
140     // Constructors
142         //- Construct from components
143         SpalartAllmaras
144         (
145             const volVectorField& U,
146             const surfaceScalarField& phi,
147             transportModel& transport
148         );
151     // Destructor
153         virtual ~SpalartAllmaras()
154         {}
157     // Member Functions
159         //- Return the turbulence viscosity
160         virtual tmp<volScalarField> nut() const
161         {
162             return nut_;
163         }
165         //- Return the effective diffusivity for nuTilda
166         tmp<volScalarField> DnuTildaEff() const;
168         //- Return the turbulence kinetic energy
169         virtual tmp<volScalarField> k() const;
171         //- Return the turbulence kinetic energy dissipation rate
172         virtual tmp<volScalarField> epsilon() const;
174         //- Return the Reynolds stress tensor
175         virtual tmp<volSymmTensorField> R() const;
177         //- Return the effective stress tensor including the laminar stress
178         virtual tmp<volSymmTensorField> devReff() const;
180         //- Return the source term for the momentum equation
181         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
183         //- Solve the turbulence equations and correct the turbulence viscosity
184         virtual void correct();
186         //- Read RASProperties dictionary
187         virtual bool read();
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 } // End namespace RASModels
194 } // End namespace incompressible
195 } // End namespace Foam
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 #endif
201 // ************************************************************************* //