Main Article Content

Abstract

This paper presents a Numba-based solver for the 1D Heat Equation, seamlessly blending Python’s readability with Numba’s dynamic Just-In-Time (JIT) compilation. The explicit method exhibits a notable runtime reduction from 8.324 s to 4.035 s, while the implicit method sees a more pronounced improvement, decreasing from 9.970 s to 1.195 s. Statistical tests confirm the statistical significance of these efficiency gains. Future research directions include extending the solver to multidimensional heat equations, exploring advanced parallelization techniques, and implementing dynamic parameter optimization strategies. Collaboration with domain experts for real-world applications is also envisioned to validate the solver’s performance and impact. In summary, the symbiosis of Python and Numba in crafting an optimized 1D Heat Equation solver marks a pivotal advancement in efficient numerical solutions. This research holds promise for diverse scientific

Keywords

Computational Efficiency Finite Difference Methods Numerical PDE Solver Numba Optimization

Article Details

How to Cite
1.
Herho SHS, Kaban SN, Irawan DE, Kapid R. Efficient 1D Heat Equation Solver: Leveraging Numba in Python. EKSAKTA [Internet]. 2024Jun.30 [cited 2024Nov.21];25(02):126-37. Available from: https://eksakta.ppj.unp.ac.id/index.php/eksakta/article/view/487

