DARhoPimpleFoam.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 DARhoPimpleFoam
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 DARhoPimpleFoam_H
34 #define DARhoPimpleFoam_H
35 
36 #include "DASolver.H"
37 #include "addToRunTimeSelectionTable.H"
38 #include "fluidThermo.H"
39 #include "turbulentFluidThermoModel.H"
40 #include "pimpleControlDF.H"
41 #include "DAFvSource.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class DARhoPimpleFoam Declaration
50 \*---------------------------------------------------------------------------*/
51 
53  : public DASolver
54 {
55 
56 protected:
58  autoPtr<pimpleControlDF> pimplePtr_;
59 
61  autoPtr<fluidThermo> pThermoPtr_;
62 
64  autoPtr<volScalarField> pPtr_;
65 
67  autoPtr<volScalarField> rhoPtr_;
68 
70  autoPtr<volVectorField> UPtr_;
71 
73  autoPtr<surfaceScalarField> phiPtr_;
74 
76  autoPtr<volScalarField> dpdtPtr_;
77 
79  autoPtr<volScalarField> KPtr_;
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  scalar cumulativeContErr_ = 0.0;
101 
104 
105 public:
106  TypeName("DARhoPimpleFoam");
107  // Constructors
108 
109  //- Construct from components
111  char* argsAll,
112  PyObject* pyOptions);
113 
114  //- Destructor
116  {
117  }
118 
120  virtual void initSolver();
121 
123  virtual label solvePrimal();
124 };
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #endif
133 
134 // ************************************************************************* //
Foam::DARhoPimpleFoam::KPtr_
autoPtr< volScalarField > KPtr_
kinetic energy pointer
Definition: DARhoPimpleFoam.H:79
Foam::DARhoPimpleFoam
Definition: DARhoPimpleFoam.H:52
Foam::DASolver
Definition: DASolver.H:54
Foam::DARhoPimpleFoam::rhoPtr_
autoPtr< volScalarField > rhoPtr_
density field pointer
Definition: DARhoPimpleFoam.H:67
Foam::DARhoPimpleFoam::solvePrimal
virtual label solvePrimal()
solve the primal equations
Definition: DARhoPimpleFoam.C:118
DAFvSource.H
Foam::DARhoPimpleFoam::pThermoPtr_
autoPtr< fluidThermo > pThermoPtr_
thermal model
Definition: DARhoPimpleFoam.H:61
Foam::DARhoPimpleFoam::fvSourceEnergyPtr_
autoPtr< volScalarField > fvSourceEnergyPtr_
fvSource term for the energy equation
Definition: DARhoPimpleFoam.H:94
Foam::DARhoPimpleFoam::phiPtr_
autoPtr< surfaceScalarField > phiPtr_
surface flux field pointer
Definition: DARhoPimpleFoam.H:73
Foam::DARhoPimpleFoam::turbulencePtr_
autoPtr< compressible::turbulenceModel > turbulencePtr_
turbulence pointer
Definition: DARhoPimpleFoam.H:82
Foam::DARhoPimpleFoam::pimplePtr_
autoPtr< pimpleControlDF > pimplePtr_
simple pointer
Definition: DARhoPimpleFoam.H:58
Foam::DARhoPimpleFoam::~DARhoPimpleFoam
virtual ~DARhoPimpleFoam()
Definition: DARhoPimpleFoam.H:115
Foam::DARhoPimpleFoam::fvSourcePtr_
autoPtr< volVectorField > fvSourcePtr_
fvSource term
Definition: DARhoPimpleFoam.H:91
pimpleControlDF.H
Foam::DARhoPimpleFoam::reduceIOWriteMesh_
label reduceIOWriteMesh_
whether to write mesh for the reduceIO
Definition: DARhoPimpleFoam.H:103
Foam
Definition: checkGeometry.C:32
Foam::DARhoPimpleFoam::cumulativeContErr_
scalar cumulativeContErr_
continuity error
Definition: DARhoPimpleFoam.H:100
Foam::DARhoPimpleFoam::pPtr_
autoPtr< volScalarField > pPtr_
pressure field pointer
Definition: DARhoPimpleFoam.H:64
Foam::DARhoPimpleFoam::daFvSourcePtr_
autoPtr< DAFvSource > daFvSourcePtr_
DASource pointer.
Definition: DARhoPimpleFoam.H:88
Foam::DARhoPimpleFoam::UPtr_
autoPtr< volVectorField > UPtr_
velocity field pointer
Definition: DARhoPimpleFoam.H:70
Foam::DARhoPimpleFoam::initSolver
virtual void initSolver()
initialize fields and variables
Definition: DARhoPimpleFoam.C:63
DASolver.H
Foam::DARhoPimpleFoam::TypeName
TypeName("DARhoPimpleFoam")
Foam::DARhoPimpleFoam::daTurbulenceModelPtr_
autoPtr< DATurbulenceModel > daTurbulenceModelPtr_
DATurbulenceModel pointer.
Definition: DARhoPimpleFoam.H:85
Foam::DARhoPimpleFoam::hasFvSource_
label hasFvSource_
whether to have fvSource term
Definition: DARhoPimpleFoam.H:97
Foam::DARhoPimpleFoam::DARhoPimpleFoam
DARhoPimpleFoam(char *argsAll, PyObject *pyOptions)
Definition: DARhoPimpleFoam.C:42
Foam::DARhoPimpleFoam::dpdtPtr_
autoPtr< volScalarField > dpdtPtr_
pressure time deriv pointer
Definition: DARhoPimpleFoam.H:76