ModiaSim / Modia3D.jl

Modeling and Simulation of 3D systems
MIT License
74 stars 8 forks source link
3d-mechanics collision-handling dynamics

Modia3D.jl

Stable The MIT License

Modia3D is a Julia package that adds a multibody program and 3D shapes for visualization and collision handling to the Modia Modeling Language. It is then, for example, possible to model the 3D mechanical part of a robot with Modia3D and the electrical motors and gearboxes that are driving the joints with the Modia language. Collision handling with elastic response calculation is performed for shapes that are defined with a contact material and have a convex geometry or are approximated by the convex hull of a concave geometry. For more details, see the Modia3D Tutorial.

Modia3D supports currently tree-structured multibody systems, but does not (yet) support kinematic loops.

Example videos:

Installation

Modia3D requires Julia 1.7 or later and is installed with

julia> ]add Modia3D

It is advised to also install Modia and at least one Modia plot package (for details see Installation of Modia).

Note, Modia3D reexports the following definitions

As a result, it is usually sufficient to have using Modia3D in a model to utilize the relevant functionalities of these packages.

Modia3D has various 3D animation features:

Faster Startup

In order to speed up startup, a sysimage can be generated by executing the following commands (may take several minutes):

julia
using Modia3D
include("$(Modia3D.path)/create_Modia3D_sysimage.jl")
exit()

This will generate a file Modia3D_sysimage.dll (on Windows) or Modia3D_sysimage.so (otherwise) in your current working directory that includes all packages of your current project and the following packages (these packages are added to your current project, if not yet included):

Start julia with this sysimage in the following way:

julia -JModia3D_sysimage.dll (on Windows)
julia -JModia3D_sysimage.so  (otherwise)

The benefit is that using Modia3D is nearly immediatedly executed (instead of > 30 seconds). The drawback is that create_Modia3D_sysimage.jl has to be newly executed, whenever new package versions are used in your environment.

Main Developers and License

Andrea Neumayr, Martin Otter and Gerhard Hippmann,\ DLR - Institute of System Dynamics and Control

License: MIT (expat)