City in the Sky

Welcome to the personal homepage of Dr David AW Barton. Here you’ll find various posts on my scientific research, Julia programming, open-source software, and my faith in Jesus Christ.

You can find information about me in the links above and recent blog posts are below.

12 month postdoc opportunity in (nonlinear) differential equations

I’ve got a postdoctoral position open at the University of Bristol, UK: It’s a one year position that must finish at some point before end June 2023 (end of grant, now extended beyond the date given in the advert). In short I’m looking for someone with experience in (nonlinear) differential equations, ideally engineering background and some interest in uncertainty quantification. (And who programs in Julia, obviously 😀) The group is small but supportive and work at the interface between (engineering-focused) physical experiments and mathematical methods....


Stability of delay differential equations (DDEs) in Julia

My PhD was on the topic of delay differential equations (DDEs) and, at the time, I wrote lots of utilities to do things like calculate the stability of linearised equations. All that code has been lost to the mists of time but I still have call for it every now and again (e.g., for real-time dynamic substructuring where I need to model the delays in the control loop). Here is some code in Julia that calculates the stability of a DDE in the form...


Broad areas for potential projects

SciML and physics-based machine learning Scientific machine learning is a rapidly growing area that seeks to combine traditional physics-based models with machine learnt models. In traditional physics-based modelling, you rely on expert knowledge to build the complete model (perhaps with some limited parameter fitting to experimental data); the machine learning approach replaces that expert knowledge with large quantities of data (that’s an over simplification but broadly correct). A key question is how to find the sweet spot in the middle whereby you make use of your expert knowledge but also include model features that emerge from the data....


Collocation for finding periodic orbits of ODEs

Every now and again I’m asked how to compute the periodic orbits of ODEs using a boundary value solver. Each time, I go looking for old code that does this and, each time, I can’t find it and end up rewriting the collocation code from scratch. This time I thought I’d put my code here so that I have a better chance of finding it again in the future! The basic idea is to use a Fourier differentiation matrix to approximate the derivatives along the orbit and use a nonlinear solver to ensure that those derivatives match the vector field....


Working with broadcasting in Julia

Broadcasting in Julia is a way of writing vectorised code (think Matlab) that is performant and explicit. The benefits of performant code are obvious (faster!) but explicit vectorisation is also a significant benefit. When I first saw Matlab and how you could call the sin with a vector input, I was (slightly) blown away by the usefulness of this. It didn’t take too long for me to realise the limitations though; vectorising a complicated function can require quite a bit of code gymnastics, which doesn’t usually help the readability, particularly for those students who are relatively new to programming....



Over the past couple of years or so I’ve been getting into the Julia programming language; it’s been great to watch the language mature over time. Many people proclaim the virtues of its speed (it’s very fast for a dynamic language) but really I like its elegance - it’s a very well designed language that makes full use of multiple dispatch. (Multiple dispatch is something that I doubt most coders know much about but once you are used to it, it’s indispensable!...