incompressibleAdjointMeanFlowVars Class Reference

Manages the adjoint mean flow fields and their mean values. More...

Inheritance diagram for incompressibleAdjointMeanFlowVars:
[legend]
Collaboration diagram for incompressibleAdjointMeanFlowVars:
[legend]

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 incompressibleVarsprimalVars () const
 
const volScalarFieldpa () const
 Return const reference to pressure. More...
 
volScalarFieldpa ()
 Return reference to pressure. More...
 
const volVectorFieldUa () const
 Return const reference to velocity. More...
 
volVectorFieldUa ()
 Return reference to velocity. More...
 
const surfaceScalarFieldphia () const
 Return const reference to volume flux. More...
 
surfaceScalarFieldphia ()
 Return reference to volume flux. More...
 
const volScalarFieldpaInst () const
 Return const reference to pressure. More...
 
volScalarFieldpaInst ()
 Return reference to pressure. More...
 
const volVectorFieldUaInst () const
 Return const reference to velocity. More...
 
volVectorFieldUaInst ()
 Return reference to velocity. More...
 
const surfaceScalarFieldphiaInst () const
 Return const reference to volume flux. More...
 
surfaceScalarFieldphiaInst ()
 Return reference to volume flux. More...
 
bool computeMeanFields () const
 Return computeMeanFields bool. More...
 
const solverControlgetSolverControl () 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< variablesSetclone () const
 Clone the variablesSet. More...
 
virtual ~variablesSet ()=default
 Destructor. More...
 
