DAFoam
v3.0.6
Discrete Adjoint with OpenFOAM
dafoam
src
adjoint
DARegDb
DARegDbTurbulenceModelCompressible.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
3
DAFoam : Discrete Adjoint with OpenFOAM
4
Version : v3
5
6
Description:
7
Register a turbulence model object to Foam::fvMesh
8
9
Example:
10
11
To register a turbulence model object to fvMesh:
12
13
autoPtr<compressible::turbulenceModel> turbulencePtr(
14
compressible::turbulenceModel::New(rho, U, phi, thermo));
15
compressible::turbulenceModel& turbulence = turbulencePtr();
16
DARegDbTurbulenceModelCompressible turb(mesh,turbulence);
17
18
Then, to get the registered turbulence model object from fvMesh:
19
20
const DARegDbTurbulenceModelCompressible& turbDb=
21
mesh.thisDb().lookupObject<DARegDbTurbulenceModelCompressible>(
22
"DARegDbTurbulenceModelCompressible");
23
const compressible::turbulenceModel& turb1 = turbDb.getObject();
24
25
\*---------------------------------------------------------------------------*/
26
27
#ifndef DARegDbTurbulenceModelCompressible_H
28
#define DARegDbTurbulenceModelCompressible_H
29
30
#include "fvOptions.H"
31
#include "fluidThermo.H"
32
#include "turbulentFluidThermoModel.H"
33
34
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
35
36
namespace
Foam
37
{
38
39
/*---------------------------------------------------------------------------*\
40
Class DARegDbTurbulenceModelCompressible Declaration
41
\*---------------------------------------------------------------------------*/
42
43
class
DARegDbTurbulenceModelCompressible
44
:
public
regIOobject
45
{
46
47
private
:
49
DARegDbTurbulenceModelCompressible
(
const
DARegDbTurbulenceModelCompressible
&);
50
52
void
operator=(
const
DARegDbTurbulenceModelCompressible
&);
53
55
const
fvMesh& mesh_;
56
58
const
compressible::turbulenceModel& turbulenceModel_;
59
60
public
:
62
DARegDbTurbulenceModelCompressible
(
63
const
fvMesh&
mesh
,
64
const
compressible::turbulenceModel& turbulenceModel);
65
67
virtual
~DARegDbTurbulenceModelCompressible
();
68
70
const
compressible::turbulenceModel&
getObject
()
const
71
{
72
return
turbulenceModel_;
73
}
74
76
bool
writeData
(Ostream& os)
const
;
77
};
78
79
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
80
81
}
// End namespace Foam
82
83
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
84
85
#endif
86
87
// ************************************************************************* //
Foam::DARegDbTurbulenceModelCompressible::writeData
bool writeData(Ostream &os) const
this is a virtual function for regIOobject
Definition:
DARegDbTurbulenceModelCompressible.C:38
Foam::DARegDbTurbulenceModelCompressible
Definition:
DARegDbTurbulenceModelCompressible.H:43
Foam::DARegDbTurbulenceModelCompressible::getObject
const compressible::turbulenceModel & getObject() const
return fluidThermo
Definition:
DARegDbTurbulenceModelCompressible.H:70
mesh
fvMesh & mesh
Definition:
createRefsHeatTransfer.H:4
Foam
Definition:
multiFreqScalarFvPatchField.C:144
Foam::DARegDbTurbulenceModelCompressible::~DARegDbTurbulenceModelCompressible
virtual ~DARegDbTurbulenceModelCompressible()
Destructor.
Definition:
DARegDbTurbulenceModelCompressible.C:33
Generated by
1.8.17