Class including all adjoint fields for incompressible flows. More...
Public Member Functions | |
| TypeName ("incompressibleAdjointVars") | |
| Run-time type information. More... | |
| incompressibleAdjointVars (fvMesh &mesh, solverControl &SolverControl, objectiveManager &objManager, incompressibleVars &primalVars) | |
| Construct from mesh. More... | |
| virtual | ~incompressibleAdjointVars () |
| Destructor. More... | |
| const autoPtr< incompressibleAdjoint::adjointRASModel > & | adjointTurbulence () const |
| Return const reference to the adjointRASModel. More... | |
| autoPtr< incompressibleAdjoint::adjointRASModel > & | adjointTurbulence () |
| Return non-const reference to the adjointRASModel. More... | |
| void | resetMeanFields () |
| Reset mean fields to zero. More... | |
| void | computeMeanFields () |
| Compute mean fields on the fly. More... | |
| virtual void | nullify () |
| Nullify all adjoint fields. More... | |
Public Member Functions inherited from incompressibleAdjointMeanFlowVars | |
| 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... | |
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) |
| 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 | |
| incompressibleAdjointVars (const incompressibleAdjointVars &) | |
| No copy construct. More... | |
| void | operator= (const incompressibleAdjointVars &) |
| No copy assignment. More... | |
Protected Member Functions inherited from incompressibleAdjointMeanFlowVars | |
| 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 | |
| objectiveManager & | objectiveManager_ |
| Reference to the objectiveManager. More... | |
| autoPtr< incompressibleAdjoint::adjointRASModel > | adjointTurbulence_ |
| Adjoint to the turbulence model. More... | |
Protected Attributes inherited from incompressibleAdjointMeanFlowVars | |
| 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_ |
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... | |
Class including all adjoint fields for incompressible flows.
Definition at line 52 of file incompressibleAdjointVars.H.
|
protected |
No copy construct.
| incompressibleAdjointVars | ( | fvMesh & | mesh, |
| solverControl & | SolverControl, | ||
| objectiveManager & | objManager, | ||
| incompressibleVars & | primalVars | ||
| ) |
Construct from mesh.
Definition at line 45 of file incompressibleAdjointVars.C.
|
inlinevirtual |
Destructor.
Definition at line 98 of file incompressibleAdjointVars.H.
|
protected |
No copy assignment.
| TypeName | ( | "incompressibleAdjointVars" | ) |
Run-time type information.
| const autoPtr< incompressibleAdjoint::adjointRASModel > & adjointTurbulence | ( | ) | const |
Return const reference to the adjointRASModel.
Definition at line 70 of file incompressibleAdjointVars.C.
References incompressibleAdjointVars::adjointTurbulence_.
Referenced by sensitivitySurface::accumulateIntegrand(), sensitivitySurfacePoints::accumulateIntegrand(), adjointSensitivity::computeGradDxDbMultiplier(), shapeSensitivities::dvdbMult(), boundaryAdjointContributionIncompressible::momentumDiffusion(), boundaryAdjointContributionIncompressible::pressureSource(), FIBase::read(), sensitivitySurfacePoints::read(), sensitivitySurface::read(), boundaryAdjointContributionIncompressible::tangentVelocitySource(), boundaryAdjointContributionIncompressible::TMVariable1Diffusion(), boundaryAdjointContributionIncompressible::TMVariable2Diffusion(), and boundaryAdjointContributionIncompressible::velocitySource().
| autoPtr< incompressibleAdjoint::adjointRASModel > & adjointTurbulence | ( | ) |
Return non-const reference to the adjointRASModel.
Definition at line 77 of file incompressibleAdjointVars.C.
References incompressibleAdjointVars::adjointTurbulence_.
| void resetMeanFields | ( | ) |
Reset mean fields to zero.
Definition at line 83 of file incompressibleAdjointVars.C.
References incompressibleAdjointVars::adjointTurbulence_, solverControl::average(), solverControl::averageIter(), Foam::endl(), Foam::Info, incompressibleAdjointMeanFlowVars::paMeanPtr_, incompressibleAdjointMeanFlowVars::paPtr_, incompressibleAdjointMeanFlowVars::phiaMeanPtr_, incompressibleAdjointMeanFlowVars::phiaPtr_, incompressibleAdjointMeanFlowVars::solverControl_, incompressibleAdjointMeanFlowVars::UaMeanPtr_, incompressibleAdjointMeanFlowVars::UaPtr_, and Foam::Zero.
| void computeMeanFields | ( | ) |
Compute mean fields on the fly.
Definition at line 101 of file incompressibleAdjointVars.C.
References incompressibleAdjointVars::adjointTurbulence_, solverControl::averageIter(), solverControl::doAverageIter(), 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 119 of file incompressibleAdjointVars.C.
References incompressibleAdjointVars::adjointTurbulence_, and incompressibleAdjointMeanFlowVars::nullify().
|
protected |
Reference to the objectiveManager.
Definition at line 61 of file incompressibleAdjointVars.H.
|
protected |
Adjoint to the turbulence model.
Definition at line 64 of file incompressibleAdjointVars.H.
Referenced by incompressibleAdjointVars::adjointTurbulence(), incompressibleAdjointVars::computeMeanFields(), incompressibleAdjointVars::nullify(), and incompressibleAdjointVars::resetMeanFields().