Category Archives: Media

Videos of my PhD, with OVITO

Philosophy…

Writing computer code for physics research is quite different to a lot of commercial software development (in a number of ways, which I might at some point write about in detail here).

For example, graphical output. In most consumer software, it’s usually pretty important to at least have a nice-looking graphical interface for the user. In special cases, e.g. games, the graphical (and aural) feedback is pretty much the whole point of the software, so it’s obviously important to get it right.

In scientific simulation, graphical feedback often doesn’t have quite the same status because it’s not normally the main output of the software. Instead, the main purpose of the code might be to produce huge data files which can then be analysed to measure various properties of the simulation’s ‘trajectory’, (e.g. temperature, pressure, structure) producing results broadly analogous to those taken in a real-life experiment. Whether or not the program looks good while it produces this trajectory is less important, and because speed and efficiency is usually such a key consideration in simulations, anything that might introduce an unnecessary overhead (e.g. graphics) is usually turned off.

However, in another way, graphics play an even more important role in scientific simulation — bug checking. In contrast to consumer software, where a bug might not matter as long as it has no observable effect or doesn’t crash the program, the value of scientific simulation code is completely tied up in knowing exactly what the code is doing. It’s no good thinking that a bug doesn’t matter as long as the results come out as expected, because the whole point is that you don’t know in advance what the results will be, and you’re interested in how they might differ from expectations. An interesting simulation result is no use at all if you’re not sure that the code, in microscopically fine detail, is doing what you say it is — the point of the simulation is to find out how large-scale effects emerge from known small-scale dynamics and if those small-scale dynamics are subject to errors and bugs, you probably won’t discover anything useful.

So, by visualising your simulation, you can check for bugs which might not be obvious during analysis. You can check that the individual particles or molecules or whatever are acting believably, as you programmed them to, and then be a lot more confident in any large-scale, emergent effects that you discover.

Also, more importantly, it looks cool.

OVITO

For a while I’ve been looking for an easy to use and powerful visualiser for atomistic simulations. I’ve used some not particularly fancy home-made code for this but wanted something more versatile that was still able to handle tens of thousands of particles.

So, OVITO which uses OpenGL rendering and is completely free and cross-platform, is perfect. I wrote some code that quickly converts my simulation’s data files (‘trajectories’) into a format readable by OVITO, loaded them in, and now I can spend all day making videos instead of doing real work. This program also easily allows special effects like color-coding particle properties, structure analysis, rotation/slicing of the simulation box etc., so it’ll be handy for preliminary analysis as well as making illustrative videos for seminars and so on.

An example

I recently posted about gas-liquid phase separation, specifically ‘spinodal decomposition’ in which the phase separation happens quickly throughout the whole system, rather than by nucleating at a specific site. A while ago I tried running something similar but in the presence of a template for crystal growth (i.e. a regular lattice at one end of the simulation box). This templated growth is another main focus of the project so we thought it might be interesting to combine the two ideas.

A video, produced with OVITO:

What seems to be happening for the parameters I’ve used is that the template causes a crystal to grow but, as was discussed in this paper, the crystal can’t locally coexist with the liquid, even though the liquid has a roughly similar density to the crystal. Instead, the crystal needs to coexist with the very-low-density gas phase, so it coats itself with a thick layer of gas which ‘shields’ the crystal from the liquid as it grows. It’s a ‘split interface’ (Crystal-Gas-Liquid) similar to those discussed here and may substantially slow down the growth of the crystal. Experimentally, this means that little crystallites form which effervesce, or bubble, as the gas bubble they keep trying to form around themselves floats away. It’s an inherently nonequilibrium effect because, at equilibrium, the gas-liquid separation disappears and you’re left with just two phases: a crystal and a very tenuous vapour. The effect of ‘metastable’ (nonequilibrium) phase transitions like the gas-liquid separation is a key focus of my work.

Advertisements

Research paper: Spinodal fractionation in a polydisperse square well fluid

EDITED: August 2012

The paper has been published in final form by Physical Review E — the final arXiv update is available here.

Here my first publication co-authored with Mike Evans. As well as being published in Physical Review E, it’s available on arXiv, which is freely accessible and contains copies of most of the papers published in recent years in a variety of physics and other fields. In fact, the conditions of my PhD funding explicitly require that my work has to be freely available — isn’t science good?

Most substances in soft matter (colloids, polymers, biological stuff and so on) are ‘polydisperse’ which, as explained here, means that all the constituent particles of a big container of the stuff are different in terms of e.g. their size or charge. This is in contrast to simple molecular fluids like water, in which every molecule of H2O is identical. Statistical mechanics and thermodynamics were originally designed for these simple fluids, so while they have been applied in soft matter with some success, traditional theories fail to capture some important and interesting phenomena in polydisperse materials.

For example, during phase separation, particles with different properties can end up being partitioned, or fractionated, into the different phases. In a simple example, a crystal growing from an initially disordered fluid of size-polydisperse particles might end up incorporating predominantly larger than average particles. This might not matter too much, but if you’re trying to create a precisely-characterised photonic crystal with a certain lattice parameter, it could matter quite a lot. Or, you might want the particles to fractionate between the phases, in order to then scoop out some of one phase and end up with a purer substance than you had before. In any case, it’s important to know how fractionation happens in polydisperse systems.

In the paper, we’ve simulated gas-liquid phase separation in a polydisperse fluid, and observed fractionation of particles between the two phases on a surprisingly short timescale. Even while the system is very quickly changing and coarsening its spinodal texture, particles of different sizes end up finding their way preferentially into one or the other phase. There’s also a striking dependence on a very trivial-seeming detail of the particle interaction, which ends up completely altering the observed ‘direction’ of the fractionation.

Fractionation has been measured in experiments, but the early stages of phase separation are very difficult to access because of how quickly the system is evolving. So, our simulations give a nice insight into how the final states observed in experiments are actually enacted through the course of the phase separation, and as far as we know constitute the first such measurements on a truly polydisperse model colloidal fluid. There are some nice pictures too.

A science picture

Click the photo for a high-res version

Here is a photo I recently took with my friend Tom. It’s a little tube containing a suspension of colloidal particles (described a bit more on my Science page). Colloids are small but not microscopically tiny, which means that when they form crystals, the typical distances between particles are larger than those found in molecular or atomic structures. In fact, the distances correspond roughly with the wavelength of visible light, so the crystals scatter incoming light of all different colours and, as shown in the picture, look great. Natural and synthetic opals also display this ‘opalescence’, because they are formed by the crystallisation of colloidal sand particles.

I got this little sample when I was on a conference in Corsica and I’m very fond of it, because the only colloidal suspensions I usually get to see are pretend ones in computer simulations. The motivation for having spent a morning with Tom pointing a camera at a tube is, hopefully, to provide a nice green-screen background for an interview I was involved in for the Physics Department’s website. In the interview I managed to talk for 15 minutes about why Leeds is a good place to do a PhD, while forgetting to once mention its music scene. Well done me.

Thanks very much to Tom West for his incredibly steady camera-hands, and patience.

Le Boy, electro house

I used to be in a very nice band called Neon Kicks. It featured Chloe Elliott on drums, Natalie Graham singing and Rob Peck playing bass, and I was playing quite an old but good keyboard on which, in a near-perfect reflection of our music, the pitch shift wheel eventually broke due to overuse.

Rob is also quite clever with computers and synths and DJing, and I’ve recently been listening to some of his work. There are some nice long mixes which I’ve found very good for doing work to, and in particular there’s a great tune called Any One which I think (think) might be a Philip Glass remix — only because Rob told me he was working on one and this seems like it might be it [edit: now I don’t think it is, and can’t remember whether Rob told me otherwise..].

