39namespace incompressible
53 fixedValueFvPatchScalarField::typeName
58 daTypes[patchi] = zeroGradientFvPatchScalarField::typeName;
70 const scalar defaultEps =
72 subOrEmptyDict(
"advectionDiffusionCoeffs").
73 getOrDefault<scalar>(
"epsilon", 0.1);
104 nybf[patchi] == -
patches[patchi].nf();
127 dict_(
dict.subOrEmptyDict(
"adjointEikonalSolver")),
128 RASModelVars_(RASModelVars),
129 adjointTurbulence_(adjointVars.adjointTurbulence()),
130 sensitivityPatchIDs_(sensitivityPatchIDs),
141 adjointVars.useSolverNameForFields() ?
142 "da" + adjointTurbulence_().adjointSolverName() :
206 Info<<
"Adjoint Eikonal Iteration : " << iter <<
endl;
217 scalar residual = daEqn.
solve().initialResidual();
225 Info<<
"\n***Reached adjoint eikonal convergence limit, iteration "
226 << iter <<
"***\n\n";
246 Info<<
"Calculating distance sensitivities " <<
endl;
256 distanceSens[patchi] =
267 Info<<
"Calculating distance sensitivities " <<
endl;
311 return tdistanceSens;
const dimensionSet & dimensions() const
Return dimensions.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
static word timeName(const scalar t, const int precision=precision_)
Ostream & printExecutionTime(OSstream &os) const
Print the elapsed ExecutionTime (cpu-time), ClockTime.
label size() const noexcept
The number of elements in the list.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
dictionary subOrEmptyDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX, const bool mandatory=false) const
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
A special matrix type and solver, designed for finite volume solutions of scalar equations....
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
SolverPerformance< Type > solve(const dictionary &)
Solve returning the solution statistics.
Mesh data needed to do the Finite Volume discretisation.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const Time & time() const
Return the top-level database.
const surfaceVectorField & Sf() const
Return cell face area vectors.
Class including all adjoint fields for incompressible flows.
virtual tmp< volScalarField > distanceSensitivities()=0
Solver of the adjoint to the eikonal PDE.
tmp< volVectorField > gradEikonal()
Return the gradient of the eikonal equation.
boundaryVectorField & distanceSensitivities()
Return the sensitivity term depending on da.
const volScalarField & da()
Return the adjoint distance field.
autoPtr< boundaryVectorField > distanceSensPtr_
Wall face sens w.r.t. (x,y.z)
tmp< surfaceScalarField > computeYPhi()
Compute convecting velocity.
autoPtr< Foam::incompressibleAdjoint::adjointRASModel > & adjointTurbulence_
const autoPtr< incompressible::RASModelVariables > & RASModelVars_
const volScalarField & d()
Return the distance field.
labelHashSet wallPatchIDs_
const labelHashSet & sensitivityPatchIDs_
tmp< volTensorField > getFISensitivityTerm() const
Return the volume-based sensitivity term depending on da.
void read()
Read options each time a new solution is found.
void accumulateIntegrand(const scalar dt)
Accumulate source term.
void reset()
Reset source term.
wordList patchTypes() const
Return the boundary condition types for da.
void solve()
Calculate the adjoint distance field.
virtual bool write(const bool valid=true) const
Write using setting from DB.
const dictionary & schemesDict() const
The current schemes dictionary, respects the "select" keyword.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const polyBoundaryMesh & patches
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
zeroField SuSp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimless
Dimensionless.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensionedScalar pow3(const dimensionedScalar &ds)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)
autoPtr< typename GeometricField< Type, fvPatchField, volMesh >::Boundary > createZeroBoundaryPtr(const fvMesh &mesh, bool printAllocation=false)
Type gMax(const FieldField< Field, Type > &f)
wordList patchTypes(nPatches)
A non-counting (dummy) refCount.