Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 1.57 KB

README.md

File metadata and controls

34 lines (24 loc) · 1.57 KB

TimeStepping

Coverage

Basic Usage

  1. Define the gap function with the signature

gap(q::AbstractArray, u::AbstractArray)
return gap, force_matrix

  1. Define the dynamics function with the signature

dynamics(q::AbstractArray, u::VecAbstractArraytor)
return M, h

  1. If there are bilateral constraints, define the holonomic constraint functions and their derivatives (Jacobian and Jacobian_dot).

loop(q::AbstractArray), jac(q::AbstractArray), jacdot(q::AbstractArray, u::AbstractArray)
return ϕ, J, Jdot

  1. If there are electrical components these can be modeled using the extradynamics function (see the magnetic levitation example and the associated description file ).

extradynamics(extra_state::AbstractArray, q::AbstractArray, u::AbstractArray)\

  1. Initialize the system by providing the gap and dynamics functions, and the initial conditions (for holonomic constraints, provide them, too).

bouncing_ball = Integrator(gap, dynamics, qA, uA; Δt=1e-3)
sc_ball = Integrator(gap, dynamics, loop, jac, jacdot, q0, u0; Δt=1e-3)
maglev = Integrator(gap, dynamics, q0, u0, extra_state0); Δt=1e-3)

  1. Integrate the system until final_time

integrate(bouncing_ball, final_time)

Examples

Examples are provided within the examples folder.

Image Image