34 namespace functionObjects
41 sixDoFRigidBodyControl,
60 meanAngularVelocity_(
Zero)
78 dict.
lookup(
"window") >> w_;
79 dict.
lookup(
"convergedVelocity") >> convergedVelocity_;
80 dict.
lookup(
"convergedAngularVelocity") >> convergedAngularVelocity_;
90 if (time_.timeIndex() <= time_.startTimeIndex() + 1)
92 meanVelocity_ =
cmptMag(velocity());
93 meanAngularVelocity_ =
cmptMag(angularVelocity());
97 const scalar dt = time_.deltaTValue();
98 const scalar beta =
min(dt/w_, 1);
100 meanVelocity_ = (1 - beta)*meanVelocity_ + beta*
cmptMag(velocity());
102 meanAngularVelocity_ =
103 (1 - beta)*meanAngularVelocity_ + beta*
cmptMag(angularVelocity());
108 time_.value() - time_.startTime().value() > w_
109 && meanVelocity_ < convergedVelocity_
110 && 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.