Go to the documentation of this file.
85 point p = bodyPoint(refAttachmentPt_);
93 vector v = bodyPointVelocity(refAttachmentPt_).l();
95 scalar m = model_.bodies()[bodyID_].m();
97 scalar d = (wallNormal_/
mag(wallNormal_)) & r;
102 scalar damping = psi_*2*m*wn;
103 scalar stiffness =
sqr(wn)*m;
108 (-damping*(rDir & v) + stiffness*d)*rDir;
110 moment = (
p ^ force);
115 Info<<
" stiffness :" << stiffness*d <<
nl
116 <<
" damping :" << -damping*
mag(rDir & v) <<
nl
117 <<
" force : " << force <<
nl
118 <<
" d : " << d <<
nl
119 <<
" r : " << r <<
nl
120 <<
" p : " <<
p <<
nl
121 <<
" velocity : " << v
137 coeffs_.readEntry(
"anchor", anchor_);
138 coeffs_.readEntry(
"refAttachmentPt", refAttachmentPt_);
139 coeffs_.readEntry(
"psi", psi_);
140 coeffs_.readEntry(
"C", C_);
141 coeffs_.readEntry(
"wallNormal", wallNormal_);
154 os.writeEntry(
"anchor", anchor_);
155 os.writeEntry(
"refAttachmentPt", refAttachmentPt_);
156 os.writeEntry(
"psi", psi_);
157 os.writeEntry(
"C", C_);
158 os.writeEntry(
"wallNormal", wallNormal_);
addToRunTimeSelectionTable(restraint, externalForce, dictionary)
defineTypeNameAndDebug(externalForce, 0)
Holds the motion state of rigid-body model.
A class for handling words, derived from Foam::string.
virtual bool read(const dictionary &dict)
Ostream & endl(Ostream &os)
virtual void write(Ostream &) const
Generic templated field type.
virtual bool read(const dictionary &dict)
Basic rigid-body model representing a system of rigid-bodies connected by 1-6 DoF joints.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
Macros for easy insertion into run-time selection tables.
softWall(const word &name, const dictionary &dict, const rigidBodyModel &model)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
virtual void write(Ostream &) const =0
Base class for defining restraints for rigid-body dynamics.
word name(const expressions::valueTypeCode typeCode)
SpatialVector< scalar > spatialVector
SpatialVector of scalars.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual void restrain(scalarField &tau, Field< spatialVector > &fx, const rigidBodyModelState &state) const