36 namespace functionObjects
52 Foam::functionObjects::sixDoFRigidBodyState::sixDoFRigidBodyState
88 writeHeader(file,
"Motion State");
89 writeHeaderValue(file,
"Angle Units", angleFormat_);
90 writeCommented(file,
"Time");
93 <<
"centreOfRotation" <<
tab 94 <<
"centreOfMass" <<
tab 114 refCast<const dynamicMotionSolverFvMesh>(obr_);
117 refCast<const sixDoFRigidBodyMotionSolver>(mesh.
motion());
126 vector angularVelocity(motion.omega());
128 if (angleFormat_ ==
"degrees")
130 rotationAngle.
x() =
radToDeg(rotationAngle.x());
131 rotationAngle.y() =
radToDeg(rotationAngle.y());
132 rotationAngle.z() =
radToDeg(rotationAngle.z());
134 angularVelocity.x() =
radToDeg(angularVelocity.x());
135 angularVelocity.y() =
radToDeg(angularVelocity.y());
136 angularVelocity.z() =
radToDeg(angularVelocity.z());
142 << motion.centreOfRotation() <<
tab 143 << motion.centreOfMass() <<
tab 144 << rotationAngle <<
tab 146 << angularVelocity <<
endl;
Six degree of freedom motion for a rigid body.
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.
6-DoF solid-body mesh motion solver for an fvMesh.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Unit conversion functions.
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.
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 bool read(const dictionary &)
Read optional controls.
bool read(const char *, int32_t &)
A class for handling words, derived from string.
Quaternion class used to perform rotations in 3D space.
virtual void writeFileHeader(const label i=0)
overloaded writeFileHeader from writeFile
virtual bool write()
Write the sixDoFRigidBodyState.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
virtual ~sixDoFRigidBodyState()
Destructor.
const motionSolver & motion() const
Return the motionSolver.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
The dynamicMotionSolverFvMesh.
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
addToRunTimeSelectionTable(functionObject, add, dictionary)
functionObject base class for creating, maintaining and writing log files e.g. integrated of averaged...