Go to the documentation of this file.
30 fvSource_(const_cast<volVectorField&>(
31 mesh_.thisDb().lookupObject<volVectorField>(
"fvSource"))),
34 pimple_(const_cast<fvMesh&>(
mesh))
38 if (
allOptions.subDict(
"fvSource").toc().size() != 0)
43 mode_ =
daOption.getSubDictOption<word>(
"unsteadyAdjoint",
"mode");
83 word divUScheme =
"div(phi,U)";
85 label isPC = options.getLabel(
"isPC");
89 divUScheme =
"div(pc)";
102 + fvm::div(
phi_,
U_, divUScheme)
106 if (
mode_ ==
"hybridAdjoint")
122 volScalarField
rAU(1.0 /
UEqn.A());
129 volVectorField
HbyA(
"HbyA",
U_);
135 + fvc::interpolate(
rAU) * fvc::ddtCorr(
U_,
phi_));
137 if (
mode_ ==
"hybridAdjoint")
155 fvm::laplacian(
rAtU(),
p_)
187 U_.correctBoundaryConditions();
188 p_.correctBoundaryConditions();
virtual void calcResiduals(const dictionary &options)
compute residual
DATurbulenceModel & daTurb_
DATurbulenceModel object.
const dictionary & allOptions
pimpleControl pimple_
pimpleControl object which will be initialized in this class
const fvMesh & mesh_
fvMesh
tmp< fvVectorMatrix > divDevReff(volVectorField &U)
divDev terms
virtual void updateIntermediateVariables()
update any intermediate variables that are dependent on state variables and are used in calcResiduals
word mode_
whether the hybrid adjoint or time accurate adjoint is active
volVectorField & fvSource_
fvSource term
DAOption daOption(mesh, pyOptions_)
virtual void calcFvSource(volVectorField &fvSource)
compute the FvSource term
label hasFvSource_
whether to has fvSource term
virtual void correctBoundaryConditions()
update the boundary condition for all the states in the selected solver
#define normalizeResiduals(resName)
surfaceScalarField & phi_
#define setResidualClassMemberPhi(stateName)
surfaceScalarField phiRes_
DAResidualPimpleFoam(const word modelType, const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex)
#define setResidualClassMemberVector(stateName, stateUnit)
tmp< volScalarField > rAtU(rAU)
defineTypeNameAndDebug(DAFvSource, 0)
addToRunTimeSelectionTable(DAFvSource, DAFvSourceActuatorDisk, dictionary)
volScalarField rAU(1.0/UEqn.A())
DAModel daModel(mesh, daOption)
virtual void clear()
clear the members
DAIndex daIndex(mesh, daOption, daModel)
#define setResidualClassMemberScalar(stateName, stateUnit)
#define normalizePhiResiduals(resName)