Speakers
Description
This presentation explores the integration of Fortran and Python in solving a system of ordinary differential equations (ODEs) modeling the thermal cracking of Ethylene Dichloride (EDC), a process relevant to vinyl chloride production. The reaction system consists of two consecutive first-order reactions and is solved using the Runge-Kutta-Gill method.
The Fortran implementation is compiled and exposed to Python using f2py, enabling interoperability with Python’s visualization and benchmarking ecosystem. A pure Python implementation using the same numerical method is developed for comparison. Performance benchmarks reveal that the Fortran-based solver achieves speedups of up to ~700× compared to the Python implementation, particularly at higher step counts.
This study demonstrates the complementary strengths of Fortran and Python: Fortran’s numerical efficiency and Python’s ease of prototyping and analysis. All source code, including Fortran modules, Python wrappers, and benchmarking scripts, is made available as part of an open-source repository. The results underscore the value of mixed-language workflows for modern scientific computing, especially in domains requiring both high performance and rapid experimentation.