Skip to content

gokserpirik/energy-lcoe-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Feasibility Analysis: Wind vs. Solar in METU (2026)

Objective: Determine the LCOE viability of onshore wind compared to solar PV at a single real site in Ankara - METU Civil Engineering K1 building.

Method: Python-based discounted cash flow (DCF) model using real-market CAPEX data (2026 estimates), PVGIS-SARAH3 solar yield (fetched live via the PVGIS v5.3 API at runtime), and NASA POWER wind speed (fetched live via the NASA POWER climatology API, extrapolated to 100m hub height) — both queried at the same GPS coordinates (METU K1 Building, Çankaya, Ankara).

Key Finding: At a 10% discount rate with mid-range CAPEX (1,250 USD/kW for wind; 13,000 TRY/kWp for solar), Solar PV (~1.13 TRY/kWh) is significantly cheaper than Wind (~3.48 TRY/kWh) at the same METU site. Wind beats the 3.67 TRY/kWh grid price in 3 out of 9 combinations tested: at the lowest CAPEX (1,000 USD/kW) with both 10% and 15% discount rates, and at mid-CAPEX (1,250 USD/kW) with 10% only. Solar beats the grid price across all 9 CAPEX × discount rate combinations tested.

Conclusion: Solar is the robust choice at this site under any realistic financing scenario. Wind is competitive at low CAPEX and low-to-mid discount rates, but becomes more expensive than the grid at mid-to-high financing costs. Solar+Battery (~3.57 TRY/kWh at 10%) delivers dispatchable power cheaper than wind in all but the most favourable wind scenario.

LCOE Sensitivity Chart

What is LCOE?

LCOE tells you the minimum price at which electricity must be sold over a system's lifetime to break even. It accounts for upfront cost, financing, and total energy produced.

$$LCOE = \frac{\text{Total Life-Cycle Cost}}{\text{Total Lifetime Energy Production}}$$

Data and Assumptions

Electricity Prices (EPDK, effective April 5, 2025)

Subscriber Type Voltage Rate (TRY/kWh)
Residential (Mesken), under 8 kWh/day Low 2.33
Residential (Mesken), over 8 kWh/day Low 3.45
Industrial (Sanayi) Medium 3.67
Commercial/Public (Kamu ve Özel) Medium 4.60

The script uses 3.67 TRY/kWh (industrial, medium voltage) as the benchmark.

Solar Yield (PVGIS, Ankara)

Source: re.jrc.ec.europa.eu — Grid-Connected PV Performance tool, queried live at runtime via the PVGIS v5.3 PVcalc API (/api/v5_3/PVcalc).

The script calls the API on every run and reads the E_y field from outputs.totals (average annual energy for a 1 kWp system). If the request fails, it falls back to 1462.8 kWh/kWp/yr — the value originally obtained manually (see below).

Previous method (replaced): Annual yield was derived by downloading the monthly output CSV from the PVGIS web UI (PVdata_39.891_32.784_SA3_crystSi_1kWp_14_35deg_0deg.csv) and summing the 12 E_m values by hand. The API-fetched result (PVGIS-SARAH3, same parameters) agrees with that manually computed total.

Note: The CSV file is not included in this repository (excluded via .gitignore). If you need it, generate it directly from the PVGIS web UI using the parameters in the table above. The script no longer reads this file — it fetches yield data live from the PVGIS v5.3 API and falls back to the hardcoded value 1462.8 kWh/kWp/yr if the API is unreachable.

Parameter Value
Location 39.891°, 32.784° (METU Civil Engineering K1 Building, Üniversiteler Mah., Çankaya)
Database PVGIS-SARAH3
PV Technology Crystalline Silicon
Installed capacity 1 kWp
System loss 14%
Fixed slope 35 deg
Azimuth 0 deg (south-facing)
Yearly production 1462.8 kWh (PVGIS-SARAH3, live via API)
Average daily production 4.01 kWh/d
Average monthly irradiation 155.56 kWh/m²/mo

Loss breakdown: angle of incidence −2.75%, spectral effects +0.57%, temperature and low irradiance −6.84%, total loss −21.64%.

Month E_m (kWh) H(i)_m (kWh/m²)
Jan 70.9 82.7
Feb 87.7 104.6
Mar 116.2 141.6
Apr 131.3 165.1
May 140.5 182.3
Jun 143.9 190.6
Jul 165.7 222.9
Aug 163.7 220.7
Sep 147.7 193.9
Oct 122.5 154.7
Nov 100.3 122.2
Dec 72.2 85.5
Total 1462.8 1866.7

Solar Installation Cost

Source: powerenerji.com (2026 estimates)

Residential rooftop systems start around 90,000 TRY. Commercial and industrial projects can exceed 350,000 TRY depending on system size (kW), battery configuration, and equipment brand.

Solar O&M

Annual O&M is approximately 1.25% of CAPEX/year. Source: IRENA, Renewable Power Generation Costs 2023.


Wind Yield (NASA POWER, Ankara)

Source: power.larc.nasa.gov — NASA POWER climatology API, queried live at runtime via WS50M (mean annual wind speed at 50m, RE community).

