RSEConUK 2019 has ended
The Fourth Conference of Research Software Engineering was held at the University of Birmingham.

Content from all sessions is licensed under a Creative Commons Attribution 2.0 UK: England & Wales License.
Back To Schedule
Tuesday, September 17 • 14:30 - 14:55
#2D3 - Revitalising Legacy Languages - Developing Fortran using Python and Literate Programming

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Xcompact3d is a high-performance CFD code for simulating turbulent flows. These flows require resolving a wide range of scales for which compact finite differences are well suited with so-called ‘quasi-spectral’ accuracy, combined with a compact stencil making them computationally efficient. As part of an EPCC-funded project to implement a free-surface solver in Xcompact3d, new differencing schemes capable of resolving the discontinuous changes in field variables without introducing spurious oscillations were required, to this end a fifth-order WENO scheme was implemented.

In this talk I will present the approach followed to implement the WENO scheme, rather than write it directly in the Xcompact3d source code, it was written as a ‘literate program’. This allows the description of the program and its implementation to be interleaved, easing review and understanding of the code. Furthermore by developing it externally it was trivial to develop it as a stand-alone module which could then be wrapped with f2py to quickly test the implementation – this all implemented within the same document. Once satisfied with the implementation, the exported Fortran code could then be integrated with the Xcompact3d code base with minimal changes.

avatar for Paul Bartholomew

Paul Bartholomew

Post-Doctoral Research Associate, Imperial College London

Tuesday September 17, 2019 14:30 - 14:55 BST
4. Aston Webb, Room WG12 Aston Webb Building