Manages the adjoint mean flow fields and their mean values. More...
Public Member Functions | |
TypeName ("incompressibleAdjointMeanFlowVars") | |
Run-time type information. More... | |
incompressibleAdjointMeanFlowVars (fvMesh &mesh, solverControl &SolverControl, incompressibleVars &primalVars) | |
Construct from mesh. More... | |
virtual | ~incompressibleAdjointMeanFlowVars ()=default |
Destructor. More... | |
const incompressibleVars & | primalVars () const |
const volScalarField & | pa () const |
Return const reference to pressure. More... | |
volScalarField & | pa () |
Return reference to pressure. More... | |
const volVectorField & | Ua () const |
Return const reference to velocity. More... | |
volVectorField & | Ua () |
Return reference to velocity. More... | |
const surfaceScalarField & | phia () const |
Return const reference to volume flux. More... | |
surfaceScalarField & | phia () |
Return reference to volume flux. More... | |
const volScalarField & | paInst () const |
Return const reference to pressure. More... | |
volScalarField & | paInst () |
Return reference to pressure. More... | |
const volVectorField & | UaInst () const |
Return const reference to velocity. More... | |
volVectorField & | UaInst () |
Return reference to velocity. More... | |
const surfaceScalarField & | phiaInst () const |
Return const reference to volume flux. More... | |
surfaceScalarField & | phiaInst () |
Return reference to volume flux. More... | |
bool | computeMeanFields () const |
Return computeMeanFields bool. More... | |
const solverControl & | getSolverControl () const |
Return const reference to solverControl. More... | |
virtual void | nullify () |
Nullify all adjoint fields. More... | |
![]() | |
TypeName ("variablesSet") | |
Run-time type information. More... | |
variablesSet (fvMesh &mesh, const dictionary &dict) | |
Construct from mesh and solver name. More... | |
virtual autoPtr< variablesSet > | clone () const |
Clone the variablesSet. More... | |
virtual | ~variablesSet ()=default |
Destructor. More... | |
const word & | solverName () const |
Return solver name. More... | |
bool | useSolverNameForFields () const |
Append solver name to fields? More... | |
template<class Type > | |
tmp< GeometricField< Type, fvPatchField, volMesh > > | allocateField (const fvMesh &mesh, const word &baseName, const word &solverName, const bool useSolverNameForFields) |
template<class Type > | |
void | renameTurbulenceField (GeometricField< Type, fvPatchField, volMesh > &baseField, const word &solverName) |
tmp< surfaceScalarField > | allocateFluxField (const fvMesh &mesh, const volVectorField &velocity, const word &baseName, const word &solverName, const bool useSolverNameForFields) |
virtual void | transfer (variablesSet &vars) |
Transfer the fields of another variablesSet to this. More... | |
Protected Member Functions | |
void | setFields () |
Read fields and set turbulence. More... | |
void | setMeanFields () |
Read mean fields, if necessary. More... | |
![]() | |
template<class Type , template< class > class PatchField, class GeoMesh > | |
autoPtr< GeometricField< Type, PatchField, GeoMesh > > | allocateRenamedField (const autoPtr< GeometricField< Type, PatchField, GeoMesh >> &bf) |
template<class Type , template< class > class PatchField, class GeoMesh > | |
void | swapAndRename (autoPtr< GeometricField< Type, PatchField, GeoMesh >> &p1, autoPtr< GeometricField< Type, PatchField, GeoMesh >> &p2) |
Swap autoPtrs and rename managed fields. More... | |
Protected Attributes | |
solverControl & | solverControl_ |
Reference to the solverControl of the solver allocating the fields. More... | |
incompressibleVars & | primalVars_ |
Reference to primal variables. More... | |
autoPtr< volScalarField > | paPtr_ |
autoPtr< volVectorField > | UaPtr_ |
autoPtr< surfaceScalarField > | phiaPtr_ |
autoPtr< volScalarField > | paMeanPtr_ |
autoPtr< volVectorField > | UaMeanPtr_ |
autoPtr< surfaceScalarField > | phiaMeanPtr_ |
![]() | |
fvMesh & | mesh_ |
Reference to the mesh database. More... | |
word | solverName_ |
Solver name owning the variables set. More... | |
bool | useSolverNameForFields_ |
Append the solver name to the variables names? More... | |
Additional Inherited Members | |
![]() | |
template<class Type > | |
static void | setField (autoPtr< GeometricField< Type, fvPatchField, volMesh >> &fieldPtr, const fvMesh &mesh, const word &baseName, const word &solverName, const bool useSolverNameForFields) |
Read vol fields. More... | |
static void | setFluxField (autoPtr< surfaceScalarField > &fieldPtr, const fvMesh &mesh, const volVectorField &velocity, const word &baseName, const word &solverName, const bool useSolverNameForFields) |
Set flux field. More... | |
static tmp< volVectorField > | autoCreateMeshMovementField (const fvMesh &mesh, const word &name, const dimensionSet &dims) |
Auto create variable for mesh movement. More... | |
template<class Type , template< class > class PatchField, class GeoMesh > | |
static void | nullifyField (GeometricField< Type, PatchField, GeoMesh > &fieldPtr) |
Nullify field and old times, if present. More... | |
Manages the adjoint mean flow fields and their mean values.
Definition at line 51 of file incompressibleAdjointMeanFlowVars.H.
incompressibleAdjointMeanFlowVars | ( | fvMesh & | mesh, |
solverControl & | SolverControl, | ||
incompressibleVars & | primalVars | ||
) |
Construct from mesh.
Definition at line 119 of file incompressibleAdjointMeanFlowVars.C.
|
virtualdefault |
Destructor.
|
protected |
Read fields and set turbulence.
Definition at line 43 of file incompressibleAdjointMeanFlowVars.C.
References variablesSet::mesh_, incompressibleAdjointMeanFlowVars::paPtr_, incompressibleAdjointMeanFlowVars::phiaPtr_, variablesSet::setField(), variablesSet::setFluxField(), schemesLookup::setFluxRequired(), variablesSet::solverName_, incompressibleAdjointMeanFlowVars::UaInst(), incompressibleAdjointMeanFlowVars::UaPtr_, and variablesSet::useSolverNameForFields_.
|
protected |
Read mean fields, if necessary.
Definition at line 60 of file incompressibleAdjointMeanFlowVars.C.
References IOobject::AUTO_WRITE, solverControl::average(), Foam::endl(), Foam::Info, variablesSet::mesh_, Foam::name(), incompressibleAdjointMeanFlowVars::paInst(), incompressibleAdjointMeanFlowVars::paMeanPtr_, incompressibleAdjointMeanFlowVars::phiaInst(), incompressibleAdjointMeanFlowVars::phiaMeanPtr_, IOobject::READ_IF_PRESENT, incompressibleAdjointMeanFlowVars::solverControl_, fvMesh::time(), Time::timeName(), incompressibleAdjointMeanFlowVars::UaInst(), and incompressibleAdjointMeanFlowVars::UaMeanPtr_.
TypeName | ( | "incompressibleAdjointMeanFlowVars" | ) |
Run-time type information.
const incompressibleVars & primalVars | ( | ) | const |
Definition at line 142 of file incompressibleAdjointMeanFlowVars.C.
References incompressibleAdjointMeanFlowVars::primalVars_.
const volScalarField & pa | ( | ) | const |
Return const reference to pressure.
Definition at line 147 of file incompressibleAdjointMeanFlowVars.C.
References incompressibleAdjointMeanFlowVars::paMeanPtr_, incompressibleAdjointMeanFlowVars::paPtr_, incompressibleAdjointMeanFlowVars::solverControl_, and solverControl::useAveragedFields().
Referenced by sensitivitySurfacePoints::accumulateIntegrand(), sensitivitySurface::accumulateIntegrand(), adjointSensitivity::computeGradDxDbMultiplier(), and shapeSensitivities::dvdbMult().
volScalarField & pa | ( | ) |
Return reference to pressure.
Definition at line 160 of file incompressibleAdjointMeanFlowVars.C.
References incompressibleAdjointMeanFlowVars::paMeanPtr_, incompressibleAdjointMeanFlowVars::paPtr_, incompressibleAdjointMeanFlowVars::solverControl_, and solverControl::useAveragedFields().
const volVectorField & Ua | ( | ) | const |
Return const reference to velocity.
Definition at line 173 of file incompressibleAdjointMeanFlowVars.C.
References incompressibleAdjointMeanFlowVars::solverControl_, incompressibleAdjointMeanFlowVars::UaMeanPtr_, incompressibleAdjointMeanFlowVars::UaPtr_, and solverControl::useAveragedFields().
Referenced by shapeSensitivities::accumulateBCSensitivityIntegrand(), sensitivitySurfacePoints::accumulateIntegrand(), sensitivitySurface::accumulateIntegrand(), adjointSensitivity::computeGradDxDbMultiplier(), adjointLaminar::devReff(), adjointSpalartAllmaras::distanceSensitivities(), shapeSensitivities::dvdbMult(), ATCUaGradU::getFISensitivityTerm(), and ATCstandard::getFISensitivityTerm().
volVectorField & Ua | ( | ) |
Return reference to velocity.
Definition at line 186 of file incompressibleAdjointMeanFlowVars.C.
References incompressibleAdjointMeanFlowVars::solverControl_, incompressibleAdjointMeanFlowVars::UaMeanPtr_, incompressibleAdjointMeanFlowVars::UaPtr_, and solverControl::useAveragedFields().
const surfaceScalarField & phia | ( | ) | const |
Return const reference to volume flux.
Definition at line 199 of file incompressibleAdjointMeanFlowVars.C.
References incompressibleAdjointMeanFlowVars::phiaMeanPtr_, incompressibleAdjointMeanFlowVars::phiaPtr_, incompressibleAdjointMeanFlowVars::solverControl_, and solverControl::useAveragedFields().
surfaceScalarField & phia | ( | ) |
Return reference to volume flux.
Definition at line 212 of file incompressibleAdjointMeanFlowVars.C.
References incompressibleAdjointMeanFlowVars::phiaMeanPtr_, incompressibleAdjointMeanFlowVars::phiaPtr_, incompressibleAdjointMeanFlowVars::solverControl_, and solverControl::useAveragedFields().
const volScalarField & paInst | ( | ) | const |
Return const reference to pressure.
Definition at line 225 of file incompressibleAdjointMeanFlowVars.C.
References incompressibleAdjointMeanFlowVars::paPtr_.
Referenced by boundaryAdjointContributionIncompressible::pab(), and incompressibleAdjointMeanFlowVars::setMeanFields().
volScalarField & paInst | ( | ) |
Return reference to pressure.
Definition at line 231 of file incompressibleAdjointMeanFlowVars.C.
References incompressibleAdjointMeanFlowVars::paPtr_.
const volVectorField & UaInst | ( | ) | const |
Return const reference to velocity.
Definition at line 237 of file incompressibleAdjointMeanFlowVars.C.
References incompressibleAdjointMeanFlowVars::UaPtr_.
Referenced by ATCstandard::addATC(), ATCUaGradU::addATC(), adjointSpalartAllmaras::correct(), adjointSpalartAllmaras::devReff(), incompressibleAdjointMeanFlowVars::setFields(), incompressibleAdjointMeanFlowVars::setMeanFields(), and boundaryAdjointContributionIncompressible::Uab().
volVectorField & UaInst | ( | ) |
Return reference to velocity.
Definition at line 243 of file incompressibleAdjointMeanFlowVars.C.
References incompressibleAdjointMeanFlowVars::UaPtr_.
const surfaceScalarField & phiaInst | ( | ) | const |
Return const reference to volume flux.
Definition at line 249 of file incompressibleAdjointMeanFlowVars.C.
References incompressibleAdjointMeanFlowVars::phiaPtr_.
Referenced by ATCUaGradU::addATC(), boundaryAdjointContributionIncompressible::phiab(), and incompressibleAdjointMeanFlowVars::setMeanFields().
surfaceScalarField & phiaInst | ( | ) |
Return reference to volume flux.
Definition at line 255 of file incompressibleAdjointMeanFlowVars.C.
References incompressibleAdjointMeanFlowVars::phiaPtr_.
bool computeMeanFields | ( | ) | const |
Return computeMeanFields bool.
Definition at line 261 of file incompressibleAdjointMeanFlowVars.C.
References solverControl::average(), and incompressibleAdjointMeanFlowVars::solverControl_.
const solverControl & getSolverControl | ( | ) | const |
Return const reference to solverControl.
Definition at line 267 of file incompressibleAdjointMeanFlowVars.C.
References incompressibleAdjointMeanFlowVars::solverControl_.
Referenced by adjointRASModel::computeMeanFields(), adjointSpalartAllmaras::correct(), adjointRASModel::getAdjointTMVariable1(), adjointRASModel::getAdjointTMVariable2(), adjointRASModel::resetMeanFields(), and adjointRASModel::setMeanFields().
|
virtual |
Nullify all adjoint fields.
Reimplemented in incompressibleAdjointVars.
Definition at line 273 of file incompressibleAdjointMeanFlowVars.C.
References variablesSet::nullifyField(), incompressibleAdjointMeanFlowVars::paPtr_, incompressibleAdjointMeanFlowVars::phiaPtr_, and incompressibleAdjointMeanFlowVars::UaPtr_.
Referenced by incompressibleAdjointVars::nullify().
|
protected |
Reference to the solverControl of the solver allocating the fields.
Definition at line 74 of file incompressibleAdjointMeanFlowVars.H.
Referenced by incompressibleAdjointVars::computeMeanFields(), incompressibleAdjointMeanFlowVars::computeMeanFields(), incompressibleAdjointMeanFlowVars::getSolverControl(), incompressibleAdjointMeanFlowVars::pa(), incompressibleAdjointMeanFlowVars::phia(), incompressibleAdjointVars::resetMeanFields(), incompressibleAdjointMeanFlowVars::setMeanFields(), and incompressibleAdjointMeanFlowVars::Ua().
|
protected |
Reference to primal variables.
Definition at line 77 of file incompressibleAdjointMeanFlowVars.H.
Referenced by incompressibleAdjointMeanFlowVars::primalVars().
|
protected |
Fields involved in the solution of the incompressible adjoint NS equations
Definition at line 81 of file incompressibleAdjointMeanFlowVars.H.
Referenced by incompressibleAdjointVars::computeMeanFields(), incompressibleAdjointMeanFlowVars::nullify(), incompressibleAdjointMeanFlowVars::pa(), incompressibleAdjointMeanFlowVars::paInst(), incompressibleAdjointVars::resetMeanFields(), and incompressibleAdjointMeanFlowVars::setFields().
|
protected |
Definition at line 82 of file incompressibleAdjointMeanFlowVars.H.
Referenced by incompressibleAdjointVars::computeMeanFields(), incompressibleAdjointMeanFlowVars::nullify(), incompressibleAdjointVars::resetMeanFields(), incompressibleAdjointMeanFlowVars::setFields(), incompressibleAdjointMeanFlowVars::Ua(), and incompressibleAdjointMeanFlowVars::UaInst().
|
protected |
Definition at line 83 of file incompressibleAdjointMeanFlowVars.H.
Referenced by incompressibleAdjointVars::computeMeanFields(), incompressibleAdjointMeanFlowVars::nullify(), incompressibleAdjointMeanFlowVars::phia(), incompressibleAdjointMeanFlowVars::phiaInst(), incompressibleAdjointVars::resetMeanFields(), and incompressibleAdjointMeanFlowVars::setFields().
|
protected |
Mean Adjoint Fields. Actual averaging is done in the incompressibleAdjointVars class to take care of the mean adjoint turbulence variables
Definition at line 88 of file incompressibleAdjointMeanFlowVars.H.
Referenced by incompressibleAdjointVars::computeMeanFields(), incompressibleAdjointMeanFlowVars::pa(), incompressibleAdjointVars::resetMeanFields(), and incompressibleAdjointMeanFlowVars::setMeanFields().
|
protected |
Definition at line 89 of file incompressibleAdjointMeanFlowVars.H.
Referenced by incompressibleAdjointVars::computeMeanFields(), incompressibleAdjointVars::resetMeanFields(), incompressibleAdjointMeanFlowVars::setMeanFields(), and incompressibleAdjointMeanFlowVars::Ua().
|
protected |
Definition at line 90 of file incompressibleAdjointMeanFlowVars.H.
Referenced by incompressibleAdjointVars::computeMeanFields(), incompressibleAdjointMeanFlowVars::phia(), incompressibleAdjointVars::resetMeanFields(), and incompressibleAdjointMeanFlowVars::setMeanFields().