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