89 for(
label i = 0; i < model_.joints()[
lambda].nDoF(); ++ i)
91 const scalar qDot = state.
qDot()[parent.qIndex() + i];
92 const scalar qDdot = state.
qDdot()[parent.qIndex() + i];
93 const scalar qDddot = 0;
95 const scalar
f = f_->value(qDot);
96 const scalar fMinusDf = f_->value(qDot - delta_/2);
97 const scalar fPlusDf = f_->value(qDot + delta_/2);
98 const scalar dfdqDot = (fPlusDf - fMinusDf)/delta_;
99 const scalar d2fdqDot2 = (fPlusDf - 2*f + fMinusDf)/
sqr(delta_);
104 v += dfdqDot*qDdot*
s;
105 c += (dfdqDot*qDddot + d2fdqDot2*
sqr(qDdot))*s;
108 const scalar magW =
mag(
x.w());
Abstract base-class for all rigid-body joints.
Run-time selectable general function of one variable.
Joint in which the position is a function of the parent joint's velocity.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedScalar lambda(laminarTransport.lookup("lambda"))
A list of keyword definitions, which are a keyword followed by any number of values (e...
spatialVector v
The constrained joint velocity.
spatialVector S1
The joint motion sub-space (1-DoF)
compactSpatialTensor S
The joint motion sub-space (3-DoF)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
functionDot(const rigidBodyModel &model, const dictionary &dict)
Construct for given model from dictionary.
defineTypeNameAndDebug(composite, 0)
addToRunTimeSelectionTable(joint, composite, dictionary)
spatialVector c
The constrained joint acceleration correction.
const dimensionedScalar c
Speed of light in a vacuum.
Macros for easy insertion into run-time selection tables.
Holds the motion state of rigid-body model.
Joint state returned by jcalc.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const scalarField & qDot() const
Return access to the joint velocity.
Quaternion class used to perform rotations in 3D space.
const List< spatialVector > & S() const
Return the joint motion sub-space.
spatialTransform X
The joint transformation.
virtual void jcalc(joint::XSvc &J, const rigidBodyModelState &state) const
Update the model state for this joint.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
#define R(A, B, C, D, E, F, K, M)
virtual ~functionDot()
Destructor.
dimensioned< scalar > mag(const dimensioned< Type > &)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
virtual autoPtr< joint > clone() const
Clone this joint.
Basic rigid-body model representing a system of rigid-bodies connected by 1-6 DoF joints...
const scalarField & qDdot() const
Return access to the joint acceleration.