It’s one of those things which, as well as being good to listen to, has obviously identifiable musical peculiarities which it’s nice to go on about to your friends. In this case, I love the extra 2 beats on the leading tone which break up the harmonic movement but are smoothed over rhythmically by thumping electro-crotchetz. I also love the way the whole thing is just 3 notes over gradually more exploratory and wandering chords. It’s great.

Jerusalem and Audio Hijack Pro

I’ve just finished an arrangement of Elgar/Parry’s lovely socialist hymn, ‘Jerusalem’. This somewhat confused adaptation was part of a last minute effort by Steve Wright and myself to provide patriotic material for one of the gigs on LUU Dance Band’s 2011 tour of France — the gig happened to fall on St George’s Day, so the enthusiastic and numerous ex-pat community of Bergerac had requested that Jerusalem and Land of Hope and Glory be played that night. We forgot about it until a week before the tour, during which Steve was very busy with other things, and fun ensued.

I hope soon to upload an export or recording of Steve’s wonderful jazz-waltz setting (yes) of the latter tune, but for now here is an export of Jerusalem using the Sibelius 7 Sounds library.

Due to a minor bug and the fact that it was made in Sibelius 6 originally (I think), the inbuilt export chopped off a few notes, so I used the terrifying and excellent Audio Hijack Pro, a great Mac application that is able to steal the audio from any program and record it to a file.

Mark Richardson and his excellent video

There were lots of good teachers at my old school. It seems to happen that we look back at teachers and various other figures who (generally speaking) tried to help us out when we were young, and realise that we didn’t appreciate them as much as we do now. That’s probably natural — it’s hard to realise you’re being offered a good deal until you’ve had the experience of being offered other ones, or not being offered them at all.

Despite that, there were a few teachers who, even at the time, we knew were something special. One of them was Mark Richardson, who is an English teacher at Beverley Grammar School, a state comprehensive near Hull. He had such a clear idea of what the point of studying English was that the question of its relevance or otherwise seemed barely to make sense. Literature wasn’t something that had to be mangled and picked at in order to connect to our lives. Instead, what we did in lessons was to talk about how the world was and what it was like to live in it; and it’s important to point out that children do that a lot anyway, possibly more than most people. Mark knew this and he knew that by its nature, literature is the most important and valuable guide there can be to that discussion.

There are a couple of links to share. The first is a video made by Mark about the recent history of the school through the eyes of its outgoing headmaster Chris Goodwin (who, from what I’ve seen of the documentary, merits a thousand blog posts of his own). The second is a resources blog for his lessons, which is excellent reading for everyone, perhaps especially people who no longer have, or have never had, the benefit of going to Mark’s lessons three times a week. Both have been doing the rounds on Facebook, circulated by the many people who saw the deal that Mark Richardson was offering them and knew it was special. Cheers.

Update — this video that I dug out from Mark’s blog (made by a friend of his working with kids from another school in Hull) is too good not to share: http://vimeo.com/15328356

My favourite podcast

I don’t listen to many podcasts at all, but there is one that I’m so obsessed with that I sometimes can’t sleep without listening to an episode. The Peacock and Gamble podcast is hosted by comedians Ray Peacock and Ed Gamble, it’s about nothing in particular, it sometimes has regular sections (if that’s possible), it’s edited down to half an hour and it’s released every week for free.

It’s probably best to start from somewhere near the first episode, and by the time you’ve listened to a few and made friends with Ray and Ed — which is very easy — it all makes sense. Unlike a lot of shows in this vein, it comes across as completely uncontrived. It’s just two naturally funny people who have great chemistry together, enjoying and exploiting the complete freedom the format gives them.

Peacock and Gamble’s main website is here, and the podcast’s available from Chortle or iTunes. They’re currently doing a live show at the Edinburgh fringe, which is called ‘Peacock and Gamble’s Emergency Broadcast’.