41 namespace pointMeshMovers
57 Foam::pointMeshMovers::rigidBodyDisplacement::bodyMesh::bodyMesh
62 const dictionary&
dict
84 "rigidBodyMotionState",
93 "rigidBodyMotionState",
104 test_(
dict.lookupOrDefault<
Switch>(
"test", false)),
107 rhoName_(
dict.lookupOrDefault<
word>(
"rho",
"rho")),
123 dict.subDict(
"meshSolver")
129 if (rhoName_ ==
"rhoInf")
131 rhoInf_ =
dict.lookup<scalar>(
"rhoInf");
134 if (
dict.found(
"ramp"))
149 if (bodyDict.
found(
"patches"))
156 <<
"Body " << iter().keyword()
157 <<
" has been merged with another body"
158 " and cannot be assigned a set of patches"
190 if (poly().
nPoints() != meshSolver_.points0().size())
193 <<
"The number of points in the mesh seems to have changed." <<
endl
194 <<
"In constant/polyMesh there are " << meshSolver_.points0().size()
195 <<
" points; in the current mesh there are " << poly().nPoints()
206 const scalar ramp = ramp_->value(t.
value());
208 if (poly().foundObject<uniformDimensionedVectorField>(
"g"))
212 *poly().lookupObject<uniformDimensionedVectorField>(
"g").value();
217 for (
label i=0; i<nIter_; i++)
234 const label bodyID = bodyMeshes_[bi].bodyIndex_;
243 "patches", bodyMeshes_[bi].patches_,
250 f.calcForcesMoments();
268 status(bodyMeshes_[bi].bodyIndex_);
281 meshSolver_.pointDisplacement().boundaryField()[
patchi]
282 .patchInternalField(meshSolver_.points0())
285 meshSolver_.pointDisplacement().boundaryFieldRef()[
patchi] ==
289 transform0(bodyMeshes_[bi].bodyIndex_),
296 return meshSolver_.newPoints();
305 meshSolverPtr_->movePoints(
points);
314 meshSolverPtr_->topoChange(map);
323 meshSolverPtr_->mapMesh(map);
332 meshSolverPtr_->distribute(map);
342 "rigidBodyMotionState",
356 &&
dict.regIOobject::writeObject
360 poly().
time().writeCompression(),
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Macros for easy insertion into run-time selection tables.
static autoPtr< Function1< Type > > New(const word &name, const Function1s::unitSets &units, const dictionary &dict)
Select from dictionary.
Templated function that returns the corresponding 1 (one).
Template class for intrusive linked lists.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static const versionNumber currentVersion
Current version number.
void append(T *)
Append an element at the end of the list.
label bodyIndex(const word &name) const
Return the ID of the body with the given name.
void solve(const scalar t, const scalar deltaT, const scalarField &tau, const Field< spatialVector > &fx)
Integrate velocities, orientation and position.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
label timeIndex() const
Return current time index.
scalar deltaTValue() const
Return time step value.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static bool master(const label communicator=0)
Am I the master process.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
static std::tuple< const Entries &... > entries(const Entries &...)
Construct an entries tuple from which to make a dictionary.
const Type & value() const
Return const reference to value.
Calculates the forces and moments by integrating the pressure and skin-friction forces over a given l...
const Time & time() const
Return time.
Abstract base class for pointMesh movers.
virtual bool write() const
Optionally write motion state information for restart.
Abstract base class for displacement pointMesh movers.
Rigid-body mesh motion solver for fvMesh.
~rigidBodyDisplacement()
Destructor.
virtual void topoChange(const polyTopoChangeMap &)
Update local data for topology changes.
virtual void distribute(const polyDistributionMap &)
Update corresponding to the given distribution map.
virtual tmp< pointField > newPoints()
Return point location obtained from the current motion field.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
virtual void movePoints(const pointField &)
Update local data for geometry changes.
virtual bool write() const
Write motion state information for restart.
rigidBodyDisplacement(const polyMesh &, const dictionary &dict)
Construct from polyMesh and dictionary.
Multiple rigid body mesh motion in which movement of the bodies is generated by RBD::rigidBodyMotion.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Mesh consisting of general polyhedral cells.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
timeIOdictionary derived from IOdictionary with globalFile set false to enable writing to processor t...
A class for managing temporary objects.
Templated form of IOobject providing type information for file reading and header type checking.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
addToRunTimeSelectionTable(pointMeshMover, externalDisplacement, dictionary)
defineTypeNameAndDebug(externalDisplacement, 0)
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const dimensionSet & dimless
void transformPoints(vectorField &, const spatialTransform &, const vectorField &)
Transform given vectorField of coordinates with the given spatialTransform.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
To & refCast(From &r)
Reference type cast template function.
Ostream & endl(Ostream &os)
Add newline and flush stream.
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
const dimensionSet & dimTime
SpatialVector< scalar > spatialVector
SpatialVector of scalars.
word typedName(Name name)
Return the name of the object within the given type.
List< wordRe > wordReList
A List of wordRe (word or regular expression)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)
faceListList boundary(nPatches)