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());
140 vector angularVelocity(motion.omega());
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());
171 << motion.centreOfRotation() <<
tab 172 << motion.centreOfMass() <<
tab 173 << rotationAngle <<
tab 175 << angularVelocity <<
endl;
Six degree of freedom motion for a rigid body.
virtual OFstream & file()
Return access to the file (if only 1)
defineTypeNameAndDebug(ObukhovLength, 0)
virtual void writeHeader(Ostream &os, const string &str) const
Write a commented header to stream.
6-DoF solid-body mesh motion solver for an fvMesh.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Unit conversion functions.
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr char tab
The tab '\t' character(0x09)
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
virtual bool execute()
Execute, currently does nothing.
virtual bool read(const dictionary &)
Read the sixDoFRigidBodyState data.
virtual void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
A class for handling words, derived from Foam::string.
Quaternion class used to perform rotations in 3D space.
errorManip< error > abort(error &err)
void writeHeaderValue(Ostream &os, const string &property, const Type &value) const
Write a (commented) header property and value pair.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
OBJstream os(runTime.globalPath()/outputName)
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
virtual bool write()
Write the sixDoFRigidBodyState.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
constexpr scalar radToDeg(const scalar rad) noexcept
Conversion from radians to degrees.
virtual bool read(const dictionary &dict)
Read optional controls.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
The dynamicMotionSolverFvMesh.
Base class for writing single files from the function objects.
virtual void writeFileHeader(Ostream &os)
Overloaded writeFileHeader from writeFile.