DARhoSimpleFoam.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2 
3  DAFoam : Discrete Adjoint with OpenFOAM
4  Version : v4
5 
6  Description:
7  Child class for DARhoSimpleFoam
8 
9  This class is modified from OpenFOAM's source code
10  applications/solvers/compressible/rhoSimpleFoam
11 
12  OpenFOAM: The Open Source CFD Toolbox
13 
14  Copyright (C): 2011-2016 OpenFOAM Foundation
15 
16  OpenFOAM License:
17 
18  OpenFOAM is free software: you can redistribute it and/or modify it
19  under the terms of the GNU General Public License as published by
20  the Free Software Foundation, either version 3 of the License, or
21  (at your option) any later version.
22 
23  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
24  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
25  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
26  for more details.
27 
28  You should have received a copy of the GNU General Public License
29  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
30 
31 \*---------------------------------------------------------------------------*/
32 
33 #ifndef DARhoSimpleFoam_H
34 #define DARhoSimpleFoam_H
35 
36 #include "DASolver.H"
37 #include "addToRunTimeSelectionTable.H"
38 #include "fluidThermo.H"
39 #include "turbulentFluidThermoModel.H"
40 #include "simpleControl.H"
41 #include "pressureControl.H"
42 #include "DAFvSource.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class DARhoSimpleFoam Declaration
51 \*---------------------------------------------------------------------------*/
52 
54  : public DASolver
55 {
56 
57 protected:
59  autoPtr<simpleControl> simplePtr_;
60 
62  autoPtr<fluidThermo> pThermoPtr_;
63 
65  autoPtr<volScalarField> pPtr_;
66 
68  autoPtr<volScalarField> rhoPtr_;
69 
71  autoPtr<volVectorField> UPtr_;
72 
74  autoPtr<surfaceScalarField> phiPtr_;
75 
77  autoPtr<pressureControl> pressureControlPtr_;
78 
80  autoPtr<compressible::turbulenceModel> turbulencePtr_;
81 
83  autoPtr<DATurbulenceModel> daTurbulenceModelPtr_;
84 
86  autoPtr<DAFvSource> daFvSourcePtr_;
87 
89  autoPtr<volVectorField> fvSourcePtr_;
90 
92  autoPtr<volScalarField> fvSourceEnergyPtr_;
93 
95  label hasFvSource_ = 0;
96 
98  dimensionedScalar initialMass_;
99 
101  autoPtr<IOMRFZoneListDF> MRFPtr_;
102 
104  scalar cumulativeContErr_ = 0.0;
105 
106 public:
107  TypeName("DARhoSimpleFoam");
108  // Constructors
109 
110  //- Construct from components
112  char* argsAll,
113  PyObject* pyOptions);
114 
115  //- Destructor
117  {
118  }
119 
121  virtual void initSolver();
122 
124  virtual label solvePrimal();
125 };
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace Foam
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #endif
134 
135 // ************************************************************************* //
Foam::DARhoSimpleFoam::pThermoPtr_
autoPtr< fluidThermo > pThermoPtr_
thermal model
Definition: DARhoSimpleFoam.H:62
Foam::DARhoSimpleFoam::UPtr_
autoPtr< volVectorField > UPtr_
velocity field pointer
Definition: DARhoSimpleFoam.H:71
Foam::DARhoSimpleFoam::daTurbulenceModelPtr_
autoPtr< DATurbulenceModel > daTurbulenceModelPtr_
DATurbulenceModel pointer.
Definition: DARhoSimpleFoam.H:83
Foam::DARhoSimpleFoam::phiPtr_
autoPtr< surfaceScalarField > phiPtr_
surface flux field pointer
Definition: DARhoSimpleFoam.H:74
Foam::DASolver
Definition: DASolver.H:54
Foam::DARhoSimpleFoam::TypeName
TypeName("DARhoSimpleFoam")
Foam::DARhoSimpleFoam::fvSourcePtr_
autoPtr< volVectorField > fvSourcePtr_
fvSource term
Definition: DARhoSimpleFoam.H:89
Foam::DARhoSimpleFoam::cumulativeContErr_
scalar cumulativeContErr_
continuity error
Definition: DARhoSimpleFoam.H:104
DAFvSource.H
Foam::DARhoSimpleFoam::hasFvSource_
label hasFvSource_
whether to have fvSource term
Definition: DARhoSimpleFoam.H:95
Foam::DARhoSimpleFoam::~DARhoSimpleFoam
virtual ~DARhoSimpleFoam()
Definition: DARhoSimpleFoam.H:116
Foam::DARhoSimpleFoam::pPtr_
autoPtr< volScalarField > pPtr_
pressure field pointer
Definition: DARhoSimpleFoam.H:65
Foam::DARhoSimpleFoam::fvSourceEnergyPtr_
autoPtr< volScalarField > fvSourceEnergyPtr_
fvSource term for the energy equation
Definition: DARhoSimpleFoam.H:92
Foam::DARhoSimpleFoam::initSolver
virtual void initSolver()
initialize fields and variables
Definition: DARhoSimpleFoam.C:63
Foam::DARhoSimpleFoam::MRFPtr_
autoPtr< IOMRFZoneListDF > MRFPtr_
MRF pointer.
Definition: DARhoSimpleFoam.H:101
Foam
Definition: checkGeometry.C:32
Foam::DARhoSimpleFoam::daFvSourcePtr_
autoPtr< DAFvSource > daFvSourcePtr_
DASource pointer.
Definition: DARhoSimpleFoam.H:86
Foam::DARhoSimpleFoam::turbulencePtr_
autoPtr< compressible::turbulenceModel > turbulencePtr_
turbulence pointer
Definition: DARhoSimpleFoam.H:80
Foam::DARhoSimpleFoam
Definition: DARhoSimpleFoam.H:53
Foam::DARhoSimpleFoam::solvePrimal
virtual label solvePrimal()
solve the primal equations
Definition: DARhoSimpleFoam.C:106
Foam::DARhoSimpleFoam::initialMass_
dimensionedScalar initialMass_
initial mass
Definition: DARhoSimpleFoam.H:98
Foam::DARhoSimpleFoam::simplePtr_
autoPtr< simpleControl > simplePtr_
simple pointer
Definition: DARhoSimpleFoam.H:59
DASolver.H
Foam::DARhoSimpleFoam::DARhoSimpleFoam
DARhoSimpleFoam(char *argsAll, PyObject *pyOptions)
Definition: DARhoSimpleFoam.C:41
Foam::DARhoSimpleFoam::pressureControlPtr_
autoPtr< pressureControl > pressureControlPtr_
pressure control pointer
Definition: DARhoSimpleFoam.H:77
Foam::DARhoSimpleFoam::rhoPtr_
autoPtr< volScalarField > rhoPtr_
density field pointer
Definition: DARhoSimpleFoam.H:68