The script calls the API on every run and:

  1. Reads WS50M.ANN (annual mean wind speed at 50m)
  2. Extrapolates to 100m hub height using the Hellmann wind shear power law: $v_{100} = v_{50} \times (100/50)^{0.143}$ (α = 0.143, 1/7 power law for neutral atmospheric conditions, onshore — Touma 1977; Peterson & Hennessey 1978; IEC 61400-1 specifies α = 0.2)
  3. Converts to capacity factor via an empirical quadratic: CF = 0.0106 × v² (capped at 0.55), calibrated to the GWA reference point below
  4. Returns CF × 8760 kWh/kW/yr

If the request fails, it falls back to 1839.6 kWh/kW/yr — the value originally derived manually from Global Wind Atlas (see below).

Previous method (replaced): Annual yield was read from Global Wind Atlas at the same coordinates — v = 4.45 m/s at 100m, power density 130 W/m², CF ≈ 21% (10% windiest areas data), giving 0.21 × 8760 = 1839.6 kWh/kW/yr. This manual value is retained as the API fallback and as the CF formula calibration point.

Parameter Value
Location 39.891°, 32.784° (METU K1 Building, Üniversiteler Mah., Çankaya — same as PVGIS solar coords)
Data source NASA POWER MERRA-2 reanalysis
Fetched parameter WS50M (mean annual wind speed at 50m)
Hub height extrapolation Hellmann α = 0.143 (1/7 power law, neutral atmospheric conditions — Touma 1977; Peterson & Hennessey 1978; IEC 61400-1 specifies 0.2)
CF formula 0.0106 × v² capped at 0.55
Estimated capacity factor ~23% (NASA POWER) vs ~21% (GWA fallback)
Annual yield ~2016 kWh/kW/yr (NASA POWER) vs 1839.6 (GWA fallback)

Note: NASA POWER uses global MERRA-2 reanalysis data, which tends to give slightly higher wind speeds than the terrain-corrected Global Wind Atlas for ridge/elevated sites. The ~2016 vs 1839.6 kWh/kW/yr spread (~10%) represents real model uncertainty at this location.

Wind Installation Cost

Source: dteknikmuhendislik.com (2026 estimates)

Scale CAPEX
Utility-scale (>1 MW) 1,000–1,500 USD/kW
Small-scale (1–2 kW) 38,000–60,000 TRY/kW (excl. battery & inverter)

The script uses the utility-scale USD range, converted via usd_to_try in the code, for a like-for-like comparison with solar.

Exchange rate: 44.07 TRY/USD — Source: investing.com, March 6, 2026.

Wind O&M

Source: marsenerji.com

Annual O&M is approximately 1% of CAPEX/year. Wind turbines (especially direct-drive, gearless designs) have very low service requirements and are designed for 20–25 years of operation in harsh conditions.

Lifetime assumption: The script uses 20 years as the standard wind turbine lifetime. Source: TWI Global — a well-maintained modern turbine typically lasts 20 years, extendable to 25 at higher maintenance cost. Solar uses 25 years (crystalline silicon industry standard).


Battery Storage (Solar + 4h BESS Hybrid)

Source: BloombergNEF, Progress Despite Fragmentation: The Energy Transition to 2030, January 6, 2026

Battery equipment (racks, modules, BMS) prices have fallen to $117/kWh — less than a third of what they were three years ago.

The model adds a 4-hour BESS sized at 1:1 kWh per kWp of solar (4 kWh per kWp), covering roughly one evening peak dispatch window per day. This models the cost of addressing the "unsunny" hours — night and low-irradiance periods when solar alone produces nothing.

Parameter Value
Battery equipment price $117/kWh (BNEF, Jan 2026)
Fully-installed CAPEX used $140/kWh (equipment + EPC/installation margin)
Storage duration 4 hours
Battery lifetime 15 years (one replacement within 25-yr solar project)
Battery O&M 0.5% of CAPEX/year
Replacement year Year 16 (discounted in DCF)

The calculate_solar_battery_lcoe() function adds battery CAPEX at project start and again at year 16, with annual O&M throughout. The denominator is the same solar energy production — battery adds no new energy, it only time-shifts existing output.


Requires Python ≥ 3.13.

pip install -r requirements.txt
python main.py

The script prints a sensitivity table to the terminal — LCOE (TRY/kWh) for Solar, Solar+Battery, and Wind across 3 CAPEX levels × 3 discount rates (10%, 15%, 20%), each compared against the 3.67 TRY/kWh grid benchmark. It also saves lcoe_sensitivity.png — a colour-coded grid of the same results — to the working directory.

Acknowledgment

This is a personal learning project, not a formal research paper. The methodology is grounded in real data and standard industry practice, but has not been peer-reviewed.

I used AI throughout this project. Early on I kept it at arm's length — using it mostly as a reference to check my reasoning, look things up, and tidy the README — so the learning stayed real.

As the project progressed I leaned on it more heavily to move faster: it helped write inline comments, shaped some of the code structure, and got more actively involved in decisions like how to model the battery replacement or structure the sensitivity analysis.

About

Wind vs. Solar LCOE feasibility analysis at a real Ankara site (METU K1) using live PVGIS & NASA POWER APIs, DCF modelling, and 2026 Turkish market data

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages