OverviewΒΆ

PyMbs consists of three main components: input, processing / analysis and output (see figure Basic structure of PyMbs), whereas the processing and analysis layer can be considered to be the heart of PyMbs.

../_images/pymbs-structure.png

Basic structure of PyMbs

The input layer provides the user interface for the description of the mechanical system. The model description is completely text based. The script created by the user is translated into an abstract syntax suitable for the generation of equations of motion by the processing module. This intermediate step prepares PyMbs for other user interfaces, i.e. graphical modeling, as any kind of model description can be used as long as an appropriate translator is provided. The analysis module simplifies and reduces the set of equations generated by the processing module and passes them to the code generator. The code generator provides a set of writers for several target languages and creates the output files. Optionally, the graphical output module evaluates a function created by the python code generator to calculate the positions and orientations of the elements of the mechanical system. The system can be visualised in an interactive scenegraph.