DATurboFoam.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 DATurboFoam
8  A steady-state compressible solver for turbomachinery
9  This class is modified based on TCFD redSolver (www.cfdsupport.com)
10 
11 \*---------------------------------------------------------------------------*/
12 
13 #ifndef DATurboFoam_H
14 #define DATurboFoam_H
15 
16 #include "DASolver.H"
17 #include "addToRunTimeSelectionTable.H"
18 #include "fluidThermo.H"
19 #include "turbulentFluidThermoModel.H"
20 #include "simpleControl.H"
21 #include "pressureControl.H"
22 #include "DARegDbFluidThermo.H"
24 
25 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
26 
27 namespace Foam
28 {
29 
30 /*---------------------------------------------------------------------------*\
31  Class DATurboFoam Declaration
32 \*---------------------------------------------------------------------------*/
33 
35  : public DASolver
36 {
37 
38 protected:
40  autoPtr<simpleControl> simplePtr_;
41 
43  autoPtr<fluidThermo> pThermoPtr_;
44 
46  autoPtr<volScalarField> pPtr_;
47 
49  autoPtr<volScalarField> rhoPtr_;
50 
52  autoPtr<volVectorField> UPtr_;
53 
55  autoPtr<volVectorField> URelPtr_;
56 
58  autoPtr<surfaceScalarField> phiPtr_;
59 
61  autoPtr<pressureControl> pressureControlPtr_;
62 
64  autoPtr<compressible::turbulenceModel> turbulencePtr_;
65 
67  autoPtr<DATurbulenceModel> daTurbulenceModelPtr_;
68 
70  autoPtr<IOMRFZoneListDF> MRFPtr_;
71 
73  dimensionedScalar initialMass_;
74 
76  scalar cumulativeContErr_ = 0.0;
77 
78 public:
79  TypeName("DATurboFoam");
80  // Constructors
81 
82  //- Construct from components
84  char* argsAll,
85  PyObject* pyOptions);
86 
87  //- Destructor
88  virtual ~DATurboFoam()
89  {
90  }
91 
93  virtual void initSolver();
94 
96  virtual label solvePrimal(
97  const Vec xvVec,
98  Vec wVec);
99 };
100 
101 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
102 
103 } // End namespace Foam
104 
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 
107 #endif
108 
109 // ************************************************************************* //
Foam::DATurboFoam::rhoPtr_
autoPtr< volScalarField > rhoPtr_
density field pointer
Definition: DATurboFoam.H:49
Foam::DATurboFoam::UPtr_
autoPtr< volVectorField > UPtr_
velocity field pointer
Definition: DATurboFoam.H:52
Foam::DATurboFoam::TypeName
TypeName("DATurboFoam")
Foam::DATurboFoam::turbulencePtr_
autoPtr< compressible::turbulenceModel > turbulencePtr_
turbulence pointer
Definition: DATurboFoam.H:64
Foam::DASolver
Definition: DASolver.H:49
Foam::DATurboFoam::pThermoPtr_
autoPtr< fluidThermo > pThermoPtr_
thermal model
Definition: DATurboFoam.H:43
DARegDbTurbulenceModelCompressible.H
Foam::DATurboFoam::pressureControlPtr_
autoPtr< pressureControl > pressureControlPtr_
pressure control pointer
Definition: DATurboFoam.H:61
Foam::DATurboFoam::~DATurboFoam
virtual ~DATurboFoam()
Definition: DATurboFoam.H:88
Foam::DATurboFoam
Definition: DATurboFoam.H:34
Foam::DATurboFoam::daTurbulenceModelPtr_
autoPtr< DATurbulenceModel > daTurbulenceModelPtr_
DATurbulenceModel pointer.
Definition: DATurboFoam.H:67
Foam::DATurboFoam::phiPtr_
autoPtr< surfaceScalarField > phiPtr_
surface flux field pointer
Definition: DATurboFoam.H:58
Foam
Definition: multiFreqScalarFvPatchField.C:144
Foam::DATurboFoam::MRFPtr_
autoPtr< IOMRFZoneListDF > MRFPtr_
MRF pointer.
Definition: DATurboFoam.H:70
Foam::DATurboFoam::initialMass_
dimensionedScalar initialMass_
initial mass
Definition: DATurboFoam.H:73
DARegDbFluidThermo.H
Foam::DATurboFoam::initSolver
virtual void initSolver()
initialize fields and variables
Definition: DATurboFoam.C:39
Foam::DATurboFoam::cumulativeContErr_
scalar cumulativeContErr_
continuity error
Definition: DATurboFoam.H:76
Foam::DATurboFoam::URelPtr_
autoPtr< volVectorField > URelPtr_
relative velocity field pointer
Definition: DATurboFoam.H:55
Foam::DATurboFoam::solvePrimal
virtual label solvePrimal(const Vec xvVec, Vec wVec)
solve the primal equations
Definition: DATurboFoam.C:61
DASolver.H
Foam::DATurboFoam::DATurboFoam
DATurboFoam(char *argsAll, PyObject *pyOptions)
Definition: DATurboFoam.C:19
Foam::DATurboFoam::simplePtr_
autoPtr< simpleControl > simplePtr_
simple pointer
Definition: DATurboFoam.H:40
Foam::DATurboFoam::pPtr_
autoPtr< volScalarField > pPtr_
pressure field pointer
Definition: DATurboFoam.H:46