DASimpleTFoam.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 DASimpleTFoam
8 
9  This class is modified from OpenFOAM's source code
10  applications/solvers/incompressible/simpleFoam
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 DASimpleTFoam_H
34 #define DASimpleTFoam_H
35 
36 #include "DASolver.H"
37 #include "addToRunTimeSelectionTable.H"
38 #include "singlePhaseTransportModel.H"
39 #include "turbulentTransportModel.H"
40 #include "simpleControl.H"
43 #include "DAFvSource.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class DASimpleTFoam Declaration
52 \*---------------------------------------------------------------------------*/
53 
55  : public DASolver
56 {
57 
58 protected:
59 
61  autoPtr<simpleControl> simplePtr_;
62 
64  autoPtr<volScalarField> pPtr_;
65 
67  autoPtr<volVectorField> UPtr_;
68 
70  autoPtr<surfaceScalarField> phiPtr_;
71 
73  autoPtr<volScalarField> alphaPorosityPtr_;
74 
76  autoPtr<singlePhaseTransportModel> laminarTransportPtr_;
77 
79  autoPtr<incompressible::turbulenceModel> turbulencePtr_;
80 
82  autoPtr<DATurbulenceModel> daTurbulenceModelPtr_;
83 
85  autoPtr<DAFvSource> daFvSourcePtr_;
86 
88  autoPtr<volVectorField> fvSourcePtr_;
89 
91  autoPtr<IOMRFZoneListDF> MRFPtr_;
92 
94  label hasFvSource_ = 0;
95 
97  scalar cumulativeContErr_ = 0.0;
98 
100  label pRefCell_ = 0;
101 
103  scalar pRefValue_ = 0.0;
104 
106  autoPtr<dimensionedScalar> PrPtr_;
107 
109  autoPtr<dimensionedScalar> PrtPtr_;
110 
112  autoPtr<volScalarField> TPtr_;
113 
115  autoPtr<volScalarField> alphatPtr_;
116 
117 public:
118  TypeName("DASimpleTFoam");
119  // Constructors
120 
121  //- Construct from components
123  char* argsAll,
124  PyObject* pyOptions);
125 
126  //- Destructor
127  virtual ~DASimpleTFoam()
128  {
129  }
130 
132  virtual void initSolver();
133 
135  virtual label solvePrimal(
136  const Vec xvVec,
137  Vec wVec);
138 
139 };
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 } // End namespace Foam
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 #endif
148 
149 // ************************************************************************* //
Foam::DASimpleTFoam::pPtr_
autoPtr< volScalarField > pPtr_
pressure field pointer
Definition: DASimpleTFoam.H:64
DARegDbTurbulenceModelIncompressible.H
Foam::DASimpleTFoam::daTurbulenceModelPtr_
autoPtr< DATurbulenceModel > daTurbulenceModelPtr_
DATurbulenceModel pointer.
Definition: DASimpleTFoam.H:82
Foam::DASolver
Definition: DASolver.H:49
Foam::DASimpleTFoam::solvePrimal
virtual label solvePrimal(const Vec xvVec, Vec wVec)
solve the primal equations
Definition: DASimpleTFoam.C:97
Foam::DASimpleTFoam::PrtPtr_
autoPtr< dimensionedScalar > PrtPtr_
Turbulence Prandtl pointer.
Definition: DASimpleTFoam.H:109
Foam::DASimpleTFoam::pRefValue_
scalar pRefValue_
pressure reference value
Definition: DASimpleTFoam.H:103
Foam::DASimpleTFoam::fvSourcePtr_
autoPtr< volVectorField > fvSourcePtr_
fvSource term
Definition: DASimpleTFoam.H:88
DAFvSource.H
Foam::DASimpleTFoam::turbulencePtr_
autoPtr< incompressible::turbulenceModel > turbulencePtr_
turbulence pointer
Definition: DASimpleTFoam.H:79
Foam::DASimpleTFoam::DASimpleTFoam
DASimpleTFoam(char *argsAll, PyObject *pyOptions)
Definition: DASimpleTFoam.C:41
Foam::DASimpleTFoam::alphatPtr_
autoPtr< volScalarField > alphatPtr_
thermal diffusivity field pointer
Definition: DASimpleTFoam.H:115
Foam::DASimpleTFoam::TPtr_
autoPtr< volScalarField > TPtr_
temperature field pointer
Definition: DASimpleTFoam.H:112
Foam::DASimpleTFoam::simplePtr_
autoPtr< simpleControl > simplePtr_
simple pointer
Definition: DASimpleTFoam.H:61
Foam::DASimpleTFoam::alphaPorosityPtr_
autoPtr< volScalarField > alphaPorosityPtr_
alpha porosity
Definition: DASimpleTFoam.H:73
Foam::DASimpleTFoam::phiPtr_
autoPtr< surfaceScalarField > phiPtr_
surface flux field pointer
Definition: DASimpleTFoam.H:70
Foam::DASimpleTFoam::~DASimpleTFoam
virtual ~DASimpleTFoam()
Definition: DASimpleTFoam.H:127
Foam::DASimpleTFoam::laminarTransportPtr_
autoPtr< singlePhaseTransportModel > laminarTransportPtr_
laminar transport properties pointer
Definition: DASimpleTFoam.H:76
Foam::DASimpleTFoam::UPtr_
autoPtr< volVectorField > UPtr_
velocity field pointer
Definition: DASimpleTFoam.H:67
Foam::DASimpleTFoam::TypeName
TypeName("DASimpleTFoam")
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::DASimpleTFoam::daFvSourcePtr_
autoPtr< DAFvSource > daFvSourcePtr_
DASource pointer.
Definition: DASimpleTFoam.H:85
Foam::DASimpleTFoam::MRFPtr_
autoPtr< IOMRFZoneListDF > MRFPtr_
MRF pointer.
Definition: DASimpleTFoam.H:91
Foam::DASimpleTFoam::pRefCell_
label pRefCell_
pressure referefence cell id
Definition: DASimpleTFoam.H:100
Foam::DASimpleTFoam::cumulativeContErr_
scalar cumulativeContErr_
continuity error
Definition: DASimpleTFoam.H:97
Foam::DASimpleTFoam
Definition: DASimpleTFoam.H:54
Foam::DASimpleTFoam::PrPtr_
autoPtr< dimensionedScalar > PrPtr_
Prandtl number pointer.
Definition: DASimpleTFoam.H:106
DASolver.H
Foam::DASimpleTFoam::initSolver
virtual void initSolver()
initialize fields and variables
Definition: DASimpleTFoam.C:64
DARegDbSinglePhaseTransportModel.H
Foam::DASimpleTFoam::hasFvSource_
label hasFvSource_
whether to have fvSource term
Definition: DASimpleTFoam.H:94