36 namespace functionObjects
61 names_(motion().movingBodyNames())
80 refCast<const dynamicMotionSolverFvMesh>(obr_);
82 return (refCast<const RBD::rigidBodyMotion>(mesh.
motion()));
98 writeHeaderValue(this->files()[i],
"Angle Units", angleFormat_);
99 writeCommented(this->files()[i],
"Time");
101 this->files()[i]<<
tab 102 <<
"Centre of rotation" <<
tab 103 <<
"Orientation" <<
tab 104 <<
"Linear velocity" <<
tab 105 <<
"Angular velocity" <<
endl;
136 vector angularVelocity(vCofR.w());
138 if (angleFormat_ ==
"degrees")
140 rotationAngle.
x() =
radToDeg(rotationAngle.x());
141 rotationAngle.y() =
radToDeg(rotationAngle.y());
142 rotationAngle.z() =
radToDeg(rotationAngle.z());
144 angularVelocity.x() =
radToDeg(angularVelocity.x());
145 angularVelocity.y() =
radToDeg(angularVelocity.y());
146 angularVelocity.z() =
radToDeg(angularVelocity.z());
149 writeTime(files()[i]);
153 << rotationAngle <<
tab 155 << angularVelocity <<
endl;
#define forAll(list, i)
Loop across all elements in list.
virtual bool write()
Write function.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
scalar radToDeg(const scalar rad)
Conversion from radians to degrees.
A list of keyword definitions, which are a keyword followed by any number of values (e...
const spatialVector & v(const label i) const
Return the spatial velocity of the bodies.
Unit conversion functions.
addToRunTimeSelectionTable(functionObject, Qdot, dictionary)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool master(const label communicator=0)
Am I the master process.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
const RBD::rigidBodyMotion & motion() const
Macros for easy insertion into run-time selection tables.
virtual bool read(const dictionary &)
Read optional controls.
bool read(const char *, int32_t &)
Six degree of freedom motion for a rigid body.
void writeHeader(std::ostream &, const bool isBinary, const std::string &title)
Write header.
A class for handling words, derived from string.
rigidBodyState(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Quaternion class used to perform rotations in 3D space.
defineTypeNameAndDebug(Qdot, 0)
virtual bool write()
Write the rigidBodyState.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
virtual ~rigidBodyState()
Destructor.
const motionSolver & motion() const
Return the motionSolver.
virtual bool execute()
Execute, currently does nothing.
label bodyID(const word &name) const
Return the ID of the body with the given name.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
The dynamicMotionSolverFvMesh.
virtual bool read(const dictionary &)
Read the rigidBodyState data.
spatialTransform X0(const label bodyId) const
Return the current transform to the global frame for the given body.
functionObject base class for creating, maintaining and writing log files e.g. integrated of averaged...
virtual void writeFileHeader(const label i=0)
overloaded writeFileHeader from writeFile