References

  1. Ewing, R. E., & Wang, H. (2001). A summary of numerical methods for time-dependent advection-dominated partial differential equations. Journal of Computational and Applied Mathematics, 128(1-2), 423-445.
  2. Fernández, D. C. D. R., Hicken, J. E., & Zingg, D. W. (2014). Review of summation-by-parts operators with simultaneous approximation terms for the numerical solution of partial differential equations. Computers & Fluids, 95, 171-196.
  3. Sharma, H., Patil, M., & Woolsey, C. (2020). A review of structure-preserving numerical methods for engineering applications. Computer Methods in Applied Mechanics and Engineering, 366, 113067.
  4. Steinboeck, A., Wild, D., Kiefer, T., & Kugi, A. (2011). A fast simulation method for 1D heat conduction. Mathematics and Computers in Simulation, 82(3), 392-403.
  5. Filbet, F., Negulescu, C., & Yang, C. (2012). Numerical study of a nonlinear heat equation for plasma physics. International Journal of Computer Mathematics, 89(8), 1060-1082.
  6. Island, J. O., Molina-Mendoza, A. J., Barawi, M., Biele, R., Flores, E., Clamagirand, J. M., ... & Castellanos-Gomez, A. (2017). Electronics and optoelectronics of quasi-1D layered transition metal trichalcogenides. 2D Materials, 4(2), 022003.
  7. Barth, A., Newcombe, M., Plank, T., Gonnermann, H., Hajimirza, S., Soto, G. J., ... & Hauri, E. (2019). Magma decompression rate correlates with explosivity at basaltic volcanoes—Constraints from water diffusion in olivine. Journal of Volcanology and Geothermal Research, 387, 106664.
  8. Suárez-Carreño, F., & Rosales-Romero, L. (2021). Convergency and stability of explicit and implicit schemes in the simulation of the heat equation. Applied Sciences, 11(10), 4468.
  9. Lam, S. K., Pitrou, A., & Seibert, S. (2015). Numba: A llvm-based python jit compiler. In Proceedings of the Second Workshop on the LLVM Compiler Infrastructure in HPC (pp. 1-6).
  10. Perez, F., Granger, B. E., & Hunter, J. D. (2010). Python: an ecosystem for scientific computing. Computing in Science & Engineering, 13(2), 13-21.
  11. Kumar, R. (2015). Future for scientific computing using Python. International Journal of Engineering Technologies and Management Research, 2(1), 30-41.
  12. Morton, K. W. (1976). Finite difference and finite element methods. Computer Physics Communications, 12(1), 99-108.
  13. Courant, R., Friedrichs, K., & Lewy, H. (1928). Über die partiellen Differenzengleichungen der mathematischen Physik. Mathematische annalen, 100(1), 32-74.
  14. Moura, C. A. D., & Kubrusly, C. S. (2012). The Courant-Friedrichs-Lewy (CFL) condition: 80 years after its discovery. Birkhäuser Basel.
  15. Harris, C. R., Millman, K. J., Van Der Walt, S. J., Gommers, R., Virtanen, P., Cournapeau, D., ... & Oliphant, T. E. (2020). Array programming with NumPy. Nature, 585(7825), 357-362.
  16. Prinzen, S., Xuan, Y., & Roetzel, W. (1990). A simple measurement method of thermal diffusivity using temperature oscillations. Wärme-und Stoffübertragung, 25, 209-214.
  17. Czarnetzki, W., & Roetzel, W. (1995). Temperature oscillation techniques for simultaneous measurement of thermal diffusivity and conductivity. International Journal of Thermophysics, 16, 413-422.
  18. Pawlik, K., Kucharczyk, A., & Podpora, M. (2023). Method of determining thermal diffusivity on the basis of measurements of linear displacements. Measurement, 211, 112624.
  19. Lattner, C., & Adve, V. (2004). LLVM: A compilation framework for lifelong program analysis & transformation. In International symposium on code generation and optimization, 2004. CGO 2004. (pp. 75-86). IEEE.
  20. Hunter, J. D. (2007). Matplotlib: A 2D graphics environment. Computing in science & engineering, 9(03), 90-95.
  21. Herho, S., Kaban, S., Irawan, D., & Kapid, R. (2023). Efficient 1D Heat Equation Solver: Leveraging Numba in Python.
  22. Mann, H. B., & Whitney, D. R. (1947). On a test of whether one of two random variables is stochastically larger than the other. The annals of mathematical statistics, 50-60.
  23. Wilcoxon, F. (1947). Probability tables for individual comparisons by ranking methods. Biometrics, 3(3), 119-122.
  24. Fuentes-Pérez, J. F., Quaresma, A. L., Pinheiro, A., & Sanz-Ronda, F. J. (2022). OpenFOAM vs FLOW-3D: A comparative study of vertical slot fishway modelling. Ecological Engineering, 174, 106446.
  25. Gaur, S., Singh, R., Bandyopadhyay, A., & Singh, R. (2023). Diagnosis of GCM-RCM-driven rainfall patterns under changing climate through the robust selection of multi-model ensemble and sub-ensembles. Climatic Change, 176(2), 13.
  26. Newman, T., Borker, R., Aubiniere-Robb, L., Hendrickson, J., Choudhury, D., Halliday, I., ... & Morris, P. D. (2023). Rapid virtual fractional flow reserve using 3D computational fluid dynamics. European Heart Journal-Digital Health, 4(4), 283-290.
  27. Herho, S. H., Herho, K. E., & Susanto, R. D. (2023). Did hydroclimate conditions contribute to the political dynamics of Majapahit?: A preliminary analysis. Geographica Pannonica, 27(3), 199-210.
  28. Uchikawa, H., Kin, T., Koizumi, S., Sato, K., Uchida, T., Takeda, Y., ... & Saito, N. (2023). Aneurysmal Inflow Rate Coefficient Predicts Ultra-early Rebleeding in Ruptured Intracranial Aneurysms: Preliminary Report of a Computational Fluid Dynamics Study. Neurologia medico-chirurgica, 63(10), 450-456.
  29. Virtanen, P., Gommers, R., Oliphant, T. E., Haberland, M., Reddy, T., Cournapeau, D., ... & Van Mulbregt, P. (2020). SciPy 1.0: fundamental algorithms for scientific computing in Python. Nature methods, 17(3), 261-272.
  30. Waskom, M. L. (2021). Seaborn: statistical data visualization. Journal of Open Source Software, 6(60), 3021.