37 namespace pointMeshMovers
55 Foam::pointMeshMovers::rigidBodyMotion::transforms0()
const
78 void Foam::pointMeshMovers::rigidBodyMotion::moveBodies()
80 const Time& t = poly().time();
83 if (curTimeIndex_ != t.timeIndex())
86 curTimeIndex_ = t.timeIndex();
89 const scalar ramp = ramp_->value(t.value());
91 if (poly().foundObject<uniformDimensionedVectorField>(
"g"))
95 *poly().lookupObject<uniformDimensionedVectorField>(
"g").value();
100 for (
label i=0; i<nIter_; i++)
107 Field<spatialVector>(nBodies(),
Zero)
113 Field<spatialVector> fx(nBodies(),
Zero);
117 const label bodyID = bodyMeshes_[bi].bodyIndex;
121 functionObjects::forces
f
128 "patches", bodyMeshes_[bi].
patches(),
135 f.calcForcesMoments();
154 if (bodyMeshes_[bi].bodyIndex != -1)
156 status(bodyMeshes_[bi].bodyIndex);
177 "rigidBodyMotionState",
186 "rigidBodyMotionState",
197 test_(
dict.lookupOrDefault<
Switch>(
"test", false)),
200 rhoName_(
dict.lookupOrDefault<
word>(
"rho",
"rho")),
204 if (rhoName_ ==
"rhoInf")
206 rhoInf_ =
dict.lookup<scalar>(
"rhoInf");
209 if (
dict.found(
"ramp"))
228 <<
" has been merged with another body"
229 " and cannot be assigned a set of patches"
253 "rigidBodyMotionState",
267 &&
dict.regIOobject::writeObject
271 poly().
time().writeCompression(),
#define forAll(list, i)
Loop across all elements in list.
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).
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static const versionNumber currentVersion
Current version number.
label bodyIndex(const word &name) const
Return the ID of the body with the given name.
const word & name(const label bodyID) const
Return the name of body with the given ID.
rigidBodyMotion()
Construct null.
spatialTransform transform0(const label bodyID) const
Return the transformation of bodyID relative to the initial time.
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,...
static bool master(const label communicator=0)
Am I the master process.
label size() const
Return the number of elements in the UPtrList.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
static std::tuple< const Entries &... > entries(const Entries &...)
Construct an entries tuple from which to make a dictionary.
Abstract base class for pointMesh movers.
Motion of the mesh specified as a list of pointMeshMovers.
virtual bool write() const
Write points0 if the mesh topology changed.
Abstract base-class for multiple rigid body mesh motion.
PtrList< bodyMesh > bodyMeshes_
List of the bodyMeshes containing the patches and point motion.
Multiple rigid body mesh motion in which movement of the bodies is generated by RBD::rigidBodyMotion.
~rigidBodyMotion()
Destructor.
virtual bool write() const
Write motion state information for restart.
Mesh consisting of general polyhedral cells.
static const septernion I
timeIOdictionary derived from IOdictionary with globalFile set false to enable writing to processor t...
Templated form of IOobject providing type information for file reading and header type checking.
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.
const fvPatchList & patches
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
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const dimensionSet & dimTime
SpatialVector< scalar > spatialVector
SpatialVector of scalars.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.