39namespace functionObjects
54 Foam::functionObjects::sixDoFRigidBodyState::angleTypes
56Foam::functionObjects::sixDoFRigidBodyState::angleTypeNames_
58 { angleTypes::RADIANS,
"radians" },
59 { angleTypes::DEGREES,
"degrees" },
72 <<
"centreOfRotation" <<
tab
73 <<
"centreOfMass" <<
tab
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;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual bool read()
Re-read model coefficients if they have changed.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
const Cmpt & z() const
Access to the vector z component.
const Cmpt & y() const
Access to the vector y component.
const Cmpt & x() const
Access to the vector x component.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
The dynamicMotionSolverFvMesh.
Abstract base-class for Time/database function objects.
Watches for presence of the named trigger file in the case directory and signals a simulation stop (o...
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Writes the 6-DoF motion state.
virtual void writeFileHeader(Ostream &os)
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.
Base class for writing single files from the function objects.
void writeHeaderValue(Ostream &os, const string &property, const Type &value) const
Write a (commented) header property and value pair.
virtual void writeHeader(Ostream &os, const string &str) const
Write a commented header to stream.
virtual OFstream & file()
Return access to the file (if only 1)
virtual void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
Quaternion class used to perform rotations in 3D space.
vector eulerAngles(const eulerOrder order) const
6-DoF solid-body mesh motion solver for an fvMesh.
const sixDoFRigidBodyMotion & motion() const
Return the six DoF motion object.
Six degree of freedom motion for a rigid body.
point centreOfMass() const
Return the current centre of mass.
const vector & v() const
Return the current velocity.
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.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr scalar radToDeg() noexcept
Multiplication factor for radians to degrees conversion.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
constexpr char tab
The tab '\t' character(0x09)
Unit conversion functions.