SpalartAllmaras.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2019-2021 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "SpalartAllmaras.H"
30 
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 namespace RASModels
36 {
37 
38 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
39 
40 template<class BasicTurbulenceModel>
42 (
43  const volScalarField& chi,
44  const volScalarField& fv1,
45  const volTensorField& gradU
46 ) const
47 {
48  return this->y_;
49 }
50 
51 
52 template<class BasicTurbulenceModel>
54 {
55  // Correct the turbulence viscosity
58 
59  // Correct the turbulence thermal diffusivity
60  BasicTurbulenceModel::correctNut();
61 }
62 
63 
64 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
65 
66 template<class BasicTurbulenceModel>
68 (
69  const alphaField& alpha,
70  const rhoField& rho,
71  const volVectorField& U,
72  const surfaceScalarField& alphaRhoPhi,
73  const surfaceScalarField& phi,
74  const transportModel& transport,
75  const word& propertiesName,
76  const word& type
77 )
78 :
79  SpalartAllmarasBase<eddyViscosity<RASModel<BasicTurbulenceModel>>>
80  (
81  type,
82  alpha,
83  rho,
84  U,
85  alphaRhoPhi,
86  phi,
87  transport,
88  propertiesName
89  )
90 {
91  if (type == typeName)
92  {
93  this->printCoeffs(type);
94  }
95 }
96 
97 
98 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
99 
100 } // End namespace RASModels
101 } // End namespace Foam
102 
103 // ************************************************************************* //
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:51
Templated abstract base class for RAS turbulence models.
Definition: RASModel.H:77
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: POSIX.C:799
A class for handling words, derived from Foam::string.
Definition: word.H:63
virtual void printCoeffs(const word &type)
Print model coefficients.
Definition: RASModel.C:27
Spalart-Allmaras one-transport-equation linear-eddy-viscosity turbulence closure model for incompress...
U
Definition: pEqn.H:72
Base-class for all transport models used by the incompressible turbulence models. ...
virtual tmp< volScalarField > dTilda(const volScalarField &chi, const volScalarField &fv1, const volTensorField &gradU) const
Return the length scale.
A class for managing temporary objects.
Definition: HashPtrTable.H:50
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Namespace for OpenFOAM.