95 Foam::fv::topOSource::topOSource
98 const word& modelType,
105 interpolationFieldName_(
word::null),
173 const word& fieldName,
174 const word& designVariablesName
177 const label fieldi = applyToField(fieldName);
185 <<
"Postprocessing Brinkman sensitivities for field " 186 << fieldName <<
endl;
195 interpolationFieldName_
205 fieldNames_ = coeffs_.get<
wordList>(
"names");
206 interpolationFieldName_ = coeffs_.
get<
word>(
"interpolationField");
207 applied_.setSize(fieldNames_.size(),
false);
216 darcyFlow_ = coeffs_.getOrDefault<
bool>(
"darcyFlow",
false);
219 Da_.reset(
new scalar(coeffs_.getOrDefault<scalar>(
"Da", 1.e-5)));
const Type & lookupObject(const word &name, const bool recursive=false) const
Lookup and return const reference to the object of the given Type. Fatal if not found or the wrong ty...
bool darcyFlow_
Does this option apply to a Darcy flow model.
autoPtr< topOInterpolationFunction > interpolation_
Interpolation function.
scalar getBetaMax() const
Get betaMax value.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
defineTypeNameAndDebug(atmAmbientTurbSource, 0)
const fvMesh & mesh_
Reference to the mesh database.
const word & name() const noexcept
Return the object name.
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.
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type get(const label i) const
Return bool value at specified position, always false for out-of-range access.
Ignore writing from objectRegistry::writeObject()
const dimensionSet dimless
Dimensionless.
const Time & time() const
Return the top-level database.
virtual bool read(const dictionary &dict)
Read source dictionary.
virtual void addSup(fvMatrix< vector > &eqn, const label fieldi)
Add implicit contribution to momentum equation.
Macros for easy insertion into run-time selection tables.
static autoPtr< option > New(const word &name, const dictionary &dict, const fvMesh &mesh)
Return a reference to the selected fvOption model.
const GeometricField< Type, fvPatchField, volMesh > & psi(const label i=0) const
Return psi.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
virtual void sourceTerm(DimensionedField< scalar, volMesh > &field, const topOInterpolationFunction &interpolationFunc, const scalar betaMax, const word &interpolationFieldName="beta") const
Populate source terms for the flow equations.
word interpolationFieldName_
Interpolation field name.
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
autoPtr< scalar > Da_
Dimensionless Darcy number.
virtual void sourceTermSensitivities(scalarField &sens, const topOInterpolationFunction &interpolationFunc, const scalar betaMax, const word &designVariablesName, const word &interpolationFieldName="beta") const
Post-processing sensitivities due to interpolations based on the indicator fields.
virtual bool read(const dictionary &dict)
Read source dictionary.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
#define DebugInfo
Report an information message using Foam::Info.
addToRunTimeSelectionTable(option, atmAmbientTurbSource, dictionary)
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
label nCells() const noexcept
Number of mesh cells.
Mesh data needed to do the Finite Volume discretisation.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
A special matrix type and solver, designed for finite volume solutions of scalar equations.
scalar betaMax_
Optional betaMax.
bool foundObject(const word &name, const bool recursive=false) const
Is the named Type found?
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
virtual void postProcessSens(scalarField &sensField, const word &fieldName=word::null, const word &designValue=word::null)
Multiply sensitivities with the derivative of the interpolation function.
A class for managing temporary objects.
Base class for all design variables related to topology optimisation (topO). Provides the lookup func...
Defines the attributes of an object for which implicit objectRegistry management is supported...
Calculate the finiteVolume matrix for implicit and explicit sources.
virtual tmp< DimensionedField< scalar, volMesh > > getSource()
Compute the source term based on the indicator field.
Base abstract class for handling finite volume options (i.e. fvOption).
static constexpr const zero Zero
Global zero (0)