36 namespace functionObjects
61 names_(motion().movingBodyNames())
79 refCast<const dynamicMotionSolverFvMesh>(obr_);
81 return (refCast<const RBD::rigidBodyMotion>(mesh.
motion()));
100 writeHeaderValue(this->files()[i],
"Angle Units", angleFormat_);
101 writeCommented(this->files()[i],
"Time");
103 this->files()[i]<<
tab 104 <<
"Centre of rotation" <<
tab 105 <<
"Orientation" <<
tab 106 <<
"Linear velocity" <<
tab 107 <<
"Angular velocity" <<
endl;
138 vector angularVelocity(vCofR.w());
140 if (angleFormat_ ==
"degrees")
142 rotationAngle.
x() =
radToDeg(rotationAngle.x());
143 rotationAngle.y() =
radToDeg(rotationAngle.y());
144 rotationAngle.z() =
radToDeg(rotationAngle.z());
146 angularVelocity.x() =
radToDeg(angularVelocity.x());
147 angularVelocity.y() =
radToDeg(angularVelocity.y());
148 angularVelocity.z() =
radToDeg(angularVelocity.z());
151 writeTime(files()[i]);
155 << rotationAngle <<
tab 157 << 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.
Specialisation 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