Skip to content

This is a Julia implementation of Moreau's time-stepping algorithm. The implementation allows for unilateral (contact) and bilateral (holonomic) constraints as well as additional continuous dynamics (such as electrical motors for actuation).

License

Notifications You must be signed in to change notification settings

Symplectomorphism/TimeStepping.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

This is a Julia implementation of Moreau's time-stepping algorithm. The implementation allows for unilateral (contact) and bilateral (holonomic) constraints as well as additional continuous dynamics (such as electrical motors for actuation).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages