In my first go at modelling a ball falling through a hole through the middle of the Earth I assumed constant density, and hence the acceleration at any point was proportional to the distance from the centre. That is of course far from the truth, the Earth has large variations in density through its depth, so the first step in creating a more realistic model will be to estimate the actual variation in gravity with depth.
For the basic data I have used a table from a presentation produced by the Washington Centre:
I have used this data (assuming a constant density for each layer) to calculate the mass of the Earth in 50 km steps from the centre out. The acceleration due to gravity at any radius R from the centre is then given by:
a = Gm/R^2
where G is the gravitational constant and m is the mass of the sphere of radius R:
The spreadsheet shown above can be downloaded from Earth Density.xls. The result of this calculation is shown in the graph below. Note that the acceleration is far from linear with depth, and initially increases through the crust layer, then initially declines through the mantle, but increases again as the outer core is approached, reaching a maximum of 10.3 m/s^2 at the surface of the outer core, then reducing rapidly through the outer core, then faster still through the very dense inner core: