Attending this event?
Welcome to the Fourth Conference of Research Software Engineering, held at the University of Birmingham. For directions to and during the event, see the campus maps page.

In the Aston Webb Building near to the registration/reception desk, a cloakroom is available in room G30 along with a quiet room in G31.
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 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
4. Aston Webb, Room WG12 Aston Webb Building