44 void Foam::Lagrangian::manualInjection::readCoeffs(
const dictionary& modelDict)
46 fileName_ = modelDict.lookup<fileName>(
"file");
51 modelDict.lookupOrDefault<scalar>
75 readCoeffs(modelDict);
90 if (!(t0 <= time_ && time_ < t1))
return mesh.subNone();
105 units_.makeStandard(positions);
109 scalarField fraction(number, (time_ - t0)/(t1 - t0));
113 labelField celli(number, -1), facei(number), faceTrii(number);
126 checkLocation(locations, positions);
129 filter(
coordinates, celli, facei, faceTrii, fraction);
150 readCoeffs(modelDict);
Macros for easy insertion into run-time selection tables.
A primitive field of type <Type> with automated input and output.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Base class for Lagrangian injections. Minimal wrapper over LagrangianSource. Implements some utility ...
Class containing Lagrangian geometry and topology.
const Time & time() const
Return time.
static const word fractionName
Name of the tracked fraction field.
Base class for Lagrangian models.
virtual bool read(const dictionary &modelDict)
Read dictionary.
const LagrangianMesh & mesh() const
The mesh.
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
LagrangianSubMesh modify(LagrangianMesh &mesh, const LagrangianSubMesh &) const
Create new elements in the Lagrangian mesh.
virtual bool read(const dictionary &modelDict)
Read dictionary.
manualInjection(const word &name, const LagrangianMesh &mesh, const dictionary &modelDict, const dictionary &stateDict)
Construct from components.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void size(const label)
Override size to be inconsistent with allocated storage.
static const word & constant()
Return constant name.
dimensionedScalar deltaT() const
Return time step.
const unitConversion & userUnits() const
Return the user-time unit conversion.
virtual dimensionedScalar beginTime() const
Return begin time (initial start time)
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
const Type & value() const
Return const reference to value.
A class for handling file names.
const Time & time() const
Return the top-level database.
bool readIfPresent(const word &keyword, const dictionary &)
Update if found in the dictionary.
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
addToRunTimeSelectionTable(LagrangianModel, constantCoefficientVirtualMass, dictionary)
defineTypeNameAndDebug(constantCoefficientVirtualMass, 0)
barycentric coordinates(const polyMesh &mesh, const point &position, const label celli, const label facei, const label faceTrii, const scalar stepFraction)
Return the coordinates given the position and tet topology.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const dimensionSet dimLength
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.