Go to the documentation of this file.
46 #ifndef adjointRASModel_H
47 #define adjointRASModel_H
71 namespace incompressibleAdjoint
169 const word& adjointTurbulenceModelName
175 adjointTurbulenceModelName
189 const word& adjointTurbulenceModelName =
190 adjointTurbulenceModel::typeName
202 const word& adjointTurbulenceModelName =
203 adjointTurbulenceModel::typeName
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Manages the adjoint mean flow fields and their mean values.
class for managing incompressible objective functions.
const word & solverName() const
Return solver name.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
volScalarField & getAdjointTMVariable1()
Return non-constant reference to adjoint turbulence model variable 1.
virtual tmp< volScalarField > nutJacobianTMVar2() const
Jacobian of nut wrt the second turbulence model variable.
autoPtr< boundaryVectorField > wallShapeSensitivitiesPtr_
Wall sensitivity term for shape optimisation.
const nearWallDist & y() const
Return the near wall distances.
A class for handling words, derived from Foam::string.
A class for managing temporary objects.
virtual tmp< volScalarField > nutJacobianTMVar1() const
Jacobian of nut wrt the first turbulence model variable.
autoPtr< volScalarField > adjointTMVariable2MeanPtr_
Adjoint turbulence model variable 2, mean value.
dictionary coeffDict_
Model coefficients dictionary.
virtual const boundaryVectorField & wallFloCoSensitivities()=0
Sensitivity terms for flow control, emerging from the.
virtual void correct()
Solve the adjoint turbulence equations.
autoPtr< boundaryVectorField > wallFloCoSensitivitiesPtr_
Wall sensitivity term for flow control optimisation.
bool changedPrimalSolution_
Has the primal solution changed?
autoPtr< volScalarField > adjointTMVariable1MeanPtr_
Adjoint turbulence model variable 1, mean value.
virtual tmp< scalarField > diffusionCoeffVar2(label patchI) const
const word & adjointSolverName() const
Const access to the adjoint solver name.
nearWallDist y_
Near wall distance boundary field.
virtual bool read()
Read adjointRASProperties dictionary.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
autoPtr< volScalarField > adjointTMVariable2Ptr_
Adjoint turbulence model variable 2.
volScalarField & getAdjointTMVariable2Inst()
Return non-constant reference to adjoint turbulence model variable 2.
volScalarField & getAdjointTMVariable2()
Return non-constant reference to adjoint turbulence model variable 2.
virtual void nullify()=0
Nullify all adjoint turbulence model fields and their old times.
autoPtr< boundaryVectorField > adjMomentumBCSourcePtr_
Bound the given scalar field if it has gone unbounded.
autoPtr< volScalarField > & getAdjointTMVariable2InstPtr()
Return non-constant autoPtr to adjoint turbulence model variable 2.
declareRunTimeSelectionTable(autoPtr, adjointRASModel, dictionary,(incompressibleVars &primalVars, incompressibleAdjointMeanFlowVars &adjointVars, objectiveManager &objManager, const word &adjointTurbulenceModelName),(primalVars, adjointVars, objManager, adjointTurbulenceModelName))
Abstract base class for incompressible adjoint turbulence models (RAS, LES and laminar).
void setChangedPrimalSolution()
Set flag of changed primal solution to true.
const word & primalSolverName() const
Const access to the primal solver name.
virtual tmp< volTensorField > FISensitivityTerm()=0
Term contributing to the computation of FI-based sensitivities.
virtual tmp< volScalarField > distanceSensitivities()=0
Switch adjointTurbulence_
Turbulence on/off flag.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool includeDistance() const
Should the adjoint to the eikonal equation be computed.
Abstract base class for incompressible turbulence models.
objectiveManager & objectiveManager_
Reference to the objectiveManager.
volScalarField & getAdjointTMVariable1Inst()
Return non-constant reference to adjoint turbulence model variable 1.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
TypeName("adjointRASModel")
Runtime type information.
Useful typenames for fields defined only at the boundaries.
Macros to ease declaration of run-time selection tables.
virtual tmp< volVectorField > adjointMeanFlowSource()=0
autoPtr< volScalarField > adjointTMVariable1Ptr_
Adjoint turbulence model variable 1.
virtual void printCoeffs()
Print model coefficients.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
autoPtr< volScalarField > & getAdjointTMVariable1InstPtr()
Return non-constant autoPtr to adjoint turbulence model variable 1.
virtual tmp< scalarField > diffusionCoeffVar1(label patchI) const
incompressibleAdjointMeanFlowVars & adjointVars_
const dictionary & coeffDict() const
Const access to the coefficients dictionary.
incompressibleVars & primalVars_
virtual const boundaryVectorField & adjointMomentumBCSource() const =0
virtual ~adjointRASModel()=default
Destructor.
Distance calculation for cells with face on a wall. Searches pointNeighbours to find closest.
void resetMeanFields()
Reset mean fields to zero.
void setMeanFields()
Set mean fields.
Switch printCoeffs_
Flag to print the model coeffs at run-time.
Base class for solution control classes.
virtual const boundaryVectorField & wallShapeSensitivities()=0
Sensitivity terms for shape optimisation, emerging from.
void computeMeanFields()
Average adjoint fields on the fly.
virtual tmp< volSymmTensorField > devReff() const =0
Return the effective stress tensor including the laminar stress.
virtual tmp< fvVectorMatrix > divDevReff(volVectorField &U) const =0
Return the diffusion term for the momentum equation.
static autoPtr< adjointRASModel > New(incompressibleVars &primalVars, incompressibleAdjointMeanFlowVars &adjointVars, objectiveManager &objManager, const word &adjointTurbulenceModelName=adjointTurbulenceModel::typeName)
Return a reference to the selected adjointRAS model.