Skip to main content
Research

Bringing Open Source to Mechanical Engineering

Bosch Research Blog | Post by Johannes Mueller, Daniel Christopher Kreuter, 2023-05-11

Johannes Mueller and Daniel Christopher Kreuter with their team bringing open source to mechanical engineering

Software used for mechanical engineering tasks such as Finite Element Method (FEM) usually comes in large, closed, heavy and often breathtakingly expensive packages. In many cases, it does not allow you to perform workflows and calculation methods you invented yourself. In contrast, in computer science and machine learning software solutions are usually available as open-source software, free of charge and freely adaptable.

Can’t we do the same in mechanical engineering? Wouldn’t it be possible to have a community of people from academia and commercial companies collaborating to create and develop software solutions for mechanical engineering? Well, someone has to start. Why not us?

I often compare open source to science. To where science took this whole notion of developing ideas in the open and improving on other peoples’ ideas and making it into what science is today and the incredible advances that we have had. And I compare that to witchcraft and alchemy, where openness was something you didn’t do.

Linus Torvalds — initiator of Linux

Changes in the mechanical engineering profession

When thinking of a mechanical engineer in the old days, you’ll probably picture a middle-aged man in a white coat standing at a drawing board, with a pencil and a calculation bar in his pocket. Today, this has all changed. Instead of white coats or suits and ties, hoodies and t-shirts have become the norm. And an increasing number of women are working in the field.

Drawing boards and calculation bars have completely vanished from our profession. They have been replaced by CAD (computer-aided design) and CAE (computer-aided engineering) tools. As we are engineers and not programmers, these tools have a user interface like any other non-programming software. You open the program and start your work by choosing “File→Open”.

This has the major drawback that it is almost impossible to do things that were not foreseen by the software manufacturer. One of the first things I remember from the days when I joined Bosch back in 2008 is that our department was developing advanced calculation methods, but without software development expertise, we were hardly able to make our models usable for everyday engineering tasks. It was simply impossible to integrate them into commonly used tool chains.

pyLife, an open-source basis for new calculation methods

That had to change. So we decided to learn the skills needed to turn the calculation methods we were developing into software that is actually usable. As it turned out, other colleagues at Bosch were struggling with the same difficulties. In order to avoid duplicate work, we decided to put commonly used code into a library — pyLife was born. pyLife is a python package that implements commonly used functions to estimate the service life of components, hence the name. By now, our internal open-source community has led pyLife to grow into a package with modules for lifetime prediction and material fatigue on a component level. From rain flow counting, predicting failure probabilities and damages, to assessing the lifetime span of electric motors for powertrains.

We believe in the power of open source and all the benefits that come with it, like collaboration with colleagues inside and outside of Bosch. We therefore decided to publish pyLife as an open-source project. One of the partners we found after the release is VIKTOR, a platform that empowers engineers and domain experts to create and manage web apps using just basic Python skills. VIKTOR has started the development of user-friendly apps that any mechanical engineer can use and that provide examples of what is possible with pyLife.

pyLife logo
pyLife logo

The aim of pyLife is to make specialistic knowledge available to others through open-source software.

Johannes Mueller, Material Research engineer at Bosch

We would also like to see pyLife used in teaching, as these are algorithms students could actually use and try out during their education. Even more, if students are really interested, they could even go to the source code and dig further into it.

Technology innovation is starting to explode and having open-source material out there really helps this explosion. You get students and researchers involved and you get people coming through and building start ups based on open source products.

Tim Berners-Lee — inventor of the world wide web

That means that everyone is now invited to test, use and to improve pyLife (see details below). There are modules available, among others, on fatigue data analysis, stress tensor analysis and service life estimation. Furthermore, we seek to make data exchange with other CAE tools as smooth as possible.

pyLife components are already used successfully in several business units inside Bosch. Even more important from an open-source point of view, the list of contributors is growing. We have a very fruitful collaboration with Bosch software experts in Budapest, Hungary. Universities have also been contributing to pyLife as part of their final thesis. Now we are further looking forward to collaborate with other external partners, too.

Who benefits from pyLife?

Researchers

One group that can directly make use of pyLife are researchers like us who want to try out new calculation methods in service life estimation. pyLife serves as a basis and allows them to test and use their developed methods more easily in real-life conditions. It also allows them to discuss their work with colleagues from other institutes and companies and have it scrutinized and improved.

University teachers

For university teachers, pyLife is the perfect combination for teaching technical content and using state-of-the-art software development in the mechanical engineering domain. When they teach text book calculation methods at the blackboard, they can give their students an exercise to do actual calculations or implement variants using pyLife. More advanced students can implement calculation methods of their final thesis on pyLife and receive immediate feedback from the community.

Consulting engineers

Consulting engineers can use pyLife to perform calculations in a transparent way. They can even modify the algorithms according to the special needs of their customers.

Software manufacturers

Software manufacturers can build their software packages on pyLife or use parts of pyLife in their software. Maybe even more interesting is the option to design interfaces between their software and pyLife to give their customers the possibility to integrate their specialized software smoothly in a complex bespoke automated tool chain.

Standardization committees

Standardization committees which release calculation guidelines can contribute well-tested reference implementations of the guidelines in pyLife and thus encourage engineers and software manufacturers to adapt to the new guideline more quickly.

How to use pyLife and how to contribute to it

As most open-source projects, pyLife is hosted on GitHub in the Bosch Research organization. To read the documentation, you can check out the documentation page. Jupyter notebooks that demonstrate the capabilities of pyLife are available for testing purposes.

It will be interesting to see how the community develops and grows around this resource. Get in touch with us via our discussion page. Like every serious open-source project, we are welcome feedback and contributions.

Let’s drive open source for mechanical engineering forward together.

What are your thoughts on this topic?

Please feel free to share them via LinkedIn or to contact us directly.

Author: Johannes Mueller

Johannes is a Material Research Engineer with a great enthusiasm for programming, especially open-source software. His main tasks at Bosch are efficient and sustainable software implementations of material models, life time assessment calculations and AI methods in production that are developed at Bosch Research.

Johannes Mueller

Author: Daniel Christopher Kreuter

Daniel loves to code the social way. The research engineer enables code projects and software deployment in the field of reliability and durability.

With his scientific background in applied mechanics, he is working in the research of data driven methods for vibration signals.

Daniel Christopher Kreuter

Further Information

The following resources provide a more in-depth understanding of open source and its application for use cases of interest to Bosch.

Share this on: