AGX Dynamics  2.37.2.0
agxCable::CableDamage Class Reference

The CableDamage class is used to estimate damage caused to a cable during a simulation. More...

#include <CableDamage.h>

+ Inheritance diagram for agxCable::CableDamage:

Public Member Functions

 CableDamage ()
 Create a new CableDamage instance. More...
 
const agxCable::SegmentDamage & getAccumulatedDamageAt (size_t index) const
 Provides access to the accumulated damage estimation for a particular cable segment. More...
 
agxCable::SegmentDamagePtrVector getAccumulatedDamagePtrs () const
 
const agxCable::SegmentDamageVector & getAccumulatedDamages () const
 Provides access to the per-segment damage estimates that has been accumulated over the simulation so far. More...
 
agx::Real getBendDeformationWeight () const
 
agx::Real getBendRateWeight ()
 
agx::Real getBendTensionWeight ()
 
agx::Real getBendThreshold ()
 
agxCable::Cable * getCable ()
 Get the cable that this CableDamage is estimating damage for. More...
 
const agxCable::Cable * getCable () const
 Get the cable that this CableDamage is estimating damage for. More...
 
const char * getClassName () const override
 
const agxCable::SegmentDamage & getCurrentDamageAt (size_t index) const
 Provides access to the last time step's damage contribution for a particular cable segment. More...
 
agxCable::SegmentDamagePtrVector getCurrentDamagePtrs () const
 
const agxCable::SegmentDamageVector & getCurrentDamages () const
 Provides access to the per-segment damage estimate contributions that the last time step produced. More...
 
agx::Real getFrictionForceWeight ()
 
agx::Real getNormalForceWeight ()
 
size_t getNumDamages () const
 May return zero until the cable for which damage is estimated has been fully initialized. More...
 
agxStream::StorageAgent * getStorageAgent () const override
 
agx::Real getStretchDeformationWeight () const
 
agx::Real getStretchRateWeight ()
 
agx::Real getStretchTensionWeight ()
 
agx::Real getStretchThreshold ()
 
agx::Real getThreshold (agxCable::Direction direction) const
 
agx::Real getTwistDeformationWeight () const
 
agx::Real getTwistRateWeight ()
 
agx::Real getTwistTensionWeight ()
 
agx::Real getTwistThreshold ()
 
agx::Real getWeight (agxCable::DamageTypes::DamageType type) const
 Get the weight, or scaling, used for the given damage source when summing it with all the other damage sources to form a total damage estimate. More...
 
virtual void restore (agxStream::InputArchive &in) override
 
void setBendDeformationWeight (agx::Real weight)
 Set the weight to use for damage caused by bend deformation. More...
 
void setBendRateWeight (agx::Real weight)
 Set the weight to use for damage caused by bend rate. More...
 
void setBendTensionWeight (agx::Real weight)
 Set the weight to use for damage caused by bend tension. More...
 
void setBendThreshold (agx::Real threshold)
 Set the bend deformation threshold that must be surpassed before the bend deformation begin to contribute to the damage estimation. More...
 
void setFrictionForceWeight (agx::Real weight)
 Set the weight to use for damage caused by friction forces from contacts. More...
 
void setNormalForceWeight (agx::Real weight)
 Set the weight to use for damage caused by normal forces from contacts. More...
 
void setStretchDeformationWeight (agx::Real weight)
 Set the weight to use for damage caused by stretch deformation. More...
 
void setStretchRateWeight (agx::Real weight)
 Set the weight to use for damage caused by stretch rate. More...
 
void setStretchTensionWeight (agx::Real weight)
 Set the weight to use for damage caused by stretch tension. More...
 
void setStretchThreshold (agx::Real threshold)
 Set the stretch deformation threshold that must be surpassed before the stretch deformation begin to contribute to the damage estimation. More...
 
void setThreshold (agxCable::Direction direction, agx::Real threshold)
 Set the deformation threshold for the given direction that must be surpassed before the deformation begin to contribute to the damage estimation. More...
 
void setTwistDeformationWeight (agx::Real weight)
 Set the weight to use for damage caused by twist deformation. More...
 
void setTwistRateWeight (agx::Real weight)
 Set the weight to use for damage caused by twist rate. More...
 
void setTwistTensionWeight (agx::Real weight)
 Set the weight to use for damage caused by twist tension. More...
 
void setTwistThreshold (agx::Real threshold)
 Set the twist deformation threshold that must be surpassed before the twist deformation begin to contribute to the damage estimation. More...
 
void setWeight (agxCable::DamageTypes::DamageType type, agx::Real weight)
 Set the weight, or scaling, to use for the given damage source when summing it with all the other damage sources to form a total damage estimate. More...
 
virtual void store (agxStream::OutputArchive &out) const override
 
- Public Member Functions inherited from agxSDK::LinkedStructureComponent
const char * getClassName () const override
 
agxSDK::LinkedStructure * getLinkedStructure () const
 
const agx::Name & getName () const
 
agxSDK::Simulation * getSimulation () const
 
agxStream::StorageAgent * getStorageAgent () const override
 
void setName (const agx::Name &name)
 Assign new name to this component. More...
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor. More...
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting. More...
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match. More...
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test. More...
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object. More...
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
- Public Member Functions inherited from agxStream::Serializable
virtual ~Serializable ()
 Destructor for normal C++ use but hidden from SWIG bindings. More...
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
agx::UInt32 getIndex () const
 This index is given at creation of this object. More...
 
agx::Uuid getUuid () const
 
bool isFinished () const
 
void setEnableSerialization (bool flag)
 Set to false to disable serialization of this object. More...
 
void setFinished ()
 Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More...
 
void setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object. More...
 

Static Public Member Functions

static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static agxCable::CableDamage * getCableDamage (agxCable::Cable *cable)
 Find the CableDamage instances that estimate damage for the given cable. More...
 
static const char * getConstructClassId ()
 
- Static Public Member Functions inherited from agxSDK::LinkedStructureComponent
static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static const char * getConstructClassId ()
 
- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Static Public Member Functions inherited from agxStream::Serializable
static void setEnableUuidGeneration (bool flag)
 Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More...
 

Protected Member Functions

virtual ~CableDamage ()
 
virtual void onAddNotification (agxSDK::LinkedStructure *linkedStructure) override
 Called when this component is added to a linked structure. More...
 
virtual void onAddNotification (agxSDK::Simulation *simulation) override
 Called when addNotification is executed when this linked structure is added to the simulation. More...
 
virtual void onPostStep () override
 Called on simulation post step event - after user postStep. More...
 
virtual void onPreStep () override
 Called on simulation pre step event - after user preStep. More...
 
- Protected Member Functions inherited from agxSDK::LinkedStructureComponent
 LinkedStructureComponent (const agx::Name &name="")
 Default, protected constructor. More...
 
virtual ~LinkedStructureComponent ()
 Reference counted object - protected destructor. More...
 
virtual void onLastStep ()
 Called on simulation last step event - after user lastStep. More...
 
virtual void onPreCollideStep ()
 Called on simulation pre-collide step event - after user preCollide. More...
 
virtual void onRemoveNotification (agxSDK::Simulation *simulation)
 Called when removeNotification is executed when this linked structure is removed from the simulation. More...
 
virtual void onRemoveNotification (agxSDK::LinkedStructure *linkedStructure)
 Called when this component is removed from a linked structure. More...
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor. More...
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
- Protected Member Functions inherited from agxStream::Serializable
 Serializable ()
 Default constructor. More...
 
 Serializable (const Serializable &other)
 Copy constructor. More...
 
void generateUuid ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More...
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

The CableDamage class is used to estimate damage caused to a cable during a simulation.

Damage is estimated from a number of damage sources and weighted together to form a total.

The damage sources are categorized in two ways: dimension and cause. The dimension is one of the regular cable dimensions: bend, twist, or stretch. The cause is the state of the cable that is producing the damage and is either tension, deformation or deformation rate. There is also contacts, which are treated separately.

Given three dimensions; bend, twist, and stretch, and three sources; tension, deformation and deformation rate, we get a total of nine damage types, plus two contact types normal force and friction force. They are enumerated in agxCable::DamageTypes.

The damage model incorporates the notion of "safe deformations". These are deformation thresholds below which no damage is being produced due to deformation or deformation rate. Tension and contact damage still apply.

Damage is estimated per cable segment.

Definition at line 57 of file CableDamage.h.

Constructor & Destructor Documentation

◆ CableDamage()

agxCable::CableDamage::CableDamage ( )

Create a new CableDamage instance.

The CableDamage is activated when added to a Cable.

◆ ~CableDamage()

