73 "ATCModel" + adjointVars.solverName(),
81 primalVars_(primalVars),
82 adjointVars_(adjointVars),
84 extraConvection_(dict_.getOrDefault<scalar>(
"extraConvection",
Zero)),
85 extraDiffusion_(dict_.getOrDefault<scalar>(
"extraDiffusion",
Zero)),
86 nSmooth_(dict_.getOrDefault<label>(
"nSmooth", 0)),
89 dict_.getOrDefault(
"reconstructGradients", false)
91 adjointSolverName_(adjointVars.solverName()),
97 "ATClimiter" + adjointSolverName_,
112 "ATCField" + adjointSolverName_,
139 auto* ctorPtr = dictionaryConstructorTable(modelType);
141 Info<<
"ATCModel type " << modelType <<
endl;
150 *dictionaryConstructorTablePtr_
154 return autoPtr<ATCModel>
195 limiter.primitiveFieldRef() = 1;
196 limiter.correctBoundaryConditions();
199 for (
const label celli :
cells)
205 limiter.correctBoundaryConditions();
209 const localMin<scalar> scheme(
mesh);
210 for (label iLimit = 0; iLimit < nSmooth; ++iLimit)
217 limiter.correctBoundaryConditions();
230 const label nSmooth =
dict.getOrDefault<label>(
"nSmooth", 0);
241 auto&
limiter = tlimiter.ref();
Base class for selecting the adjoint transpose convection model. Inherits from regIOobject to add loo...
static tmp< volScalarField > createLimiter(const fvMesh &mesh, const dictionary &dict)
Return a limiter based on given cells. For use with classes other than ATC which employ the same smoo...
const labelList & getZeroATCcells()
Get the list of cells on which to zero ATC.
const incompressibleAdjointVars & adjointVars_
const scalar extraDiffusion_
virtual bool writeData(Ostream &) const
Dummy writeData function required from regIOobject.
scalar getExtraDiffusionMultiplier()
Get the extra diffusion multiplier.
scalar getExtraConvectionMultiplier()
Get the extra convection multiplier.
const scalar extraConvection_
virtual void updatePrimalBasedQuantities()
Update quantities related with the primal fields.
const bool reconstructGradients_
const volScalarField & getLimiter() const
Get the list of cells on which to zero ATC.
void smoothATC()
Limit ATC field using ATClimiter_.
const incompressibleVars & primalVars_
autoPtr< zeroATCcells > zeroATCcells_
volScalarField ATClimiter_
void computeLimiter()
Compute limiter based on the cells given by zeroATCcells.
static autoPtr< ATCModel > New(const fvMesh &mesh, const incompressibleVars &primalVars, const incompressibleAdjointVars &adjointVars, const dictionary &dict)
Return a reference to the selected turbulence model.
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
@ NO_REGISTER
Do not request registration (bool: false).
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const Time & time() const noexcept
Return Time associated with the objectRegistry.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Mesh data needed to do the Finite Volume discretisation.
Template invariant parts for fvPatchField.
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
Class including all adjoint fields for incompressible flows.
Base class for solution control classes.
LocalMin-mean differencing scheme class.
virtual tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &vf) const
Return the face-interpolate of the given cell field.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
regIOobject(const IOobject &io, const bool isTimeObject=false)
Construct from IOobject. The optional flag adds special handling if the object is the top-level regIO...
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
Base class for selecting cells on which to zero the ATC term.
static autoPtr< zeroATCcells > New(const fvMesh &mesh, const dictionary &dict)
Return a reference to the selected turbulence model.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
#define DebugInfo
Report an information message using Foam::Info.
tmp< GeometricField< Type, fvPatchField, volMesh > > average(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Area-weighted average a surfaceField creating a volField.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
const dimensionSet dimless
Dimensionless.
List< label > labelList
A List of labels.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
messageStream Info
Information stream (stdout output on master, null elsewhere).
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
static constexpr const zero Zero
Global zero (0).
errorManipArg< error, int > exit(error &err, const int errNo=1)
Type gMax(const FieldField< Field, Type > &f)
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
tmp< areaScalarField > limiter(const areaScalarField &phi)
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.
zeroCells(alpha, inletCells)