A laboratory model for solidification of Earth's core