createAdjointCompressible.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2 
3  DAFoam : Discrete Adjoint with OpenFOAM
4  Version : v3
5 
6 \*---------------------------------------------------------------------------*/
7 // adjoint
8 
9 // need to register thermo and turbulence to mesh
10 // before initializing DATurbulenceModel
11 DARegDbFluidThermo regDbThermo(mesh, thermo);
12 DARegDbTurbulenceModelCompressible regDbTurbulence(mesh, turbulencePtr_());
13 
14 // read the RAS model from constant/turbulenceProperties
15 const word turbModelName(
16  IOdictionary(
17  IOobject(
18  "turbulenceProperties",
19  mesh.time().constant(),
20  mesh,
21  IOobject::MUST_READ,
22  IOobject::NO_WRITE,
23  false))
24  .subDict("RAS")
25  .lookup("RASModel"));
26 daTurbulenceModelPtr_.reset(DATurbulenceModel::New(turbModelName, mesh, daOptionPtr_()));
27 
28 daModelPtr_.reset(new DAModel(mesh, daOptionPtr_()));
29 
30 word solverName = daOptionPtr_->getOption<word>("solverName");
31 daStateInfoPtr_.reset(DAStateInfo::New(solverName, mesh, daOptionPtr_(), daModelPtr_()));
32 stateInfo_ = daStateInfoPtr_->getStateInfo();
33 
34 daIndexPtr_.reset(new DAIndex(mesh, daOptionPtr_(), daModelPtr_()));
35 
36 daIndexPtr_->printIndices();
37 
38 daFieldPtr_.reset(new DAField(mesh, daOptionPtr_(), daModelPtr_(), daIndexPtr_()));
39 
40 daResidualPtr_.reset(DAResidual::New(solverName, mesh, daOptionPtr_(), daModelPtr_(), daIndexPtr_()));
regDbTurbulence
DARegDbTurbulenceModelCompressible regDbTurbulence(mesh, turbulencePtr_())
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
solverName
word solverName
Definition: createAdjointCompressible.H:30
regDbThermo
DARegDbFluidThermo regDbThermo(mesh, thermo)
stateInfo_
stateInfo_
Definition: createAdjointCompressible.H:32
thermo
fluidThermo & thermo
Definition: createRefsRhoSimpleC.H:6
turbModelName
const word turbModelName(IOdictionary(IOobject("turbulenceProperties", mesh.time().constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE, false)) .subDict("RAS") .lookup("RASModel"))