50 const word& sourceName,
51 const word& modelType,
54 const word& defaultAreaName
57 fa::faceSetOption(sourceName, modelType,
dict, m, defaultAreaName),
58 fieldName_(
dict.get<
word>(
"fieldName")),
59 tableName_(
dict.get<
word>(
"tableName")),
65 regionMesh().thisDb().time().
timeName(),
66 regionMesh().thisDb(),
70 dict.getOrDefault(
"store", false)
95void Foam::fa::externalFileSource::updateMapping()
98 const scalar t =
mesh().time().value();
100 PtrList<scalarField> patchValues(mapping_.size());
104 const auto* map = mapping_.get(patchi);
108 patchValues.set(patchi, map->value(t));
112 vsm().mapToSurface<scalar>(patchValues, pExt_.field());
129 <<
name() <<
": applying source to "
156 for (
const label patchi :
patches)
158 const polyPatch&
p = mesh_.boundaryMesh()[patchi];
164 new PatchFunction1Types::MappedFile<scalar>
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
const Internal & internalField() const noexcept
Return a const-reference to the dimensioned internal field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const Time & time() const noexcept
Return Time associated with the objectRegistry.
const word & name() const noexcept
Return the object name.
void resize(const label len)
Adjust allocated size of list.
Patch value mapping from a set of values stored in a file and a set of unstructured points using the ...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
label timeIndex() const noexcept
Return the current time index.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A special matrix type and solver, designed for finite area solutions of scalar equations....
const GeometricField< Type, faPatchField, areaMesh > & psi() const
Applies sources on a specified field within a specified region by using an external table file.
externalFileSource(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh, const word &defaultAreaName=word())
Construct from explicit source name and mesh.
virtual bool read(const dictionary &dict)
Read source dictionary.
virtual void addSup(const areaScalarField &rho, faMatrix< scalar > &eqn, const label fieldi)
Add explicit contribution to compressible momentum equation.
void subsetFilter(List< Type > &field) const
Zero all non-selected locations within field.
virtual bool isActive()
Is the source active?
faceSetOption(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh, const word &defaultAreaName=word())
Construct from components.
Base abstract class for handling finite area options (i.e. faOption).
virtual bool read(const dictionary &dict)
Read source dictionary.
const fvMesh & mesh_
Reference to the mesh database.
wordList fieldNames_
Field names to apply source to - populated by derived models.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
const faMesh & regionMesh() const
Return the region mesh database (demand-driven).
Mesh data needed to do the Finite Volume discretisation.
A patch is a list of labels that address the faces in the global face list.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const polyBoundaryMesh & patches
const volSurfaceMapping vsm(aMesh)
Namespace of functions to calculate implicit derivatives returning a matrix. Time derivatives are cal...
#define DebugInfo
Report an information message using Foam::Info.
Namespace for finite-area.
const dimensionSet dimPressure
List< label > labelList
A List of labels.
Ostream & endl(Ostream &os)
Add newline and flush stream.
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
static constexpr const zero Zero
Global zero (0).
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
#define forAll(list, i)
Loop across all elements in list.