DAResidualPimpleFoam.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 DAPimpleFoam
8 
9 \*---------------------------------------------------------------------------*/
10 
11 #ifndef DAResidualPimpleFoam_H
12 #define DAResidualPimpleFoam_H
13 
14 #include "DAResidual.H"
15 #include "addToRunTimeSelectionTable.H"
16 #include "pimpleControl.H"
17 #include "adjustPhi.H"
18 
19 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
20 
21 namespace Foam
22 {
23 
24 /*---------------------------------------------------------------------------*\
25  Class DAResidualPimpleFoam Declaration
26 \*---------------------------------------------------------------------------*/
27 
29  : public DAResidual
30 {
31 protected:
33 
34  volVectorField& U_;
35  volVectorField URes_;
36 
37  volScalarField& p_;
38  volScalarField pRes_;
39 
40  surfaceScalarField& phi_;
41  surfaceScalarField phiRes_;
43 
45  volVectorField& fvSource_;
46 
49 
51  pimpleControl pimple_;
52 
54  label hasFvSource_ = 0;
55 
57  word mode_ = "None";
58 
59 public:
60  TypeName("DAPimpleFoam");
61  // Constructors
62 
63  //- Construct from components
65  const word modelType,
66  const fvMesh& mesh,
67  const DAOption& daOption,
68  const DAModel& daModel,
69  const DAIndex& daIndex);
70 
71  //- Destructor
73  {
74  }
75 
76  // Members
77 
79  virtual void clear();
80 
82  virtual void calcResiduals(const dictionary& options);
83 
85  virtual void updateIntermediateVariables();
86 
88  virtual void correctBoundaryConditions();
89 };
90 
91 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
92 
93 } // End namespace Foam
94 
95 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
96 
97 #endif
98 
99 // ************************************************************************* //
Foam::DAResidualPimpleFoam::calcResiduals
virtual void calcResiduals(const dictionary &options)
compute residual
Definition: DAResidualPimpleFoam.C:61
Foam::DAResidualPimpleFoam::daTurb_
DATurbulenceModel & daTurb_
DATurbulenceModel object.
Definition: DAResidualPimpleFoam.H:48
Foam::DAResidualPimpleFoam::p_
volScalarField & p_
Definition: DAResidualPimpleFoam.H:37
Foam::DAResidualPimpleFoam::pimple_
pimpleControl pimple_
pimpleControl object which will be initialized in this class
Definition: DAResidualPimpleFoam.H:51
Foam::DAOption
Definition: DAOption.H:29
Foam::DAResidualPimpleFoam::updateIntermediateVariables
virtual void updateIntermediateVariables()
update any intermediate variables that are dependent on state variables and are used in calcResiduals
Definition: DAResidualPimpleFoam.C:170
Foam::DAResidualPimpleFoam::mode_
word mode_
whether the hybrid adjoint or time accurate adjoint is active
Definition: DAResidualPimpleFoam.H:57
Foam::DAResidualPimpleFoam::fvSource_
volVectorField & fvSource_
fvSource term
Definition: DAResidualPimpleFoam.H:45
daOption
DAOption daOption(mesh, pyOptions_)
Foam::DAResidualPimpleFoam::U_
volVectorField & U_
Definition: DAResidualPimpleFoam.H:34
Foam::DAResidualPimpleFoam::hasFvSource_
label hasFvSource_
whether to has fvSource term
Definition: DAResidualPimpleFoam.H:54
Foam::DAResidualPimpleFoam::correctBoundaryConditions
virtual void correctBoundaryConditions()
update the boundary condition for all the states in the selected solver
Definition: DAResidualPimpleFoam.C:180
Foam::DAResidualPimpleFoam::phi_
surfaceScalarField & phi_
Definition: DAResidualPimpleFoam.H:40
Foam::DAResidualPimpleFoam::URes_
volVectorField URes_
Definition: DAResidualPimpleFoam.H:35
DAResidual.H
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
Foam::DAResidualPimpleFoam::~DAResidualPimpleFoam
virtual ~DAResidualPimpleFoam()
Definition: DAResidualPimpleFoam.H:72
Foam::DAIndex
Definition: DAIndex.H:32
Foam::DAResidualPimpleFoam::phiRes_
surfaceScalarField phiRes_
Definition: DAResidualPimpleFoam.H:41
Foam::DAResidualPimpleFoam::DAResidualPimpleFoam
DAResidualPimpleFoam(const word modelType, const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex)
Definition: DAResidualPimpleFoam.C:19
Foam::DAResidualPimpleFoam::TypeName
TypeName("DAPimpleFoam")
Foam::DAModel
Definition: DAModel.H:59
Foam::DAResidualPimpleFoam
Definition: DAResidualPimpleFoam.H:28
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::DAResidual
Definition: DAResidual.H:35
Foam::DATurbulenceModel
Definition: DATurbulenceModel.H:61
daModel
DAModel daModel(mesh, daOption)
Foam::DAResidualPimpleFoam::clear
virtual void clear()
clear the members
Definition: DAResidualPimpleFoam.C:48
daIndex
DAIndex daIndex(mesh, daOption, daModel)
Foam::DAResidualPimpleFoam::pRes_
volScalarField pRes_
Definition: DAResidualPimpleFoam.H:38