Nov 4 – 5, 2025
Virtual
Europe/Zurich timezone
Final timetable has been published! Registration will close this Friday!

Interfacing Fortran and Python for ODE Modeling: A Performance Study on Ethylene Dichloride Cracking

Nov 4, 2025, 6:30 PM
30m
ZOOM (Virtual)

ZOOM

Virtual

Presentations (25 + 5 minutes) Sessions

Speakers

Helianildes Silva Ferreira (Federal University of Bahia) Rodrigo Silva Ferreira (Posit PBC)

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.

Authors

Helianildes Silva Ferreira (Federal University of Bahia) Rodrigo Silva Ferreira (Posit PBC)

Presentation materials

There are no materials yet.