Applied Sciences (Aug 2024)
Development of a Sustainable Universal Python Code for Accurate 2D Heat Transfer Conduction Simulations in Educational Environment
Abstract
Simulation software like ANSYS, COMSOL, and SimScale excel at modeling heat transfer phenomena, but their extensive functionalities necessitate a deep understanding, making them less suitable and too expensive for use in educational settings below the post-secondary level in Singapore, where the current curriculum does not demand such advanced capabilities. To provide a more accessible and cost-effective solution, this work introduces a novel universal Python code designed to simplify the understanding of 2D steady-state heat transfer on irregular shapes, utilizing only Microsoft Excel and Python. The developed code employs the Gauss–Seidel iteration method within a full multigrid framework, applying the relevant nodal finite-difference equations based on the node type within a 2D irregular shape delineated by a 65 × 65 mesh in Excel. The generated contour plots from these simulations are meticulously compared with those produced by ANSYS to validate accuracy. The comparison reveals that the results from the Python code closely align with those from ANSYS, showing only minor differences. Consequently, the Python code emerges as a viable and simplified alternative for conducting 2D steady-state heat transfer simulations, making it a valuable tool for educational purposes, bridging the gap between complex simulation software and the educational needs of students in Singapore.
Keywords