Simulating the geodynamo