Flow batteries and liquid metal batteries