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);
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
virtual void write(Ostream &) const
Write.
addToRunTimeSelectionTable(restraint, externalForce, dictionary)
defineTypeNameAndDebug(externalForce, 0)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Base class for defining restraints for rigid-body dynamics.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void restrain(scalarField &tau, Field< spatialVector > &fx, const rigidBodyModelState &state) const
Accumulate the retraint internal joint forces into the tau field and.
Macros for easy insertion into run-time selection tables.
Holds the motion state of rigid-body model.
virtual bool read(const dictionary &dict)
Update properties from given dictionary.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
externalForce(const word &name, const dictionary &dict, const rigidBodyModel &model)
Construct from components.
scalar t() const
Return access to the time.
A class for handling words, derived from Foam::string.
SpatialVector< scalar > spatialVector
SpatialVector of scalars.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
OBJstream os(runTime.globalPath()/outputName)
messageStream Info
Information stream (stdout output on master, null elsewhere)
virtual bool read(const dictionary &dict)
Update properties from given dictionary.
Basic rigid-body model representing a system of rigid-bodies connected by 1-6 DoF joints...
virtual void write(Ostream &) const =0
Write.
Time-dependent external force restraint using Function1.
virtual ~externalForce()
Destructor.
static constexpr const zero Zero
Global zero (0)