virtual agxCable::CableDamage::~CableDamage ( )
protectedvirtual

Member Function Documentation

◆ create() [1/2]

static agxStream::Serializable* agxCable::CableDamage::create ( )
inlinestatic

Definition at line 393 of file CableDamage.h.

◆ create() [2/2]

static agxStream::Serializable* agxCable::CableDamage::create ( agxStream::InputArchive &  )
inlinestatic

Definition at line 393 of file CableDamage.h.

◆ getAccumulatedDamageAt()

const agxCable::SegmentDamage& agxCable::CableDamage::getAccumulatedDamageAt ( size_t  index) const

Provides access to the accumulated damage estimation for a particular cable segment.

index must be less than the value returned by getNumDamages.

Parameters
index- The index of the SegmentDamage instance to access.
Returns
The SegmentDamage at the given index.

◆ getAccumulatedDamagePtrs()

agxCable::SegmentDamagePtrVector agxCable::CableDamage::getAccumulatedDamagePtrs ( ) const

◆ getAccumulatedDamages()

const agxCable::SegmentDamageVector& agxCable::CableDamage::getAccumulatedDamages ( ) const

Provides access to the per-segment damage estimates that has been accumulated over the simulation so far.

Returns
A collection of SegmentDamage instances holding the sum of all time step's damage contributions.

◆ getBendDeformationWeight()

agx::Real agxCable::CableDamage::getBendDeformationWeight ( ) const
See also
setBendDeformationWeight
Returns
The bend deformation weight.

◆ getBendRateWeight()

agx::Real agxCable::CableDamage::getBendRateWeight ( )
See also
setBendRateWeight
Returns
The bend rate weight.

◆ getBendTensionWeight()

agx::Real agxCable::CableDamage::getBendTensionWeight ( )
See also
setBendTensionWeight
Returns
The bend tension weight.

◆ getBendThreshold()

agx::Real agxCable::CableDamage::getBendThreshold ( )
See also
setBendRateThreshold
Returns
The bend deformation threshold

◆ getCable() [1/2]

agxCable::Cable* agxCable::CableDamage::getCable ( )

Get the cable that this CableDamage is estimating damage for.

Will return nullptr if this CableDamage hasn't been added to a cable yet.

Returns
The cable for which this CableDamage is estimating damage.

◆ getCable() [2/2]

const agxCable::Cable* agxCable::CableDamage::getCable ( ) const

Get the cable that this CableDamage is estimating damage for.

Will return nullptr if this CableDamage hasn't been added to a cable yet.

Returns
The cable for which this CableDamage is estimating damage.

◆ getCableDamage()

static agxCable::CableDamage* agxCable::CableDamage::getCableDamage ( agxCable::Cable *  cable)
static

Find the CableDamage instances that estimate damage for the given cable.

Parameters
cable- The cable for which a CableDamage instance should be found.
Returns
The CableDamage instance that is part of the given cable, or nullptr if there is no such CableDamage.

◆ getClassName()

const char* agxCable::CableDamage::getClassName ( ) const
inlineoverridevirtual
Returns
the class name of this class.

Reimplemented from agxStream::Serializable.

Definition at line 393 of file CableDamage.h.

◆ getConstructClassId()

static const char* agxCable::CableDamage::getConstructClassId ( )
inlinestatic

Definition at line 393 of file CableDamage.h.

◆ getCurrentDamageAt()

const agxCable::SegmentDamage& agxCable::CableDamage::getCurrentDamageAt ( size_t  index) const

Provides access to the last time step's damage contribution for a particular cable segment.

index must be less than the value returned by getNumDamages.

Parameters
index- The index of the SegmentDamage instance to access.
Returns
The SegmentDamage at the given index.

◆ getCurrentDamagePtrs()

agxCable::SegmentDamagePtrVector agxCable::CableDamage::getCurrentDamagePtrs ( ) const

◆ getCurrentDamages()

const agxCable::SegmentDamageVector& agxCable::CableDamage::getCurrentDamages ( ) const

Provides access to the per-segment damage estimate contributions that the last time step produced.

Returns
A collection of SegmentDamage instances holding the last time step's damage contributions.

◆ getFrictionForceWeight()

agx::Real agxCable::CableDamage::getFrictionForceWeight ( )
See also
setFrictionForceWeight
Returns
The friction force weight.

◆ getNormalForceWeight()

agx::Real agxCable::CableDamage::getNormalForceWeight ( )
See also
setNormalForceWeight
Returns
The normal force weight.

◆ getNumDamages()

size_t agxCable::CableDamage::getNumDamages ( ) const

May return zero until the cable for which damage is estimated has been fully initialized.

Returns
The number of segments for which damage is estimated.

◆ getStorageAgent()

agxStream::StorageAgent* agxCable::CableDamage::getStorageAgent ( ) const
inlineoverridevirtual
Returns
the storage agent

Implements agxStream::Serializable.

Definition at line 393 of file CableDamage.h.

◆ getStretchDeformationWeight()

agx::Real agxCable::CableDamage::getStretchDeformationWeight ( ) const
See also
setStretchDeformationWeight
Returns
The stretch deformation weight.

◆ getStretchRateWeight()

agx::Real agxCable::CableDamage::getStretchRateWeight ( )
See also
setStretchRateWeight
Returns
The stretch rate weight.

◆ getStretchTensionWeight()

agx::Real agxCable::CableDamage::getStretchTensionWeight ( )
See also
setStretchTensionWeight
Returns
The stretch tension weight.

◆ getStretchThreshold()

agx::Real agxCable::CableDamage::getStretchThreshold ( )
See also
setStretchrateThreshold
Returns
The stretch deformation threshold.

◆ getThreshold()

agx::Real agxCable::CableDamage::getThreshold ( agxCable::Direction  direction) const
See also
setThreshold
Parameters
direction- Direction to get deformation threshold for.
Returns
The deformation threshold for the given direction.

◆ getTwistDeformationWeight()

agx::Real agxCable::CableDamage::getTwistDeformationWeight ( ) const
See also
setTwistDeformationWeight
Returns
The twist deformation weight.

◆ getTwistRateWeight()

agx::Real agxCable::CableDamage::getTwistRateWeight ( )
See also
setTwistRateWeight
Returns
The twist rate weight.

◆ getTwistTensionWeight()

agx::Real agxCable::CableDamage::getTwistTensionWeight ( )
See also
setTwistTensionWeight
Returns
The twist tension weight.

◆ getTwistThreshold()

agx::Real agxCable::CableDamage::getTwistThreshold ( )
See also
setTwistRateThreshold
Returns
The twistdeformation threshold

◆ getWeight()

agx::Real agxCable::CableDamage::getWeight ( agxCable::DamageTypes::DamageType  type) const

Get the weight, or scaling, used for the given damage source when summing it with all the other damage sources to form a total damage estimate.

Parameters
type- The damage type to get the weight for.
Returns
The weight for the given damage type.

◆ onAddNotification() [1/2]

virtual void agxCable::CableDamage::onAddNotification ( agxSDK::LinkedStructure *  linkedStructure)
overrideprotectedvirtual

Called when this component is added to a linked structure.

Reimplemented from agxSDK::LinkedStructureComponent.

◆ onAddNotification() [2/2]

virtual void agxCable::CableDamage::onAddNotification ( agxSDK::Simulation *  simulation)
overrideprotectedvirtual

Called when addNotification is executed when this linked structure is added to the simulation.

Reimplemented from agxSDK::LinkedStructureComponent.

◆ onPostStep()

virtual void agxCable::CableDamage::onPostStep ( )
overrideprotectedvirtual

Called on simulation post step event - after user postStep.

Reimplemented from agxSDK::LinkedStructureComponent.

◆ onPreStep()

virtual void agxCable::CableDamage::onPreStep ( )
overrideprotectedvirtual

Called on simulation pre step event - after user preStep.

Reimplemented from agxSDK::LinkedStructureComponent.

◆ restore()

virtual void agxCable::CableDamage::restore ( agxStream::InputArchive &  in)
overridevirtual

Reimplemented from agxSDK::LinkedStructureComponent.

◆ setBendDeformationWeight()

void agxCable::CableDamage::setBendDeformationWeight ( agx::Real  weight)

Set the weight to use for damage caused by bend deformation.

Parameters
weight- The new weight for bend deformation damage estimation.

◆ setBendRateWeight()

void agxCable::CableDamage::setBendRateWeight ( agx::Real  weight)

Set the weight to use for damage caused by bend rate.

Bend rate is a measure of how fast the cable is being bent, measured as the change in curvature per unit time.

Parameters
weight- The new weight for bend rate damage estimation.

