DAResidualScalarTransportFoam.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 DAScalarTransportFoam
8 
9 \*---------------------------------------------------------------------------*/
10 
11 #ifndef DAResidualScalarTransportFoam_H
12 #define DAResidualScalarTransportFoam_H
13 
14 #include "DAResidual.H"
15 #include "addToRunTimeSelectionTable.H"
16 
17 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
18 
19 namespace Foam
20 {
21 
22 /*---------------------------------------------------------------------------*\
23  Class DAResidualScalarTransportFoam Declaration
24 \*---------------------------------------------------------------------------*/
25 
27  : public DAResidual
28 {
29 
30 protected:
32 
33  volScalarField& T_;
34  volScalarField TRes_;
35  surfaceScalarField& phi_;
37 
38  scalar DT_;
39 
40 public:
41  TypeName("DAScalarTransportFoam");
42  // Constructors
43 
44  //- Construct from components
46  const word modelType,
47  const fvMesh& mesh,
48  const DAOption& daOption,
49  const DAModel& daModel,
50  const DAIndex& daIndex);
51 
52  //- Destructor
54  {
55  }
56 
57  // Members
58 
60  virtual void clear();
61 
63  virtual void calcResiduals(const dictionary& options);
64 
66  virtual void updateIntermediateVariables();
67 
69  virtual void correctBoundaryConditions();
70 };
71 
72 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
73 
74 } // End namespace Foam
75 
76 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77 
78 #endif
79 
80 // ************************************************************************* //
Foam::DAResidualScalarTransportFoam::calcResiduals
virtual void calcResiduals(const dictionary &options)
compute residual
Definition: DAResidualScalarTransportFoam.C:57
Foam::DAResidualScalarTransportFoam::DT_
scalar DT_
Definition: DAResidualScalarTransportFoam.H:38
Foam::DAResidualScalarTransportFoam::TRes_
volScalarField TRes_
Definition: DAResidualScalarTransportFoam.H:34
Foam::DAOption
Definition: DAOption.H:29
daOption
DAOption daOption(mesh, pyOptions_)
Foam::DAResidualScalarTransportFoam::TypeName
TypeName("DAScalarTransportFoam")
DAResidual.H
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
Foam::DAResidualScalarTransportFoam::updateIntermediateVariables
virtual void updateIntermediateVariables()
update any intermediate variables that are dependent on state variables and are used in calcResiduals
Definition: DAResidualScalarTransportFoam.C:86
Foam::DAResidualScalarTransportFoam::clear
virtual void clear()
clear the members
Definition: DAResidualScalarTransportFoam.C:46
Foam::DAIndex
Definition: DAIndex.H:32
Foam::DAResidualScalarTransportFoam::DAResidualScalarTransportFoam
DAResidualScalarTransportFoam(const word modelType, const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex)
Definition: DAResidualScalarTransportFoam.C:19
Foam::DAResidualScalarTransportFoam
Definition: DAResidualScalarTransportFoam.H:26
Foam::DAModel
Definition: DAModel.H:59
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::DAResidualScalarTransportFoam::~DAResidualScalarTransportFoam
virtual ~DAResidualScalarTransportFoam()
Definition: DAResidualScalarTransportFoam.H:53
Foam::DAResidualScalarTransportFoam::correctBoundaryConditions
virtual void correctBoundaryConditions()
update the boundary condition for all the states in the selected solver
Definition: DAResidualScalarTransportFoam.C:95
Foam::DAResidualScalarTransportFoam::phi_
surfaceScalarField & phi_
Definition: DAResidualScalarTransportFoam.H:35
Foam::DAResidual
Definition: DAResidual.H:35
Foam::DAResidualScalarTransportFoam::T_
volScalarField & T_
Definition: DAResidualScalarTransportFoam.H:33
daModel
DAModel daModel(mesh, daOption)
daIndex
DAIndex daIndex(mesh, daOption, daModel)