Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

rdSetPoint Class Reference

A class that supports a contact force with a moving set point or spring zero. More...

#include <rdSetPoint.h>

Inheritance diagram for rdSetPoint:

rdContactForce rdForce rdActuator rdObject rdLinearSetPoint rdPolynomialSetPoint List of all members.

Public Member Functions

 rdSetPoint (int aBodyA=0, int aBodyB=0, int aNYP=3)
 Default constructor.

 rdSetPoint (IDOM_Element *aElement, int aNYP=3)
 Construct an actuator from an XML node.

 rdSetPoint (const rdSetPoint &aContact)
 Copy constructor.

virtual ~rdSetPoint ()
 Destructor.

rdSetPoint & operator= (const rdSetPoint &aSetPoint)
 Assignment operator.

virtual void setPseudoStates (const double aYP[])
 Set the current values of the pseudostates.

virtual void getPseudoStates (double rYP[]) const
 Get the current values of the pseudostates.

void setTangentialStiffness (double aKTP)
 Set tangential stiffness.

double getTangentialStiffness () const
 Get tangential stiffness.

void setTangentialViscosity (double aKTV)
 Set tangential viscosity.

double getTangentialViscosity () const
 Get tangential viscosity.

void setFriction (double aMU)
 Set friction coefficient.

double getFriction () const
 Get friction coefficient.

virtual void updatePseudoStates ()
 Update the pseudostates.

virtual bool check () const
 Check that this force actuator has a valid set of states.

double computeTangentialForce (double aNormalForce, double rTangentForce[3], double rDFFric[3])
 Compute the tangential contact force exerted on BodyB expressed in the local frame of BodyA.

bool computeNewSetPoint (double aTangentForce, double rSetPoint[3]) const
 Compute the setpoint (PointA) so that it is consistent with the displacement of PointB amd the elastic properties of the tangential spring.

virtual void updateObject (bool aDeep=true)
 Update this object based on its XML node.

virtual void updateNode (bool aDeep=true)
 Update the XML node representing this object.

virtual void generateNode (IDOM_Element *aParent)
 Generate an XML node representing this object.

void updateData ()
 Update the member data of this object based on its XML node.


Static Public Attributes

const char PROP_TANGENTIAL_STIFFNESS [] = "tangential_stiffness"
const char PROP_TANGENTIAL_VISCOSITY [] = "tangential_viscosity"
const char PROP_FRICTION [] = "coefficient_of_friction"

Protected Attributes

double _mu
 Coefficient of friction.


Private Member Functions

void setNull ()
 Set the data members of this actuator to their null values.


Detailed Description

A class that supports a contact force with a moving set point or spring zero.

The set point moves on the body whose direction and surface normal are active.

Author:
Frank C. Anderson
Version:
1.0


Constructor & Destructor Documentation

rdSetPoint::rdSetPoint int  aBodyA = 0,
int  aBodyB = 0,
int  aNYP = 3
 

Default constructor.

rdSetPoint has three pseudo-states, which are the coordinates of contact PointA. Derived classes should be aware of this.

Parameters:
aBodyA Contact BodyA.
aBodyB Contact BodyB.
aNYP Number of pseudo-states (3, by default).

rdSetPoint::rdSetPoint IDOM_Element *  aElement,
int  aNYP = 3
 

Construct an actuator from an XML node.

rdSetPoint has three pseudo-states, which are the coordinates of contact PointA. Derived classes should be aware of this.

Parameters:
aElement XML node representing this setpoint object.
aNYP Number of pseudo-states (3, by default).

rdSetPoint::rdSetPoint const rdSetPoint &  aContact  ) 
 

Copy constructor.

Parameters:
aForce Force to be copied.


Member Function Documentation

bool rdSetPoint::computeNewSetPoint double  aTangentForce,
double  rSetPoint[3]
const
 

Compute the setpoint (PointA) so that it is consistent with the displacement of PointB amd the elastic properties of the tangential spring.

The viscous properties are not considered in this calculation.

Parameters:
aNormalForce Normal force.
rSetPoint Setpoint (PointA) in the local frame of BodyA.
Returns:
True if a new set point was computed, False otherwise.

double rdSetPoint::computeTangentialForce double  aNormalForce,
double  rTangentForce[3],
double  rDFFric[3]
 

Compute the tangential contact force exerted on BodyB expressed in the local frame of BodyA.

Note that because of damping, the tangential force vector does not necessarily lie along the line directed from PointA to PointB.

This method returns the correction made to the tangential force in order to maintain friction constraints.

NOTE that this method neither sets the tangential force or friction correction in base class rdForce (rdForce::_ftA and rdForce::_dfFric). It is left to derived classes to set these member variables.

This method does set the values of the elastic and viscous components of the tangent force. Corrections are not made to these quantities to enforce frictional constraints. Only the resultant tangential force has been changed to satisfy friction constraints.

Parameters:
aNormalForce Normal force currently exerted by the contact force. The tangential force is not allowed to exceed the coefficient of friction times the normal force.
rFT Total tangential force exerted on BodyA expressed in the local frame of BodyA.
rDFFric Change in the force exerted on BodyA to enforce friction constraints expressed in the local frame of BodyA (i.e., rDFFric = rTangentForce - TangentForce(uncorrected), where |rTangentForce| = mu * aNormalForce). If no correction is needed rDFFric = {0,0,0}.
Returns:
Magnitude of the tangential force.

void rdSetPoint::generateNode IDOM_Element *  aParent  )  [virtual]
 

Generate an XML node representing this object.

Parameters:
aParent Intended parent of the node to be generated. If aParent is NULL, the intent is for this object to serve as the root element of a new document.
See also:
rdObject::generateNode()

Reimplemented from rdContactForce.

Reimplemented in rdLinearSetPoint, and rdPolynomialSetPoint.

double rdSetPoint::getFriction  )  const
 

Get friction coefficient.

Returns:
Tangent viscosity.

virtual void rdSetPoint::getPseudoStates double  rYP[]  )  const [virtual]
 

Get the current values of the pseudostates.

Parameters:
rYP Array of pseudostate values.

Reimplemented from rdActuator.

double rdSetPoint::getTangentialStiffness  )  const
 

Get tangential stiffness.

Returns:
Tangential stiffness.

double rdSetPoint::getTangentialViscosity  )  const
 

Get tangential viscosity.

Returns:
Tangential viscosity.

rdSetPoint & rdSetPoint::operator= const rdSetPoint &  aSetPoint  ) 
 

Assignment operator.

Returns:
Reference to this object.

void rdSetPoint::setFriction double  aMU  ) 
 

Set friction coefficient.

Sliding occurs when the tangential force exceeds the product of the fricitonal coefficient and the normal force.

Parameters:
aMU Coefficient of Friction. Must be positive. If aMU is negative, the fricition coefficient is set to 0.0. A fricition coefficient greater than 1.0 corresponds to stiction.

virtual void rdSetPoint::setPseudoStates const double  aYP[]  )  [virtual]
 

Set the current values of the pseudostates.

Parameters:
aYP Array of pseudostate values.

Reimplemented from rdActuator.

void rdSetPoint::setTangentialStiffness double  aKTP  ) 
 

Set tangential stiffness.

Parameters:
aKTP Tangential stiffness- must be positive.

void rdSetPoint::setTangentialViscosity double  aKTV  ) 
 

Set tangential viscosity.

Parameters:
aKTV Tangential viscosity- must be positive.

void rdSetPoint::updateData  ) 
 

Update the member data of this object based on its XML node.

Member objects (children) are not updated.

Reimplemented from rdContactForce.

Reimplemented in rdLinearSetPoint, and rdPolynomialSetPoint.

void rdSetPoint::updateNode bool  aDeep = true  )  [virtual]
 

Update the XML node representing this object.

Parameters:
aDeep If true, update the XML node of this object AND the XML nodes of all class members that are rdObjects (child nodes); if false, update only the XML node of this object without updating the XML nodes of its children.

Reimplemented from rdContactForce.

Reimplemented in rdLinearSetPoint, and rdPolynomialSetPoint.

void rdSetPoint::updateObject bool  aDeep = true  )  [virtual]
 

Update this object based on its XML node.

Parameters:
aDeep If true, update this object and all its child objects (that is, member variables that are rdObject's); if false, update only the member variables that are not rdObject's.

Reimplemented from rdContactForce.

Reimplemented in rdLinearSetPoint, and rdPolynomialSetPoint.

void rdSetPoint::updatePseudoStates  )  [virtual]
 

Update the pseudostates.

Pseudostates are quantities that are not integrated but that depend on the time history of an integration (e.g., spring set points).

This method assumes that the model states are up-to-date (i.e., that model->set(t,x,y) or a similar method has been called).

rdSetPoint has three pseudostates that are the coordinates of the contact point on BodyA.

See also:
rdForce::setPointA()

Implements rdContactForce.


The documentation for this class was generated from the following files:
Generated on Wed Aug 20 02:17:12 2003 for Simulation Software by doxygen1.3