DAResidualRhoSimpleCFoam.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 DARhoSimpleCFoam
8 
9 \*---------------------------------------------------------------------------*/
10 
11 #ifndef DAResidualRhoSimpleCFoam_H
12 #define DAResidualRhoSimpleCFoam_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 DAResidualRhoSimpleCFoam 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 
55  volScalarField& he_;
56  volScalarField& rho_;
57  volScalarField& alphat_;
58  volScalarField& psi_;
60 
63 
65  simpleControl simple_;
66 
69 
71 
72  scalar molWeight_;
73  scalar Cp_;
75 
76 public:
77  TypeName("DARhoSimpleCFoam");
78  // Constructors
79 
80  //- Construct from components
82  const word modelType,
83  const fvMesh& mesh,
84  const DAOption& daOption,
85  const DAModel& daModel,
86  const DAIndex& daIndex);
87 
88  //- Destructor
90  {
91  }
92 
93  // Members
94 
96  virtual void clear();
97 
99  virtual void calcResiduals(const dictionary& options);
100 
102  virtual void updateIntermediateVariables();
103 
105  virtual void correctBoundaryConditions();
106 };
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 } // End namespace Foam
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 #endif
115 
116 // ************************************************************************* //
Foam::DAResidualRhoSimpleCFoam::U_
volVectorField & U_
Definition: DAResidualRhoSimpleCFoam.H:37
Foam::DAResidualRhoSimpleCFoam::alphat_
volScalarField & alphat_
Definition: DAResidualRhoSimpleCFoam.H:57
pressureControl
pressureControl & pressureControl
Definition: createRefsRhoSimpleC.H:12
Foam::DAResidualRhoSimpleCFoam::psi_
volScalarField & psi_
Definition: DAResidualRhoSimpleCFoam.H:58
Foam::DAResidualRhoSimpleCFoam::DAResidualRhoSimpleCFoam
DAResidualRhoSimpleCFoam(const word modelType, const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex)
Definition: DAResidualRhoSimpleCFoam.C:19
Foam::DAResidualRhoSimpleCFoam::~DAResidualRhoSimpleCFoam
virtual ~DAResidualRhoSimpleCFoam()
Definition: DAResidualRhoSimpleCFoam.H:89
Foam::DAOption
Definition: DAOption.H:29
Foam::DAResidualRhoSimpleCFoam::rho_
volScalarField & rho_
Definition: DAResidualRhoSimpleCFoam.H:56
daOption
DAOption daOption(mesh, pyOptions_)
Foam::DAResidualRhoSimpleCFoam::clear
virtual void clear()
clear the members
Definition: DAResidualRhoSimpleCFoam.C:61
Foam::DAResidualRhoSimpleCFoam
Definition: DAResidualRhoSimpleCFoam.H:30
Foam::DAResidualRhoSimpleCFoam::URes_
volVectorField URes_
Definition: DAResidualRhoSimpleCFoam.H:38
Foam::DAResidualRhoSimpleCFoam::thermo_
fluidThermo & thermo_
thermophysical property
Definition: DAResidualRhoSimpleCFoam.H:51
DAResidual.H
Foam::DAResidualRhoSimpleCFoam::TypeName
TypeName("DARhoSimpleCFoam")
Foam::DAResidualRhoSimpleCFoam::TRes_
volScalarField TRes_
Definition: DAResidualRhoSimpleCFoam.H:44
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
Foam::DAIndex
Definition: DAIndex.H:32
Foam::DAResidualRhoSimpleCFoam::daTurb_
DATurbulenceModel & daTurb_
DATurbulenceModel object.
Definition: DAResidualRhoSimpleCFoam.H:62
Foam::DAModel
Definition: DAModel.H:59
Foam::DAResidualRhoSimpleCFoam::updateIntermediateVariables
virtual void updateIntermediateVariables()
update any intermediate variables that are dependent on state variables and are used in calcResiduals
Definition: DAResidualRhoSimpleCFoam.C:197
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::DAResidualRhoSimpleCFoam::correctBoundaryConditions
virtual void correctBoundaryConditions()
update the boundary condition for all the states in the selected solver
Definition: DAResidualRhoSimpleCFoam.C:271
Foam::DAResidualRhoSimpleCFoam::calcResiduals
virtual void calcResiduals(const dictionary &options)
compute residual
Definition: DAResidualRhoSimpleCFoam.C:75
Foam::DAResidualRhoSimpleCFoam::p_
volScalarField & p_
Definition: DAResidualRhoSimpleCFoam.H:40
Foam::DAResidual
Definition: DAResidual.H:35
Foam::DAResidualRhoSimpleCFoam::Cp_
scalar Cp_
Definition: DAResidualRhoSimpleCFoam.H:73
Foam::DATurbulenceModel
Definition: DATurbulenceModel.H:61
daModel
DAModel daModel(mesh, daOption)
Foam::DAResidualRhoSimpleCFoam::T_
volScalarField & T_
Definition: DAResidualRhoSimpleCFoam.H:43
Foam::DAResidualRhoSimpleCFoam::he_
volScalarField & he_
Definition: DAResidualRhoSimpleCFoam.H:55
daIndex
DAIndex daIndex(mesh, daOption, daModel)
Foam::DAResidualRhoSimpleCFoam::pressureControl_
pressureControl pressureControl_
pressureControl object to set ref pressure
Definition: DAResidualRhoSimpleCFoam.H:68
Foam::DAResidualRhoSimpleCFoam::simple_
simpleControl simple_
simpleControl object which will be initialized in this class
Definition: DAResidualRhoSimpleCFoam.H:65
Foam::DAResidualRhoSimpleCFoam::molWeight_
scalar molWeight_
Definition: DAResidualRhoSimpleCFoam.H:72
Foam::DAResidualRhoSimpleCFoam::phi_
surfaceScalarField & phi_
Definition: DAResidualRhoSimpleCFoam.H:46
Foam::DAResidualRhoSimpleCFoam::pRes_
volScalarField pRes_
Definition: DAResidualRhoSimpleCFoam.H:41
Foam::DAResidualRhoSimpleCFoam::phiRes_
surfaceScalarField phiRes_
Definition: DAResidualRhoSimpleCFoam.H:47