const wordsolverName () 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< surfaceScalarFieldallocateFluxField (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

solverControlsolverControl_
 Reference to the solverControl of the solver allocating the fields. More...
 
incompressibleVarsprimalVars_
 Reference to primal variables. More...
 
autoPtr< volScalarFieldpaPtr_
 
autoPtr< volVectorFieldUaPtr_
 
autoPtr< surfaceScalarFieldphiaPtr_
 
autoPtr< volScalarFieldpaMeanPtr_
 
autoPtr< volVectorFieldUaMeanPtr_
 
autoPtr< surfaceScalarFieldphiaMeanPtr_
 
- Protected Attributes inherited from variablesSet
fvMeshmesh_
 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< volVectorFieldautoCreateMeshMovementField (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...
 

Detailed Description

Manages the adjoint mean flow fields and their mean values.

Definition at line 51 of file incompressibleAdjointMeanFlowVars.H.

Constructor & Destructor Documentation

◆ incompressibleAdjointMeanFlowVars()

incompressibleAdjointMeanFlowVars ( fvMesh mesh,
solverControl SolverControl,
incompressibleVars primalVars 
)

Construct from mesh.

Definition at line 118 of file incompressibleAdjointMeanFlowVars.C.

References incompressibleAdjointMeanFlowVars::setFields(), and incompressibleAdjointMeanFlowVars::setMeanFields().

Here is the call graph for this function:

◆ ~incompressibleAdjointMeanFlowVars()

virtual ~incompressibleAdjointMeanFlowVars ( )
virtualdefault

Destructor.

Member Function Documentation

◆ setFields()

void setFields ( )
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_.

Referenced by incompressibleAdjointMeanFlowVars::incompressibleAdjointMeanFlowVars().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMeanFields()

void setMeanFields ( )
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_.

Referenced by incompressibleAdjointMeanFlowVars::incompressibleAdjointMeanFlowVars().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TypeName()

TypeName ( "incompressibleAdjointMeanFlowVars"  )

Run-time type information.

◆ primalVars()

const incompressibleVars & primalVars ( ) const

◆ pa() [1/2]

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 sensitivitySurface::accumulateIntegrand(), sensitivitySurfacePoints::accumulateIntegrand(), and shapeSensitivities::dvdbMult().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pa() [2/2]

volScalarField & pa ( )

Return reference to pressure.

Definition at line 160 of file incompressibleAdjointMeanFlowVars.C.

References incompressibleAdjointMeanFlowVars::paMeanPtr_, incompressibleAdjointMeanFlowVars::paPtr_, incompressibleAdjointMeanFlowVars::solverControl_, and solverControl::useAveragedFields().

Here is the call graph for this function:

◆ Ua() [1/2]

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(), sensitivitySurface::accumulateIntegrand(), sensitivitySurfacePoints::accumulateIntegrand(), adjointLaminar::devReff(), adjointSpalartAllmaras::distanceSensitivities(), shapeSensitivities::dvdbMult(), ATCstandard::getFISensitivityTerm(), and ATCUaGradU::getFISensitivityTerm().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Ua() [2/2]

volVectorField & Ua ( )

Return reference to velocity.

Definition at line 186 of file incompressibleAdjointMeanFlowVars.C.

References incompressibleAdjointMeanFlowVars::solverControl_, incompressibleAdjointMeanFlowVars::UaMeanPtr_, incompressibleAdjointMeanFlowVars::UaPtr_, and solverControl::useAveragedFields().

Here is the call graph for this function:

◆ phia() [1/2]

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().

Here is the call graph for this function:

◆ phia() [2/2]

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().

Here is the call graph for this function:

◆ paInst() [1/2]

const Foam::volScalarField & paInst ( ) const
inline

Return const reference to pressure.

Definition at line 32 of file incompressibleAdjointMeanFlowVarsI.H.

References incompressibleAdjointMeanFlowVars::paPtr_.

Referenced by adjointSimple::adjointSimple(), boundaryAdjointContributionIncompressible::pab(), and incompressibleAdjointMeanFlowVars::setMeanFields().

Here is the caller graph for this function:

◆ paInst() [2/2]

Foam::volScalarField & paInst ( )
inline

Return reference to pressure.

Definition at line 38 of file incompressibleAdjointMeanFlowVarsI.H.

◆ UaInst() [1/2]

const Foam::volVectorField & UaInst ( ) const
inline

◆ UaInst() [2/2]

Foam::volVectorField & UaInst ( )
inline

Return reference to velocity.

Definition at line 51 of file incompressibleAdjointMeanFlowVarsI.H.

◆ phiaInst() [1/2]

const Foam::surfaceScalarField & phiaInst ( ) const
inline

Return const reference to volume flux.

Definition at line 58 of file incompressibleAdjointMeanFlowVarsI.H.

Referenced by ATCUaGradU::addATC(), boundaryAdjointContributionIncompressible::phiab(), and incompressibleAdjointMeanFlowVars::setMeanFields().

Here is the caller graph for this function:

◆ phiaInst() [2/2]

Foam::surfaceScalarField & phiaInst ( )
inline

Return reference to volume flux.

Definition at line 65 of file incompressibleAdjointMeanFlowVarsI.H.

◆ computeMeanFields()

bool computeMeanFields ( ) const

Return computeMeanFields bool.

Definition at line 225 of file incompressibleAdjointMeanFlowVars.C.

References solverControl::average(), and incompressibleAdjointMeanFlowVars::solverControl_.

Here is the call graph for this function:

◆ getSolverControl()

const solverControl & getSolverControl ( ) const

Return const reference to solverControl.

Definition at line 231 of file incompressibleAdjointMeanFlowVars.C.

References incompressibleAdjointMeanFlowVars::solverControl_.

Referenced by adjointRASModel::computeMeanFields(), adjointkOmegaSST::correct(), adjointSpalartAllmaras::correct(), adjointRASModel::getAdjointTMVariable1(), adjointRASModel::getAdjointTMVariable2(), adjointRASModel::resetMeanFields(), and adjointRASModel::setMeanFields().

Here is the caller graph for this function:

◆ nullify()

void nullify ( )
virtual

Nullify all adjoint fields.

Reimplemented in incompressibleAdjointVars.

Definition at line 237 of file incompressibleAdjointMeanFlowVars.C.

References variablesSet::nullifyField(), incompressibleAdjointMeanFlowVars::paPtr_, incompressibleAdjointMeanFlowVars::phiaPtr_, and incompressibleAdjointMeanFlowVars::UaPtr_.

Referenced by incompressibleAdjointVars::nullify().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ solverControl_

◆ primalVars_

incompressibleVars& primalVars_
protected

Reference to primal variables.

Definition at line 77 of file incompressibleAdjointMeanFlowVars.H.

Referenced by incompressibleAdjointMeanFlowVars::primalVars().

◆ paPtr_

◆ UaPtr_

◆ phiaPtr_

◆ paMeanPtr_

autoPtr<volScalarField> paMeanPtr_
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().

◆ UaMeanPtr_

◆ phiaMeanPtr_


The documentation for this class was generated from the following files: