Abstract
DynPy is an open-source library implemented in Python (version 3.10.12) programming language which aims to provide a versatile set of functionalities for mechanical and electrical engineers. It enables the user to model, solve, simulate, and report analysis of dynamic systems with the use of a single environment. The DynPy library comes with a predefined collection of ready-to-use mechanical and electrical systems. A proprietary approach to creating new systems by combining independent elements defined as classes, such as masses, springs, dampers, resistors, capacitors, inductors, and more, allows for the quick creation of new, or the modification of existing systems. In the paper examples for obtaining analytical and numerical solutions of the systems described with ordinary differential equations were presented. The assessment of solver accuracy was conducted utilising a coupled electro-mechanical model of a direct current motor, with MATLAB/Simulink (R2022b) used as a reference tool. The model was solved in DynPy with the hybrid analytical–numerical method and fully analytically, while in MATLAB/Simulink strictly numerical simulations were run. The comparison of the results obtained from both tools not only proved the credibility of the developed library but also showed its superiority in specific conditions.
Published Version
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have