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... | |
Public Member Functions inherited from variablesSet | |
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) |
Turbulence model always reads fields with the prescribed name If a custom name is supplied, check whether this field exists, copy it to the field known by the turbulence model and re-name the latter. More... | |
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... | |
Protected Member Functions inherited from variablesSet | |
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_ |
Fields involved in the solution of the incompressible adjoint NS equations. More... | |
autoPtr< volVectorField > | UaPtr_ |
autoPtr< surfaceScalarField > | phiaPtr_ |
autoPtr< volScalarField > | paMeanPtr_ |
Mean Adjoint Fields. Actual averaging is done in the incompressibleAdjointVars class to take care of the mean adjoint turbulence variables. More... | |
autoPtr< volVectorField > | UaMeanPtr_ |
autoPtr< surfaceScalarField > | phiaMeanPtr_ |
Protected Attributes inherited from variablesSet | |
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 | |
Static Public Member Functions inherited from variablesSet | |
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 45 of file incompressibleAdjointMeanFlowVars.H.
incompressibleAdjointMeanFlowVars | ( | fvMesh & | mesh, |
solverControl & | SolverControl, | ||
incompressibleVars & | primalVars | ||
) |
Construct from mesh.
Definition at line 112 of file incompressibleAdjointMeanFlowVars.C.
|
virtualdefault |
Destructor.
|
protected |
Read fields and set turbulence.
Definition at line 36 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 53 of file incompressibleAdjointMeanFlowVars.C.
References IOobjectOption::AUTO_WRITE, solverControl::average(), Foam::endl(), Foam::Info, variablesSet::mesh_, Foam::name(), incompressibleAdjointMeanFlowVars::paInst(), incompressibleAdjointMeanFlowVars::paMeanPtr_, incompressibleAdjointMeanFlowVars::phiaInst(), incompressibleAdjointMeanFlowVars::phiaMeanPtr_, IOobjectOption::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 135 of file incompressibleAdjointMeanFlowVars.C.
References incompressibleAdjointMeanFlowVars::primalVars_.
const volScalarField & pa | ( | ) | const |
Return const reference to pressure.
Definition at line 140 of file incompressibleAdjointMeanFlowVars.C.
References incompressibleAdjointMeanFlowVars::paMeanPtr_, incompressibleAdjointMeanFlowVars::paPtr_, incompressibleAdjointMeanFlowVars::solverControl_, and solverControl::useAveragedFields().
Referenced by sensitivitySurfacePoints::accumulateIntegrand(), sensitivitySurface::accumulateIntegrand(), and shapeSensitivities::dvdbMult().
volScalarField & pa | ( | ) |
Return reference to pressure.
Definition at line 153 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 166 of file incompressibleAdjointMeanFlowVars.C.
References incompressibleAdjointMeanFlowVars::solverControl_, incompressibleAdjointMeanFlowVars::UaMeanPtr_, incompressibleAdjointMeanFlowVars::UaPtr_, and solverControl::useAveragedFields().
Referenced by shapeSensitivities::accumulateBCSensitivityIntegrand(), sensitivitySurfacePoints::accumulateIntegrand(), sensitivitySurface::accumulateIntegrand(), adjointLaminar::devReff(), adjointSpalartAllmaras::distanceSensitivities(), shapeSensitivities::dvdbMult(), ATCUaGradU::getFISensitivityTerm(), and ATCstandard::getFISensitivityTerm().
volVectorField & Ua | ( | ) |
Return reference to velocity.
Definition at line 179 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 192 of file incompressibleAdjointMeanFlowVars.C.
References incompressibleAdjointMeanFlowVars::phiaMeanPtr_, incompressibleAdjointMeanFlowVars::phiaPtr_, incompressibleAdjointMeanFlowVars::solverControl_, and solverControl::useAveragedFields().
surfaceScalarField & phia | ( | ) |
Return reference to volume flux.
Definition at line 205 of file incompressibleAdjointMeanFlowVars.C.
References incompressibleAdjointMeanFlowVars::phiaMeanPtr_, incompressibleAdjointMeanFlowVars::phiaPtr_, incompressibleAdjointMeanFlowVars::solverControl_, and solverControl::useAveragedFields().
|
inline |
Return const reference to pressure.
Definition at line 25 of file incompressibleAdjointMeanFlowVarsI.H.
References incompressibleAdjointMeanFlowVars::paPtr_.
Referenced by boundaryAdjointContributionIncompressible::pab(), and incompressibleAdjointMeanFlowVars::setMeanFields().
|
inline |
Return reference to pressure.
Definition at line 31 of file incompressibleAdjointMeanFlowVarsI.H.
|
inline |
Return const reference to velocity.
Definition at line 38 of file incompressibleAdjointMeanFlowVarsI.H.
Referenced by ATCUaGradU::addATC(), ATCstandard::addATC(), adjointkOmegaSST::adjointMeanFlowSource(), adjointSpalartAllmaras::correct(), adjointSpalartAllmaras::devReff(), adjointkOmegaSST::devReff(), adjointkOmegaSST::dR_dnut(), incompressibleAdjointMeanFlowVars::setFields(), incompressibleAdjointMeanFlowVars::setMeanFields(), and boundaryAdjointContributionIncompressible::Uab().
|
inline |
Return reference to velocity.
Definition at line 44 of file incompressibleAdjointMeanFlowVarsI.H.
|
inline |
Return const reference to volume flux.
Definition at line 51 of file incompressibleAdjointMeanFlowVarsI.H.
Referenced by ATCUaGradU::addATC(), boundaryAdjointContributionIncompressible::phiab(), and incompressibleAdjointMeanFlowVars::setMeanFields().
|
inline |
Return reference to volume flux.
Definition at line 58 of file incompressibleAdjointMeanFlowVarsI.H.
bool computeMeanFields | ( | ) | const |
Return computeMeanFields bool.
Definition at line 218 of file incompressibleAdjointMeanFlowVars.C.
References solverControl::average(), and incompressibleAdjointMeanFlowVars::solverControl_.
const solverControl & getSolverControl | ( | ) | const |
Return const reference to solverControl.
Definition at line 224 of file incompressibleAdjointMeanFlowVars.C.
References incompressibleAdjointMeanFlowVars::solverControl_.
Referenced by adjointRASModel::computeMeanFields(), adjointSpalartAllmaras::correct(), adjointkOmegaSST::correct(), adjointRASModel::getAdjointTMVariable1(), adjointRASModel::getAdjointTMVariable2(), adjointRASModel::resetMeanFields(), and adjointRASModel::setMeanFields().
|
virtual |
Nullify all adjoint fields.
Reimplemented in incompressibleAdjointVars.
Definition at line 230 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 79 of file incompressibleAdjointMeanFlowVars.H.
Referenced by incompressibleAdjointMeanFlowVars::primalVars().
|
protected |
Fields involved in the solution of the incompressible adjoint NS equations.
Definition at line 85 of file incompressibleAdjointMeanFlowVars.H.
Referenced by incompressibleAdjointVars::computeMeanFields(), incompressibleAdjointMeanFlowVars::nullify(), incompressibleAdjointMeanFlowVars::pa(), incompressibleAdjointMeanFlowVars::paInst(), incompressibleAdjointVars::resetMeanFields(), and incompressibleAdjointMeanFlowVars::setFields().
|
protected |
Definition at line 86 of file incompressibleAdjointMeanFlowVars.H.
Referenced by incompressibleAdjointVars::computeMeanFields(), incompressibleAdjointMeanFlowVars::nullify(), incompressibleAdjointVars::resetMeanFields(), incompressibleAdjointMeanFlowVars::setFields(), and incompressibleAdjointMeanFlowVars::Ua().
|
protected |
Definition at line 87 of file incompressibleAdjointMeanFlowVars.H.
Referenced by incompressibleAdjointVars::computeMeanFields(), incompressibleAdjointMeanFlowVars::nullify(), incompressibleAdjointMeanFlowVars::phia(), 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 94 of file incompressibleAdjointMeanFlowVars.H.
Referenced by incompressibleAdjointVars::computeMeanFields(), incompressibleAdjointMeanFlowVars::pa(), incompressibleAdjointVars::resetMeanFields(), and incompressibleAdjointMeanFlowVars::setMeanFields().
|
protected |
Definition at line 95 of file incompressibleAdjointMeanFlowVars.H.
Referenced by incompressibleAdjointVars::computeMeanFields(), incompressibleAdjointVars::resetMeanFields(), incompressibleAdjointMeanFlowVars::setMeanFields(), and incompressibleAdjointMeanFlowVars::Ua().
|
protected |
Definition at line 96 of file incompressibleAdjointMeanFlowVars.H.
Referenced by incompressibleAdjointVars::computeMeanFields(), incompressibleAdjointMeanFlowVars::phia(), incompressibleAdjointVars::resetMeanFields(), and incompressibleAdjointMeanFlowVars::setMeanFields().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.