Overview
The F1 model is programmed in python [1], it uses the numpy [2] and scipy [3] modules to perform calculations and the matplotlib [4] library to produce the visual outputs. The model works by calculating the position, velocity and acceleration of the race car after each small time step. It does this by solving the relevant differential equation numerically using the scipy.integrate.odeint integrator.
​
The model splits up the programmed track design into three different states, the car can be: accelerating along a straight, braking along a straight or executing a corner at a constant speed. The model of the car used is shown in the forces diagram below. The engine power and braking force are modelled as constant. The aerodynamic forces used in this model are consistent with those discussed previously, they can be read about here.
The force from the the engine or braking changes as a function of velocity due to the increasing down force. The force output by either depends on whether the car is on the limit of slipping or the limit of the force. This is due to assuming the tyres do not slip.
​
​


Accelerating

Braking

Cornering

Stages of the model
Depending on the state of the car, the model numerically solves the relevant differential equation below:
​



In the accelerating and braking equations, m is the mass of the car, x represents displacement and the remaining parameters represent the constants discussed on the aerodynamics page. These differential equations are only true for the car accelerating in a single direction. These equations are derived by equating F=ma to the horizontal forces acting in each state. The model solves the equations assuming the car is travelling along the x-axis. Once it has completed its calculations, the position and velocity are adjusted so that it is continuous with in time, displacement and velocity from the previous corner.section.
​
Cornering is done using two dimensional spherical coordinates. A corner is modelled as an arc segment of a circle with a constant radius. In these equations, v is the constant linear speed of the car round the corner (derived here), R is the radius of the corner and theta is the angle the car has moved through.
​
Assumptions
-
The driver is assumed to be “perfect,” he knows the maximum speed the car is able to travel round each corner on the track and the exact distance he will need to brake.
-
There is no continuity in the changing of states, the car switches instantaneously between accelerating, braking and cornering. This is why the G-Force meter is seen to switch direction and magnitude instantaneously.
-
Cars travel around each corner of the track at a constant radius. This is unrealistic as drivers try to maximise the radius of the corner (starting wide, touching apex and exiting wide again) to maintain as much speed as possible.
-
The car goes round a corner at a constant speed. This is unrealistic due to cars accelerating out of corners in real life.
-
The car’s changing mass due to the burning of fuel is not simulated, it has been assumed constant for the duration of one lap of the circuit. Monza is approximately 6km long, F1 cars burn approximately 0.5kg per km giving a mass change per lap of 3kg. This is negligible compared to the mass of the car (~720kg).
-
The car is modelled as having a large single wing whereas in reality there is several different shaped and sized body parts of the car each producing downforce.
-
There is no degradation of the tyres. In real life tyres would lose grip as they degrade over the course of a race, this effect an be assumed negligible over one lap.
-
The temperature dependence of tyres is not modelled, the tyres are assumed to have a constant grip throughout the lap.
​
​