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

rdSprings Class Reference

A class which implements a set of static functions which model the stress-strain properties of a number of different types of springs. More...

#include <rdSprings.h>

List of all members.

Public Member Functions

 rdSprings ()
 Default constructor.

virtual ~rdSprings ()
 Destructor.


Static Public Member Functions

double Damp (double kv, double v)
 Compute a linear damping force based on a damping constant, kv, and a velocity, v.

double Linear (double kx, double dx)
 Compute a linear spring force based on a spring constant, k, and a deviation from the rest length, dx.

double Linear (double kx, double x0, double x)
 Compute a linear spring force based on a spring constant, k, a spring zero, x0, and a spring length, x.

double DampedLinear (double kv, double v, double kx, double x0, double x)
 Compute a linear damped spring force based on a damping constant, kv, a velocity, v, a spring stiffness, kx, a spring zero, xo, and a spring length, x.

double ZeroForDampedLinear (double kv, double v, double kx, double x, double f)
 Compute a spring zero to achieve a given force, f, given a damping constant, kv, a velocity, v, a spring stiffness, kx, and a spring position, x.

double DisplacementOfDampedLinear (double kv, double v, double kx, double f)
 Compute the spring length that will achieve a desired stiffness.

double Quadratic (double kx, double dx)
 Compute a quadratic spring force based on a spring constant, kx, and a deviation from the rest length, dx.

double Quadratic (double kx, double x0, double x)
 Compute a quadratic spring force based on a spring constant, kx, a spring zero, x0, and a spring length, x.

double DampedQuadratic (double kv, double v, double kx, double dx)
 Compute a quadratic damped spring force based on a damping constant, kv, a velocity, v, a spring stiffness, kx, and a deviation from rest length, dx.

double DampedQuadratic (double kv, double v, double kx, double x0, double x)
 Compute a quadratic damped spring force based on a damping constant, kv, a velocity, v, a spring stiffness, kx, a spring zero, x0, and a spring length, x.

double ExponentialBarrier (double v, double dx)
 Compute an exponential spring force based on the distance, dx, of a point from a plane and the velocity of the point v.

double ExponentialBarrier (double aG0, double aG1, double aG2, double aE0, double aE1, double aE2, double aKV, double aV, double aDX)
 Compute an exponential spring force based on the distance, dx, of a point from a plane and the velocity of the point v.

double ExponentialBarrierDX (double v, double dx)
 Compute the stiffness of the exponential barrier with respect to changes in x.

double ExponentialBarrierDX (double aG0, double aG1, double aG2, double aE0, double aE1, double aE2, double aKV, double aV, double aDX)
 Compute the stiffness of the exponential barrier with respect to changes in x.

double ExponentialBarrierDV (double v, double dx)
 Compute the stiffness of the exponential barrier with respect to changes in v.

double ExponentialBarrierDV (double aG0, double aG1, double aG2, double aE0, double aE1, double aE2, double aKV, double aV, double aDX)
 Compute the stiffness of the exponential barrier with respect to changes in v.

double oscillation (double delay, double t, double f)
 Return an oscilation amplitude as a function of time.


Detailed Description

A class which implements a set of static functions which model the stress-strain properties of a number of different types of springs.


Member Function Documentation

double rdSprings::Damp double  kv,
double  v
[static]
 

Compute a linear damping force based on a damping constant, kv, and a velocity, v.

The argument kv is assumed to be a non-negative constant.

double rdSprings::DampedLinear double  kv,
double  v,
double  kx,
double  x0,
double  x
[static]
 

Compute a linear damped spring force based on a damping constant, kv, a velocity, v, a spring stiffness, kx, a spring zero, xo, and a spring length, x.

The kv and kx are assumed to be non-negative constants.

double rdSprings::DampedQuadratic double  kv,
double  v,
double  kx,
double  x0,
double  x
[static]
 

Compute a quadratic damped spring force based on a damping constant, kv, a velocity, v, a spring stiffness, kx, a spring zero, x0, and a spring length, x.

The kv and kx are assumed to be non-negative constants.

double rdSprings::DampedQuadratic double  kv,
double  v,
double  kx,
double  dx
[static]
 

Compute a quadratic damped spring force based on a damping constant, kv, a velocity, v, a spring stiffness, kx, and a deviation from rest length, dx.

The kv and kx are assumed to be non-negative constants.

double rdSprings::DisplacementOfDampedLinear double  kv,
double  v,
double  kx,
double  f
[static]
 

Compute the spring length that will achieve a desired stiffness.

Parameters:
kv Damping constant (assumed non-negative).
v Velocity of the spring.
kx Stiffness (assumed non-negative).
f Desired force in the spring.

double rdSprings::ExponentialBarrier double  aG0,
double  aG1,
double  aG2,
double  aE0,
double  aE1,
double  aE2,
double  aKV,
double  aV,
double  aDX
[static]
 

Compute an exponential spring force based on the distance, dx, of a point from a plane and the velocity of the point v.

This spring type is often used to represent a firm floor or a wall.

dx is assumed to be a positive quantity. At large dx, the force is negligible. As dx approaches 0.0, the force increases exponentially. v is included so that a damping force can also be computed. The damping force allows numerical integrations to execute more efficiently. The sign of v should be positive if the point is moving away from the barrier (dx increasing), and negative if moving toward the barrier (dx decreasing).

double rdSprings::ExponentialBarrier double  v,
double  dx
[static]
 

Compute an exponential spring force based on the distance, dx, of a point from a plane and the velocity of the point v.

This spring type is often used to represent a firm floor or a wall.

dx is assumed to be a positive quantity. At large dx, the force is negligible. As dx approaches 0.0, the force increases exponentially. v is included so that a damping force can also be computed. The damping force allows numerical integrations to execute more efficiently. The sign of v should be positive if the point is moving away from the barrier (dx increasing), and negative if moving toward the barrier (dx decreasing).

double rdSprings::Linear double  kx,
double  x0,
double  x
[static]
 

Compute a linear spring force based on a spring constant, k, a spring zero, x0, and a spring length, x.

The argument k is assumed to be a non-negative constant.

double rdSprings::Linear double  kx,
double  dx
[static]
 

Compute a linear spring force based on a spring constant, k, and a deviation from the rest length, dx.

dx = x - x0, where x is the length of the spring and x0 is the rest length of the spring.

The argument k is assumed to be a non-negative constant.

double rdSprings::oscillation double  delay,
double  t,
double  f
[static]
 

Return an oscilation amplitude as a function of time.

The returned amplitued oscillates about 0.0 with an amplitude of 1.0 (i.e., between 0.5 and 1.5) with a frequency of f. If t is less than or equal to delay, 0.0 is returned.

double rdSprings::Quadratic double  kx,
double  x0,
double  x
[static]
 

Compute a quadratic spring force based on a spring constant, kx, a spring zero, x0, and a spring length, x.

The argument kx is assumed to be a non-negative constant.

double rdSprings::Quadratic double  kx,
double  dx
[static]
 

Compute a quadratic spring force based on a spring constant, kx, and a deviation from the rest length, dx.

dx = x - x0, where x is the length of the spring and x0 is the rest length of the spring.

The argument kx is assumed to be a non-negative constant.

double rdSprings::ZeroForDampedLinear double  kv,
double  v,
double  kx,
double  x,
double  f
[static]
 

Compute a spring zero to achieve a given force, f, given a damping constant, kv, a velocity, v, a spring stiffness, kx, and a spring position, x.

Parameters:
kv Damping constant (assumed non-negative).
v Velocity of the spring.
kx Stiffness (assumed non-negative).
x Position of the spring.
f Desired force in the spring.


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