61 delta_(
dict.lookupOrDefault<scalar>(
"delta", rootSmall))
89 for(
label i = 0; i < model_.joints()[
lambda].nDoF(); ++ i)
91 const scalar q = state.
q()[parent.qIndex() + i];
92 const scalar qDot = state.
qDot()[parent.qIndex() + i];
93 const scalar qDdot = state.
qDdot()[parent.qIndex() + i];
95 const scalar
f = f_->value(q);
96 const scalar fMinusDf = f_->value(q - delta_/2);
97 const scalar fPlusDf = f_->value(q + delta_/2);
98 const scalar dfdq = (fPlusDf - fMinusDf)/delta_;
99 const scalar d2fdq2 = (fPlusDf - 2*
f + fMinusDf)/
sqr(delta_);
105 c += (dfdq*qDdot + d2fdq2*
sqr(qDot))*
s;
108 const scalar magW =
mag(
x.w());
Macros for easy insertion into run-time selection tables.
Run-time selectable general function of one variable.
Joint state returned by jcalc.
spatialVector c
The constrained joint acceleration correction.
compactSpatialTensor S
The joint motion sub-space (3-DoF)
spatialVector v
The constrained joint velocity.
spatialVector S1
The joint motion sub-space (1-DoF)
spatialTransform X
The joint transformation.
Abstract base-class for all rigid-body joints.
const List< spatialVector > & S() const
Return the joint motion sub-space.
virtual autoPtr< joint > clone() const
Clone this joint.
virtual void jcalc(joint::XSvc &J, const rigidBodyModelState &state) const
Update the model state for this joint.
virtual ~function()
Destructor.
function(const rigidBodyModel &model, const dictionary &dict)
Construct for given model from dictionary.
Holds the motion state of rigid-body model.
const scalarField & qDdot() const
Return access to the joint acceleration.
const scalarField & qDot() const
Return access to the joint velocity.
const scalarField & q() const
Return access to the joint position and orientation.
Basic rigid-body model representing a system of rigid-bodies connected by 1-6 DoF joints.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A list of keyword definitions, which are a keyword followed by any number of values (e....
Quaternion class used to perform rotations in 3D space.
tensor R() const
The rotation tensor corresponding the quaternion.
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.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
dimensionedScalar lambda(viscosity->lookup("lambda"))
defineTypeNameAndDebug(composite, 0)
addToRunTimeSelectionTable(joint, composite, dictionary)
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
const dimensionedScalar c
Speed of light in a vacuum.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const unitConversion unitNone
dimensioned< scalar > mag(const dimensioned< Type > &)