Skip to content

Commit 3701ef8

Browse files
authored
Merge pull request #58 from pielube/dev_Matti
Stable version.
2 parents 6545b69 + 9cf6d1e commit 3701ef8

File tree

173 files changed

+693331
-359797
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+693331
-359797
lines changed

.gitignore

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
__pycache__/
22
results/
33
previous_simulation/
4-
input_dev/
5-
run_dev.py
6-
postprocess_dev.py
7-
preprocess_dev.py
4+

README.md

+21-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# MESSpy - Multi-Energy System Simulator
2-
An open-source model for simulating multy-energy systems such as Renewable Energy Communities and much more.
2+
An open-source model for simulating multy-energy systems such as Renewable Energy Communities, about hydrogen supercool things and much more.
33

44
![image](https://user-images.githubusercontent.com/83342584/177154238-c0e6b9fa-69b4-40c8-9b45-9d16919e079b.png)
55

66
### Authors
7-
**Pietro Lubello**, **Mattia Pasqui**, **Alessandro Mati**, **Andrea Ademollo** and **Carlo Carcasci**\
7+
**Mattia Pasqui**, **Alessandro Mati**, **Andrea Ademollo**, **Pietro Lubello**, and **Carlo Carcasci**\
88
Department of Industrial Engineering (DIEF), University of Florence (UNIFI), Italy
99

1010
## Overview
@@ -25,17 +25,22 @@ Models of different technologies are avialable and still under development to in
2525
- Boilers (ng, ele or H2)
2626
- CHP (combined heat and power)
2727

28-
### MESS needs the hourly load profiles as input as a .csv file
28+
### MESS needs the load profiles as input as a .csv file
2929
Depending on the type of meter installed, these data is in some cases made available by the electricity/gas supplier, in others it must be requested, while sometimes it cannot be obtained. In the latter case, specific programmes are required to generate such profiles in the specific .csv format needed as one of the program inputs. There are many programmes available online, the authors recommend the following:\
3030
bottom-up model: https://github.com/RAMP-project/RAMP \
31+
bottom-up model: https://github.com/open-ideas/StROBe
3132
top-down model: https://github.com/PasquinoFI/LoBi
3233

34+
### Timestep
35+
Simulation timestep can vary from 1 to 60 minutes. The time horizon from 1 year to as many years as you want.
36+
3337
### Requirements
3438
The model is developed in Python 3.9, and requires the following libraries:
3539
- numpy
3640
- pandas
3741
- os
38-
- pickle (results are saved in .pickle)
42+
- pickle (results can be saved in .pickle)
43+
- csv (results can be saved in .pickle)
3944
- json (input files are .json)
4045
- pvlib (used to download PV production series and weather data based on typical meteorological year)
4146
- matplotlib (used in post_process)
@@ -44,14 +49,23 @@ A less up-to-date but fully functional and documented fortran version is also av
4449
https://github.com/pielube/MESS-Fortran
4550

4651
## Quick start
47-
To get started, download the repository and simply run the "run_test.py" script
52+
To get started, download the repository.
53+
Three examples analysis are available:
54+
- "run_test_1" A small energy community composed by two consumers and one prosumer with PV and battery. A sensisivety analysi is also carried out.
55+
- "run_test_2" A residential building replaces the gas boiler with a heat pump
56+
- "run_test_3" Supercool hydrogen things
57+
Choose one of these, read it and press run!
4858

4959
### Input files
5060
You can modify them from a python interface or simply from notepad. The "Input_test" folder contains a demonstration case study.
5161
- general.json defines the general input. More details can be found in rec.py prologue comments.
52-
- structure.json defines the structure of the case study. Here you can define all the locations to consider, each technology inside the locations and technology's parameters. More detalis can be found in rec.py and location.py comments to the code.
62+
- studycase.json defines the structure of the case study. Here you can define all the locations to consider, each technology inside the locations and technology's parameters. More detalis can be found in rec.py and location.py comments to the code.
5363
- refcase.json This file has the same structure of structure.json and defines the "buiseness as usual" case, which is used as a reference case for calculating the cash flows of the study case and performing the economic assessment.
54-
- economics.json defines economic parameters. More details can be found in the comments of economics.py
64+
- energy_market.json defines economic parameters. More details can be found in the comments of economics.py
65+
- tech_cost.json defines economic parameters. More details can be found in the comments of economics.py
66+
67+
### Output files
68+
Results are saved in both .pkl and .csv
5569

5670
### How to continue
5771
We suggest you to create your own run_dev.py, input_dev/ and post_process_dev.py and to work on them instead of modifying the existing file used as initial test.

constants.py core/constants.py

+11-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
This module contains:
55
- Main phisical constants
6-
- Fluid properties
6+
- Fluid properties
77
88
For the sake of non-ambiguity, all technologies implement the same values by referring to this module
99
@@ -23,6 +23,8 @@
2323
AMBTEMP = 288 # [K] Standard ambient temperature - 15 °C
2424
GIBBS = -237.17 # [kJ/mol] Gibbs free energy @ T = 25°C p = 101325 Pa
2525
R_H2 = 4124.2 # [J/(kgK)] H2 characteristic constant
26+
kWh2kJ = 3600 # [kJ/kWh] Conversion factor from kWh to kJ
27+
2628

2729
#%%
2830

@@ -53,7 +55,7 @@
5355
H2ONDENSITY = 999.8437620819061 # [kg/Nm^3] Water density at Normal conditions (T = 0°C, P = 101325 Pa) -> PropsSI('D', 'T', 273.16, 'P', 101325, 'Water')
5456
H2OSDENSITY = 999.1026214670995 # [kg/Sm^3] Water density at Standard conditions (T = 15°C, P = 101325 Pa) -> PropsSI('D', 'T', 288.15, 'P', 101325, 'Water')
5557
H2OADENSITY = 998.2071504679284 # [kg/Sm^3] Water density at 20°C (T = 20°C, P = 101325 Pa) -> PropsSI('D', 'T', 293.15, 'P', 101325, 'Water')
56-
CP_WATER = 4188.460622611614 # [J/kgK] Water Mass specific constant pressure specific heat
58+
CP_WATER = 4.188460622611614 # [kJ/kgK] Water Mass specific constant pressure specific heat
5759
H2OMOL_S_E = 188.8 # [J/K*mol] Water Standard Entropy - gaseous phase
5860

5961
'Natural Gas'
@@ -82,11 +84,16 @@
8284

8385
'Air'
8486

85-
AIRMOLMASS = 28.96547 # [g/mol] Air molar mass
87+
AIRMOLMASS = 28.96547e-3 # [kg/mol] Air molar mass
8688
AIRSDENSITY = 1.225 # [kg/Sm^3] Air density at Standard conditions (T = 15°C, P = 101325 Pa) -> PropsSI('D', 'T', 273.15, 'P', 101325, 'Air')
8789
CP_AIR = 1.0063 # [kJ/kgK] Air mass specific costant pressure specific heat (T = 25°C, P = 101325 Pa)
8890
CV_AIR = 0.7178 # [kJ/kgK] Air mass specific costant volume specific heat (T = 25°C, P = 101325 Pa)
8991

9092
'Steam'
9193

92-
H1_STEAM800 = 4159.9 # [kJ/kg] Steam mass specific enthalpy @ T = 800°C, P = 116000 Pa
94+
H1_STEAM800 = 4159.9 # [kJ/kg] Steam mass specific enthalpy @ T = 800°C, P = 116000 Pa
95+
96+
97+
98+
99+

0 commit comments

Comments
 (0)