Instantly share code, notes, and snippets.

# komuw/kenya_electricity_power.py

Last active September 8, 2024 09:09
Show Gist options
• Save komuw/b598f718fc6af155249261a9bc35d702 to your computer and use it in GitHub Desktop.
kenya electricity power back of envelope stats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 # These statistics, figures and projections are back of the envelope # see; https://en.wikipedia.org/wiki/Back-of-the-envelope_calculation. # Do not rely on them for serious matters. # But they should mostly be relatively accurate. import math # According to EPRA(Energy and Petroleum Regulatory Authority) # See: https://www.epra.go.ke/wp-content/uploads/2023/01/ABRIDGED-KPLC-TARIFF-2023.pdf peak_demand_for_electricity_in_year_2020 = 1880 # megawatt. This was in july 2020 peak_demand_for_electricity_in_year_2022 = 2150 # megawatt. December 2022 # Thus number_of_months_in_interval = 29 demand_growth_per_month = ( peak_demand_for_electricity_in_year_2022 - peak_demand_for_electricity_in_year_2020 ) / number_of_months_in_interval demand_growth_per_month = math.ceil(demand_growth_per_month) # growth in megawatt. Here we have made assumption that growth is linear and not compound, etc. assert demand_growth_per_month == 10 # MW # According to Kenya power # See; https://twitter.com/sammyjamar/status/1734137763937620149 available_capacity_in_year_2022 = 2235 # megawatt. December 2022 reserve_margin_in_2022 = ( (available_capacity_in_year_2022 - peak_demand_for_electricity_in_year_2022) / available_capacity_in_year_2022 ) * 100 reserve_margin_in_2022 = math.ceil(reserve_margin_in_2022) assert reserve_margin_in_2022 == 4 # percent. # Nuclear plant is expected to be commisioned in year 2035(the first phase). # See: https://www.theeastafrican.co.ke/tea/business/kenya-to-build-nuclear-power-plant-from-2027-4380566 # Let's make the assumption that all the 1000MW will be available in year 2035. nuclear_capacity_in_year_2035 = 1000 # MW available_capacity_in_year_2035 = available_capacity_in_year_2022 + nuclear_capacity_in_year_2035 assert available_capacity_in_year_2035 == 3235 # MW months_between_2022_to_2035 = (2035 - 2022) * 12 assert months_between_2022_to_2035 == 156 # months peak_demand_for_electricity_in_year_2035 = peak_demand_for_electricity_in_year_2022 + ( months_between_2022_to_2035 * demand_growth_per_month ) assert peak_demand_for_electricity_in_year_2035 == 3710 # MW reserve_margin_in_2035 = ( (available_capacity_in_year_2035 - peak_demand_for_electricity_in_year_2035) / available_capacity_in_year_2035 ) * 100 reserve_margin_in_2035 = math.ceil(reserve_margin_in_2035) assert reserve_margin_in_2035 == -14 # NEGATIVE. percent # The acceptable reserve margin is at least 15% # See; https://energyknowledgebase.com/topics/reserve-margin.asp # South Africa for instance had a negative(percent) reserve margin in march 2023 # https://mybroadband.co.za/news/energy/486595-economists-warn-risk-of-total-grid-collapse-is-higher-eskom-denies-it.html # So how much more megawatts do we need to bring on to the grid by 2035 to be within acceptable reserve margins? # ie, How big or How many new power plants do we need to bring up. # The equation is; # 15 = ((x- peak_demand_for_electricity_in_year_2035)/x) * 100 # Find x? target_reserve_margin_in_year_2035 = 15 # percent needed_capacity_in_year_2035 = (100 * peak_demand_for_electricity_in_year_2035) / ( 100 - target_reserve_margin_in_year_2035 ) needed_capacity_in_year_2035 = math.ceil(needed_capacity_in_year_2035) assert needed_capacity_in_year_2035 == 4365 # megawatt # Thus besides the nuclear plant's 1000MW, we will need an extra; extra_power_needed = ( needed_capacity_in_year_2035 - available_capacity_in_year_2022 - nuclear_capacity_in_year_2035 ) assert extra_power_needed == 1130 # MW

Some other electricity stuff;

1. intermittency of renewable energy sources: https://twitter.com/komu_wairagu/status/1726250498616123687