Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
adjointEikonalSolver Class Reference

Solver of the adjoint to the eikonal PDE. More...

Collaboration diagram for adjointEikonalSolver:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("adjointEikonalSolver")
 
 adjointEikonalSolver (const fvMesh &mesh, const dictionary &dict, const autoPtr< incompressible::RASModelVariables > &RASModelVars, incompressibleAdjointVars &adjointVars, const labelHashSet &sensitivityPatchIDs)
 
virtual ~adjointEikonalSolver ()=default
 
virtual bool readDict (const dictionary &dict)
 
void accumulateIntegrand (const scalar dt)
 
void solve ()
 
void reset ()
 
boundaryVectorFielddistanceSensitivities ()
 
tmp< volTensorFieldgetFISensitivityTerm () const
 
const volScalarFieldda ()
 
const volScalarFieldd ()
 
tmp< volVectorFieldgradEikonal ()
 

Protected Member Functions

wordList patchTypes () const
 
tmp< surfaceScalarFieldcomputeYPhi ()
 
void read ()
 

Protected Attributes

const fvMeshmesh_
 
dictionary dict_
 
const autoPtr< incompressible::RASModelVariables > & RASModelVars_
 
autoPtr< Foam::incompressibleAdjoint::adjointRASModel > & adjointTurbulence_
 
const labelHashSetsensitivityPatchIDs_
 
label nEikonalIters_
 
scalar tolerance_
 
scalar epsilon_
 
labelHashSet wallPatchIDs_
 
volScalarField da_
 
volScalarField source_
 
autoPtr< boundaryVectorFielddistanceSensPtr_
 

Detailed Description

Solver of the adjoint to the eikonal PDE.

Reference:

    For the development of the adjoint eikonal PDE and its boundary
    conditions

        Papoutsis-Kiachagias, E. M., & Giannakoglou, K. C. (2014).
        Continuous Adjoint Methods for Turbulent Flows, Applied to Shape
        and Topology Optimization: Industrial Applications.
        Archives of Computational Methods in Engineering, 23(2), 255-299.
        http://doi.org/10.1007/s11831-014-9141-9

To be as consistent as possible, it is recommended to use the advectionDiffusion wallDist method in fvSchemes, instead of the more widely used meshWave

Example of the adjointEikonalSolver specification in optimisationDict:

    optimisation
    {
        sensitivities
        {
            includeDistance true;
            adjointEikonalSolver
            {
                // epsilon should be the same as the one used
                // in fvSchemes/wallDist/advectionDiffusionCoeffs
                epsilon   0.1;
                iters     1000;
                tolerance 1e-6;
            }
        }
    }

Example of the entries in fvSchemes:

    divSchemes
    {
        .
        .
        // avoid bounded schemes since yPhi is not conservative
        div(-yPhi,da) Gauss linearUpwind grad(da);
        .
        .
    }
    laplacianSchemes
    {
        .
        .
        laplacian(yWall,da) Gauss linear corrected;
        .
        .
    }

Also, the solver specification and a relaxation factor for da are required in fvSolution

    da
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        tolerance       1e-9;
        relTol          0.1;
    }

    relaxationFactors
    {
        equations
        {
            .
            .
            da           0.5;
            .
            .
        }
    }
See also
Foam::patchDistMethod::advectionDiffusion Foam::wallDist
Source files

Definition at line 142 of file adjointEikonalSolverIncompressible.H.

Constructor & Destructor Documentation

◆ adjointEikonalSolver()

adjointEikonalSolver ( const fvMesh mesh,
const dictionary dict,
const autoPtr< incompressible::RASModelVariables > &  RASModelVars,
incompressibleAdjointVars adjointVars,
const labelHashSet sensitivityPatchIDs 
)

Definition at line 106 of file adjointEikonalSolverIncompressible.C.

References Foam::read().

Here is the call graph for this function:

◆ ~adjointEikonalSolver()

virtual ~adjointEikonalSolver ( )
virtualdefault

Member Function Documentation

◆ patchTypes()

wordList patchTypes ( ) const
protected

Definition at line 41 of file adjointEikonalSolverIncompressible.C.

References fvMesh::boundary(), adjointEikonalSolver::mesh_, and adjointEikonalSolver::wallPatchIDs_.

Here is the call graph for this function:

◆ computeYPhi()

tmp< surfaceScalarField > computeYPhi ( )
protected

◆ read()

void read ( )
protected

◆ TypeName()

TypeName ( "adjointEikonalSolver"  )

◆ readDict()

bool readDict ( const dictionary dict)
virtual

Definition at line 163 of file adjointEikonalSolverIncompressible.C.

References dict, and adjointEikonalSolver::dict_.

◆ accumulateIntegrand()

void accumulateIntegrand ( const scalar  dt)

◆ solve()

void solve ( )

◆ reset()

void reset ( )

◆ distanceSensitivities()

boundaryVectorField & distanceSensitivities ( )

◆ getFISensitivityTerm()

tmp< volTensorField > getFISensitivityTerm ( ) const

◆ da()

const volScalarField & da ( )

Definition at line 303 of file adjointEikonalSolverIncompressible.C.

References adjointEikonalSolver::da_.

◆ d()

const volScalarField& d ( )

◆ gradEikonal()

tmp< volVectorField > gradEikonal ( )

Definition at line 309 of file adjointEikonalSolverIncompressible.C.

References adjointEikonalSolver::d(), Foam::fvc::grad(), tmp::New(), and adjointEikonalSolver::RASModelVars_.

Here is the call graph for this function:

Member Data Documentation

◆ mesh_

const fvMesh& mesh_
protected

◆ dict_

dictionary dict_
protected

◆ RASModelVars_

const autoPtr<incompressible::RASModelVariables>& RASModelVars_
protected

◆ adjointTurbulence_

autoPtr<Foam::incompressibleAdjoint::adjointRASModel>& adjointTurbulence_
protected

◆ sensitivityPatchIDs_

const labelHashSet& sensitivityPatchIDs_
protected

◆ nEikonalIters_

label nEikonalIters_
protected

◆ tolerance_

scalar tolerance_
protected

◆ epsilon_

scalar epsilon_
protected

◆ wallPatchIDs_

labelHashSet wallPatchIDs_
protected

◆ da_

volScalarField da_
protected

◆ source_

volScalarField source_
protected

◆ distanceSensPtr_

autoPtr<boundaryVectorField> distanceSensPtr_
protected

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