# Sailing Flow Chart

At Cowes week this year one of my friends reassured a Fastnet Race competitor that sailing was essentially very easy, in fact you just point the boat where you want to go and pull the sails in until they stop flapping. This made me wonder if there was a very simple but functional algorithm for sailing that could be expressed as a small flowchart. It's slightly more complicated than my friend's description because it also covers the case where you can't pull the sails in enough to make them stop flapping whilst pointing the way you want to go:

I think this pretty much covers it, at least as far as white sails go. You end up either close hauled and constantly steering to the point where the sails flap, or reaching and constantly trimming to the point where the sails flap. I know that in practice it can be more complicated that this, but not much, this flowchart certainly captures the two essential modes of sailing. I also like the fact that there is no end point, no state which you can relax in, you're doomed to constantly trim, or steer, to the edge of flapping: I think that's pretty accurate!

# F1 vs. Academia, round 1: Sharing Information

For the last four years I have been simultaneously doing a PhD in biomedical engineering and consulting for Formula One teams, principally Ferrari. This has put me in a position to directly compare the academic and commercial ways of working. In this post I will discuss one particularly striking difference between F1 and academia: the speed of sharing information.

For the purposes of our comparison we can think of an F1 team as like a department at a university, and individual functions within an F1 team, such as aerodynamics, or engines, as like individual research groups within a university. This is a fairly good comparison, about the same numbers of people work in each and cutting edge research goes on in both. To get a measure of the speed at which information is shared between groups let's use a kind of echo-time – the time taken between having an idea and seeing that someone else has developed that idea. First, let's see what this time is in the F1 case:

1. An aerodynamicist has an idea (this does happen occasionally) for a new shape of front-wing endplate (for example), first she does some CFD to see if it works in theory; this will take maybe a couple of days.
2. If that works then the model makers will make a scale model of it which is put into the wind-tunnel and tested against the old endplates; depending on how good it looked in CFD, maybe a week or two.
3. If the wind tunnel agrees with CFD (which it never does) about how good the new shape is then some real endplates will get built; this normally takes a couple of weeks but in rare circumstances it has  been known to be rushed through in days, sometimes even making solid metal pieces when hopes are really inflated about a part.

Ferrari's Ruth Buscombe films a Mercedes practice pitstop in Abu Dhabi.

4. The endplates will be taken to the next race where they will be run in practice as test items, and then in the race if a driver likes them – at this point everyone in other teams can see them and the idea has, in effect, been published – F1 engineers are always examining each others cars for good ideas. From here it's a similar development time for other teams who covet the shiny new endplates to make there own ones, possibly a bit shorter because they have a greater conviction that they will be good than ideas they've come up with themselves.

The total echo-time, from the first aerodynamicist having the idea to seeing that another team has developed (copied) it, is between 6 and 10 weeks, assuming it's an idea worth developing! Now for the academic equivalent:

1. Post-doc researcher has an idea/discovers something, decides to write a paper about it; timescales vary enormously for paper writing, from three days to three years, let's be generous and say two weeks.
2. Paper is reviewed by supervisor and revisions are made; let's say another week, although it might take that long before the supervisor even reads it.
3. Paper is submitted to a journal where it is sent for peer review; this is where the time really starts stacking up, it could take absolutely ages, the mean is probably about three months.

Cartoon by Nick Kim, http://www.lab-initio.com/

4. Let's assume it's a really great paper with really lazy reviewers and no revisions are necessary (which would necessitate a repeat of steps 2 and 3), next step publication in the journal; depends on the frequency of publication, let's say another 3 months.
5. Now another researcher might see it, immediately have a fully fledged idea, and sit down to write her own paper in reply; repeat steps 1-4 for the minimum time until the original researcher sees that his idea has been developed.

This academic echo time is 27 weeks, and that would probably set a new record! It would be more realistic to make this estimate about 2.5 years. Even at 27 weeks it's between 3 and 4 times slower than the F1 equivalent – at 2.5 years it's between 13 and 21 times slower! The really baffling thing about this discrepancy is this: F1 teams do not want to share ideas with other teams, in fact efforts are actively made to prevent sharing information, whereas academia has constructed a whole publishing industry specifically to facilitate the sharing of ideas! So what's going on here, why is one so much faster than the other? Here are two candidate factors:

Validation: The F1 team can validate its ideas itself, in CFD, in the wind tunnel, and ultimately on track, whereas the academic has to send his ideas off to be scrutinised by some other academics who aren't paid enough to do it quickly. This is an obvious difference in terms of time that raises an equally obvious question: why are F1 teams able to validate their own ideas while academics are not? There are two issues here, practicality and motivation: practically it's easier to test a mechanical or aerodynamic idea (when you've got a wind tunnel and a car to play with) than it is to test a more abstract idea, especially in biomedicine where the true tests for many ideas would take years themselves or are simply not possible. So the best substitute is used instead of real testing, which is asking some other experienced people if they think it sounds sensible, given the evidence available. The second issue is motivation, we know that an F1 team wants to go faster, so it has no interest in putting parts on its car that don't work – if a part is raced on a car, we know that team really thinks it's good. Not only that but if that team wins we have proof that the parts on their car work. Conversely the academic has an incentive to publish papers, good papers are better than bad papers but a publication is, more often than not, better than no publications. Academics can't be trusted to validate their own work because it's not necessarily in their interest to find fault with it.

Competition: It sounds too obvious to be worth pointing out, but F1 is a competition – all the teams want exactly the same thing, and so have exactly the same problem. A good idea for one team is a good idea for all other teams too, and getting it on the car one race earlier will have real tangible benefits. Academia is not (supposed to be) a competition but rather a collaboration – research groups actively avoid overlapping domains with research groups at other institutions. Publishing a week earlier won't bring any real benefit, it's very unlikely that someone else is about to publish the same thing, there is not a fortnightly "best published idea" prize worth hundreds of thousands of pounds to the university.

I could go on about this all day, but this is already quite a long post so I'll wrap it up here and open up to discussion. Given the relative benefits to humanity of medical/scientific research vs. motor racing it's alarming to find that the useless and supposedly secretive one provides a much, much faster environment for sharing ideas than the hugely valuable and purportedly open one. If we want to eliminate diseases and make people healthier for longer then we have to bring academic information sharing up to speed.

# Race-Trace: Chinese GP

There is a great way to visualize a Grand Prix which most people have never seen, even though all the teams use it during and after the race: it's called the Race-Trace or Race-History-Chart, depending on which team you're at, and it's a plot of time ahead/behind against lap number. Fig. 1 shows the Race-Trace for the Chinese GP.

Fig. 1: Race-Trace for the 2014 Chinese GP

Each car/driver is represented by a line, the x-axis is number of laps completed, the y-axis is time ahead/behind an average laptime. So at the left-hand edge is the start, at the right is the chequered flag. The higher a line is, the further ahead that car is; so the winner is the line on top at the right hand side, in this case Hamilton. The sharp downward steps are where a car makes a pit stop and so loses about 23s relative to the cars around it. The time gap between two drivers on track is shown by the vertical distance between those two lines on the chart. Faster cars have steeper lines, slower cars have shallower, or even downward-sloping, lines.

So what can this Race-Trace tell us? Well, we can obviously see that Hamilton was out-front for the whole race thanks to his superior pace from the outset, pulling away from the field in the first 8 laps and then further extending his lead as other cars pitted. We can see that Alonso undercut Vettel by pitting one lap before him in the first round of pit-stops: when Alonso pitted on lap 11 he was behind Vettel, but because his first lap on new tires was quicker than Vettel's lap on older tires he was able to come out ahead of Vettel after Vettel had made his stop one lap later. Vettel is able to hang on to Alonso for only two laps before suffering a serious loss of pace. Compare Vettel's line in the second stint to those of Alonso, Rosberg, and Ricciardo, it's much flatter. You can see that Rosberg catches Vettel on lap 21 and is stuck behind him for a lap before getting past and pulling away rapidly.

We can also see where Ricciardo catches Vettel on lap 23 and gets stuck behind him for 3 laps. This is the point where Vettel was told to let Ricciardo past and replied with his "Tough luck." comment. A zoomed-in section of the Race-Trace shows this more clearly in Fig. 2.

Fig. 2: Detail of Vettel-Ricciardo incident.

The reason that RedBull must have issued that order is because they could see (maybe from watching the Race-Trace live) that Vettel was having a shocking second stint and that Ricciardo was going much faster and in a close fight with Alonso. Ricciardo did finally get past Vettel and went on to finish only 1.3s behind Alonso. What would have happened if Vettel had done what he was told? Would Ricciardo have been on the podium instead of Alonso? Christian Horner thought not, saying "Arguably he [Ricciardo] would have been a second further up the road", not enough to catch Alonso.

If we suppose that instead of holding up Ricciardo, Vettel had been ordered to let his teammate past before Ricciardo caught him (and he'd obeyed) then we can fill in those three laps with normal, unimpeded lap-times and see from the Race-Trace what would have happened. Fig. 3 shows a hypothetical trace for the case where Ricciardo wasn't impeded by Vettel (green line with purple dots):

Fig. 3: Hypothetical race if Ricciardo had not been help up.

As you can see, it looks like he would have caught Alonso. Whether or not he'd have got past him in the last few laps is questionable, but it would have been exciting to watch! It certainly wouldn't have done Vettel any harm to do what he was told, and it could have got his teammate a podium finish.

# The (not-so) Exponential Growth of Knowledge

A couple of weeks ago I enjoyed a dinner in London with other alumni of University College Oxford. In speaking about the state of the college, the Master of Univ said that it was a constant struggle to decide what to include in undergraduate courses because,

"...our knowledge increases exponentially."

I know the Master was speaking figuratively, but being an engineer I started to wonder if knowledge actually does increase exponentially, and what conditions would be necessary to make this happen?

Where to start? Well, let's start with Einstein, or rather one of Einstein's collaborators, John Archibald Wheeler. In 1992 he said,

"We live on an island surrounded by a sea of ignorance. As our island of knowledge grows, so does the shore of our ignorance"

How fast does this island of knowledge grow? Let's start by making some assumptions about Wheeler's universe, namely:

1. We expand the island by reclaiming 'knowledge land' from 'ignorance sea'.
2. We always have enough resources on the island to reclaim land, but...
3. We don't have any boats, so we have to stand on the island to do the island expansion work.

All of these assumptions add up to the realization that the rate of expansion of the island is proportional to the length of the shoreline. So if our island is round, or roughly round, and the area of the island corresponds to the amount of knowledge, K, then it will have a shoreline length, s, equal to the circumference of the circle. So we can write:

John Archibald Wheeler's Island of Knowledge surrounded by the Sea of Ignorance.

With an ignorance-reclaiming-speed of A m/s. This doesn't give us the exponential rate that the Master spoke of, it's merely quadratic:

$K(t) = A^2\pi t^2$.

Perhaps if the island were a more convenient shape we could achieve exponential growth? In fact a circle is the worst possible shape for the island because it has the lowest ratio of shoreline to area of any 2D shape. The best possible shape would be long and thin, infinitely thin in fact, then area and shoreline would be proportional, and so our island would grow exponentially, wouldn't it? Well, no, it wouldn't, at least not for very long. In order to maintain exponential growth the island must stay infinitely thin and so it can only grow at its ends, but this isn't really the land reclaim model we started off with. You can hardly say that shoreline length is the limiting factor in the growth of an island if you insist on reclaiming land only at the infinitely thin ends of the island! In fact we find an interesting result that if we grow uniformly from each part of the shoreline then no matter what clever shape we start off with we'll always end up with a circular island! Even if we start with exponential growth of the island (perhaps from some clever fractal geometry), we will soon settle to the growth rate given above, which increases with time, but is nonetheless far from exponential.

In fact there may be a paradox even in the Master's statement of the problem: if knowledge grows exponentially, then the growth rate must be proportional to the amount of knowledge. Growth in knowledge requires research, and researchers, but the Master's statement was itself concerned with the fact that each year we must select a smaller fraction of our ever growing knowledge to teach to the next generation of researchers. If this fraction is decreasing, then it looks like we're on a circular island of knowledge - it will grow ever faster, but at the same time, ever slower than exponential growth.

# F1 Fuel Saving in 2014

F1 this year is going to be very different from any previous season. The technical regulations open the doors to turbos connected to electric motors, 120kW KERS motors, 4MJ batteries, and wastegates. The ways in which the 2014 power unit can be used are myriad and it will be very difficult for the TV commentary teams to understand the implications themselves, let alone explain them to viewers! However, there are some things we can work from very basic information available online.

Aside from all of the turbo, MGU-H, battery stuff that makes it more complicated for us to understand, there are two parts of the 2014 rules which are very straightforward, from the technical regulations:

5.1.4 Fuel mass flow must not exceed 100kg/h.

And from the sporting regulations:

29.5 No car is permitted to consume more than 100kg of fuel, from the time at which the signal to start the race is given to the time each car crosses the Line after the end-of-race...

First off, let's observe that if fuel flow is limited to 100kg/h, then we know the fuel flow of every car at full throttle (100kg/h!). Let's take an extreme example and look at Monza, the high speed circuit of F1. The race in 2012 was won by Lewis Hamilton in a total time of  1:19:41.22. Monza is 53laps, so that's an average laptime of 90.21s. Depending on which website you get your F1 stats from, a lap of Monza is about 75% full throttle. The remaining 25% is divided into braking (at zero throttle) and accelerating from zero to full throttle. If we say that the split between braking and part throttle acceleration is even, and that the average throttle in the part throttle regions is 50%, then we can approximately represent all the time that's not full throttle by saying that a quarter of that time is full throttle, and three quarters of it is zero throttle. Adding this throttle usage to the 75% full throttle portion we get to 81.3% of the lap at full throttle as an approximation including the part throttle regions. Now, we should translate the FIA's fuel rate into a proper unit:

100kg/h / 3600s/h = 0.0278kg/s

If we multiply our three numbers so far together, we should get fuel use per lap:

90.21s/lap x 81.3% x 0.0278kg/s = 2.039kg/lap

Which is 2.039kg/lap x 53laps/race = 108.06kg/race. Which was fine in 2012, but it's over budget for 2014 by a little over 8kg! So, clearly you can't just smash round the track at full throttle like you did in the good old bad old use-as-much-fuel-as-you-like days. The question is, what's the best way of saving fuel without losing time? As any well informed motorsport fan knows, the most laptime-efficient way to say fuel is to completely lift off the throttle at the end of each straight and coast for a bit before hitting the brakes for the next corner, called 'lift-off', or 'lift and coast'. The reason is that saving fuel at the start of a straight means that you accelerate less and therefore go slower for the whole straight, whereas lifting at the end of the straight doesn't make you slower further down the track because you were about to brake anyway. How much lift-off are we talking about here? Well, if we lift-off at the ends of the straights then we're swapping time spent at full  fuel-flow for time spent at zero fuel-flow, so we save 0.0278kg/s during lift-off. To save our 8.06kg per race we need:

8.06kg / 0.0278kg/s = 289.9s/race

289.9s/race / 53laps/race = 5.47s/lap of lift-off!

No, your eyes do not deceive you (I encourage you to check my maths): this season, at Monza, drivers could have to lift-off the throttle at the ends of straights for an average of nearly 5 1/2 seconds per lap! If we distribute this time mainly over the four longer 'straights' (the Curva Grande is effectively a straight) and a little on the two shorter sections leading into each Lesmo then we might get something like this for an average lift-off schedule:

1.24s on the main straight into the first chicane
1.02s after Curva Grande into the second chicane
0.54s before the first Lesmo
0.54s before the second Lesmo
1.02s into Ascari
1.02s into Parabolica

As you can see, it's not exactly going to be the traditional 'last of the late brakers' scenario into the first chicane, or into any of the corners for that matter. Even if we're overestimating the amount of lift-off by a factor of two, we're still talking about half a second at the end of each long straight.

Of course drivers and teams might decide that lifting-off at the end of the main straight is too costly in strategic terms because it's a prime spot to overtake, or be overtaken. In which case they may not lift there, but they will then have to lift even more elsewhere to save the extra fuel.

There will be races where fuel saving is not an issue, Monaco for example is so slow that it's likely that no fuel saving will be necessary. Monza is an extreme example of a high-speed track where the fuel limit will have a big effect. The other factor that would eliminate the need for fuel saving is the safety car. F1 cars use (relatively) so little fuel when behind the safety car that as few as 4 laps behind a safety car could save enough fuel to complete the race without lifting-off any more.

I can't wait to see how this season plays out, and what strategic effects these radical fuel saving regulations will have.