34 namespace functionObjects
41 sixDoFRigidBodyControl,
60 meanAngularVelocity_(
Zero)
79 dict.
lookup(
"window") >> w_;
80 dict.
lookup(
"convergedVelocity") >> convergedVelocity_;
81 dict.
lookup(
"convergedAngularVelocity") >> convergedAngularVelocity_;
89 if (time_.timeIndex() <= time_.startTimeIndex() + 1)
91 meanVelocity_ =
cmptMag(velocity());
92 meanAngularVelocity_ =
cmptMag(angularVelocity());
96 const scalar dt = time_.deltaTValue();
97 const scalar beta =
min(dt/w_, 1);
99 meanVelocity_ = (1 - beta)*meanVelocity_ + beta*
cmptMag(velocity());
101 meanAngularVelocity_ =
102 (1 - beta)*meanAngularVelocity_ + beta*
cmptMag(angularVelocity());
107 time_.value() - time_.startTime().value() > w_
108 && meanVelocity_ < convergedVelocity_
109 && meanAngularVelocity_ < convergedAngularVelocity_
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual ~sixDoFRigidBodyControl()
Destructor.
set endTime to stop immediately w/ writing
addToRunTimeSelectionTable(functionObject, Qdot, dictionary)
Writes the 6-DoF motion state.
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 read(const dictionary &)
Read the sixDoFRigidBodyState data.
bool read(const char *, int32_t &)
A class for handling words, derived from string.
virtual bool read(const dictionary &)
Read the sixDoFRigidBodyControl data.
sixDoFRigidBodyControl(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
defineTypeNameAndDebug(Qdot, 0)
virtual bool execute()
Execute, currently does nothing.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.