BeamAdapter
Loading...
Searching...
No Matches
AdaptiveInflatableBeamForceField< DataTypes > Class Template Reference

AdaptiveInflatableBeamForceField Class. More...

#include <AdaptiveInflatableBeamForceField.h>

Inheritance diagram for AdaptiveInflatableBeamForceField< DataTypes >:

Classes

class  BeamLocalMatrices
 BeamLocalMatrices Class. More...

Public Types

typedef DataTypes::VecCoord VecCoord
typedef DataTypes::VecDeriv VecDeriv
typedef DataTypes::VecReal VecReal
typedef VecCoord Vector
typedef DataTypes::Coord Coord
typedef DataTypes::Deriv Deriv
typedef Coord::value_type Real
typedef Data< VecCoord > DataVecCoord
typedef Data< VecDeriv > DataVecDeriv
typedef BeamInterpolation< DataTypes > BInterpolation
typedef unsigned int Index
typedef BaseMeshTopology::Edge Element
typedef type::vector< BaseMeshTopology::Edge > VecElement
typedef type::vector< unsigned int > VecIndex
typedef SolidTypes< Real >::Transform Transform
typedef SolidTypes< Real >::SpatialVector SpatialVector
typedef Vec< 3, Real > Vec3
typedef Vec< 6, Real > Vec6
 the displacement vector
typedef Mat< 6, 6, Real > Matrix6x6

Public Member Functions

 SOFA_CLASS (SOFA_TEMPLATE(AdaptiveInflatableBeamForceField, DataTypes), SOFA_TEMPLATE(core::behavior::Mass, DataTypes))
virtual void init () override
 This is inhereted from BaseComponent.
virtual void reinit () override
virtual void draw (const VisualParams *vparams) override
 Visualization.
virtual void addMDx (const MechanicalParams *mparams, DataVecDeriv &f, const DataVecDeriv &dx, SReal factor) override
 Mass Interface.
virtual void addMToMatrix (const MechanicalParams *mparams, const MultiMatrixAccessor *matrix) override
virtual void addMBKToMatrix (const MechanicalParams *mparams, const MultiMatrixAccessor *matrix) override
virtual void accFromF (const MechanicalParams *mparams, DataVecDeriv &, const DataVecDeriv &) override
virtual SReal getKineticEnergy (const MechanicalParams *mparams, const DataVecDeriv &) const override
 < vMv/2 using dof->getV()
virtual void addGravityToV (const MechanicalParams *mparams, DataVecDeriv &) override
bool isDiagonal () const override
virtual void addForce (const MechanicalParams *mparams, DataVecDeriv &f, const DataVecCoord &x, const DataVecDeriv &v) override
 ForceField Interface.
virtual void addDForce (const MechanicalParams *mparams, DataVecDeriv &datadF, const DataVecDeriv &datadX) override
virtual SReal getPotentialEnergy (const MechanicalParams *mparams, const DataVecCoord &) const override
void addKToMatrix (const MechanicalParams *mparams, const MultiMatrixAccessor *matrix) override
void computeStiffness (int beam, BeamLocalMatrices &beamLocalMatrices)
void computeMass (int beam, BeamLocalMatrices &beamMatrices)

Public Attributes

Data< bool > d_computeMass
 if false, only compute the stiff elastic model
Data< Real > d_massDensity
 Density of the mass (usually in kg/m^3).
Data< bool > d_reinforceLength
 if true, perform a separate computation to evaluate the elongation
Data< Real > d_pressure
 Pressure applied inside the inflatable beams.
DataVecDeriv d_dataG

Protected Member Functions

void applyMassLarge (VecDeriv &df, const VecDeriv &dx, int bIndex, Index nd0Id, Index nd1Id, SReal factor)
void applyStiffnessLarge (VecDeriv &df, const VecDeriv &dx, int beam, Index nd0Id, Index nd1Id, SReal factor)
void computeGravityVector ()

Protected Attributes

SingleLink< AdaptiveInflatableBeamForceField< DataTypes >, BInterpolation, BaseLink::FLAG_STOREPATH|BaseLink::FLAG_STRONGLINK > l_interpolation
Vec3 m_gravity
type::vector< BeamLocalMatrices > m_localBeamMatrices

Detailed Description

Member Function Documentation

◆ addForce()

template<class DataTypes>
void addForce ( const MechanicalParams * mparams,
DataVecDeriv & f,
const DataVecCoord & x,
const DataVecDeriv & v )
overridevirtual

ForceField Interface.

TODO:

  • Resize _localBeamMatrices
  • Compute rotations and transformations
  • Compute local frame matrix
  • Compute force contribution of each beam
  • Calculer la force exercée par la gravitée

find the indices of the nodes

find the beamMatrices:

  1. get the current transform of the beam:
  1. Computes the frame of the beam based on the spline interpolation:
  1. Computes the transformation from the DOF (in global frame) to the node's local frame DOF0global_H_Node0local and DOF1global_H_Node1local
  1. Computes the adequate transformation
  • rotation due to the optional transformation

compute Adjoint Matrices:

COMPUTATION OF THE MASS AND STIFFNESS MATRIX (LOCAL) compute the local mass matrices

IF RIGIDIFICATION: no stiffness forces:

compute the local stiffness matrices

COMPUTATION OF THE STIFFNESS FORCE compute the current local displacement of the beam (6dofs)

  1. get the rest transformation from local to 0 and local to 1
  1. computes the local displacement of 0 and 1 in frame local:
  1. put the result in a Vec6

compute the force in the local frame:

ADD the effect of the pressure in the axial direction

effect of pressure is added as an external force (- internal force)

compute the force in the global frame

Add this force to vector f (negative as it is internal force)

add gravity:

◆ addMToMatrix()

template<class DataTypes>
void addMToMatrix ( const MechanicalParams * mparams,
const MultiMatrixAccessor * matrix )
overridevirtual

matrices in global frame

◆ applyMassLarge()

template<class DataTypes>
void applyMassLarge ( VecDeriv & df,
const VecDeriv & dx,
int bIndex,
Index nd0Id,
Index nd1Id,
SReal factor )
protected

displacement in local frame

internal force in local frame

force in global frame

put the result in df

◆ applyStiffnessLarge()

template<class DataTypes>
void applyStiffnessLarge ( VecDeriv & df,
const VecDeriv & dx,
int beam,
Index nd0Id,
Index nd1Id,
SReal factor )
protected

Return in case of rigidification

displacement in local frame

internal force in local frame

force in global frame

put the result in df

◆ computeMass()

template<class DataTypes>
void computeMass ( int beam,
BeamLocalMatrices & beamMatrices )

material parameters

interpolation & geometrical parameters

diagonal values

diagonal blocks

lower non-diagonal blocks

Make a symetric matrix with diagonal blocks

upper non-diagonal block : set k_loc10 as the transposed matrix of k_loc01

◆ computeStiffness()

template<class DataTypes>
void computeStiffness ( int beam,
BeamLocalMatrices & beamLocalMatrices )

Get the curvilinear abscissa of the extremity of the beam

material parameters

interpolation & geometrical parameters

correction for inflated beam (effective shear area for circular tubes with thin walls

pressure

Find shear-deformation parameters

formula from "Mechanics of Inflatable Fabric Beams, C. Wielgosz et al.

except that they consider the Pressure as a force (P*_A)

diagonal values

diagonal blocks

lower non-diagonal blocks

Make a symetric matrix with diagonal blocks

upper non-diagonal block : set k_loc10 as the transposed matrix of k_loc01

◆ draw()

template<class DataTypes>
void draw ( const VisualParams * vparams)
overridevirtual

Visualization.

rigidification case