Design and test of a heat pipe for geothermal applications