◆ setBendTensionWeight()

void agxCable::CableDamage::setBendTensionWeight ( agx::Real  weight)

Set the weight to use for damage caused by bend tension.

Parameters
weight- The new weight for bend tension damage estimation.

◆ setBendThreshold()

void agxCable::CableDamage::setBendThreshold ( agx::Real  threshold)

Set the bend deformation threshold that must be surpassed before the bend deformation begin to contribute to the damage estimation.

The threshold is measured in radians per unit length.

Parameters
threshold- The minimum bend deformation for bend damage to be applied.

◆ setFrictionForceWeight()

void agxCable::CableDamage::setFrictionForceWeight ( agx::Real  weight)

Set the weight to use for damage caused by friction forces from contacts.

Parameters
weight- The new weight for friction force damage estimation.

◆ setNormalForceWeight()

void agxCable::CableDamage::setNormalForceWeight ( agx::Real  weight)

Set the weight to use for damage caused by normal forces from contacts.

Parameters
weight- The new weight for normal force damage estimation.

◆ setStretchDeformationWeight()

void agxCable::CableDamage::setStretchDeformationWeight ( agx::Real  weight)

Set the weight to use for damage caused by stretch deformation.

Parameters
weight- The new weight for stretch deformation damage estimation.

◆ setStretchRateWeight()

void agxCable::CableDamage::setStretchRateWeight ( agx::Real  weight)

Set the weight to use for damage caused by stretch rate.

Stretch rate is a measure of how fast the cable is being stretched, measured in lengths per unit length per unit time.

Parameters
weight- The new weight for stretch rate damage estimation.

◆ setStretchTensionWeight()

void agxCable::CableDamage::setStretchTensionWeight ( agx::Real  weight)

Set the weight to use for damage caused by stretch tension.

Parameters
weight- The new weight for stretch tension damage estimation.

◆ setStretchThreshold()

void agxCable::CableDamage::setStretchThreshold ( agx::Real  threshold)

Set the stretch deformation threshold that must be surpassed before the stretch deformation begin to contribute to the damage estimation.

The threshold is given in length per unit length.

Parameters
threshold- The minimum stretch deformation for stretch damage to be applied.

◆ setThreshold()

void agxCable::CableDamage::setThreshold ( agxCable::Direction  direction,
agx::Real  threshold 
)

Set the deformation threshold for the given direction that must be surpassed before the deformation begin to contribute to the damage estimation.

The unit of the threshold depends on the direction. See setStretchThreshold, setBendThreshold, and setTwistThreshold.

Parameters
direction- The direction to set deformation threshold for.
threshold- The new deformation threshold.
See also
setStretchThreshold
setBendThreshold
setTwistThreshold

◆ setTwistDeformationWeight()

void agxCable::CableDamage::setTwistDeformationWeight ( agx::Real  weight)

Set the weight to use for damage caused by twist deformation.

Parameters
weight- The new weight for twist deformation damage estimation.

◆ setTwistRateWeight()

void agxCable::CableDamage::setTwistRateWeight ( agx::Real  weight)

Set the weight to use for damage caused by twist rate.

Twist rate is a measure of how fast the cable is being twisted, measured in radians per unit length per unit time.

Parameters
weight- The new weight for twist rate damage estimation.

◆ setTwistTensionWeight()

void agxCable::CableDamage::setTwistTensionWeight ( agx::Real  weight)

Set the weight to use for damage caused by twist tension.

Parameters
weight- The new weight for twist tension damage estimation.

◆ setTwistThreshold()

void agxCable::CableDamage::setTwistThreshold ( agx::Real  threshold)

Set the twist deformation threshold that must be surpassed before the twist deformation begin to contribute to the damage estimation.

The twist threshold is measured in radians per unit length.

Parameters
threshold- The minimum twist deformation for twist damage to be applied.

◆ setWeight()

void agxCable::CableDamage::setWeight ( agxCable::DamageTypes::DamageType  type,
agx::Real  weight 
)

Set the weight, or scaling, to use for the given damage source when summing it with all the other damage sources to form a total damage estimate.

Parameters
type- The damage type to set the weight for.
weight- The new weight.

◆ store()

virtual void agxCable::CableDamage::store ( agxStream::OutputArchive &  out) const
overridevirtual

Reimplemented from agxSDK::LinkedStructureComponent.


The documentation for this class was generated from the following file: