44 void Foam::Lagrangian::manualInjection::readCoeffs(
const dictionary& modelDict)
46 const bool havePositions = modelDict.found(
"positions");
47 const bool haveFile = modelDict.found(
"file");
48 const bool haveUnits = modelDict.found(
"units");
50 if (havePositions == haveFile)
53 << (haveFile ?
"both keywords" :
"neither keyword")
54 <<
" positions " << (haveFile ?
"and" :
"nor")
55 <<
" file defined in dictionary " << modelDict.name()
59 if (havePositions && haveUnits)
62 <<
"both keywords positions and units defined in dictionary "
73 fileName_ = modelDict.lookup<fileName>(
"file");
79 modelDict.lookupOrDefault<scalar>
104 readCoeffs(modelDict);
119 if (!(t0 <= time_ && time_ < t1))
return mesh.subNone();
145 units_.makeStandard(tpositions.
ref());
155 labelField celli(number, -1), facei(number), faceTrii(number);
168 checkLocation(locations, positions);
192 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...
Manual injection model. This injects particles instantaneously at a list of positions specified in a ...
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.
virtual dimensionedScalar beginTime() const
Return begin time (initial start time)
const unitSet & userUnits() const
Return the user-time unit conversion.
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.
static const fileName null
An empty fileName.
const Time & time() const
Return the top-level database.
Motion of the mesh specified as a list of pointMeshMovers.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
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)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
defineTypeNameAndDebug(collisionPhaseTransfer, 0)
addToRunTimeSelectionTable(LagrangianModel, collisionPhaseTransfer, dictionary)
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.
errorManipArg< error, int > exit(error &err, const int errNo=1)
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
vectorField pointField
pointField is a vectorField.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.