37 namespace functionObjects
63 angularVelocityUnits_(
"[rad/s]")
81 angleUnits_.readIfPresent(
"angleUnits",
dict);
82 angularVelocityUnits_.readIfPresent(
"angularVelocityUnits",
dict);
95 writeHeaderValue(
file,
"Angle Units", angleUnits_);
96 writeHeaderValue(
file,
"Angular Velocity Units", angularVelocityUnits_);
97 writeCommented(
file,
"Time");
100 <<
"centreOfRotation" <<
tab
101 <<
"centreOfMass" <<
tab
115 Foam::functionObjects::sixDoFRigidBodyState::motion()
const
118 refCast<const fvMeshMovers::motionSolver>(mesh_.mover());
120 return (refCast<const sixDoFRigidBodyMotion>(mover.
motion()));
133 return motion().omega();
140 return angularVelocityUnits_;
161 << angleUnits_.toUser(theta) <<
tab
163 << 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 keyword definitions, which are a keyword followed by any number of values (e....
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.
const unitConversion & angularVelocityUnits() const
Return the units in which to write the angular velocities.
virtual void writeFileHeader(const label i=0)
overloaded writeFileHeader from writeFile
virtual bool execute()
Execute, currently does nothing.
virtual bool write()
Write the sixDoFRigidBodyState.
virtual bool read(const dictionary &)
Read the sixDoFRigidBodyState data.
const Foam::motionSolver & motion() const
Return the motionSolver.
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.
Unit conversion structure. Contains the associated dimensions and the multiplier with which to conver...
A class for handling words, derived from string.
defineTypeNameAndDebug(adjustTimeStepToCombustion, 0)
addToRunTimeSelectionTable(functionObject, adjustTimeStepToCombustion, 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 bool)
Return a word representation of a bool.