DAResidualTurboFoam.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 DATurboFoam
8 
9 \*---------------------------------------------------------------------------*/
10 
11 #ifndef DAResidualTurboFoam_H
12 #define DAResidualTurboFoam_H
13 
14 #include "DAResidual.H"
15 #include "addToRunTimeSelectionTable.H"
16 #include "simpleControl.H"
17 #include "adjustPhi.H"
18 #include "thermodynamicConstants.H"
19 #include "pressureControl.H"
20 
21 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
22 
23 namespace Foam
24 {
25 
26 /*---------------------------------------------------------------------------*\
27  Class DAResidualTurboFoam Declaration
28 \*---------------------------------------------------------------------------*/
29 
31  : public DAResidual
32 {
33 
34 protected:
36 
37  volVectorField& U_;
38  volVectorField URes_;
39 
40  volScalarField& p_;
41  volScalarField pRes_;
42 
43  volScalarField& T_;
44  volScalarField TRes_;
45 
46  surfaceScalarField& phi_;
47  surfaceScalarField phiRes_;
49 
51  fluidThermo& thermo_;
52 
54  volVectorField& URel_;
55 
57 
58  volScalarField& he_;
59  volScalarField& rho_;
60  volScalarField& alphat_;
61  volScalarField& psi_;
63 
66 
68  simpleControl simple_;
69 
72 
75 
77 
78  scalar molWeight_;
79  scalar Cp_;
81 
82 public:
83  TypeName("DATurboFoam");
84  // Constructors
85 
86  //- Construct from components
88  const word modelType,
89  const fvMesh& mesh,
90  const DAOption& daOption,
91  const DAModel& daModel,
92  const DAIndex& daIndex);
93 
94  //- Destructor
96  {
97  }
98 
99  // Members
100 
102  virtual void clear();
103 
105  virtual void calcResiduals(const dictionary& options);
106 
108  virtual void updateIntermediateVariables();
109 
111  virtual void correctBoundaryConditions();
112 };
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 } // End namespace Foam
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 #endif
121 
122 // ************************************************************************* //
Foam::DAResidualTurboFoam::pRes_
volScalarField pRes_
Definition: DAResidualTurboFoam.H:41
Foam::DAResidualTurboFoam::URes_
volVectorField URes_
Definition: DAResidualTurboFoam.H:38
pressureControl
pressureControl & pressureControl
Definition: createRefsRhoSimpleC.H:12
Foam::DAResidualTurboFoam::clear
virtual void clear()
clear the members
Definition: DAResidualTurboFoam.C:65
Foam::DAResidualTurboFoam::TRes_
volScalarField TRes_
Definition: DAResidualTurboFoam.H:44
Foam::DAResidualTurboFoam
Definition: DAResidualTurboFoam.H:30
Foam::DAResidualTurboFoam::p_
volScalarField & p_
Definition: DAResidualTurboFoam.H:40
Foam::DAOption
Definition: DAOption.H:29
Foam::DAResidualTurboFoam::calcResiduals
virtual void calcResiduals(const dictionary &options)
compute residual
Definition: DAResidualTurboFoam.C:79
daOption
DAOption daOption(mesh, pyOptions_)
Foam::DAResidualTurboFoam::DAResidualTurboFoam
DAResidualTurboFoam(const word modelType, const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex)
Definition: DAResidualTurboFoam.C:19
Foam::DAResidualTurboFoam::simple_
simpleControl simple_
simpleControl object which will be initialized in this class
Definition: DAResidualTurboFoam.H:68
Foam::DAResidualTurboFoam::phi_
surfaceScalarField & phi_
Definition: DAResidualTurboFoam.H:46
DAResidual.H
Foam::DAResidualTurboFoam::daTurb_
DATurbulenceModel & daTurb_
DATurbulenceModel object.
Definition: DAResidualTurboFoam.H:65
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
Foam::DAIndex
Definition: DAIndex.H:32
Foam::DAResidualTurboFoam::MRF_
IOMRFZoneListDF & MRF_
Multiple Reference Frame.
Definition: DAResidualTurboFoam.H:74
Foam::DAModel
Definition: DAModel.H:59
Foam::DAResidualTurboFoam::T_
volScalarField & T_
Definition: DAResidualTurboFoam.H:43
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::IOMRFZoneListDF
Definition: IOMRFZoneListDF.H:49
Foam::DAResidualTurboFoam::alphat_
volScalarField & alphat_
Definition: DAResidualTurboFoam.H:60
Foam::DAResidual
Definition: DAResidual.H:35
Foam::DATurbulenceModel
Definition: DATurbulenceModel.H:61
Foam::DAResidualTurboFoam::molWeight_
scalar molWeight_
Definition: DAResidualTurboFoam.H:78
Foam::DAResidualTurboFoam::correctBoundaryConditions
virtual void correctBoundaryConditions()
update the boundary condition for all the states in the selected solver
Definition: DAResidualTurboFoam.C:308
Foam::DAResidualTurboFoam::pressureControl_
pressureControl pressureControl_
pressureControl object to set ref pressure
Definition: DAResidualTurboFoam.H:71
Foam::DAResidualTurboFoam::updateIntermediateVariables
virtual void updateIntermediateVariables()
update any intermediate variables that are dependent on state variables and are used in calcResiduals
Definition: DAResidualTurboFoam.C:232
Foam::DAResidualTurboFoam::TypeName
TypeName("DATurboFoam")
Foam::DAResidualTurboFoam::phiRes_
surfaceScalarField phiRes_
Definition: DAResidualTurboFoam.H:47
daModel
DAModel daModel(mesh, daOption)
Foam::DAResidualTurboFoam::he_
volScalarField & he_
Definition: DAResidualTurboFoam.H:58
Foam::DAResidualTurboFoam::rho_
volScalarField & rho_
Definition: DAResidualTurboFoam.H:59
daIndex
DAIndex daIndex(mesh, daOption, daModel)
Foam::DAResidualTurboFoam::thermo_
fluidThermo & thermo_
thermophysical property
Definition: DAResidualTurboFoam.H:51
Foam::DAResidualTurboFoam::U_
volVectorField & U_
Definition: DAResidualTurboFoam.H:37
Foam::DAResidualTurboFoam::Cp_
scalar Cp_
Definition: DAResidualTurboFoam.H:79
Foam::DAResidualTurboFoam::URel_
volVectorField & URel_
relative velocity
Definition: DAResidualTurboFoam.H:54
Foam::DAResidualTurboFoam::~DAResidualTurboFoam
virtual ~DAResidualTurboFoam()
Definition: DAResidualTurboFoam.H:95
Foam::DAResidualTurboFoam::psi_
volScalarField & psi_
Definition: DAResidualTurboFoam.H:61