createAdjoint.H
Go to the documentation of this file.
1 // adjoint
2 
3 DAUtility daUtil;
4 
5 DAOption daOption(mesh, pyOptions_);
6 
7 // need to register thermo and turbulence to mesh
8 // before initializing DATurbulenceModel
9 DARegDbFluidThermo regDbThermo(mesh, thermo);
10 DARegDbTurbulenceModelCompressible regDbTurbulence(mesh, turbulence());
11 
12 // read the RAS model from constant/turbulenceProperties
13 const word turbModelName(
14  IOdictionary(
15  IOobject(
16  "turbulenceProperties",
17  mesh.time().constant(),
18  mesh,
19  IOobject::MUST_READ,
20  IOobject::NO_WRITE,
21  false))
22  .subDict("RAS")
23  .lookup("RASModel"));
24 autoPtr<DATurbulenceModel> daTurbulenceModel(DATurbulenceModel::New(turbModelName, mesh, daOption));
25 
26 DAModel daModel(mesh, daOption);
27 
28 DAIndex daIndex(mesh, daOption, daModel);
regDbTurbulence
DARegDbTurbulenceModelCompressible regDbTurbulence(mesh, turbulence())
turbModelName
const word turbModelName(IOdictionary(IOobject("turbulenceProperties", mesh.time().constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE, false)) .subDict("RAS") .lookup("RASModel"))
daOption
DAOption daOption(mesh, pyOptions_)
turbulence
Info<< "Reading field p\n"<< endl;volScalarField p(IOobject("p", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading field U\n"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);label pRefCell=0;scalar pRefValue=0.0;setRefCell(p, pimple.dict(), pRefCell, pRefValue);mesh.setFluxRequired(p.name());singlePhaseTransportModel laminarTransport(U, phi);autoPtr< incompressible::turbulenceModel > turbulence(incompressible::turbulenceModel::New(U, phi, laminarTransport))
regDbThermo
DARegDbFluidThermo regDbThermo(mesh, thermo)
daTurbulenceModel
autoPtr< DATurbulenceModel > daTurbulenceModel(DATurbulenceModel::New(turbModelName, mesh, daOption))
daUtil
DAUtility daUtil
Definition: createAdjoint.H:3
mesh
fvMesh & mesh
Definition: createAdjoint.H:3
thermo
fluidThermo & thermo
Definition: createRefsRhoSimpleC.H:6
daModel
DAModel daModel(mesh, daOption)
daIndex
DAIndex daIndex(mesh, daOption, daModel)