Vykstorm / pylib3d-mec-ginac

Extension of the library lib3d-mec-ginac implemented in Python language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction

This package is an extension of the symbolical C++ library lib3d_mec_ginac for Python.

lib3d_mec_ginac provides all the features of a modern symbolic kernel (matrix algebra, expressions atomization, trigonometric simplifications, ...). It is designed specifically to pose and solve equations in dynamical mechanical multibody systems.

pylib3d_mec_ginac brings all the features of this library to a high level interpreted language with a clean and easy to use API and a graphical user interface to visualize mechanical simulations.

Installation

You will need python==3.7 and ubuntu OS ( 64-bit ). For the time being, only ubuntu 18.04 system was tested succesfully. Later versions of ubuntu and python may also work.

You can use this script to install this library and its dependencies in your system, or just run the next code in your bash console:

curl https://raw.githubusercontent.com/Vykstorm/pylib3d-mec-ginac/stable/install.sh | bash

Usage

This software can be used in different ways.

As a python module

Import all the functions & classes of this library inside the python interpreter and embed its features to your applications.

python
>>> from lib3d_mec_ginac import *
>>> ...

As a framework

Use the integrated graphical user interface where you can build and simulate mechanical systems within this library. The interface includes an interactive console to run arbitrary python code and a 3D viewer to display the mechanism.

The contextual menu provides options to change simulation parameters, open, edit and run python files, customize the interface, among other things.

Execute the next statement to start using it:

python -m lib3d_mec_ginac

framework

Try it online

Finally you can run a jupyter notebook and use this library. No installation needed, but features are limited ( 3D viewer is not avaliable ).

Try it now!

Documentation

Most of the classes and methods of the API are documented. You can use the command help inside the Python interpreter to get information about them e.g:

from lib3d_mec_ginac import System
help(System)

Also this page contains the reference of the API and a quick start tutorial.

Examples

This library provides a few usage examples under the directory examples/ Here we list a few of them

Four bar linkage

four-bar

Go to the directory where you downloaded this repository and run this example with:

python -m lib3d_mec_ginac examples/four_bar

Simple pendulum

simple-pendulum

Go to the directory where you downloaded this repository and run this example with:

python -m lib3d_mec_ginac example/simple_pendulum

License

This project is under GPLv2 license

About

Extension of the library lib3d-mec-ginac implemented in Python language.

License:GNU General Public License v2.0


Languages

Language:Python 65.7%Language:C++ 31.1%Language:HTML 2.0%Language:C 0.6%Language:Dockerfile 0.4%Language:Shell 0.1%Language:Objective-C 0.1%Language:Jupyter Notebook 0.0%Language:Batchfile 0.0%