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 turbulence to mesh
8 DARegDbSinglePhaseTransportModel regDbTransport(mesh, laminarTransport);
9 DARegDbTurbulenceModelIncompressible regDbTurbulence(mesh, turbulence());
10 
11 // read the RAS model from constant/turbulenceProperties
12 const word turbModelName(
13  IOdictionary(
14  IOobject(
15  "turbulenceProperties",
16  mesh.time().constant(),
17  mesh,
18  IOobject::MUST_READ,
19  IOobject::NO_WRITE,
20  false))
21  .subDict("RAS")
22  .lookup("RASModel"));
23 autoPtr<DATurbulenceModel> daTurbulenceModel(DATurbulenceModel::New(turbModelName, mesh, daOption));
24 
25 DAModel daModel(mesh, daOption);
26 
27 DAIndex daIndex(mesh, daOption, daModel);
regDbTransport
DARegDbSinglePhaseTransportModel regDbTransport(mesh, laminarTransport)
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"))
laminarTransport
singlePhaseTransportModel & laminarTransport
Definition: createRefsPimple.H:9
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))
daTurbulenceModel
autoPtr< DATurbulenceModel > daTurbulenceModel(DATurbulenceModel::New(turbModelName, mesh, daOption))
daUtil
DAUtility daUtil
Definition: createAdjoint.H:3
mesh
fvMesh & mesh
Definition: createAdjoint.H:3
daModel
DAModel daModel(mesh, daOption)
daIndex
DAIndex daIndex(mesh, daOption, daModel)