Inside the tank is a coil of pipe layers down gradient from the top to the bottom of the shell by heating water to flow into the top of the coil and out the bottom of the coil section of cold water will flow in the bottom of the shell, and flow out the top of the shell.