MBDyn FreeCAD GUI -- 2019 Google Summer of Code final report
Overview of the Project:
MBDyn is a multibody dynamics solver which comes without any graphical pre-processor. MBDyn requires user to write the input file in its unique syntax. The objective of the project was to kick start the development of a module which will serve as an addon to FreeCAD. This addon will enable a user to model the assembly of bodies in the FreeCAD GUI and subsquently produce the "mbdyn input file". FreeCAD has a fully fledged Python API which can be used to model CAD assemblies in addition to the GUI.
This was my first time participating in GSoC and getting involved with an open source community. It gave me immense pleasure and learning opportunity working with MBDyn. My GSoC journey with MBDyn is detailed in the Project progress summary. My phase wise progress:
- In the first phase, I implemented a simple GUI to control MBDyn simulation. I also started writing the classes to hold data required for MBDyn simulation for different blocks of a typical MBDyn input file. Classes for initial values and control data were completed. Classes for integration methods, structural nodes, body elements and joints were also added. All the commits can be found in the link Commits to MBDynModel.py
- During the start of 2nd phase, a lot of focus was given on the joints section. Building of GUI to add mbdyn simulation features to the FreeCAD assembly also started. Classes for drivers, forces, drives, and the classes that would hold the nodes and elements were added. The core code of the GUI can be found in Commits to GUI
- In the third phase, the 'write method' that would return the mbdyn input syntax for the corresponding classes was implemented. Improvements to GUI were made as discussed in the issue. Things got a bit slow as my college resumed, although I kept working as much as I could afford. Next, I started developing the FreeCAD 'workbench' for MBDyn. This was partially completed before the final evaluations.
- Completion of the FreeCAD workbench to convert a FreeCAD assembly to MBDyn input file
- Completion of the classes of the 'control data' block in MBDynModel as well as the corresponding features in the GUI
- Creation of features to add elements like forces, etc
Building the FreeCAD addon was started from scratch and is quite ambitious. Although, the project is not there yet where it can be used by the end user, the base has been set and most of the challenges that are faced in the initial phase of a project have been met with. I will continue to contribute to this project even after the GSoC, and with help of more contributors, we will soon see the first complete mbdyn simulation through the FreeCAD interface.