DAResidualPisoFoam.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 DAPisoFoam
8 
9 \*---------------------------------------------------------------------------*/
10 
11 #ifndef DAResidualPisoFoam_H
12 #define DAResidualPisoFoam_H
13 
14 #include "DAResidual.H"
15 #include "addToRunTimeSelectionTable.H"
16 #include "pisoControl.H"
17 #include "adjustPhi.H"
18 
19 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
20 
21 namespace Foam
22 {
23 
24 /*---------------------------------------------------------------------------*\
25  Class DAResidualPisoFoam 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  pisoControl piso_;
52 
54  label hasFvSource_ = 0;
55 
57  word mode_ = "None";
58 
59 public:
60  TypeName("DAPisoFoam");
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::DAResidualPisoFoam::clear
virtual void clear()
clear the members
Definition: DAResidualPisoFoam.C:49
Foam::DAResidualPisoFoam::daTurb_
DATurbulenceModel & daTurb_
DATurbulenceModel object.
Definition: DAResidualPisoFoam.H:48
Foam::DAResidualPisoFoam::correctBoundaryConditions
virtual void correctBoundaryConditions()
update the boundary condition for all the states in the selected solver
Definition: DAResidualPisoFoam.C:171
Foam::DAOption
Definition: DAOption.H:29
Foam::DAResidualPisoFoam::p_
volScalarField & p_
Definition: DAResidualPisoFoam.H:37
daOption
DAOption daOption(mesh, pyOptions_)
Foam::DAResidualPisoFoam::calcResiduals
virtual void calcResiduals(const dictionary &options)
compute residual
Definition: DAResidualPisoFoam.C:62
Foam::DAResidualPisoFoam::TypeName
TypeName("DAPisoFoam")
Foam::DAResidualPisoFoam::DAResidualPisoFoam
DAResidualPisoFoam(const word modelType, const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex)
Definition: DAResidualPisoFoam.C:19
Foam::DAResidualPisoFoam::~DAResidualPisoFoam
virtual ~DAResidualPisoFoam()
Definition: DAResidualPisoFoam.H:72
DAResidual.H
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
Foam::DAResidualPisoFoam::URes_
volVectorField URes_
Definition: DAResidualPisoFoam.H:35
Foam::DAResidualPisoFoam
Definition: DAResidualPisoFoam.H:28
Foam::DAIndex
Definition: DAIndex.H:32
Foam::DAResidualPisoFoam::pRes_
volScalarField pRes_
Definition: DAResidualPisoFoam.H:38
Foam::DAModel
Definition: DAModel.H:59
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::DAResidualPisoFoam::piso_
pisoControl piso_
pisoControl object which will be initialized in this class
Definition: DAResidualPisoFoam.H:51
Foam::DAResidualPisoFoam::U_
volVectorField & U_
Definition: DAResidualPisoFoam.H:34
Foam::DAResidualPisoFoam::updateIntermediateVariables
virtual void updateIntermediateVariables()
update any intermediate variables that are dependent on state variables and are used in calcResiduals
Definition: DAResidualPisoFoam.C:161
Foam::DAResidual
Definition: DAResidual.H:35
Foam::DATurbulenceModel
Definition: DATurbulenceModel.H:61
Foam::DAResidualPisoFoam::mode_
word mode_
whether the hybrid adjoint or time accurate adjoint is active
Definition: DAResidualPisoFoam.H:57
Foam::DAResidualPisoFoam::phiRes_
surfaceScalarField phiRes_
Definition: DAResidualPisoFoam.H:41
daModel
DAModel daModel(mesh, daOption)
Foam::DAResidualPisoFoam::hasFvSource_
label hasFvSource_
whether to has fvSource term
Definition: DAResidualPisoFoam.H:54
daIndex
DAIndex daIndex(mesh, daOption, daModel)
Foam::DAResidualPisoFoam::fvSource_
volVectorField & fvSource_
fvSource term
Definition: DAResidualPisoFoam.H:45
Foam::DAResidualPisoFoam::phi_
surfaceScalarField & phi_
Definition: DAResidualPisoFoam.H:40