DARhoSimpleFoam.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 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 "DARegDbFluidThermo.H"
44 #include "DAFvSource.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class DARhoSimpleFoam Declaration
53 \*---------------------------------------------------------------------------*/
54 
56  : public DASolver
57 {
58 
59 protected:
61  autoPtr<simpleControl> simplePtr_;
62 
64  autoPtr<fluidThermo> pThermoPtr_;
65 
67  autoPtr<volScalarField> pPtr_;
68 
70  autoPtr<volScalarField> rhoPtr_;
71 
73  autoPtr<volVectorField> UPtr_;
74 
76  autoPtr<surfaceScalarField> phiPtr_;
77 
79  autoPtr<pressureControl> pressureControlPtr_;
80 
82  autoPtr<compressible::turbulenceModel> turbulencePtr_;
83 
85  autoPtr<DATurbulenceModel> daTurbulenceModelPtr_;
86 
88  autoPtr<DAFvSource> daFvSourcePtr_;
89 
91  autoPtr<volVectorField> fvSourcePtr_;
92 
94  autoPtr<volScalarField> fvSourceEnergyPtr_;
95 
97  label hasFvSource_ = 0;
98 
100  dimensionedScalar initialMass_;
101 
103  autoPtr<IOMRFZoneListDF> MRFPtr_;
104 
106  scalar cumulativeContErr_ = 0.0;
107 
108 public:
109  TypeName("DARhoSimpleFoam");
110  // Constructors
111 
112  //- Construct from components
114  char* argsAll,
115  PyObject* pyOptions);
116 
117  //- Destructor
119  {
120  }
121 
123  virtual void initSolver();
124 
126  virtual label solvePrimal(
127  const Vec xvVec,
128  Vec wVec);
129 };
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
Foam::DARhoSimpleFoam::pThermoPtr_
autoPtr< fluidThermo > pThermoPtr_
thermal model
Definition: DARhoSimpleFoam.H:64
Foam::DARhoSimpleFoam::solvePrimal
virtual label solvePrimal(const Vec xvVec, Vec wVec)
solve the primal equations
Definition: DARhoSimpleFoam.C:97
Foam::DARhoSimpleFoam::UPtr_
autoPtr< volVectorField > UPtr_
velocity field pointer
Definition: DARhoSimpleFoam.H:73
Foam::DARhoSimpleFoam::daTurbulenceModelPtr_
autoPtr< DATurbulenceModel > daTurbulenceModelPtr_
DATurbulenceModel pointer.
Definition: DARhoSimpleFoam.H:85
Foam::DARhoSimpleFoam::phiPtr_
autoPtr< surfaceScalarField > phiPtr_
surface flux field pointer
Definition: DARhoSimpleFoam.H:76
Foam::DASolver
Definition: DASolver.H:49
DARegDbTurbulenceModelCompressible.H
Foam::DARhoSimpleFoam::TypeName
TypeName("DARhoSimpleFoam")
Foam::DARhoSimpleFoam::fvSourcePtr_
autoPtr< volVectorField > fvSourcePtr_
fvSource term
Definition: DARhoSimpleFoam.H:91
Foam::DARhoSimpleFoam::cumulativeContErr_
scalar cumulativeContErr_
continuity error
Definition: DARhoSimpleFoam.H:106
DAFvSource.H
Foam::DARhoSimpleFoam::hasFvSource_
label hasFvSource_
whether to have fvSource term
Definition: DARhoSimpleFoam.H:97
Foam::DARhoSimpleFoam::~DARhoSimpleFoam
virtual ~DARhoSimpleFoam()
Definition: DARhoSimpleFoam.H:118
Foam::DARhoSimpleFoam::pPtr_
autoPtr< volScalarField > pPtr_
pressure field pointer
Definition: DARhoSimpleFoam.H:67
Foam::DARhoSimpleFoam::fvSourceEnergyPtr_
autoPtr< volScalarField > fvSourceEnergyPtr_
fvSource term for the energy equation
Definition: DARhoSimpleFoam.H:94
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:103
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::DARhoSimpleFoam::daFvSourcePtr_
autoPtr< DAFvSource > daFvSourcePtr_
DASource pointer.
Definition: DARhoSimpleFoam.H:88
Foam::DARhoSimpleFoam::turbulencePtr_
autoPtr< compressible::turbulenceModel > turbulencePtr_
turbulence pointer
Definition: DARhoSimpleFoam.H:82
Foam::DARhoSimpleFoam
Definition: DARhoSimpleFoam.H:55
DARegDbFluidThermo.H
Foam::DARhoSimpleFoam::initialMass_
dimensionedScalar initialMass_
initial mass
Definition: DARhoSimpleFoam.H:100
Foam::DARhoSimpleFoam::simplePtr_
autoPtr< simpleControl > simplePtr_
simple pointer
Definition: DARhoSimpleFoam.H:61
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:79
Foam::DARhoSimpleFoam::rhoPtr_
autoPtr< volScalarField > rhoPtr_
density field pointer
Definition: DARhoSimpleFoam.H:70