MBDyn sim suite

General installation instructions

The package has not yet been adapted for every distributions. Until now you need to follow those instructions for running MBDyn models from Python. This sections assumes that you have already downloaded an archive of the sources, else come back to the previous step.


The following packages need to be installed on your system:
  • Libtool, library used in the MBDyn source code.
  • GCC, supporting the C++ and Fortran languages. Note that another compiler could be used with SCons but it has not been tested.
  • SWIG, the Python bindings builder.
  • Python, the language interpreter.
  • SCons, the construction tool for the MBDyn shared library and Python bindings.
  • Numpy, for matrix manipulation in Python.
  • Matplotlib, optional, only for plotting results.
  • IPython, optional, used to interact with results after running a Python script.
To give an idea, the versions used during development are libtool 1.5.24, GCC 4.1.2, SWIG 1.3.31, Python 2.4.4, SCons 0.97, Numpy 1.0.3, Matplotlib 0.90.1 and IPython 0.6.15.
Some notes have also been set for some specific distributions.

Extracting the sources

Extract the sources from the archive got in the download part to the directory of your choice. Then open a terminal in the top directory containing the file 'setup.py'.

MBDyn service for Python

First the bindings to MBDyn need to be built, it will require to turn the MBDyn sources into a shared library.

Build and Install

To build the Python package, run: # python setup.py build

To install it to its standard location: # sudo python setup.py install

If you do not use sudo, it just means that you need to execute that command as administrator. You can also set a custom place thanks to the '--prefix' option but be sure to then udpate your 'PYTHONPATH'.

Tests and examples

You can as an example starts in the cantilever directory: # cd doc/example/cantilever_beam

Then try the 4 tests, but you will need Matplotlib to see the results as figures: # python test.py

You can also have a look at the current documentation to understand the package concept. A big user of py-mbdyn-sim-suite is certainly the wind-sim-suite project.
Documentation under Creative Commons - Attribution / Share Alike license.