DAObjFuncWallHeatFlux.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 heat flux
8 
9 \*---------------------------------------------------------------------------*/
10 
11 #ifndef DAObjFuncWallHeatFlux_H
12 #define DAObjFuncWallHeatFlux_H
13 
14 #include "DAObjFunc.H"
15 #include "addToRunTimeSelectionTable.H"
16 
17 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
18 
19 namespace Foam
20 {
21 
22 /*---------------------------------------------------------------------------*\
23  Class DAObjFuncWallHeatFlux Declaration
24 \*---------------------------------------------------------------------------*/
25 
27  : public DAObjFunc
28 {
29 
30 protected:
31 #ifdef CompressibleFlow
32  fluidThermo& thermo_;
34 #endif
35 
37  scalar Cp_ = -9999.0;
38 
40  scalar k_ = -9999.0;
41 
42 #ifndef SolidDASolver
45 #endif
46 
48  volScalarField wallHeatFlux_;
49 
51  scalar areaSum_ = -9999.0;
52 
53 public:
54  TypeName("wallHeatFlux");
55  // Constructors
56 
57  //- Construct from components
59  const fvMesh& mesh,
60  const DAOption& daOption,
61  const DAModel& daModel,
62  const DAIndex& daIndex,
63  const DAResidual& daResidual,
64  const word objFuncName,
65  const word objFuncPart,
66  const dictionary& objFuncDict);
67 
68  //- Destructor
70  {
71  }
72 
74  virtual void calcObjFunc(
75  const labelList& objFuncFaceSources,
76  const labelList& objFuncCellSources,
77  scalarList& objFuncFaceValues,
78  scalarList& objFuncCellValues,
79  scalar& objFuncValue);
80 };
81 
82 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
83 
84 } // End namespace Foam
85 
86 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
87 
88 #endif
89 
90 // ************************************************************************* //
Foam::DAObjFuncWallHeatFlux::Cp_
scalar Cp_
Cp used in incompressible heatFlux calculation.
Definition: DAObjFuncWallHeatFlux.H:37
Foam::DAObjFuncWallHeatFlux::DAObjFuncWallHeatFlux
DAObjFuncWallHeatFlux(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: DAObjFuncWallHeatFlux.C:19
Foam::DAObjFuncWallHeatFlux::calcObjFunc
virtual void calcObjFunc(const labelList &objFuncFaceSources, const labelList &objFuncCellSources, scalarList &objFuncFaceValues, scalarList &objFuncCellValues, scalar &objFuncValue)
calculate the value of objective function
Definition: DAObjFuncWallHeatFlux.C:138
Foam::DAOption
Definition: DAOption.H:29
daOption
DAOption daOption(mesh, pyOptions_)
Foam::DAObjFuncWallHeatFlux
Definition: DAObjFuncWallHeatFlux.H:26
Foam::DAObjFuncWallHeatFlux::wallHeatFlux_
volScalarField wallHeatFlux_
wall heat flux field
Definition: DAObjFuncWallHeatFlux.H:48
Foam::DAObjFuncWallHeatFlux::TypeName
TypeName("wallHeatFlux")
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::DAResidual
Definition: DAResidual.H:35
Foam::DATurbulenceModel
Definition: DATurbulenceModel.H:61
daModel
DAModel daModel(mesh, daOption)
daIndex
DAIndex daIndex(mesh, daOption, daModel)
Foam::DAObjFuncWallHeatFlux::daTurb_
DATurbulenceModel & daTurb_
DATurbulenceModel object.
Definition: DAObjFuncWallHeatFlux.H:44
Foam::DAObjFuncWallHeatFlux::~DAObjFuncWallHeatFlux
virtual ~DAObjFuncWallHeatFlux()
Definition: DAObjFuncWallHeatFlux.H:69
DAObjFunc.H
Foam::DAObjFuncWallHeatFlux::areaSum_
scalar areaSum_
the area of all heat flux patches
Definition: DAObjFuncWallHeatFlux.H:51
Foam::DAObjFuncWallHeatFlux::k_
scalar k_
thermal conductivity for solid heatFlux calculation
Definition: DAObjFuncWallHeatFlux.H:40
Foam::DAObjFunc
Definition: DAObjFunc.H:33