Reversible solid oxide cells in microgrids and peer-to-peer energy markets