Experiments

Recently both computer simulations and laboratory experiments involving liquid sodium have been able to reproduce sustained magnetic fields as well as field reversals. The results are similar to what has been observed with Earth's field.

The VKS2 experiment

An experiment at Cadarache in France involves concentric copper cylinders filled with liquid sodium. The high conductivity and low density of sodium make it ideal for such an experiment. The apparatus was fitted with rotors that drive the motion of the fluid. The speed of the rotors can be controlled and the resultant magnetic field is measured. The experiment was able to produce randomly timed reversals of the magnetic field with patterns consistent with those observed on Earth. There was also observation of magnetic excursions.

Reference:
VKS collaboration web page
Their web page contains a number of papers as well as links to other dynamo experiments.

The Glatzmaier-Roberts simulation

The Glatzmaier-Roberts model "simulates convection and magnetic field generation in a fluid outer core surrounding a solid inner core with the dimensions, rotation rate, heat flow and (as much as possible) the material properties of the Earth's core." The fields produced by this simulation have a structure that matches what is seen on Earth. The simulation also underwent a magnetic field reversal. Computer simulations are useful because it is possible to inspect all of the detailed inner workings of the result.

Reference:
Geodynamo
It is worth checking out this page if only to see the pictures of the fields generated.