This project uses a conda environment to manage the Python version and required packages. Follow below steps to start
git clone https://github.com/ronitd07/Master-Thesis.git
cd Master-Thesisconda create --name myenv python=3.14conda activate myenvpip install .Navigate to your .tespy folder in your HOME directory HOME/.tespy. Create a folder named data, if it does not exist. In this folder, you can place the two json-files char_lines.json and char_maps.json for your characteristics which are under the folder charline and charmaps. Or follow below steps to generate the charline and charmaps using the scripts
To generate charlines and charmaps run the scripts
python src/models/create_charline.py
python src/models/create_charmap.pyThe data preprocessing is done by running the below script
python src/models/data_cleaning.pySimulation with characteristic lines
python src/models/MVV_GKM_simulation_charline.pySimulation with characteristic maps
python src/models/MVV_GKM_simulation_charmap.pySimulation with real compressor powers
python src/models/MVV_GKM_simulation_compressorP.pyThe results from the simulation are validated by running the below script. Make sure you have run the simulation in above step before running the validation scripts below or else the result files will be missing.
python src/models/Error_metrics.pyTo plot the COP residual frequency distribution plot run below script
python src/plots/plotbar.pyTo plot the COP residual per Speedline for the results with charmap simulation run below script
python src/plots/plot_COP_error_per_Speedline_boxplot.py- Manheim_data_original.xlsx - Unprocessed data received
- Manheim_data_cleaned.xlsx - processed input data. Also after Column 30 it has the results from the real compressor simulation run like compressor powers, efficiency, igva, scaling factor
- Manheim_data_cleaned_automated.xlsx - processed input data after running the data_cleaning.py script but will not have the results from real compressor power runs.
This repository contains the Python code, data processing scripts, TESPy models, calibration routines, and plotting scripts used for my master's thesis:
Simulation and Calibration of Large-Scale Heat Pumps Using Measurement Data
The work focuses on the modelling and calibration of a large-scale heat pump system using measurement data. The model is implemented in Python using TESPy, CoolProp, pandas, NumPy, Matplotlib, and scikit-learn.
The main objective of this project is to simulate the offdesign operation of a large-scale heat pump and calibrate the model against measured plant data.
The project includes:
- TESPy-based heat pump cycle modelling
- Compressor characteristic map evaluation
- Offdesign simulation
- Calibration of compressor performance
- Comparison between simulated and measured COP
- Error analysis using metrics such as RMSE, MAPE, R², and residual plots
- Generation of figures and tables for thesis documentation
ma_ronit/
│
├──charline # stores the charline.json files used in simulation
├──charmaps # stores the charmaps.json files used used in simulation
│
├── data/process_data
│ ├── Manheim_data_cleaned.xlsx # Cleaned and preprocessed data
│ ├── Manheim_data_original.xlsx # Original unprocessed measurement data
│ ├── Manheim_data_cleaned_automated.xlsx # Cleaned and preprocessed data using automaed script [data_cleaning.py](src/models/data_cleaning.py)
│ ├── fits_for_maps.xlsx # Speedline data for fits
│ └── *.json # Design json files
│
├── results/
│ └── *.csv # Simulation and calibration results
│
├── src/
│ ├── models/
│ │ ├── MVV_GKM_simulation_charmap.py # Heat Pump simulation using char maps
│ │ ├── MVV_GKM_simulation_charline.py # Heat Pump simulation using char lines
│ │ └── MVV_GKM_simulation_compressorP.py # Heat Pump simulation using real compressor Powers
│ └── plots/ # Contains the plotting scripts used
│
├── pyproject.toml # Python project configuration
├── environment.yml # Conda environment file
└── README.md # Project documentation