A flower vase, in the form of a hexagonal prism, is to be filled with 512 cubic inches of water. Find the height of the water if the wet portion of the flower vase and its volume are numerically equal.