36 namespace functionObjects
62 angularVelocityUnits_(
"[rad/s]")
80 angleUnits_.readIfPresent(
"angleUnits",
dict);
81 angularVelocityUnits_.readIfPresent(
"angularVelocityUnits",
dict);
94 writeHeaderValue(
file,
"Angle Units", angleUnits_);
95 writeHeaderValue(
file,
"Angular Velocity Units", angularVelocityUnits_);
96 writeCommented(
file,
"Time");
99 <<
"centreOfRotation" <<
tab
100 <<
"centreOfMass" <<
tab
114 Foam::functionObjects::sixDoFRigidBodyState::motion()
const
117 refCast<const fvMeshMovers::pointMeshMover>(mesh_.mover());
119 return (refCast<const sixDoFRigidBodyMotion>(mover.
mover()));
132 return motion().omega();
139 return angularVelocityUnits_;
160 << angleUnits_.toUser(theta) <<
tab
162 << angularVelocityUnits_.toUser(
omega) <<
endl;
Macros for easy insertion into run-time selection tables.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static bool master(const label communicator=0)
Am I the master process.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Abstract base-class for Time/database functionObjects.
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
functionObject base class for creating, maintaining and writing log files e.g. integrated of averaged...
virtual bool write()
Write function.
virtual bool read(const dictionary &)
Read optional controls.
Writes the 6-DoF motion state.
vector velocity() const
Return the current body velocity.
virtual ~sixDoFRigidBodyState()
Destructor.
vector angularVelocity() const
Return the current body angular velocity.
sixDoFRigidBodyState(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
virtual void writeFileHeader(const label i=0)
overloaded writeFileHeader from writeFile
const unitSet & angularVelocityUnits() const
Return the units in which to write the angular velocities.
virtual bool execute()
Execute, currently does nothing.
virtual bool write()
Write the sixDoFRigidBodyState.
virtual bool read(const dictionary &)
Read the sixDoFRigidBodyState data.
Wrapper class so that a pointMeshMover can be instantiated to move an fvMesh.
const Foam::pointMeshMover & mover() const
Return the pointMeshMover.
Convenience class to handle the input of constant rotational speed. Reads an omega entry with default...
Quaternion class used to perform rotations in 3D space.
vector eulerAngles(const rotationSequence rs) const
Return a vector of euler angles corresponding to the.
Six degree of freedom motion for a rigid body.
point centreOfMass() const
Return the current centre of mass.
const tensor & orientation() const
Return the orientation tensor, Q.
vector omega() const
Return the angular velocity in the global frame.
const point & centreOfRotation() const
Return the current centre of rotation.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
Unit conversion structure. Contains the associated dimensions and the multiplier with which to conver...
A class for handling words, derived from string.
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
addToRunTimeSelectionTable(functionObject, fvModel, dictionary)
void writeHeader(std::ostream &, const bool isBinary, const std::string &title)
Write header.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.