Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hydrogen Techno-Economic Sizing Simulator (PV + Electrolyzer + optional Battery)

A techno-economic simulator to size an electrolyzer and an optional battery for a PV-powered green hydrogen system using hourly PV generation as input.
The tool explores many sizing combinations and ranks projects by technical and financial KPIs (e.g., NPV, IRR, Payback, capacity factor, self-consumption, and hydrogen selling price / LCOH-like metrics).

Main output: an Excel report that summarizes the best configurations (Top-N) and includes per-project cash flows, KPIs, and plots.

Provenance & data
This repository contains a public/sanitized version of work developed during a project/internship.
It does not include confidential information or proprietary datasets.


Table of contents


Key features

  • Hourly dispatch simulation (PV → electrolyzer / grid export / optional battery)
  • Sizing sweep across multiple candidate capacities:
    • electrolyzer rated power
    • battery energy/power (if enabled)
  • Electrolyzer minimum load constraint (fraction of rated power)
  • Battery model with:
    • SoC constraints (minimum SoC fraction)
    • round-trip efficiency
    • charging/discharging limits (if configured)
  • Hydrogen production computed from electrolyzer energy use and corrected with a part-load efficiency curve (polynomial vs load fraction)
  • Project finance model with CAPEX/OPEX, inflation/discount, taxes/VAT, and optional incentives/financing logic
  • Ranking engine (maximize or minimize an objective)
  • Optional equilibrium mode: find the H₂ selling price (or €/kg incentive) required to meet a profitability target (e.g., NPV ≥ 0) for Top-N projects
  • Excel reporting: general summary + per-project sheets + charts

How it works

1) Technical simulation (hourly dispatch)

For each candidate sizing (electrolyzer + optional battery), the tool simulates hour-by-hour energy allocation:

  • PV energy to electrolyzer
  • PV export to grid
  • optional battery charge/discharge (SoC, efficiency, limits)
  • electrolyzer minimum operating load constraint

Technical KPIs typically include:

  • annual hydrogen production (kg/y)
  • self-consumed electricity (kWh/y and %)
  • electricity exported to grid (kWh/y)
  • electrolyzer capacity factor (%)

2) Financial model (project economics)

For every simulated configuration, the tool builds a financial model including:

  • CAPEX breakdown (PV, electrolyzer, compressor, storage, optional battery, BOP)
  • OPEX (water, O&M, administrative/other)
  • inflation + discount rate
  • optional grants/incentives (if enabled)
  • debt structure and taxes/VAT logic (if enabled)

Financial KPIs typically include:

  • NPV
  • IRR
  • Payback

3) Ranking + optional equilibrium

All configurations are ranked by a chosen criterion:

  • objectives to maximize (e.g., NPV, IRR)
  • objectives to minimize (e.g., hydrogen selling price / cost metric)

Optional equilibrium mode estimates the minimum H₂ selling price (or €/kg incentive) required to satisfy a condition (e.g., NPV ≥ 0) for Top-N projects.

4) Excel reporting

The simulator generates an Excel report with:

  • General Summary sheet (Top-N projects)
  • per-project sheets with:
    • financial tables (cash flows / statements)
    • KPIs
    • time-series charts and energy-flow plots

Output filenames (depending on language setting):

  • Simulation_result.xlsx (English)
  • Risultati_simulazione.xlsx (Italian)

Quick start

Requirements

  • Python 3.9+ recommended
  • Typical dependencies: numpy, pandas, matplotlib, openpyxl, xlsxwriter

Install dependencies

pip install -r requirements.txt

Run

You can run the simulator via:

  • the provided notebook: NOTEBOOK.ipynb, or
  • directly from the script:
python SimulationH2.py

Inputs

1) Hourly PV profile (CSV)

Supported formats:

  • PVGIS-style files (reads the PV column and converts W → kW if needed)
  • custom hourly profiles (typically 8760 hourly values for a representative year)

Tip: store the PV CSV in data/ and reference it from INPUT.xlsx (or inside your notebook/script).

2) Configuration file (INPUT.xlsx)

INPUT.xlsx includes (typical) settings:

  • PV plant size
  • battery enable flag (YES/NO)

Technical constraints:

  • minimum electrolyzer load fraction
  • minimum battery SoC fraction
  • battery efficiency, limits

Sizing sweep resolution:

  • electrolyzer step (dP_el)
  • battery step (dP_bat)

Economic parameters:

  • CAPEX unit costs, OPEX assumptions
  • inflation, discount rate
  • financing/tax/VAT assumptions
  • H₂ selling price and/or incentives

Output controls:

  • ranking criterion (NPV, IRR, Payback, H₂ price, etc.)
  • Top-N projects to report
  • language (ENG/ITA)
  • optional plots between selected variables

Outputs

Generated Excel report (examples):

  • outputs/Simulation_result.xlsx (ENG)
  • outputs/Risultati_simulazione.xlsx (ITA)

The report includes:

  • Top-N summary (ranked)
  • per-project sheets with KPIs, detailed cash flows, and charts

Repository structure

Example structure:

.
├── SimulationH2.py            # main simulator (technical + financial + reporting)
├── INPUT.xlsx                 # configuration template (all parameters)
├── NOTEBOOK.ipynb             # minimal runner example
├── data/
│   └── your_hourly_PV.csv     # hourly PV production time series
└── outputs/
    └── Simulation_result.xlsx # generated report (example)

Bilingual deliverables (optional):
.
├── en/ (SimulationH2.py, INPUT.xlsx, NOTEBOOK.ipynb)
└── it/ (SimulationH2.py, INPUT.xlsx, NOTEBOOK.ipynb)

Notes & limitations

  • This is a sizing and feasibility tool: results depend strongly on input assumptions (costs, efficiency curves, financing, incentives, etc.).
  • Ensure your PV profile and units are consistent (W vs kW, timezone, leap year handling, etc.).
  • If you share results, consider documenting the scenario assumptions (CAPEX/OPEX, discount rate, incentives, electricity value/export).

License

This project is licensed under the MIT License — see the LICENSE file for details.

About

Hydrogen Techno-Economic Simulator: a lightweight tool to estimate CAPEX/OPEX and levelized cost of hydrogen (LCOH) for hydrogen production projects. Includes EN/IT notebooks for scenario analysis and sensitivity to electricity price, capacity factor, and electrolyzer performance.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages