createAdjointIncompressible.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2 
3  DAFoam : Discrete Adjoint with OpenFOAM
4  Version : v3
5 
6 \*---------------------------------------------------------------------------*/
7 
8 // adjoint
9 
10 // need to register laminarTransport and turbulence to mesh
11 DARegDbSinglePhaseTransportModel regDbTransport(mesh, laminarTransport);
12 DARegDbTurbulenceModelIncompressible 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_()));
stateInfo_
stateInfo_
Definition: createAdjointIncompressible.H:32
solverName
word solverName
Definition: createAdjointIncompressible.H:30
regDbTurbulence
DARegDbTurbulenceModelIncompressible regDbTurbulence(mesh, turbulencePtr_())
laminarTransport
singlePhaseTransportModel & laminarTransport
Definition: createRefsPimple.H:9
turbModelName
const word turbModelName(IOdictionary(IOobject("turbulenceProperties", mesh.time().constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE, false)) .subDict("RAS") .lookup("RASModel"))
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
regDbTransport
DARegDbSinglePhaseTransportModel regDbTransport(mesh, laminarTransport)