DAPisoFoam.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 DAPisoFoam
8 
9  This class is modified from OpenFOAM's source code
10  applications/solvers/incompressible/pisoFoam
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 DAPisoFoam_H
34 #define DAPisoFoam_H
35 
36 #include "DASolver.H"
37 #include "addToRunTimeSelectionTable.H"
38 #include "singlePhaseTransportModel.H"
39 #include "turbulentTransportModel.H"
40 #include "pisoControl.H"
43 #include "DAFvSource.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class DAPisoFoam Declaration
52 \*---------------------------------------------------------------------------*/
53 
55  : public DASolver
56 {
57 
58 protected:
60  autoPtr<pisoControl> pisoPtr_;
61 
63  autoPtr<volScalarField> pPtr_;
64 
66  autoPtr<volVectorField> UPtr_;
67 
69  autoPtr<surfaceScalarField> phiPtr_;
70 
72  autoPtr<singlePhaseTransportModel> laminarTransportPtr_;
73 
75  autoPtr<incompressible::turbulenceModel> turbulencePtr_;
76 
78  autoPtr<DATurbulenceModel> daTurbulenceModelPtr_;
79 
81  autoPtr<DAFvSource> daFvSourcePtr_;
82 
84  autoPtr<volVectorField> fvSourcePtr_;
85 
87  label hasFvSource_ = 0;
88 
90  scalar cumulativeContErr_ = 0.0;
91 
93  label pRefCell_ = 0;
94 
96  scalar pRefValue_ = 0.0;
97 
99  word mode_ = "None";
100 
101 public:
102  TypeName("DAPisoFoam");
103  // Constructors
104 
105  //- Construct from components
106  DAPisoFoam(
107  char* argsAll,
108  PyObject* pyOptions);
109 
110  //- Destructor
111  virtual ~DAPisoFoam()
112  {
113  }
114 
116  virtual void initSolver();
117 
119  virtual label solvePrimal(
120  const Vec xvVec,
121  Vec wVec);
122 };
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 } // End namespace Foam
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 #endif
131 
132 // ************************************************************************* //
DARegDbTurbulenceModelIncompressible.H
Foam::DAPisoFoam::daTurbulenceModelPtr_
autoPtr< DATurbulenceModel > daTurbulenceModelPtr_
DATurbulenceModel pointer.
Definition: DAPisoFoam.H:78
Foam::DAPisoFoam::laminarTransportPtr_
autoPtr< singlePhaseTransportModel > laminarTransportPtr_
laminar transport properties pointer
Definition: DAPisoFoam.H:72
Foam::DAPisoFoam::initSolver
virtual void initSolver()
initialize fields and variables
Definition: DAPisoFoam.C:58
Foam::DASolver
Definition: DASolver.H:49
Foam::DAPisoFoam::solvePrimal
virtual label solvePrimal(const Vec xvVec, Vec wVec)
solve the primal equations
Definition: DAPisoFoam.C:147
Foam::DAPisoFoam::hasFvSource_
label hasFvSource_
whether to have fvSource term
Definition: DAPisoFoam.H:87
Foam::DAPisoFoam::daFvSourcePtr_
autoPtr< DAFvSource > daFvSourcePtr_
DASource pointer.
Definition: DAPisoFoam.H:81
DAFvSource.H
Foam::DAPisoFoam::phiPtr_
autoPtr< surfaceScalarField > phiPtr_
surface flux field pointer
Definition: DAPisoFoam.H:69
Foam::DAPisoFoam::mode_
word mode_
whether the hybrid adjoint or time accurate adjoint is active
Definition: DAPisoFoam.H:99
Foam::DAPisoFoam::TypeName
TypeName("DAPisoFoam")
Foam::DAPisoFoam
Definition: DAPisoFoam.H:54
Foam::DAPisoFoam::pPtr_
autoPtr< volScalarField > pPtr_
pressure field pointer
Definition: DAPisoFoam.H:63
Foam::DAPisoFoam::pRefValue_
scalar pRefValue_
pressure reference value
Definition: DAPisoFoam.H:96
Foam::DAPisoFoam::UPtr_
autoPtr< volVectorField > UPtr_
velocity field pointer
Definition: DAPisoFoam.H:66
Foam::DAPisoFoam::DAPisoFoam
DAPisoFoam(char *argsAll, PyObject *pyOptions)
Definition: DAPisoFoam.C:41
Foam::DAPisoFoam::turbulencePtr_
autoPtr< incompressible::turbulenceModel > turbulencePtr_
turbulence pointer
Definition: DAPisoFoam.H:75
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::DAPisoFoam::cumulativeContErr_
scalar cumulativeContErr_
continuity error
Definition: DAPisoFoam.H:90
Foam::DAPisoFoam::~DAPisoFoam
virtual ~DAPisoFoam()
Definition: DAPisoFoam.H:111
Foam::DAPisoFoam::pisoPtr_
autoPtr< pisoControl > pisoPtr_
piso pointer
Definition: DAPisoFoam.H:60
Foam::DAPisoFoam::pRefCell_
label pRefCell_
pressure referefence cell id
Definition: DAPisoFoam.H:93
DASolver.H
Foam::DAPisoFoam::fvSourcePtr_
autoPtr< volVectorField > fvSourcePtr_
fvSource term
Definition: DAPisoFoam.H:84
DARegDbSinglePhaseTransportModel.H