Abstract
MPh is a library of Python that makes possible to link the Python computer language with COMSOL Multiphysics. The use of the MPh library opens the possibility to save the computer resources employed when simulating physical phenomena and solving mathematical models and equations. In the Python command interpreter is possible to change or adjust some settings and parameters from the models created in COMSOL, and to execute the COMSOL kernel to solve those models. In this study, we compare the performance of COMSOL Multiphysics and the MPh library of Python when computing the magnetic field generated by a distribution of currents and ferromagnetic material. The metrics employed to do the comparison and the methodology to measure them are described, as well as the computer equipment where the programs ran. The results show that the execution time of the computations are similar in both software, but in the rest of the metrics, the execution in Python surpassed the execution in COMSOL. We showed that the MPh library of Python demands less CPU and RAM usage when solving the mathematical models and the files containing the solutions use less storage memory. As a conclusion, we propose the use of the MPh library of Python to improve the performance of the computer in charge of carrying out the calculations.
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