DAInputThermalCoupling.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 thermal variables in CHT.
8 
9  Assign the thermal BC values to all of the faces on the conjugate heat
10  transfer patches.
11 
12  We assume the conjugate coupling patches are of mixed type, so we need to assign
13  refValue = neighbour near wall temperature
14  refGrad = 0
15  valueFraction = neighKDeltaCoeffs / ( neighKDeltaCoeffs + myKDeltaCoeffs)
16 
17  NOTE: we have two separate variables saved in the thermal array.
18  One is the neighbour near wall temperature and the other is the neighbour kappa/d.
19  So the size of thermal array is 2 * nCouplingFaces
20  NOTE: this function can be called by either fluid or solid domain!
21 
22  This conjugate heat transfer coupling uses the OpenFOAM's implementation in
23  turbulentTemperatureCoupledBaffleMixed.C
24 
25 \*---------------------------------------------------------------------------*/
26 
27 #ifndef DAInputThermalCoupling_H
28 #define DAInputThermalCoupling_H
29 
30 #include "DAInput.H"
31 #include "addToRunTimeSelectionTable.H"
32 #include "mixedFvPatchFields.H"
33 #include "thermodynamicConstants.H"
34 
35 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 
37 namespace Foam
38 {
39 
40 /*---------------------------------------------------------------------------*\
41  Class DAInputThermalCoupling Declaration
42 \*---------------------------------------------------------------------------*/
43 
45  : public DAInput
46 {
47 
48 protected:
50  wordList patches_;
51 
53  label size_;
54 
57 
60 
61 public:
62  TypeName("thermalCouplingInput");
63  // Constructors
64 
65  //- Construct from components
67  const word inputName,
68  const word inputType,
69  fvMesh& mesh,
70  const DAOption& daOption,
71  const DAModel& daModel,
72  const DAIndex& daIndex);
73 
74  //- Destructor
76  {
77  }
78 
79  virtual void run(const scalarList& input);
80 
81  virtual label size()
82  {
83  return size_;
84  }
85 
86  virtual label distributed()
87  {
88  return 1;
89  }
90 };
91 
92 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93 
94 } // End namespace Foam
95 
96 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
97 
98 #endif
99 
100 // ************************************************************************* //
Foam::DAInputThermalCoupling::size_
label size_
the total face number for all the patches_ owned by this processor
Definition: DAInputThermalCoupling.H:53
Foam::DAInputThermalCoupling::run
virtual void run(const scalarList &input)
Definition: DAInputThermalCoupling.C:66
Foam::DAOption
Definition: DAOption.H:29
Foam::DAInputThermalCoupling::TypeName
TypeName("thermalCouplingInput")
Foam::DAInputThermalCoupling::distanceMode_
word distanceMode_
if calculating wallHeatFlux by OpenFOAMs snGrad() or DAFOAM's custom (daCustom) formulation
Definition: DAInputThermalCoupling.H:59
Foam::DAInputThermalCoupling::size
virtual label size()
Definition: DAInputThermalCoupling.H:81
Foam::DAInputThermalCoupling
Definition: DAInputThermalCoupling.H:44
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
Foam::DAIndex
Definition: DAIndex.H:32
DAInput.H
Foam::DAModel
Definition: DAModel.H:57
Foam::DAInputThermalCoupling::patches_
wordList patches_
list of patch names for the thermal var
Definition: DAInputThermalCoupling.H:50
Foam
Definition: checkGeometry.C:32
Foam::DAInput
Definition: DAInput.H:30
Foam::DAInputThermalCoupling::DAInputThermalCoupling
DAInputThermalCoupling(const word inputName, const word inputType, fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex)
Definition: DAInputThermalCoupling.C:19
Foam::DAInputThermalCoupling::discipline_
word discipline_
whether this is flow or solid
Definition: DAInputThermalCoupling.H:56
Foam::DAInputThermalCoupling::distributed
virtual label distributed()
Definition: DAInputThermalCoupling.H:86
Foam::DAInputThermalCoupling::~DAInputThermalCoupling
virtual ~DAInputThermalCoupling()
Definition: DAInputThermalCoupling.H:75