Calculation of adjoint based sensitivities at wall points. More...
Public Member Functions | |
| TypeName ("surfacePoints") | |
| Runtime type information. More... | |
| sensitivitySurfacePoints (const fvMesh &mesh, const dictionary &dict, incompressibleVars &primalVars, incompressibleAdjointVars &adjointVars, objectiveManager &objectiveManager, fv::optionAdjointList &fvOptionsAdjoint) | |
| Construct from components. More... | |
| virtual | ~sensitivitySurfacePoints ()=default |
| Destructor. More... | |
| virtual bool | readDict (const dictionary &dict) |
| Read dict if changed. More... | |
| virtual void | accumulateIntegrand (const scalar dt) |
| Accumulate sensitivity integrands. More... | |
| virtual void | assembleSensitivities () |
| Assemble sensitivities. More... | |
| virtual void | clearSensitivities () |
| Zero sensitivity fields and their constituents. More... | |
| virtual void | write (const word &baseName=word::null) |
| Write sensitivity fields. More... | |
Public Member Functions inherited from adjointSensitivity | |
| TypeName ("adjointSensitivity") | |
| Runtime type information. More... | |
| declareRunTimeSelectionTable (autoPtr, adjointSensitivity, dictionary,(const fvMesh &mesh, const dictionary &dict, incompressibleVars &primalVars, incompressibleAdjointVars &adjointVars, objectiveManager &objectiveManager, fv::optionAdjointList &fvOptionsAdjoint),(mesh, dict, primalVars, adjointVars, objectiveManager, fvOptionsAdjoint)) | |
| adjointSensitivity (const fvMesh &mesh, const dictionary &dict, incompressibleVars &primalVars, incompressibleAdjointVars &adjointVars, objectiveManager &objectiveManager, fv::optionAdjointList &fvOptionsAdjoint) | |
| Construct from components. More... | |
| virtual | ~adjointSensitivity ()=default |
| Destructor. More... | |
| virtual const scalarField & | calculateSensitivities () |
| Calculates and returns sensitivity fields. More... | |
| const scalarField & | getSensitivities () const |
| Returns the sensitivity fields. More... | |
| tmp< volTensorField > | computeGradDxDbMultiplier () |
| tmp< volVectorField > | adjointMeshMovementSource () |
| Compute source term for adjoint mesh movement equation. More... | |
Public Member Functions inherited from sensitivity | |
| TypeName ("sensitivity") | |
| Runtime type information. More... | |
| sensitivity (const fvMesh &mesh, const dictionary &dict) | |
| Construct from components. More... | |
| virtual | ~sensitivity ()=default |
| Destructor. More... | |
| const dictionary & | dict () const |
| Return the construction dictionary. More... | |
| virtual void | computeDerivativesSize () |
| Compute design variables number. Does nothing in the base. More... | |
Protected Member Functions | |
| void | read () |
| Read controls and update solver pointers if necessary. More... | |
| void | finaliseFaceMultiplier () |
| void | finalisePointSensitivities () |
| void | constructGlobalPointNormalsAndAreas (vectorField &pointNormals, scalarField &pointMagSf) |
| Construct globally correct point normals and point areas. More... | |
| void | setSuffixName () |
| Set suffix name for sensitivity fields. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from adjointSensitivity | |
| static autoPtr< adjointSensitivity > | New (const fvMesh &mesh, const dictionary &dict, incompressibleVars &primalVars, incompressibleAdjointVars &adjointVars, objectiveManager &objectiveManager, fv::optionAdjointList &fvOptionsAdjoint) |
| Return a reference to the selected turbulence model. More... | |
Calculation of adjoint based sensitivities at wall points.
Definition at line 59 of file sensitivitySurfacePointsIncompressible.H.
| sensitivitySurfacePoints | ( | const fvMesh & | mesh, |
| const dictionary & | dict, | ||
| incompressibleVars & | primalVars, | ||
| incompressibleAdjointVars & | adjointVars, | ||
| objectiveManager & | objectiveManager, | ||
| fv::optionAdjointList & | fvOptionsAdjoint | ||
| ) |
Construct from components.
Definition at line 331 of file sensitivitySurfacePointsIncompressible.C.
References nPoints, Foam::read(), Foam::returnReduce(), and Foam::Zero.
|
virtualdefault |
Destructor.
|
protected |
Read controls and update solver pointers if necessary.
Definition at line 54 of file sensitivitySurfacePointsIncompressible.C.
References incompressibleAdjointVars::adjointTurbulence(), adjointSensitivity::adjointVars_, sensitivity::dict(), sensitivitySurfacePoints::eikonalSolver_, dictionary::getOrDefault(), sensitivitySurfacePoints::includeDistance_, sensitivitySurfacePoints::includeDivTerm_, sensitivitySurfacePoints::includeGradStressTerm_, sensitivitySurfacePoints::includeMeshMovement_, sensitivitySurfacePoints::includeObjective_, sensitivitySurfacePoints::includePressureTerm_, sensitivitySurfacePoints::includeSurfaceArea_, sensitivitySurfacePoints::includeTransposeStresses_, sensitivity::mesh_, sensitivitySurfacePoints::meshMovementSolver_, adjointSensitivity::primalVars_, and incompressibleVars::RASModelVariables().
|
protected |
Add terms related to post-processing PDEs (i.e. adjoint Eikonal, adjoint mesh movement) and add local face area
Definition at line 110 of file sensitivitySurfacePointsIncompressible.C.
References fvMesh::boundary(), sensitivitySurfacePoints::dnfdbMult_, sensitivitySurfacePoints::eikonalSolver_, sensitivitySurfacePoints::includeDistance_, sensitivitySurfacePoints::includeMeshMovement_, sensitivity::mesh_, sensitivitySurfacePoints::meshMovementSolver_, Foam::foamVersion::patch, autoPtr< T >::reset(), and sensitivitySurfacePoints::wallFaceSens_.
Referenced by sensitivitySurfacePoints::assembleSensitivities().
|
protected |
Converts face sensitivities to point sensitivities and adds the ones directly computed in points (i.e. dSf/db and dnf/db).
Definition at line 171 of file sensitivitySurfacePointsIncompressible.C.
References fvMesh::boundary(), sensitivitySurfacePoints::dnfdbMult_, sensitivitySurfacePoints::dSfdbMult_, polyMesh::faces(), forAll, Tensor< scalar >::I, sensitivitySurfacePoints::includeObjective_, deltaBoundary::makeFaceCentresAndAreas_d(), sensitivity::mesh_, p, Foam::foamVersion::patch, face::points(), polyMesh::points(), sensitivitySurfacePoints::wallFaceSens_, and Foam::Zero.
Referenced by sensitivitySurfacePoints::assembleSensitivities().
|
protected |
Construct globally correct point normals and point areas.
Definition at line 257 of file sensitivitySurfacePointsIncompressible.C.
References forAll, Foam::foamVersion::patch, syncTools::syncPointList(), and VectorSpace< Vector< scalar >, scalar, 3 >::zero.
Referenced by sensitivitySurfacePoints::assembleSensitivities().
|
protected |
Set suffix name for sensitivity fields.
Definition at line 307 of file sensitivitySurfacePointsIncompressible.C.
References adjointSensitivity::adjointVars_, sensitivity::dict(), sensitivitySurfacePoints::includeMeshMovement_, word::null, shapeSensitivitiesBase::setSuffix(), and variablesSet::solverName().
Referenced by sensitivitySurfacePoints::write().
| TypeName | ( | "surfacePoints" | ) |
Runtime type information.
|
virtual |
Read dict if changed.
Reimplemented from sensitivity.
Definition at line 393 of file sensitivitySurfacePointsIncompressible.C.
References sensitivity::dict(), sensitivitySurfacePoints::eikonalSolver_, sensitivitySurfacePoints::meshMovementSolver_, and sensitivity::readDict().
|
virtual |
Accumulate sensitivity integrands.
Implements adjointSensitivity.
Definition at line 414 of file sensitivitySurfacePointsIncompressible.C.
References incompressibleAdjointVars::adjointTurbulence(), adjointSensitivity::adjointVars_, fvMesh::boundary(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), GeometricField< Type, PatchField, GeoMesh >::component(), DebugInfo, sensitivitySurfacePoints::dnfdbMult_, sensitivitySurfacePoints::dSfdbMult_, sensitivitySurfacePoints::eikonalSolver_, Foam::endl(), forAll, objectiveManager::getObjectiveFunctions(), Foam::fvc::grad(), sensitivitySurfacePoints::includeDistance_, sensitivitySurfacePoints::includeDivTerm_, sensitivitySurfacePoints::includeGradStressTerm_, sensitivitySurfacePoints::includeMeshMovement_, sensitivitySurfacePoints::includeObjective_, sensitivitySurfacePoints::includePressureTerm_, sensitivitySurfacePoints::includeTransposeStresses_, sensitivity::mesh_, sensitivitySurfacePoints::meshMovementSolver_, adjointSensitivity::objectiveManager_, p, incompressibleVars::p(), incompressibleAdjointMeanFlowVars::pa(), Foam::foamVersion::patch, adjointSensitivity::primalVars_, Foam::T(), U, incompressibleVars::U(), incompressibleAdjointMeanFlowVars::Ua(), sensitivitySurfacePoints::wallFaceSens_, and Foam::Zero.
|
virtual |
Assemble sensitivities.
Implements adjointSensitivity.
Definition at line 616 of file sensitivitySurfacePointsIncompressible.C.
References polyMesh::boundaryMesh(), sensitivitySurfacePoints::constructGlobalPointNormalsAndAreas(), adjointSensitivity::derivatives_, sensitivitySurfacePoints::finaliseFaceMultiplier(), sensitivitySurfacePoints::finalisePointSensitivities(), forAll, Pstream::gatherList(), sensitivitySurfacePoints::includeSurfaceArea_, Foam::mag(), sensitivity::mesh_, UPstream::myProcNo(), primitiveMesh::nPoints(), UPstream::nProcs(), Foam::foamVersion::patch, Pstream::scatterList(), List< T >::setSize(), syncTools::syncPointList(), VectorSpace< Vector< scalar >, scalar, 3 >::zero, and Foam::Zero.
|
virtual |
Zero sensitivity fields and their constituents.
Reimplemented from adjointSensitivity.
Definition at line 734 of file sensitivitySurfacePointsIncompressible.C.
References shapeSensitivitiesBase::clearSensitivities(), adjointSensitivity::clearSensitivities(), sensitivitySurfacePoints::dnfdbMult_, sensitivitySurfacePoints::dSfdbMult_, sensitivitySurfacePoints::eikonalSolver_, sensitivitySurfacePoints::includeDistance_, sensitivitySurfacePoints::includeMeshMovement_, sensitivitySurfacePoints::meshMovementSolver_, sensitivitySurfacePoints::wallFaceSens_, and VectorSpace< Vector< scalar >, scalar, 3 >::zero.
|
virtual |
Write sensitivity fields.
If valid, copies boundaryFields to volFields and writes them. Virtual to be reimplemented by control points-based methods (Bezier, RBF) which do not need to write fields
Reimplemented from adjointSensitivity.
Definition at line 757 of file sensitivitySurfacePointsIncompressible.C.
References sensitivitySurfacePoints::setSuffixName(), shapeSensitivitiesBase::write(), and adjointSensitivity::write().
|
protected |
Include surface area in sens computation.
Definition at line 70 of file sensitivitySurfacePointsIncompressible.H.
Referenced by sensitivitySurfacePoints::assembleSensitivities(), and sensitivitySurfacePoints::read().
|
protected |
Include the adjoint pressure term in sens computation.
Definition at line 73 of file sensitivitySurfacePointsIncompressible.H.
Referenced by sensitivitySurfacePoints::accumulateIntegrand(), and sensitivitySurfacePoints::read().
|
protected |
Include the term containing the grad of the stress at the boundary.
Definition at line 76 of file sensitivitySurfacePointsIncompressible.H.
Referenced by sensitivitySurfacePoints::accumulateIntegrand(), and sensitivitySurfacePoints::read().
|
protected |
Include the transpose part of the adjoint stresses.
Definition at line 79 of file sensitivitySurfacePointsIncompressible.H.
Referenced by sensitivitySurfacePoints::accumulateIntegrand(), and sensitivitySurfacePoints::read().
|
protected |
Include the term from the deviatoric part of the stresses.
Definition at line 82 of file sensitivitySurfacePointsIncompressible.H.
Referenced by sensitivitySurfacePoints::accumulateIntegrand(), and sensitivitySurfacePoints::read().
|
protected |
Include distance variation in sens computation.
Definition at line 85 of file sensitivitySurfacePointsIncompressible.H.
Referenced by sensitivitySurfacePoints::accumulateIntegrand(), sensitivitySurfacePoints::clearSensitivities(), sensitivitySurfacePoints::finaliseFaceMultiplier(), and sensitivitySurfacePoints::read().
|
protected |
Include mesh movement variation in sens computation.
Definition at line 88 of file sensitivitySurfacePointsIncompressible.H.
Referenced by sensitivitySurfacePoints::accumulateIntegrand(), sensitivitySurfacePoints::clearSensitivities(), sensitivitySurfacePoints::finaliseFaceMultiplier(), sensitivitySurfacePoints::read(), and sensitivitySurfacePoints::setSuffixName().
|
protected |
Include terms directly emerging from the objective function.
Definition at line 91 of file sensitivitySurfacePointsIncompressible.H.
Referenced by sensitivitySurfacePoints::accumulateIntegrand(), sensitivitySurfacePoints::finalisePointSensitivities(), and sensitivitySurfacePoints::read().
|
protected |
Definition at line 93 of file sensitivitySurfacePointsIncompressible.H.
Referenced by sensitivitySurfacePoints::accumulateIntegrand(), sensitivitySurfacePoints::clearSensitivities(), sensitivitySurfacePoints::finaliseFaceMultiplier(), sensitivitySurfacePoints::read(), and sensitivitySurfacePoints::readDict().
|
protected |
Definition at line 95 of file sensitivitySurfacePointsIncompressible.H.
Referenced by sensitivitySurfacePoints::accumulateIntegrand(), sensitivitySurfacePoints::clearSensitivities(), sensitivitySurfacePoints::finaliseFaceMultiplier(), sensitivitySurfacePoints::read(), and sensitivitySurfacePoints::readDict().
|
protected |
The face-based part of the sensitivities.
i.e. terms that multiply dxFace/dxPoint. Sensitivities DO include locale surface area, to get the correct weighting from the contributions of various faces. Normalized at the end.
Definition at line 102 of file sensitivitySurfacePointsIncompressible.H.
Referenced by sensitivitySurfacePoints::accumulateIntegrand(), sensitivitySurfacePoints::clearSensitivities(), sensitivitySurfacePoints::finaliseFaceMultiplier(), and sensitivitySurfacePoints::finalisePointSensitivities().
|
protected |
Multipliers of d(Sf)/db and d(nf)/db.
Definition at line 105 of file sensitivitySurfacePointsIncompressible.H.
Referenced by sensitivitySurfacePoints::accumulateIntegrand(), sensitivitySurfacePoints::clearSensitivities(), and sensitivitySurfacePoints::finalisePointSensitivities().
|
protected |