SpalartAllmarasFv3.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2 
3  DAFoam : Discrete Adjoint with OpenFOAM
4  Version : v3
5 
6  Description:
7  SpalartAllmaras turbulence model with Fv3 term.
8  NOTE: this is just a dummy turbulence model implementation, just to
9  create the variable nuTilda. We shouldn't call any function in this class
10  Instead, we should call the correct function in DAModel/DATurbulenceModel
11 
12 \*---------------------------------------------------------------------------*/
13 
14 #ifndef SpalartAllmarasFv3_H
15 #define SpalartAllmarasFv3_H
16 
17 #include "RASModel.H"
18 #include "eddyViscosity.H"
19 
20 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
21 
22 namespace Foam
23 {
24 namespace RASModels
25 {
26 
27 /*---------------------------------------------------------------------------*\
28  Class SpalartAllmarasFv3 Declaration
29 \*---------------------------------------------------------------------------*/
30 
31 template<class BasicTurbulenceModel>
33  : public eddyViscosity<RASModel<BasicTurbulenceModel>>
34 {
35  // Private Member Functions
36 
37  // Disallow default bitwise copy construct and assignment
39  void operator=(const SpalartAllmarasFv3&);
40 
41 protected:
42  // Protected data
43 
44  // Fields
45 
46  volScalarField nuTilda_;
47 
48  //- Wall distance
49  // Note: different to wall distance in parent RASModel
50  // which is for near-wall cells only
51  const volScalarField& y_;
52 
53  virtual void correctNut();
54 
55 public:
56  typedef typename BasicTurbulenceModel::alphaField alphaField;
57  typedef typename BasicTurbulenceModel::rhoField rhoField;
58  typedef typename BasicTurbulenceModel::transportModel transportModel;
59 
60  //- Runtime type information
61  TypeName("SpalartAllmarasFv3");
62 
63  // Constructors
64 
65  //- Construct from components
67  const alphaField& alpha,
68  const rhoField& rho,
69  const volVectorField& U,
70  const surfaceScalarField& alphaRhoPhi,
71  const surfaceScalarField& phi,
72  const transportModel& transport,
73  const word& propertiesName = turbulenceModel::propertiesName,
74  const word& type = typeName);
75 
76  //- Destructor
78  {
79  }
80 
81  // Member Functions
82 
83  //- Re-read model coefficients if they have changed
84  virtual bool read();
85 
86  //- Return the turbulence kinetic energy
87  virtual tmp<volScalarField> k() const;
88 
89  //- Return the turbulence kinetic energy dissipation rate
90  virtual tmp<volScalarField> epsilon() const;
91 
92  //- Solve the turbulence equations and correct the turbulence viscosity
93  virtual void correct();
94 };
95 
96 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
97 
98 } // End namespace RASModels
99 } // End namespace Foam
100 
101 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
102 
103 #ifdef NoRepository
104 #include "SpalartAllmarasFv3.C"
105 #endif
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 #endif
110 
111 // ************************************************************************* //
U
U
Definition: pEqnPimpleDyM.H:60
Foam::RASModels::SpalartAllmarasFv3::transportModel
BasicTurbulenceModel::transportModel transportModel
Definition: SpalartAllmarasFv3.H:58
Foam::RASModels::SpalartAllmarasFv3::epsilon
virtual tmp< volScalarField > epsilon() const
Definition: SpalartAllmarasFv3.C:76
Foam::RASModels::SpalartAllmarasFv3::alphaField
BasicTurbulenceModel::alphaField alphaField
Definition: SpalartAllmarasFv3.H:56
Foam::RASModels::SpalartAllmarasFv3::correctNut
virtual void correctNut()
Definition: SpalartAllmarasFv3.C:23
Foam::RASModels::SpalartAllmarasFv3::correct
virtual void correct()
Definition: SpalartAllmarasFv3.C:83
phi
surfaceScalarField & phi
Definition: createRefsPimple.H:8
Foam::RASModels::SpalartAllmarasFv3::TypeName
TypeName("SpalartAllmarasFv3")
SpalartAllmarasFv3.C
Foam::RASModels::SpalartAllmarasFv3::k
virtual tmp< volScalarField > k() const
Definition: SpalartAllmarasFv3.C:70
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::RASModels::SpalartAllmarasFv3
Definition: SpalartAllmarasFv3.H:32
Foam::RASModels::SpalartAllmarasFv3::rhoField
BasicTurbulenceModel::rhoField rhoField
Definition: SpalartAllmarasFv3.H:57
Foam::RASModels::SpalartAllmarasFv3::nuTilda_
volScalarField nuTilda_
Definition: SpalartAllmarasFv3.H:46
Foam::RASModels::SpalartAllmarasFv3::~SpalartAllmarasFv3
virtual ~SpalartAllmarasFv3()
Definition: SpalartAllmarasFv3.H:77
Foam::RASModels::SpalartAllmarasFv3::read
virtual bool read()
Definition: SpalartAllmarasFv3.C:64
Foam::RASModels::SpalartAllmarasFv3::y_
const volScalarField & y_
Definition: SpalartAllmarasFv3.H:51
rho
volScalarField & rho
Definition: createRefsRhoSimpleC.H:8