Skip to content

iame-uni-bonn/final-project-skhalid531

Repository files navigation

Title : Optimal Mix of Dispatchable Net-Zero Generation Technologies in Germany

Research Question

What is the optimal mix of dispatchable net-zero generation technologies in Germany? This involves replacing traditional coal and natural gas plants with the following net-zero technologies:

  • Gas-fired plants with Carbon Capture and Storage (CCS)
  • Hydrogen-fired plants

Motivation

The transition to a net-zero electricity system requires not only the deployment of renewable technologies like solar and wind but also reliable dispatchable generation to maintain grid stability. This project focuses on identifying the most effective dispatchable technologies to support this transition in Germany.


Project Flow

Project Flow Diagram

Methodology

Data Loading (data_loader.py):

  1. Loaded and cleaned data from CSV files. Used Pandas for efficient data manipulation. Best Practice: Modular code with proper use of .gitignore to untrack large data files. Model Definition (model.py):

  2. Defined optimization model using PuLP (linear programming). Structured decision variables, constraints, and objective function. Best Practice: Clear naming conventions and modular model setup for future flexibility. Optimization Execution (task_analysis.py):

  3. Used Pytask for task-based workflow to run the optimization and save results as .pickle files. Best Practice: Step-by-step execution with separation of concerns for maintainability. Testing (test_data_loader.py):

  4. Implemented unit tests using pytest to validate data integrity and loading process. Best Practice: Verifying data consistency to ensure correctness before running optimization. Git Version Control:

  5. Used .gitignore to manage untracked large data files. Best Practice: Committed relevant changes, avoided tracking unnecessary data files, and made incremental commits.

  6. main.py script included in the root folder can be run as well in case of modular failure.

Final Output: Optimization results saved as pickle files for easy reloading and analysis.

  1. Created a plot task to generate and save final optimization results plots to the BLD directory.

Best Practice: Ensured reproducibility and result accessibility without re-running the optimization. Effective Practices: -Modular code: Each step is isolated and reusable. -Testing: Ensures data integrity before optimization. -Version control: Follows git best practices for clean project management. -This structure ensures the project is scalable, reproducible, and maintainable.

Results :

The project highlights the cost-effectiveness of renewable energy sources like wind and solar in reducing electricity generation costs and reliance on fossil fuels. The optimization model shows that investing in renewables lowers long-term operational costs, though some non-renewable capacity is needed for energy security. It recommends a balanced investment strategy to support a sustainable and economically efficient energy mix.

Project Structure

final-project-skhalid531/ │ ├── files_project/ # Core project directory containing analysis and data management scripts │ ├── analysis/ │ │ ├── model.py # Defines optimization model (using PuLP) │ │ ├── task_analysis.py # Task-based workflow for optimization execution and testing │ │ └── plot_analysis.py # For generating plots and saving final output visuals │ ├── data_management/ │ │ ├── data_loader.py # Data loading and cleaning script │ │ ├── prepare_combined_data.py # Data cleaning functions │ │ ├── process_average_fixed_cost.py # Cleaning fixed cost data │ │ ├── process_estimated_capacity.py # Cleaning existing capacity data │ │ └── process_variable_electricity_cost.py # Cleaning variable cost data │ ├── results/ │ │ └── optimization_results.pkl # Saves optimization results as pickle file │ └── data/ │ └── raw_data/ # Folder containing raw data files (Yearly_Load.xlsx, hourly_renewable_capacity.xlsx, etc.) │ ├── BLD/ # Build directory for final output and plots │ └── plots/ # Saves the final plots generated during analysis │ ├── tests/ # Directory for test scripts │ └── analysis/ │ └── test_model.py # Tests to validate optimization results │ └── data_management/ │ └── test_data_loader.py # Tests for data loading functionality │ ├── .gitignore # Defines files and folders to be ignored by Git ├── environment.yml # Environment configuration file for setting up project dependencies ├── LICENSE # Project license file ├── main.py # Main script to run the full pipeline in case of modular faliure. ├── pyproject.toml # Project metadata and configuration for Pytask ├── README.md # Project README file └── requirements.txt # List of required Python dependencies

1. Modeling Framework

The analysis involves a linear optimization model designed to assess:

  • Investment decisions for net-zero technologies.
  • Dispatch patterns of technologies under varying demand and renewable generation scenarios.

2. Key Parameters to Incorporate

a. Technical Performance

  • Load-following capabilities of hydrogen-fired plants.
  • Efficiency losses in CCS systems.

b. Optimization Model

The model will use Linear Programming, which includes:

  1. linear objective function.
  2. Linear constraints.
  3. Continuous decision variables.

This optimization model will be implemented using open-source Python packages:

-OptiMagic (PuLP) Approach

We will Define variables: GENERATION, INVESTMENT Set constraints: Energy balance, generation limits, storage Minimize cost: Total Cost = Variable Cost + Fixed Cost

3. Troubleshooting Guide :

-Why Might pytask --force Need to Be Run Multiple Times? -Pytask executes tasks based on dependencies, meaning:

1️⃣ First run: Cleans and processes raw data. 2️⃣ Second run: Runs optimization and generates results. 3️⃣ Third run: Creates and validates plots.

Since some tasks depend on others, running pytask --force multiple times ensures that all required files are created before they are used in the next steps.

4. Data Sources

  • It is to be noted that Yearly_Load.xlsx and hourly_renewable capacity were ENTSO-E ERRA directly, and the rest were assumtions which where taken from all the different sources mentioned and compiled .xlsx files.
  • Formulas used: -Electricity Generation Cost = (O&m Cost +(Fuel Cost + Co2Price x Co2 Intensity)) / Efficiency -The Variable Generation Cost (EUR/(MW*a)) = (Investment/Annuity Factor) + Fixed O&M Cost.

Hourly Load Data for Germany (2030)

Hourly Capacity Factors for Renewable Technologies

Variable Electricity Generation Cost [EUR/MWh]

Economic Parameters

Average Fixed Costs based on assumptions of:

  • Investment Cost [EUR/MW]
  • Fixed O&M Cost [EUR/(MW*a)]
  • Economic Lifetime
  • Interest Rate
  • Annuity Factor

Sources:

Existing Electricity Generation Capacity [MW]


References

  1. ENTSO-E ERAA 2022 Downloads
  2. TYNDP 2024 Scenarios Methodology
  3. Energy-Charts: Installed Power in Germany

About

final-project-skhalid531 created by GitHub Classroom

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors