Class including all adjoint fields for incompressible flows. More...
#include <incompressibleAdjointVars.H>


Public Member Functions | |
| TypeName ("incompressibleAdjointVars") | |
| Run-time type information. | |
| incompressibleAdjointVars (fvMesh &mesh, solverControl &SolverControl, objectiveManager &objManager, incompressibleVars &primalVars) | |
| Construct from mesh. | |
| virtual | ~incompressibleAdjointVars ()=default |
| Destructor. | |
| const autoPtr< incompressibleAdjoint::adjointRASModel > & | adjointTurbulence () const |
| Return const reference to the adjointRASModel. | |
| autoPtr< incompressibleAdjoint::adjointRASModel > & | adjointTurbulence () |
| Return non-const reference to the adjointRASModel. | |
| void | restoreInitValues () |
| Restore field values to the initial ones. | |
| void | resetMeanFields () |
| Reset mean fields to zero. | |
| void | computeMeanFields () |
| Compute mean fields on the fly. | |
| virtual void | nullify () |
| Nullify all adjoint fields. | |
| virtual void | updatePrimalBasedQuantities () |
| Update primal based quantities of the adjoint boundary. | |
| Public Member Functions inherited from incompressibleAdjointMeanFlowVars | |
| TypeName ("incompressibleAdjointMeanFlowVars") | |
| Run-time type information. | |
| incompressibleAdjointMeanFlowVars (fvMesh &mesh, solverControl &SolverControl, incompressibleVars &primalVars) | |
| Construct from mesh. | |
| virtual | ~incompressibleAdjointMeanFlowVars ()=default |
| Destructor. | |
| const incompressibleVars & | primalVars () const |
| const volScalarField & | pa () const |
| Return const reference to pressure. | |
| volScalarField & | pa () |
| Return reference to pressure. | |
| const volVectorField & | Ua () const |
| Return const reference to velocity. | |
| volVectorField & | Ua () |
| Return reference to velocity. | |
| const surfaceScalarField & | phia () const |
| Return const reference to volume flux. | |
| surfaceScalarField & | phia () |
| Return reference to volume flux. | |
| const volScalarField & | paInst () const |
| Return const reference to pressure. | |
| volScalarField & | paInst () |
| Return reference to pressure. | |
| const volVectorField & | UaInst () const |
| Return const reference to velocity. | |
| volVectorField & | UaInst () |
| Return reference to velocity. | |
| const surfaceScalarField & | phiaInst () const |
| Return const reference to volume flux. | |
| surfaceScalarField & | phiaInst () |
| Return reference to volume flux. | |
| bool | computeMeanFields () const |
| Return computeMeanFields bool. | |
| const solverControl & | getSolverControl () const |
| Return const reference to solverControl. | |
| Public Member Functions inherited from variablesSet | |
| TypeName ("variablesSet") | |
| Run-time type information. | |
| variablesSet (fvMesh &mesh, const dictionary &dict) | |
| Construct from mesh and solver name. | |
| virtual autoPtr< variablesSet > | clone () const |
| Clone the variablesSet. | |
| virtual | ~variablesSet ()=default |
| Destructor. | |
| const word & | solverName () const |
| Return solver name. | |
| bool | useSolverNameForFields () const |
| Append solver name to fields? | |
| 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. | |
| 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. | |
Protected Member Functions | |
| incompressibleAdjointVars (const incompressibleAdjointVars &)=delete | |
| No copy construct. | |
| void | operator= (const incompressibleAdjointVars &)=delete |
| No copy assignment. | |
| Protected Member Functions inherited from incompressibleAdjointMeanFlowVars | |
| void | setFields () |
| Read fields and set turbulence. | |
| void | setMeanFields () |
| Read mean fields, if necessary. | |
| 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. | |
Protected Attributes | |
| objectiveManager & | objectiveManager_ |
| Reference to the objectiveManager. | |
| autoPtr< incompressibleAdjoint::adjointRASModel > | adjointTurbulence_ |
| Adjoint to the turbulence model. | |
| Protected Attributes inherited from incompressibleAdjointMeanFlowVars | |
| solverControl & | solverControl_ |
| Reference to the solverControl of the solver allocating the fields. | |
| incompressibleVars & | primalVars_ |
| Reference to primal variables. | |
| autoPtr< volScalarField > | paPtr_ |
| Fields involved in the solution of the incompressible adjoint NS equations. | |
| 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. | |
| autoPtr< volVectorField > | UaMeanPtr_ |
| autoPtr< surfaceScalarField > | phiaMeanPtr_ |
| Protected Attributes inherited from variablesSet | |
| fvMesh & | mesh_ |
| Reference to the mesh database. | |
| word | solverName_ |
| Solver name owning the variables set. | |
| bool | useSolverNameForFields_ |
| Append the solver name to the variables names? | |
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. | |
| static void | setFluxField (autoPtr< surfaceScalarField > &fieldPtr, const fvMesh &mesh, const volVectorField &velocity, const word &baseName, const word &solverName, const bool useSolverNameForFields) |
| Set flux field. | |
| static tmp< volVectorField > | autoCreateMeshMovementField (const fvMesh &mesh, const word &name, const dimensionSet &dims) |
| Auto create variable for mesh movement. | |
| template<class Type, template< class > class PatchField, class GeoMesh> | |
| static void | nullifyField (GeometricField< Type, PatchField, GeoMesh > &fieldPtr) |
| Nullify field and old times, if present. | |
Class including all adjoint fields for incompressible flows.
Definition at line 46 of file incompressibleAdjointVars.H.
|
protecteddelete |
No copy construct.
References incompressibleAdjointVars().
Referenced by incompressibleAdjointVars(), and operator=().


