DAObjFuncTotalTemperatureRatio.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2 
3  DAFoam : Discrete Adjoint with OpenFOAM
4  Version : v3
5 
6  Description:
7  Child class for total temperature ratio
8 
9 \*---------------------------------------------------------------------------*/
10 
11 #ifndef DAObjFuncTotalTemperatureRatio_H
12 #define DAObjFuncTotalTemperatureRatio_H
13 
14 #include "DAObjFunc.H"
15 #include "addToRunTimeSelectionTable.H"
16 
17 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
18 
19 namespace Foam
20 {
21 
22 /*---------------------------------------------------------------------------*\
23  Class DAObjFuncTotalTemperatureRatio Declaration
24 \*---------------------------------------------------------------------------*/
25 
27  : public DAObjFunc
28 {
29 
30 protected:
31 
33  scalar areaSumInlet_ = -9999.0;
34 
36  scalar areaSumOutlet_ = -9999.0;
37 
39  wordList outletPatches_;
40 
42  wordList inletPatches_;
43 
44  scalar TTInRef_ = 0.0;
45 
46  scalar TTOutRef_ = 0.0;
47 
48  scalar Cp_;
49 
50  scalar gamma_;
51 
52 public:
53  TypeName("totalTemperatureRatio");
54  // Constructors
55 
56  //- Construct from components
58  const fvMesh& mesh,
59  const DAOption& daOption,
60  const DAModel& daModel,
61  const DAIndex& daIndex,
62  const DAResidual& daResidual,
63  const word objFuncName,
64  const word objFuncPart,
65  const dictionary& objFuncDict);
66 
67  //- Destructor
69  {
70  }
71 
73  virtual void calcObjFunc(
74  const labelList& objFuncFaceSources,
75  const labelList& objFuncCellSources,
76  scalarList& objFuncFaceValues,
77  scalarList& objFuncCellValues,
78  scalar& objFuncValue);
79 };
80 
81 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82 
83 } // End namespace Foam
84 
85 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
86 
87 #endif
88 
89 // ************************************************************************* //
Foam::DAObjFuncTotalTemperatureRatio
Definition: DAObjFuncTotalTemperatureRatio.H:26
Foam::DAObjFuncTotalTemperatureRatio::outletPatches_
wordList outletPatches_
names of outlet patches
Definition: DAObjFuncTotalTemperatureRatio.H:39
Foam::DAOption
Definition: DAOption.H:29
daOption
DAOption daOption(mesh, pyOptions_)
Foam::DAObjFuncTotalTemperatureRatio::calcObjFunc
virtual void calcObjFunc(const labelList &objFuncFaceSources, const labelList &objFuncCellSources, scalarList &objFuncFaceValues, scalarList &objFuncCellValues, scalar &objFuncValue)
calculate the value of objective function
Definition: DAObjFuncTotalTemperatureRatio.C:65
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
Foam::DAIndex
Definition: DAIndex.H:32
Foam::DAObjFuncTotalTemperatureRatio::TTOutRef_
scalar TTOutRef_
Definition: DAObjFuncTotalTemperatureRatio.H:46
Foam::DAObjFuncTotalTemperatureRatio::areaSumOutlet_
scalar areaSumOutlet_
the area of all outlet patches
Definition: DAObjFuncTotalTemperatureRatio.H:36
Foam::DAModel
Definition: DAModel.H:59
Foam::DAObjFuncTotalTemperatureRatio::TTInRef_
scalar TTInRef_
Definition: DAObjFuncTotalTemperatureRatio.H:44
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::DAObjFuncTotalTemperatureRatio::inletPatches_
wordList inletPatches_
names of inlet patches
Definition: DAObjFuncTotalTemperatureRatio.H:42
Foam::DAResidual
Definition: DAResidual.H:35
Foam::DAObjFuncTotalTemperatureRatio::Cp_
scalar Cp_
Definition: DAObjFuncTotalTemperatureRatio.H:48
Foam::DAObjFuncTotalTemperatureRatio::~DAObjFuncTotalTemperatureRatio
virtual ~DAObjFuncTotalTemperatureRatio()
Definition: DAObjFuncTotalTemperatureRatio.H:68
daModel
DAModel daModel(mesh, daOption)
Foam::DAObjFuncTotalTemperatureRatio::DAObjFuncTotalTemperatureRatio
DAObjFuncTotalTemperatureRatio(const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex, const DAResidual &daResidual, const word objFuncName, const word objFuncPart, const dictionary &objFuncDict)
Definition: DAObjFuncTotalTemperatureRatio.C:19
Foam::DAObjFuncTotalTemperatureRatio::areaSumInlet_
scalar areaSumInlet_
the area of all inlet patches
Definition: DAObjFuncTotalTemperatureRatio.H:33
daIndex
DAIndex daIndex(mesh, daOption, daModel)
Foam::DAObjFuncTotalTemperatureRatio::gamma_
scalar gamma_
Definition: DAObjFuncTotalTemperatureRatio.H:50
DAObjFunc.H
Foam::DAObjFunc
Definition: DAObjFunc.H:33
Foam::DAObjFuncTotalTemperatureRatio::TypeName
TypeName("totalTemperatureRatio")