65 externalForce_(nullptr),
87 const vector force = externalForce_().value(state.
t());
88 const vector moment(location_ ^ force);
92 Info<<
" location " << location_
94 <<
" moment " << moment
110 coeffs_.readEntry(
"location", location_);
125 os.writeEntry(
"location", location_);
127 externalForce_().writeData(
os);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
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.
Base class for defining restraints for rigid-body dynamics.
Time-dependent external force restraint using Function1.
virtual bool read(const dictionary &dict)
Update properties from given dictionary.
virtual void restrain(scalarField &tau, Field< spatialVector > &fx, const rigidBodyModelState &state) const
Accumulate the retraint internal joint forces into the tau field and.
virtual ~externalForce()
Destructor.
Holds the motion state of rigid-body model.
scalar t() const
Return access to the time.
Basic rigid-body model representing a system of rigid-bodies connected by 1-6 DoF joints.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool write()
Write the output fields.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
OBJstream os(runTime.globalPath()/outputName)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
SpatialVector< scalar > spatialVector
SpatialVector of scalars.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.