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();
210 for (label iLimit = 0; iLimit < nSmooth; ++iLimit)
217 limiter.correctBoundaryConditions();
225 const dictionary&
dict 230 const label nSmooth =
dict.getOrDefault<label>(
"nSmooth", 0);
241 auto&
limiter = tlimiter.ref();
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
void computeLimiter()
Compute limiter based on the cells given by zeroATCcells.
virtual void updatePrimalBasedQuantities()
Update quantities related with the primal fields.
volScalarField ATClimiter_
const word zeroGradientType
A zeroGradient patch field type.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void smoothATC()
Limit ATC field using ATClimiter_.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
autoPtr< zeroATCcells > zeroATCcells_
static tmp< edgeInterpolationScheme< Type > > scheme(const edgeScalarField &faceFlux, Istream &schemeData)
Return weighting factors for scheme given from Istream.
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
Template invariant parts for fvPatchField.
zeroCells(alpha, inletCells)
const dimensionSet dimless
Dimensionless.
tmp< areaScalarField > limiter(const areaScalarField &phi)
scalar getExtraDiffusionMultiplier()
Get the extra diffusion multiplier.
Class including all adjoint fields for incompressible flows.
static autoPtr< zeroATCcells > New(const fvMesh &mesh, const dictionary &dict)
Return a reference to the selected turbulence model.
Base class for solution control classes.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
virtual bool writeData(Ostream &) const
Dummy writeData function required from regIOobject.
A class for handling words, derived from Foam::string.
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...
#define DebugInfo
Report an information message using Foam::Info.
const scalar extraConvection_
Base class for selecting cells on which to zero the ATC term.
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())
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions and patch type. [Takes current timeN...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
scalar getExtraConvectionMultiplier()
Get the extra convection multiplier.
static autoPtr< ATCModel > New(const fvMesh &mesh, const incompressibleVars &primalVars, const incompressibleAdjointVars &adjointVars, const dictionary &dict)
Return a reference to the selected turbulence model.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
Type gMax(const FieldField< Field, Type > &f)
defineTypeNameAndDebug(combustionModel, 0)
const labelList & getZeroATCcells()
Get the list of cells on which to zero ATC.
const scalar extraDiffusion_
const volScalarField & getLimiter() const
Get the list of cells on which to zero ATC.
Mesh data needed to do the Finite Volume discretisation.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
messageStream Info
Information stream (stdout output on master, null elsewhere)
tmp< GeometricField< Type, fvPatchField, volMesh > > average(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Area-weighted average a surfaceField creating a volField.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
List< label > labelList
A List of labels.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Defines the attributes of an object for which implicit objectRegistry management is supported...
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
Do not request registration (bool: false)
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)