Go to the documentation of this file.
39 namespace functionObjects
54 Foam::functionObjects::sixDoFRigidBodyState::angleTypes
56 Foam::functionObjects::sixDoFRigidBodyState::angleTypeNames_
58 { angleTypes::RADIANS,
"radians" },
59 { angleTypes::DEGREES,
"degrees" },
72 <<
"centreOfRotation" <<
tab
73 <<
"centreOfMass" <<
tab
82 Foam::functionObjects::sixDoFRigidBodyState::sixDoFRigidBodyState
91 angleFormat_(angleTypes::RADIANS)
105 angleTypeNames_.getOrDefault
128 refCast<const dynamicMotionSolverFvMesh>(obr_);
131 refCast<const sixDoFRigidBodyMotionSolver>(
mesh.motion());
142 switch (angleFormat_)
144 case angleTypes::RADIANS:
149 case angleTypes::DEGREES:
151 rotationAngle.x() =
radToDeg(rotationAngle.x());
152 rotationAngle.y() =
radToDeg(rotationAngle.y());
153 rotationAngle.z() =
radToDeg(rotationAngle.z());
155 angularVelocity.x() =
radToDeg(angularVelocity.x());
156 angularVelocity.y() =
radToDeg(angularVelocity.y());
157 angularVelocity.z() =
radToDeg(angularVelocity.z());
163 <<
"Unhandled enumeration " << angleTypeNames_[angleFormat_]
168 writeCurrentTime(file());
173 << rotationAngle <<
tab
175 << angularVelocity <<
endl;
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual void writeFileHeader(Ostream &os)
A class for handling words, derived from Foam::string.
virtual OFstream & file()
6-DoF solid-body mesh motion solver for an fvMesh.
virtual bool read(const dictionary &)
const tensor & orientation() const
bool read(const char *buf, int32_t &val)
Unit conversion functions.
Ostream & endl(Ostream &os)
vector eulerAngles(const eulerOrder order) const
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
void writeHeaderValue(Ostream &os, const string &property, const Type &value) const
Quaternion class used to perform rotations in 3D space.
virtual void writeHeader(Ostream &os, const string &str) const
constexpr scalar radToDeg(const scalar rad) noexcept
const sixDoFRigidBodyMotion & motion() const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool read(const dictionary &dict)
OBJstream os(runTime.globalPath()/outputName)
Macros for easy insertion into run-time selection tables.
errorManip< error > abort(error &err)
#define FatalErrorInFunction
virtual void writeCommented(Ostream &os, const string &str) const
Six degree of freedom motion for a rigid body.
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
defineTypeNameAndDebug(ObukhovLength, 0)
word name(const expressions::valueTypeCode typeCode)
Base class for writing single files from the function objects.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const point & centreOfRotation() const
point centreOfMass() const
The dynamicMotionSolverFvMesh.