DAObjFuncMassFlowRate.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 mass flow rate
8 
9 \*---------------------------------------------------------------------------*/
10 
11 #ifndef DAObjFuncMassFlowRate_H
12 #define DAObjFuncMassFlowRate_H
13 
14 #include "DAObjFunc.H"
15 #include "addToRunTimeSelectionTable.H"
16 
17 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
18 
19 namespace Foam
20 {
21 
22 /*---------------------------------------------------------------------------*\
23  Class DAObjFuncMassFlowRate Declaration
24 \*---------------------------------------------------------------------------*/
25 
27  : public DAObjFunc
28 {
29 
30 protected:
31 
34 
36  volScalarField rho_;
37 
39  scalar areaSum_ = -9999.0;
40 
41 public:
42  TypeName("massFlowRate");
43  // Constructors
44 
45  //- Construct from components
47  const fvMesh& mesh,
48  const DAOption& daOption,
49  const DAModel& daModel,
50  const DAIndex& daIndex,
51  const DAResidual& daResidual,
52  const word objFuncName,
53  const word objFuncPart,
54  const dictionary& objFuncDict);
55 
56  //- Destructor
58  {
59  }
60 
62  virtual void calcObjFunc(
63  const labelList& objFuncFaceSources,
64  const labelList& objFuncCellSources,
65  scalarList& objFuncFaceValues,
66  scalarList& objFuncCellValues,
67  scalar& objFuncValue);
68 };
69 
70 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71 
72 } // End namespace Foam
73 
74 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
75 
76 #endif
77 
78 // ************************************************************************* //
Foam::DAObjFuncMassFlowRate::daTurb_
DATurbulenceModel & daTurb_
DATurbulenceModel object.
Definition: DAObjFuncMassFlowRate.H:33
Foam::DAObjFuncMassFlowRate::DAObjFuncMassFlowRate
DAObjFuncMassFlowRate(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: DAObjFuncMassFlowRate.C:19
Foam::DAObjFuncMassFlowRate::~DAObjFuncMassFlowRate
virtual ~DAObjFuncMassFlowRate()
Definition: DAObjFuncMassFlowRate.H:57
Foam::DAOption
Definition: DAOption.H:29
daOption
DAOption daOption(mesh, pyOptions_)
Foam::DAObjFuncMassFlowRate::areaSum_
scalar areaSum_
the area of all inlet patches
Definition: DAObjFuncMassFlowRate.H:39
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
Foam::DAIndex
Definition: DAIndex.H:32
Foam::DAModel
Definition: DAModel.H:59
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::DAObjFuncMassFlowRate::rho_
volScalarField rho_
density
Definition: DAObjFuncMassFlowRate.H:36
Foam::DAObjFuncMassFlowRate::TypeName
TypeName("massFlowRate")
Foam::DAResidual
Definition: DAResidual.H:35
Foam::DATurbulenceModel
Definition: DATurbulenceModel.H:61
Foam::DAObjFuncMassFlowRate
Definition: DAObjFuncMassFlowRate.H:26
Foam::DAObjFuncMassFlowRate::calcObjFunc
virtual void calcObjFunc(const labelList &objFuncFaceSources, const labelList &objFuncCellSources, scalarList &objFuncFaceValues, scalarList &objFuncCellValues, scalar &objFuncValue)
calculate the value of objective function
Definition: DAObjFuncMassFlowRate.C:62
daModel
DAModel daModel(mesh, daOption)
daIndex
DAIndex daIndex(mesh, daOption, daModel)
DAObjFunc.H
Foam::DAObjFunc
Definition: DAObjFunc.H:33