DAFunctionForce.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2 
3  DAFoam : Discrete Adjoint with OpenFOAM
4  Version : v4
5 
6  Description:
7  Child class for force
8 
9 \*---------------------------------------------------------------------------*/
10 
11 #ifndef DAFunctionForce_H
12 #define DAFunctionForce_H
13 
14 #include "DAFunction.H"
15 #include "addToRunTimeSelectionTable.H"
16 #include "mixedFvPatchFields.H"
17 #include "DAGlobalVar.H"
18 
19 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
20 
21 namespace Foam
22 {
23 
24 /*---------------------------------------------------------------------------*\
25  Class DAFunctionForce Declaration
26 \*---------------------------------------------------------------------------*/
27 
29  : public DAFunction
30 {
31 
32 protected:
34  vector forceDir_;
35 
37  word dirMode_;
38 
41 
44 
47 
48 public:
49  TypeName("force");
50  // Constructors
51 
52  //- Construct from components
54  const fvMesh& mesh,
55  const DAOption& daOption,
56  const DAModel& daModel,
57  const DAIndex& daIndex,
58  const word functionName);
59 
60  //- Destructor
61  virtual ~DAFunctionForce()
62  {
63  }
64 
66  virtual scalar calcFunction();
67 };
68 
69 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70 
71 } // End namespace Foam
72 
73 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
74 
75 #endif
76 
77 // ************************************************************************* //
Foam::DAFunctionForce::flowAxisIndex_
label flowAxisIndex_
flowAxisIndex_ for the alpha design variable with tan(U_normal/U_flow)
Definition: DAFunctionForce.H:40
Foam::DAFunctionForce::dirMode_
word dirMode_
if dynamically adjusting the angle what mode to use
Definition: DAFunctionForce.H:37
Foam::DAOption
Definition: DAOption.H:29
DAFunction.H
Foam::DAFunctionForce::DAFunctionForce
DAFunctionForce(const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex, const word functionName)
Definition: DAFunctionForce.C:19
DAGlobalVar.H
Foam::DAFunctionForce::calcFunction
virtual scalar calcFunction()
calculate the value of objective function
Definition: DAFunctionForce.C:79
Foam::DAFunctionForce::normalAxisIndex_
label normalAxisIndex_
normalAxisIndex_ for the alpha design variable with tan(U_normal/U_flow)
Definition: DAFunctionForce.H:43
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
Foam::DAIndex
Definition: DAIndex.H:32
Foam::DAFunctionForce::TypeName
TypeName("force")
Foam::DAModel
Definition: DAModel.H:57
Foam::DAFunction
Definition: DAFunction.H:31
Foam
Definition: checkGeometry.C:32
Foam::DAFunctionForce::~DAFunctionForce
virtual ~DAFunctionForce()
Definition: DAFunctionForce.H:61
Foam::DAFunctionForce
Definition: DAFunctionForce.H:28
Foam::DATurbulenceModel
Definition: DATurbulenceModel.H:52
Foam::DAFunctionForce::daTurb_
const DATurbulenceModel & daTurb_
DATurbulenceModel object.
Definition: DAFunctionForce.H:46
Foam::DAFunctionForce::forceDir_
vector forceDir_
the direction of the force
Definition: DAFunctionForce.H:34