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.Prerequisites
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.
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 buildTo 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_beamThen 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.