DARegDbTurbulenceModelIncompressible.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<incompressible::turbulenceModel> turbulencePtr(
14  incompressible::turbulenceModel::New(U, phi, laminarTransport));
15  incompressible::turbulenceModel& turbulence = turbulencePtr();
16  DARegDbTurbulenceModelIncompressible turb(mesh,turbulence);
17 
18  Then, to get the registered turbulence model object from fvMesh:
19 
20  const DARegDbTurbulenceModelIncompressible& turbDb=
21  mesh.thisDb().lookupObject<DARegDbTurbulenceModelIncompressible>(
22  "DARegDbTurbulenceModelIncompressible");
23  const incompressible::turbulenceModel& turb1 = turbDb.getObject();
24 
25 \*---------------------------------------------------------------------------*/
26 
27 #ifndef DARegDbTurbulenceModelIncompressible_H
28 #define DARegDbTurbulenceModelIncompressible_H
29 
30 #include "fvOptions.H"
31 #include "singlePhaseTransportModel.H"
32 #include "turbulentTransportModel.H"
33 
34 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
35 
36 namespace Foam
37 {
38 
39 /*---------------------------------------------------------------------------*\
40  Class DARegDbTurbulenceModelIncompressible Declaration
41 \*---------------------------------------------------------------------------*/
42 
44  : public regIOobject
45 {
46 
47 private:
50 
52  void operator=(const DARegDbTurbulenceModelIncompressible&);
53 
55  const fvMesh& mesh_;
56 
58  const incompressible::turbulenceModel& turbulenceModel_;
59 
60 public:
63  const fvMesh& mesh,
64  const incompressible::turbulenceModel& turbulenceModel);
65 
68 
70  const incompressible::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 // ************************************************************************* //
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
Foam::DARegDbTurbulenceModelIncompressible::getObject
const incompressible::turbulenceModel & getObject() const
return fluidThermo
Definition: DARegDbTurbulenceModelIncompressible.H:70
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::DARegDbTurbulenceModelIncompressible
Definition: DARegDbTurbulenceModelIncompressible.H:43
Foam::DARegDbTurbulenceModelIncompressible::writeData
bool writeData(Ostream &os) const
this is a virtual function for regIOobject
Definition: DARegDbTurbulenceModelIncompressible.C:38
Foam::DARegDbTurbulenceModelIncompressible::~DARegDbTurbulenceModelIncompressible
virtual ~DARegDbTurbulenceModelIncompressible()
Destructor.
Definition: DARegDbTurbulenceModelIncompressible.C:33