DARhoSimpleCFoam.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  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 #include "DARegDbFluidThermo.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class DARhoSimpleCFoam Declaration
52 \*---------------------------------------------------------------------------*/
53 
55  : public DASolver
56 {
57 
58 protected:
59 
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  dimensionedScalar initialMass_;
89 
91  scalar cumulativeContErr_ = 0.0;
92 
93 public:
94  TypeName("DARhoSimpleCFoam");
95  // Constructors
96 
97  //- Construct from components
99  char* argsAll,
100  PyObject* pyOptions);
101 
102  //- Destructor
104  {
105  }
106 
108  virtual void initSolver();
109 
111  virtual label solvePrimal(
112  const Vec xvVec,
113  Vec wVec);
114 
115 };
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 } // End namespace Foam
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 #endif
124 
125 // ************************************************************************* //
Foam::DARhoSimpleCFoam::simplePtr_
autoPtr< simpleControl > simplePtr_
simple pointer
Definition: DARhoSimpleCFoam.H:61
Foam::DARhoSimpleCFoam::rhoPtr_
autoPtr< volScalarField > rhoPtr_
density field pointer
Definition: DARhoSimpleCFoam.H:70
Foam::DARhoSimpleCFoam::turbulencePtr_
autoPtr< compressible::turbulenceModel > turbulencePtr_
turbulence pointer
Definition: DARhoSimpleCFoam.H:82
Foam::DARhoSimpleCFoam::UPtr_
autoPtr< volVectorField > UPtr_
velocity field pointer
Definition: DARhoSimpleCFoam.H:73
Foam::DARhoSimpleCFoam::solvePrimal
virtual label solvePrimal(const Vec xvVec, Vec wVec)
solve the primal equations
Definition: DARhoSimpleCFoam.C:81
Foam::DASolver
Definition: DASolver.H:49
Foam::DARhoSimpleCFoam::initialMass_
dimensionedScalar initialMass_
initial mass
Definition: DARhoSimpleCFoam.H:88
DARegDbTurbulenceModelCompressible.H
Foam::DARhoSimpleCFoam::daTurbulenceModelPtr_
autoPtr< DATurbulenceModel > daTurbulenceModelPtr_
DATurbulenceModel pointer.
Definition: DARhoSimpleCFoam.H:85
Foam::DARhoSimpleCFoam::pThermoPtr_
autoPtr< fluidThermo > pThermoPtr_
thermal model
Definition: DARhoSimpleCFoam.H:64
Foam::DARhoSimpleCFoam::pPtr_
autoPtr< volScalarField > pPtr_
pressure field pointer
Definition: DARhoSimpleCFoam.H:67
Foam::DARhoSimpleCFoam::cumulativeContErr_
scalar cumulativeContErr_
continuity error
Definition: DARhoSimpleCFoam.H:91
Foam::DARhoSimpleCFoam::TypeName
TypeName("DARhoSimpleCFoam")
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::DARhoSimpleCFoam::DARhoSimpleCFoam
DARhoSimpleCFoam(char *argsAll, PyObject *pyOptions)
Definition: DARhoSimpleCFoam.C:41
Foam::DARhoSimpleCFoam::~DARhoSimpleCFoam
virtual ~DARhoSimpleCFoam()
Definition: DARhoSimpleCFoam.H:103
DARegDbFluidThermo.H
Foam::DARhoSimpleCFoam
Definition: DARhoSimpleCFoam.H:54
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:76
Foam::DARhoSimpleCFoam::pressureControlPtr_
autoPtr< pressureControl > pressureControlPtr_
pressure control pointer
Definition: DARhoSimpleCFoam.H:79
DASolver.H