Skip to content

Instantly share code, notes, and snippets.

@komuw
Last active February 24, 2025 08:19
Show Gist options
  • Save komuw/b598f718fc6af155249261a9bc35d702 to your computer and use it in GitHub Desktop.
Save komuw/b598f718fc6af155249261a9bc35d702 to your computer and use it in GitHub Desktop.
kenya electricity power back of envelope stats
# 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/sites/default/files/2024-10/EPRA%20Energy%20and%20Petroleum%20Statistics%20Report%20FY%202023-2024_2.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
@komuw
Copy link
Author

komuw commented Feb 24, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment