Mathematical Energy Storage Technology