DARhoSimpleCFoam.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 DARhoSimpleCFoam
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 DARhoSimpleCFoam_H
34 #define DARhoSimpleCFoam_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 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class DARhoSimpleCFoam Declaration
50 \*---------------------------------------------------------------------------*/
51 
53  : public DASolver
54 {
55 
56 protected:
58  autoPtr<simpleControl> simplePtr_;
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<pressureControl> pressureControlPtr_;
77 
79  autoPtr<compressible::turbulenceModel> turbulencePtr_;
80 
82  autoPtr<DATurbulenceModel> daTurbulenceModelPtr_;
83 
85  dimensionedScalar initialMass_;
86 
88  scalar cumulativeContErr_ = 0.0;
89 
90 public:
91  TypeName("DARhoSimpleCFoam");
92  // Constructors
93 
94  //- Construct from components
96  char* argsAll,
97  PyObject* pyOptions);
98 
99  //- Destructor
101  {
102  }
103 
105  virtual void initSolver();
106 
108  virtual label solvePrimal();
109 };
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 } // End namespace Foam
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 #endif
118 
119 // ************************************************************************* //
Foam::DARhoSimpleCFoam::simplePtr_
autoPtr< simpleControl > simplePtr_
simple pointer
Definition: DARhoSimpleCFoam.H:58
Foam::DARhoSimpleCFoam::rhoPtr_
autoPtr< volScalarField > rhoPtr_
density field pointer
Definition: DARhoSimpleCFoam.H:67
Foam::DARhoSimpleCFoam::turbulencePtr_
autoPtr< compressible::turbulenceModel > turbulencePtr_
turbulence pointer
Definition: DARhoSimpleCFoam.H:79
Foam::DARhoSimpleCFoam::UPtr_
autoPtr< volVectorField > UPtr_
velocity field pointer
Definition: DARhoSimpleCFoam.H:70
Foam::DASolver
Definition: DASolver.H:54
Foam::DARhoSimpleCFoam::initialMass_
dimensionedScalar initialMass_
initial mass
Definition: DARhoSimpleCFoam.H:85
Foam::DARhoSimpleCFoam::daTurbulenceModelPtr_
autoPtr< DATurbulenceModel > daTurbulenceModelPtr_
DATurbulenceModel pointer.
Definition: DARhoSimpleCFoam.H:82
Foam::DARhoSimpleCFoam::pThermoPtr_
autoPtr< fluidThermo > pThermoPtr_
thermal model
Definition: DARhoSimpleCFoam.H:61
Foam::DARhoSimpleCFoam::pPtr_
autoPtr< volScalarField > pPtr_
pressure field pointer
Definition: DARhoSimpleCFoam.H:64
Foam::DARhoSimpleCFoam::cumulativeContErr_
scalar cumulativeContErr_
continuity error
Definition: DARhoSimpleCFoam.H:88
Foam::DARhoSimpleCFoam::TypeName
TypeName("DARhoSimpleCFoam")
Foam::DARhoSimpleCFoam::solvePrimal
virtual label solvePrimal()
solve the primal equations
Definition: DARhoSimpleCFoam.C:90
Foam
Definition: checkGeometry.C:32
Foam::DARhoSimpleCFoam::DARhoSimpleCFoam
DARhoSimpleCFoam(char *argsAll, PyObject *pyOptions)
Definition: DARhoSimpleCFoam.C:41
Foam::DARhoSimpleCFoam::~DARhoSimpleCFoam
virtual ~DARhoSimpleCFoam()
Definition: DARhoSimpleCFoam.H:100
Foam::DARhoSimpleCFoam
Definition: DARhoSimpleCFoam.H:52
Foam::DARhoSimpleCFoam::initSolver
virtual void initSolver()
initialize fields and variables
Definition: DARhoSimpleCFoam.C:59
Foam::DARhoSimpleCFoam::phiPtr_
autoPtr< surfaceScalarField > phiPtr_
surface flux field pointer
Definition: DARhoSimpleCFoam.H:73
Foam::DARhoSimpleCFoam::pressureControlPtr_
autoPtr< pressureControl > pressureControlPtr_
pressure control pointer
Definition: DARhoSimpleCFoam.H:76
DASolver.H