kOmegaFieldInversionOmega.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2 
3  DAFoam : Discrete Adjoint with OpenFOAM
4  Version : v3
5 
6 \*---------------------------------------------------------------------------*/
7 
9 #include "fvOptions.H"
10 #include "bound.H"
11 #include "wallDist.H"
12 
13 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
14 
15 namespace Foam
16 {
17 namespace RASModels
18 {
19 
20 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
21 
22 template<class BasicTurbulenceModel>
24 {
25 }
26 
27 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
28 
29 template<class BasicTurbulenceModel>
31  const alphaField& alpha,
32  const rhoField& rho,
33  const volVectorField& U,
34  const surfaceScalarField& alphaRhoPhi,
35  const surfaceScalarField& phi,
36  const transportModel& transport,
37  const word& propertiesName,
38  const word& type)
39  : eddyViscosity<RASModel<BasicTurbulenceModel>>(
40  type,
41  alpha,
42  rho,
43  U,
44  alphaRhoPhi,
45  phi,
46  transport,
47  propertiesName),
48  omega_(
49  IOobject(
50  "omega",
51  this->runTime_.timeName(),
52  this->mesh_,
53  IOobject::MUST_READ,
54  IOobject::AUTO_WRITE),
55  this->mesh_),
56  k_(
57  IOobject(
58  "k",
59  this->runTime_.timeName(),
60  this->mesh_,
61  IOobject::MUST_READ,
62  IOobject::AUTO_WRITE),
63  this->mesh_),
64  betaFieldInversion_(
65  IOobject(
66  "betaFieldInversion",
67  this->runTime_.timeName(),
68  this->mesh_,
69  IOobject::MUST_READ,
70  IOobject::AUTO_WRITE),
71  this->mesh_),
72  surfaceFriction_(
73  IOobject(
74  "surfaceFriction",
75  this->runTime_.timeName(),
76  this->mesh_,
77  IOobject::READ_IF_PRESENT,
78  IOobject::AUTO_WRITE),
79  this->mesh_,
80  dimensionedScalar("surfaceFriction", dimensionSet(0, 0, 0, 0, 0, 0, 0), 0.0),
81  zeroGradientFvPatchField<scalar>::typeName),
82  surfaceFrictionData_(
83  IOobject(
84  "surfaceFrictionData",
85  this->runTime_.timeName(),
86  this->mesh_,
87  IOobject::READ_IF_PRESENT,
88  IOobject::AUTO_WRITE),
89  this->mesh_,
90  dimensionedScalar("surfaceFrictionData", dimensionSet(0, 0, 0, 0, 0, 0, 0), 0.0),
91  zeroGradientFvPatchField<scalar>::typeName),
92  pData_(
93  IOobject(
94  "pData",
95  this->runTime_.timeName(),
96  this->mesh_,
97  IOobject::READ_IF_PRESENT,
98  IOobject::AUTO_WRITE),
99  this->mesh_,
100  dimensionedScalar("pData", dimensionSet(0, 0, 0, 0, 0, 0, 0), 0.0),
101  zeroGradientFvPatchField<scalar>::typeName),
102  UData_(
103  IOobject(
104  "UData",
105  this->runTime_.timeName(),
106  this->mesh_,
107  IOobject::READ_IF_PRESENT,
108  IOobject::AUTO_WRITE),
109  this->mesh_,
110  dimensionedVector("UData", dimensionSet(0, 1, -1, 0, 0, 0, 0), vector(0, 0, 0)),
111  "zeroGradient"),
112  USingleComponentData_(
113  IOobject(
114  "USingleComponentData",
115  this->runTime_.timeName(),
116  this->mesh_,
117  IOobject::READ_IF_PRESENT,
118  IOobject::AUTO_WRITE),
119  this->mesh_,
120  dimensionedScalar("USingleComponentData", dimensionSet(0, 0, 0, 0, 0, 0, 0), 0.0),
121  zeroGradientFvPatchField<scalar>::typeName),
122  y_(wallDist::New(this->mesh_).y())
123 
124 {
125 }
126 
127 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
128 
129 template<class BasicTurbulenceModel>
131 {
132 
133  return true;
134 }
135 
136 template<class BasicTurbulenceModel>
138 {
139  return this->nut_;
140 }
141 
142 template<class BasicTurbulenceModel>
144 {
145  return this->nut_;
146 }
147 
148 template<class BasicTurbulenceModel>
150 {
151 }
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 } // End namespace RASModels
156 } // End namespace Foam
157 
158 // ************************************************************************* //
Foam::RASModels::kOmegaFieldInversionOmega::read
virtual bool read()
Definition: kOmegaFieldInversionOmega.C:130
U
U
Definition: pEqnPimpleDyM.H:60
Foam::RASModels::kOmegaFieldInversionOmega::epsilon
virtual tmp< volScalarField > epsilon() const
Definition: kOmegaFieldInversionOmega.C:143
Foam::RASModels::kOmegaFieldInversionOmega
Definition: kOmegaFieldInversionOmega.H:30
Foam::RASModels::kOmegaFieldInversionOmega::alphaField
BasicTurbulenceModel::alphaField alphaField
Definition: kOmegaFieldInversionOmega.H:76
Foam::RASModels::kOmegaFieldInversionOmega::rhoField
BasicTurbulenceModel::rhoField rhoField
Definition: kOmegaFieldInversionOmega.H:77
kOmegaFieldInversionOmega.H
phi
surfaceScalarField & phi
Definition: createRefsPimple.H:8
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::RASModels::kOmegaFieldInversionOmega::k
virtual tmp< volScalarField > k() const
Definition: kOmegaFieldInversionOmega.C:137
Foam::RASModels::kOmegaFieldInversionOmega::correct
virtual void correct()
Definition: kOmegaFieldInversionOmega.C:149
Foam::RASModels::kOmegaFieldInversionOmega::transportModel
BasicTurbulenceModel::transportModel transportModel
Definition: kOmegaFieldInversionOmega.H:78
Foam::RASModels::kOmegaFieldInversionOmega::correctNut
virtual void correctNut()
Definition: kOmegaFieldInversionOmega.C:23
rho
volScalarField & rho
Definition: createRefsRhoSimpleC.H:8