jass.contact
Class StickSlip0

java.lang.Object
  extended by jass.engine.Out
      extended by jass.contact.StickSlip0
All Implemented Interfaces:
Source

public class StickSlip0
extends Out

A force model based on stick slip model.

Author:
Kees van den Doel (kvdoel@cs.ubc.ca)

Field Summary
 
Fields inherited from class jass.engine.Out
buf, bufferSize, bufOld, lock
 
Constructor Summary
StickSlip0(float srate, int bufferSize)
          Construct force.
 
Method Summary
 void computeBuffer()
          Compute the next buffer.
 void reset()
          Reset state.
 void setNormalForce(float val)
          Set normal force magnitude.
 void setSpeed(float v)
          Set velocity.
 void setStickSlipParameters(float k_damp, float dummy, float mu_static, float mu_dynamic, float v_crit)
          Set stick-slip model parameters (all in S.I.
 
Methods inherited from class jass.engine.Out
clearBuffer, copyToOld, getBuffer, getBuffer, getBufferSize, getTime, peekAtBuffer, resetTime, setBufferSize, setTime, setTimeAndNotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StickSlip0

public StickSlip0(float srate,
                  int bufferSize)
Construct force.

Parameters:
srate - sampling rate in Hertz.
bufferSize - bufferSize of this Out.
Method Detail

setStickSlipParameters

public void setStickSlipParameters(float k_damp,
                                   float dummy,
                                   float mu_static,
                                   float mu_dynamic,
                                   float v_crit)
Set stick-slip model parameters (all in S.I. units).

Parameters:
k_damp - damping of spring system
dummy - not used
mu_static - static friction coeff
mu_dynamic - dynamic friction coeff
v_crit - critical velocity for transition from dyn. to static friction

setNormalForce

public void setNormalForce(float val)
Set normal force magnitude.

Parameters:
val - normal force in Newton

setSpeed

public void setSpeed(float v)
Set velocity.

Parameters:
v - velocity in m/s

reset

public void reset()
Reset state.


computeBuffer

public void computeBuffer()
Compute the next buffer. q(t+1) = (1-k_damp)q(t)+fn mu[(v - (q(t)-q(t-1)))] * sign(v - (q(t)-q(t-1))

Specified by:
computeBuffer in class Out