Suppression of self-discharge in a non-flowing bromine battery via in situ generation of countercharged groups