SpalartAllmarasFv3FieldInversion.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 and the beta
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 SpalartAllmarasFv3FieldInversion_H
15 #define SpalartAllmarasFv3FieldInversion_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 SpalartAllmarasFv3FieldInversion 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 SpalartAllmarasFv3FieldInversion&);
40 
41 protected:
42  // Protected data
43 
44  // Fields
45 
47  volScalarField nuTilda_;
48 
49  volScalarField betaFieldInversion_;
50 
51  volVectorField UData_;
52 
53  volScalarField surfaceFriction_;
54 
55  volScalarField surfaceFrictionData_;
56 
57  volScalarField pData_;
58 
59  volScalarField USingleComponentData_;
60 
61  //- Wall distance
62  // Note: different to wall distance in parent RASModel
63  // which is for near-wall cells only
64  const volScalarField& y_;
65 
66  virtual void correctNut();
67 
68 public:
69  typedef typename BasicTurbulenceModel::alphaField alphaField;
70  typedef typename BasicTurbulenceModel::rhoField rhoField;
71  typedef typename BasicTurbulenceModel::transportModel transportModel;
72 
73  //- Runtime type information
74  TypeName("SpalartAllmarasFv3FieldInversion");
75 
76  // Constructors
77 
78  //- Construct from components
80  const alphaField& alpha,
81  const rhoField& rho,
82  const volVectorField& U,
83  const surfaceScalarField& alphaRhoPhi,
84  const surfaceScalarField& phi,
85  const transportModel& transport,
86  const word& propertiesName = turbulenceModel::propertiesName,
87  const word& type = typeName);
88 
89  //- Destructor
91  {
92  }
93 
94  // Member Functions
95 
96  //- Re-read model coefficients if they have changed
97  virtual bool read();
98 
99  //- Return the turbulence kinetic energy
100  virtual tmp<volScalarField> k() const;
101 
102  //- Return the turbulence kinetic energy dissipation rate
103  virtual tmp<volScalarField> epsilon() const;
104 
105  //- Solve the turbulence equations and correct the turbulence viscosity
106  virtual void correct();
107 };
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 } // End namespace RASModels
112 } // End namespace Foam
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 #ifdef NoRepository
118 #endif
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #endif
123 
124 // ************************************************************************* //
U
U
Definition: pEqnPimpleDyM.H:60
SpalartAllmarasFv3FieldInversion.C
Foam::RASModels::SpalartAllmarasFv3FieldInversion
Definition: SpalartAllmarasFv3FieldInversion.H:32
Foam::RASModels::SpalartAllmarasFv3FieldInversion::k
virtual tmp< volScalarField > k() const
Definition: SpalartAllmarasFv3FieldInversion.C:127
Foam::RASModels::SpalartAllmarasFv3FieldInversion::~SpalartAllmarasFv3FieldInversion
virtual ~SpalartAllmarasFv3FieldInversion()
Definition: SpalartAllmarasFv3FieldInversion.H:90
Foam::RASModels::SpalartAllmarasFv3FieldInversion::TypeName
TypeName("SpalartAllmarasFv3FieldInversion")
Foam::RASModels::SpalartAllmarasFv3FieldInversion::read
virtual bool read()
Definition: SpalartAllmarasFv3FieldInversion.C:121
Foam::RASModels::SpalartAllmarasFv3FieldInversion::correct
virtual void correct()
Definition: SpalartAllmarasFv3FieldInversion.C:140
Foam::RASModels::SpalartAllmarasFv3FieldInversion::alphaField
BasicTurbulenceModel::alphaField alphaField
Definition: SpalartAllmarasFv3FieldInversion.H:69
Foam::RASModels::SpalartAllmarasFv3FieldInversion::pData_
volScalarField pData_
Definition: SpalartAllmarasFv3FieldInversion.H:57
Foam::RASModels::SpalartAllmarasFv3FieldInversion::betaFieldInversion_
volScalarField betaFieldInversion_
Definition: SpalartAllmarasFv3FieldInversion.H:49
Foam::RASModels::SpalartAllmarasFv3FieldInversion::surfaceFriction_
volScalarField surfaceFriction_
Definition: SpalartAllmarasFv3FieldInversion.H:53
Foam::RASModels::SpalartAllmarasFv3FieldInversion::rhoField
BasicTurbulenceModel::rhoField rhoField
Definition: SpalartAllmarasFv3FieldInversion.H:70
Foam::RASModels::SpalartAllmarasFv3FieldInversion::y_
const volScalarField & y_
Definition: SpalartAllmarasFv3FieldInversion.H:64
phi
surfaceScalarField & phi
Definition: createRefsPimple.H:8
Foam::RASModels::SpalartAllmarasFv3FieldInversion::correctNut
virtual void correctNut()
Definition: SpalartAllmarasFv3FieldInversion.C:23
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::RASModels::SpalartAllmarasFv3FieldInversion::epsilon
virtual tmp< volScalarField > epsilon() const
Definition: SpalartAllmarasFv3FieldInversion.C:133
Foam::RASModels::SpalartAllmarasFv3FieldInversion::USingleComponentData_
volScalarField USingleComponentData_
Definition: SpalartAllmarasFv3FieldInversion.H:59
Foam::RASModels::SpalartAllmarasFv3FieldInversion::surfaceFrictionData_
volScalarField surfaceFrictionData_
Definition: SpalartAllmarasFv3FieldInversion.H:55
Foam::RASModels::SpalartAllmarasFv3FieldInversion::nuTilda_
volScalarField nuTilda_
turbulence variable for SA
Definition: SpalartAllmarasFv3FieldInversion.H:47
Foam::RASModels::SpalartAllmarasFv3FieldInversion::transportModel
BasicTurbulenceModel::transportModel transportModel
Definition: SpalartAllmarasFv3FieldInversion.H:71
Foam::RASModels::SpalartAllmarasFv3FieldInversion::UData_
volVectorField UData_
Definition: SpalartAllmarasFv3FieldInversion.H:51
rho
volScalarField & rho
Definition: createRefsRhoSimpleC.H:8