| incompressibleAdjointVars | ( | fvMesh & | mesh, |
| solverControl & | SolverControl, | ||
| objectiveManager & | objManager, | ||
| incompressibleVars & | primalVars ) |
Construct from mesh.
Definition at line 38 of file incompressibleAdjointVars.C.
References adjointTurbulence_, mesh, Foam::New(), objectiveManager_, incompressibleAdjointMeanFlowVars::primalVars(), and incompressibleAdjointMeanFlowVars::primalVars_.

|
virtualdefault |
Destructor.
|
protecteddelete |
No copy assignment.
References incompressibleAdjointVars().

| TypeName | ( | "incompressibleAdjointVars" | ) |
Run-time type information.
References mesh, and incompressibleAdjointMeanFlowVars::primalVars().

|
inline |
Return const reference to the adjointRASModel.
Definition at line 25 of file incompressibleAdjointVarsI.H.
References adjointTurbulence_.
Referenced by boundaryAdjointContributionIncompressible::momentumDiffusion(), boundaryAdjointContributionIncompressible::pressureSource(), boundaryAdjointContributionIncompressible::tangentVelocitySource(), boundaryAdjointContributionIncompressible::TMVariable1Diffusion(), boundaryAdjointContributionIncompressible::TMVariable2Diffusion(), incompressibleAdjointSolver::topOSensMultiplier(), objectiveIncompressible::update_dJdTMvar(), objectiveNutSqr::update_dJdv(), objectivePowerDissipation::update_dJdv(), and boundaryAdjointContributionIncompressible::velocitySource().

|
inline |
Return non-const reference to the adjointRASModel.
Definition at line 32 of file incompressibleAdjointVarsI.H.
References adjointTurbulence_.
| void restoreInitValues | ( | ) |
Restore field values to the initial ones.
Definition at line 63 of file incompressibleAdjointVars.C.
References adjointTurbulence_, Foam::endl(), Foam::Info, incompressibleAdjointMeanFlowVars::paInst(), incompressibleAdjointMeanFlowVars::phiaInst(), incompressibleAdjointMeanFlowVars::solverControl_, incompressibleAdjointMeanFlowVars::UaInst(), and Foam::Zero.

| void resetMeanFields | ( | ) |
Reset mean fields to zero.
Definition at line 76 of file incompressibleAdjointVars.C.
References adjointTurbulence_, Foam::endl(), Foam::Info, incompressibleAdjointMeanFlowVars::paMeanPtr_, incompressibleAdjointMeanFlowVars::phiaMeanPtr_, incompressibleAdjointMeanFlowVars::solverControl_, incompressibleAdjointMeanFlowVars::UaMeanPtr_, and Foam::Zero.

| void computeMeanFields | ( | ) |
Compute mean fields on the fly.
Definition at line 94 of file incompressibleAdjointVars.C.
References adjointTurbulence_, Foam::endl(), Foam::Info, incompressibleAdjointMeanFlowVars::paMeanPtr_, incompressibleAdjointMeanFlowVars::paPtr_, incompressibleAdjointMeanFlowVars::phiaMeanPtr_, incompressibleAdjointMeanFlowVars::phiaPtr_, incompressibleAdjointMeanFlowVars::solverControl_, incompressibleAdjointMeanFlowVars::UaMeanPtr_, and incompressibleAdjointMeanFlowVars::UaPtr_.

|
virtual |
Nullify all adjoint fields.
Reimplemented from incompressibleAdjointMeanFlowVars.
Definition at line 112 of file incompressibleAdjointVars.C.
References adjointTurbulence_, and incompressibleAdjointMeanFlowVars::nullify().

|
virtual |
Update primal based quantities of the adjoint boundary.
conditions
Definition at line 119 of file incompressibleAdjointVars.C.
|
protected |
Reference to the objectiveManager.
Definition at line 57 of file incompressibleAdjointVars.H.
Referenced by incompressibleAdjointVars().
|
protected |
Adjoint to the turbulence model.
Definition at line 62 of file incompressibleAdjointVars.H.
Referenced by adjointTurbulence(), adjointTurbulence(), computeMeanFields(), incompressibleAdjointVars(), nullify(), resetMeanFields(), and restoreInitValues().