DAFvSourceHeatSource.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 HeatSource disk source
8 
9 \*---------------------------------------------------------------------------*/
10 
11 #ifndef DAFvSourceHeatSource_H
12 #define DAFvSourceHeatSource_H
13 
14 #include "DAFvSource.H"
15 #include "addToRunTimeSelectionTable.H"
16 #include "DAGlobalVar.H"
17 
18 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
19 
20 namespace Foam
21 {
22 
23 /*---------------------------------------------------------------------------*\
24  Class DAFvSourceHeatSource Declaration
25 \*---------------------------------------------------------------------------*/
26 
28  : public DAFvSource
29 {
30 
31 protected:
33  HashTable<labelList> fvSourceCellIndices_;
34 
35  HashTable<scalarList> cylinderP1_;
36  HashTable<scalarList> cylinderP2_;
37  HashTable<scalar> cylinderRadius_;
38  HashTable<scalar> power_;
39  HashTable<scalar> cylinderEps_;
40 
43 
45  HashTable<label> snapCenter2Cell_;
46 
48  HashTable<label> snappedCenterCellI_;
49 
50 public:
51  TypeName("heatSource");
52  // Constructors
53 
54  //- Construct from components
56  const word modelType,
57  const fvMesh& mesh,
58  const DAOption& daOption,
59  const DAModel& daModel,
60  const DAIndex& daIndex);
61 
62  //- Destructor
64  {
65  }
66 
68  virtual void calcFvSource(volScalarField& fvSource);
69 
71  virtual void initFvSourcePars();
72 };
73 
74 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
75 
76 } // End namespace Foam
77 
78 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
79 
80 #endif
81 
82 // ************************************************************************* //
Foam::DAFvSource
Definition: DAFvSource.H:34
Foam::DAFvSourceHeatSource::snappedCenterCellI_
HashTable< label > snappedCenterCellI_
the cell index for the center if snapCenter2Cell_ = 1
Definition: DAFvSourceHeatSource.H:48
Foam::DAFvSourceHeatSource::~DAFvSourceHeatSource
virtual ~DAFvSourceHeatSource()
Definition: DAFvSourceHeatSource.H:63
Foam::DAFvSourceHeatSource::DAFvSourceHeatSource
DAFvSourceHeatSource(const word modelType, const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex)
Definition: DAFvSourceHeatSource.C:19
Foam::DAFvSourceHeatSource::printInterval_
label printInterval_
print interval for primal and adjoint
Definition: DAFvSourceHeatSource.H:42
Foam::DAOption
Definition: DAOption.H:29
Foam::DAFvSourceHeatSource::initFvSourcePars
virtual void initFvSourcePars()
Initialize the values for all types of fvSource in DAGlobalVar, including actuatorDiskPars,...
Definition: DAFvSourceHeatSource.C:371
Foam::DAFvSourceHeatSource::power_
HashTable< scalar > power_
Definition: DAFvSourceHeatSource.H:38
Foam::DAFvSourceHeatSource
Definition: DAFvSourceHeatSource.H:27
DAFvSource.H
DAGlobalVar.H
fvSource
volScalarField & fvSource
Definition: createRefsHeatTransfer.H:7
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
Foam::DAFvSourceHeatSource::fvSourceCellIndices_
HashTable< labelList > fvSourceCellIndices_
HashTable that contains lists of cell indices that are within the actuator disk space.
Definition: DAFvSourceHeatSource.H:33
Foam::DAIndex
Definition: DAIndex.H:32
Foam::DAModel
Definition: DAModel.H:57
Foam
Definition: checkGeometry.C:32
Foam::DAFvSourceHeatSource::cylinderP2_
HashTable< scalarList > cylinderP2_
Definition: DAFvSourceHeatSource.H:36
Foam::DAFvSourceHeatSource::snapCenter2Cell_
HashTable< label > snapCenter2Cell_
whether to snap the center to a cell in the mesh if yes the center will move with the mesh
Definition: DAFvSourceHeatSource.H:45
Foam::DAFvSourceHeatSource::cylinderP1_
HashTable< scalarList > cylinderP1_
Definition: DAFvSourceHeatSource.H:35
Foam::DAFvSourceHeatSource::TypeName
TypeName("heatSource")
Foam::DAFvSourceHeatSource::calcFvSource
virtual void calcFvSource(volScalarField &fvSource)
compute the FvSource term
Definition: DAFvSourceHeatSource.C:151
Foam::DAFvSourceHeatSource::cylinderEps_
HashTable< scalar > cylinderEps_
Definition: DAFvSourceHeatSource.H:39
Foam::DAFvSourceHeatSource::cylinderRadius_
HashTable< scalar > cylinderRadius_
Definition: DAFvSourceHeatSource.H:37