Drake

This class provides an analytical solution to a massdamperspring system. More...
#include <drake/multibody/benchmarks/mass_damper_spring/mass_damper_spring_analytical_solution.h>
Public Member Functions  
MassDamperSpringAnalyticalSolution (const T &mass, const T &b, const T &k)  
This constructs the aforementioned massdamperspring system. More...  
void  SetInitialValue (const T &x0, const T &xDt0) 
Sets the initial values of x and ẋ for this system. More...  
Vector3< T >  CalculateOutput (const T &t) const 
For this massdamperspring system, and with the given initial values, this method calculates the values of x, ẋ, ẍ at time t. More...  
T  get_x (const T &t) const 
Returns x (Nx measure of Q's position from No) at time t. More...  
T  get_xDt (const T &t) const 
Returns ẋ (Nx measure of Q's velocity in N) at time t. More...  
T  get_xDtDt (const T &t) const 
Returns ẍ (Nx measure of Q's acceleration in N) at time t. More...  
Does not allow copy, move, or assignment  
MassDamperSpringAnalyticalSolution (const MassDamperSpringAnalyticalSolution &)=delete  
MassDamperSpringAnalyticalSolution &  operator= (const MassDamperSpringAnalyticalSolution &)=delete 
MassDamperSpringAnalyticalSolution (MassDamperSpringAnalyticalSolution &&)=delete  
MassDamperSpringAnalyticalSolution &  operator= (MassDamperSpringAnalyticalSolution &&)=delete 
This class provides an analytical solution to a massdamperspring system.
The system consists of a particle Q of mass m that can only move left/right on flat Earth (frame N). Particle Q is connected by an ideal translational spring/damper. The other end of the spring/damper is welded to point No (the origin of frame N). Q's position from No is x*Nx where x(t) is a time dependent variable (tobecalculated) and Nx is a horizontal unit vector fixed in Earth (N). The spring force on Q is k*x*Nx, where k is a spring constant. The damper force on Q is b*ẋ*Nx where b is a damper constant and ẋ is the timederivative of x.
Instantiated templates for the following kinds of T's are provided and available to link against in the containing library:

delete 

delete 

inline 
This constructs the aforementioned massdamperspring system.
[in]  mass  Mass of system (particle Q). 
[in]  b  Linear damping constant. 
[in]  k  Linear spring constant. 
Vector3< T > CalculateOutput  (  const T &  t  )  const 
For this
massdamperspring system, and with the given initial values, this method calculates the values of x, ẋ, ẍ at time t.
[in]  t  The value of time at which output is requested. 

inline 
Returns x (Nx measure of Q's position from No) at time t.

inline 
Returns ẋ (Nx measure of Q's velocity in N) at time t.

inline 
Returns ẍ (Nx measure of Q's acceleration in N) at time t.

delete 

delete 

inline 
Sets the initial values of x and ẋ for this
system.
[in]  x0  Initial value of x (value of x at time t = 0). 
[in]  xDt0  Initial value of ẋ (value of ẋ at time t = 0). 