release 0.1 - spreadsheet energy system model generator
Post on 11-Apr-2022
1 Views
Preview:
TRANSCRIPT
SESMGRelease 0.1.1
Apr 08, 2022
Structure of Energy Systems
1 Structure of Energy Systems 31.1 Structure of Energy Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Manual 112.1 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.2 Graphical User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.3 Scenario Spreadsheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182.4 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362.5 Urban District Upscaling Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402.7 Demo Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3 Troubleshooting 433.1 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4 Sourcecode Documentation 474.1 Sourcecode documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5 Further Information 715.1 Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715.2 Related links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725.3 License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725.4 Contact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735.5 Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735.6 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Python Module Index 75
Index 77
i
ii
SESMG, Release 0.1.1
The Spreadsheet Energy System Model Generator allows the modeling and optimization of energy systems withoutthe need for programming skills. The components defined in this spreadsheet are defined with the included Pythonprogram and the open source Python library “oemof”, assembled to an energy system and optimized with the opensource solver “cbc”. The modeling results can be viewed and analyzed using a browser-based results output.
Fig. 1: From an input spreadsheet to interactive modelling results: The Spreadsheet Energy System Model Generator
Structure of Energy Systems 1
SESMG, Release 0.1.1
2 Structure of Energy Systems
CHAPTER 1
Structure of Energy Systems
• Structure of Energy Systems
1.1 Structure of Energy Systems
Energy systems in the sense of the Spreadseet Energy System Model Generator are designed according to the speci-fications of the oemof library. Accordingly, energy systems can be represented with the help of mathematical graphtheory. Thus, energy systems are exemplified as “graphs” consisting of sets of “vertices” and “edges”. In more specificterms, vertices stand for components and buses while directed edges connect them. The status variable of the energyflow indicates which amount of energy is transported between the individual nodes at what time. Possible componentsof an oemof energy system are
• sources,
• sinks,
• transformers, and
• storages.
Buses furthermore form connection points of an energy system. The graph of a simple energy system consisting ofeach one source, one transformer, one sink, as well as two buses, could look like the example displayed in the followingfigure.
Fig. 1: Graph of a simple energy system, consisting of one source, two buses, one transformer, and one a sink.
An oemof energy system must be in equilibrium at all times. Therefore sources must always provide exactly as muchenergy as the sinks and transformer losses consume. In turn, the sink must be able to consume the entire amount ofenergy supplied. If there is no balance, oemof is not able to solve the energy system.
3
SESMG, Release 0.1.1
1.1.1 Buses
The modelling framework oemof does not allow direct connections between components. Instead, they must alwaysbe connected with a bus. The bus in turn can be connected to other components, so that energy can be transported viathe bus. Buses can have any number of incoming and outgoing flows. Buses can not directly be connected with eachother. They do not consider any conversion processes or losses.
1.1.2 Sources
Sources represent the provision of energy. This can either be the exploitation of an energy source (e.g. gas storagereservoir or solar energy, no energy source in physical sense), or the simplified energy import from adjacent energysystems. While some sources may have variable performances, depending on the temporary needs of the energysystem, others have fixed performances, which depend on external circumstances. In the latter case, the exact perfor-mances must be entered to the model in form of time series. With the help of oemofs “feedinlib” and “windpowerlib”,electrical outputs of photovoltaik (pv)-systems and wind power plants can be generated automatically. In order toensure a balance in the energy system at all times, it may be useful to add a “shortage” source to the energy system,which supplies energy in the event of an energy deficit. In reality, such a source could represent the purchase of energyat a fixed price.
Photovoltaic Systems
The following figure sketches the fractions of radiation arriving at a PV-module as well as further relevant parameters.
Fig. 2: Radiation on a photovoltaic module.
The global radiation is composed of direct and diffuse radiation. The “direct horizontal irradiance” dirhi is the amountof sun radiation as directly received by a horizontal surface. The “diffuse horizontal irradiance” dhi is the share ofradiation, which arrives via scattering effects on the same surface. A part of the global radiation is reflected on theground surface and can thus cause an additional radiation contribution on the photovoltaic module. The amount of thereflected part depends on the magnitude of the albedo of the ground material. Exemplary albedo values are listed inthe following table.
4 Chapter 1. Structure of Energy Systems
SESMG, Release 0.1.1
Material Consumer Groupherbage (july, august) 0.25pasture 0.18 - 0.23uncoppied fields 0.26woods 0.05 - 0.18heath area 0.10 - 0.25asphalt 0.15concrete, clean 0.30concrete, weathered 0.2snow cover, fresh 0.80 - 0.90snow cover, old 0.45 - 0.70
Wind Turbines
For the modeling of wind turbines, the weather data set must include wind speeds. The wind speeds must be availablefor a measurement height of 10 m in the unit m/s.
The system data of the wind turbine to be modelled are obtained from the “oedb” database.
Solar thermal collectors
There are two collector types that can be modeled with this function.
• flat plate collectors
• concentrated solar power (parabolic through collector)
The irradiance on the flat plate collector is very similar to the photovoltaic source, although the reflected irradianceand the albedo are not a part of the calculation for flat plate collectors. For visualization you can take a look at thegraph above.
The heat output of a parabolic through collector is based on the direct horizontal irradiance, the diffuse irradiance isnot absorbed.
The solar thermal collector function automatically creates a heat source, a collector bus object and a transformerobject. The output of the source is the actual heat, the collector would produce due to its technical parameters. Thetransformer object embodies the systems periphery (pipes, pumps). Thermal losses and the electricity demand of thisperiphery can be considered by the transformer.
Fig. 3: Graph of a solar thermal collector system.
The irradiance on the collector, its efficiency and the heat output is calculated by using “oemof.thermal”. Thereforespecific values have to be given. Eta 0 is the optical efficiency of the collector, A1 is the linear heat loss coefficient and
1.1. Structure of Energy Systems 5
SESMG, Release 0.1.1
A2 is the quadratic heat loss coefficient. Values for Eta 0, A1 and A2 are collector specific values and can be found indata sheets. These values are measured and calculated according to DIN EN ISO 9806. The parameters C1 and C2 forconcentrated solar power are as well collector specific values. An exemplary set of values is give in the documentationon how to use the scenario file.
The solar irradiance is given in W/sqm. Therefore the collector’s heat output is given in this unit as well. Theinvestment object has to be power (kW). So the energy output (kW/sqm) has to be multiplied with a conversion factor.The conversion factor (sqm/kW) is calculated by dividing the gross aperture area of a collector model by a measuredpower output per module, e.g at 1000 W/sqm (DIN EN ISO 9806).
Some data sheets doesn’t contain all the necessary data. So another useful tool is the “Keymark Certificate Database”.The Keymark Certificate of a flat plate collector contains measured collector specific test data (a1, a2, eta 0, differentpower outputs).
Example: “Keymark Certificate 011-7S2432 F”. If this collector is part of the energy model, the conversion factor iscalculated by dividing the gross aperture area (2,53 sqm) by the power output. Considering an average inside collectortemperature of 40 °C and an outside average temperature of 10°C result in a temperature difference of 30 K. So, inthis case the heat power output is 1,504 kW and the conversion factor roundabout 1,68 (sqm/kW).
Power output per collectormoduleG=1000W/sqm
Aperturearea (Aa)
Grosslength
Grosswidth
Grossheigth
Grossarea(AG)
Tm-Ta
0K 10K 30K 50K 70KCollector name sqm mm mm mm sqm W W W W WFlachkollektorFK 253 HA-4A
2.34 2104 1204 80 2.53 1808 1712 1504 1278 1032
Example for calculation of conversion factor.
If you are calculating a system with the concentrated solar power module, you need to be careful. Depending on theazimuth of the system some tests have shown, that for some hours of the considered period the calculated power outputof the concentrated solar power module peaks by a factor of e.g. 100 compared to the rest of the period. This wasobserved with increasing azimuth e.g. an azimuth of 270 degrees. These peaks in power output are not possible, sothe final results have to be evaluated carefully. The interactive results in the end can help to identify possible peaksvery well.
1.1.3 Sinks
Sinks represent either energy demands within the energy system or energy exports to adjacent systems. Like sources,sinks can either have variable or fixed energy demands. Sinks with variable demands adjust their consumption tothe amount of energy available. This could for example stand for the sale of surplus electricity. However, actualconsumers usually have fixed energy demands, which do not respond to amount of energy available in the system. Aswith sources, the exact demands of sinks can be passed to the model with the help of time series.
In order to ensure a balance in the energy system at all times, it may be appropriate to add an “excess” sink to theenergy system, which consumes energy in the event of energy surplus. In reality, this could be the sale of electricityor the give-away of heat to the atmosphere.
Standard Load Profiles
Oemof’s sub-library demandlib can be used for the estimation of heat and electricity demands of different consumergroups, as based on German standard load profiles (SLP). The following electrical standard load profiles of the Asso-ciation of the Electricity Industry (VDEW) can be used:
6 Chapter 1. Structure of Energy Systems
SESMG, Release 0.1.1
Profil Consumer GroupH0 householdsG0 commercial generalG1 commercial on weeks 8-18 hG2 commercial with strong consumption in the eveningG3 commercial continuousG4 shop/hairdresserG5 bakeryG6 weekend operationL0 agriculture generalL1 agriculture with dairy industry/animal breedingL2 other agriculture
The following heat standard load profiles of the Association of Energy and Water Management (BDEW) can be used:
Profile House TypeEFH single family houseMFH multi family houseGMK metal and automotiveGHA retail and wholesaleGKO Local authorities, credit institutions and insurance companiesGBD other operational servicesGGA restaurantsGBH accommodationGWA laundries, dry cleaningGGB horticultureGBA bakeryGPD paper and printingGMF household-like business enterprisesGHD Total load profile Business/Commerce/Services
In addition, the location of the building and whether the building is located in a “windy” or “non-windy” area are takeninto account for the application of heat standard load profiles. The following location classes may be considered:
Category Building Location11 Germany, nationwide1 Bremen2 Hamburg, Saarland3 Berlin , Hessen, Lower Saxony, North Rhine-Westphalia4 Baden-Württemberg, Rhineland-Paatinate, Schleswig-Holstein, Saxony5 Brandenburg, Bavaria, Mecklenburg-Western Pomerania, Saxony-Anhalt, Thuringia
Stochastic Load Profiles (Richardson Tool)
The use of standard load profiles has the disadvantage that they only represent the average of a larger number of house-holds (> 200). Load peaks of individual households (e.g. through the use of hair dryers or electric kettles) are filteredout by this procedure. To counteract this, the Spreadsheet Energy System Model Generator offers the possibility togenerate stochastic load profiles for residential buildings. These are generated on the basis of Richardsonpy. Thereby,an arbitrary number of different realistic load profiles is simulated under consideration of statistic rules. The meanvalue of a large-enough number of profiles should, again, result in the standard load profile. However, if calculationsare continued using the individual values before averaging – as in the above calculation of costs – different values areobtained than when calculating with SLPs.
1.1. Structure of Energy Systems 7
SESMG, Release 0.1.1
1.1.4 Transformers
Transformers are components with one ore more input flows, which are transformed to one or more output flows.Transformers may be power plants, energy transforming processes (e.g., electrolysis, heat pumps), as well as transportlines with losses. The transformers’ efficiencies can be defined for every time step (e.g., the efficiency of a thermalpowerplants in dependence of the ambient temperature).
Currently only Generic Transformers can be used within the Spreadsheet Energy System Model Generator. These mayhave one or more different outputs, e.g., heat and electricity. For the modelling, the nominal performance of a generictransformer with several outputs, the respective output ratios, and an efficiency for each output need to be known.
Compression Heat Transformers
For the modeling of compression heat pumps and chillers, different heat sources are considered so the weather dataset must include different temperatures. The efficiency of the heat pump or chiller cycle process can be described bythe coefficient of performance (COP). The compression heat transformer function automatically creates a heat sourceand a low or high temperature bus, depending on the mode of operation (see red bubble). So only a transformer and aelectricity bus needs to be created. An example is shown in the following figure.
Fig. 4: Graph of a compression heat pump (left) and compression chiller (right).
At the moment it is possible to use ground water, soil (vertical heat exchanger), surface water and ambient air as a heatsource.
The compression heat transformers are implemented by using “oemof.thermal” .
Absorption Heat Transformers
At this point this function implies the modeling of an absorption chiller. An absorption chiller object contains a hightemperature heat source, the necessary connection bus and a transformer object, that describes the absorption chiller.The heat source can be waste heat for example. The efficiency of the absorption chiller is described by the coefficientof Performance (COP).
The necessary parameters for the characteristic equation method are found in the “characteristic_parameters.csv” inthe folder “technical_parameters”. According to the oemof.thermal documentation the parameters for the absorptionchillers ‘Rotartica’, ‘Safarik’, ‘Broad_01’ and ‘Broad_02’ are published by “Puig-Arnavat et al”. The parameters forthe machine named “Kuehn” is published by “Kühn and Ziegler”. The labels refer to the following machine types:
8 Chapter 1. Structure of Energy Systems
SESMG, Release 0.1.1
label DescriptionRotartica Single-effect hot-water-fired H2O/LiBr 4.5 kW absorption chillerSafarik Single-effect hot-water-fired H2O/LiBr 15 kW absorption chillerBroad_01 Single-effect hot-water-fired H2O/LiBr 768 kW absorption chillerBroad_02 Double-effect hot-water-fired H2O/LiBr 1163 kW absorption chillerKuehn Single-effect hot-water-fired H2O/LiBr 10 kW absorption chiller
If data for other specific machines are available, they can be added to the “characteristic_parameters.csv” mentionedabove. Please note, that the values in the “characteristic_parameters.csv” are measured by tests. Therefore the valuesfor the label “Kuehn” were measured for a machine with 10 kW nominal cooling capacity. If you calculate a systemwith a maximum investment of e.g. 100 kW cooling capacity, you should consider that the model assumes, that thesevalues are linear and scalable. This is not yet proven, so the results of such a model have to be validated further.Additionally the ambient temperature dependence of the cooling capacity (cooling output) is not considered by themodel.
The absorption heat transformers are implemented by using “oemof.thermal” .
1.1.5 Links
Links can be used to connect two buses or to display transport losses of networks. Links are not represented by aseparate oemof class, they are rather represented by transformers. In order to map a loss-free connection between twobuses, an efficiency of 1 is used. If a link is undirected, a separate transformer is used for each direction. In an energysystem, links can represent, for example, electrical powerlines, gas pipelines, district heating distribution networks orsimilar.
Fig. 5: Representation of directed and undirected links with oemof transformers
1.1.6 Storages
Storages are connected to a bus and can store energy from this bus and return it to a later point in time.
Stratified thermal storages use the thermal transmittance of the wall of the stratified thermal storage (including thermalinsulation) for calculating the losses. Specific values can be found in data sheets.
1.1.7 Investment
The investment costs help to compare the costs of building new components to the costs of further using existingcomponents instead. The annual savings from building new capacities should compensate the investment costs. Theinvestment method can be applied to any new component to be built. In addition to the usual component parameters,the maximum installable capacity needs to be known. Further, the periodic costs need to be assigned to the investment
1.1. Structure of Energy Systems 9
SESMG, Release 0.1.1
costs. The periodic costs refer to the defined time horizon. If the time horizon is one year, the periodical costscorrespond to the annualized capital costs of an investment.
Non-Convex-Investments
While a linear programming approach is used for normal investment decisions, a mixed integer variable is definedfor non-convex investment decisions. The model can thus decide, for example, whether a component should beimplemented FULL or NOT. Mixed-integer variables increase the computational effort significantly and should beused with caution.
10 Chapter 1. Structure of Energy Systems
CHAPTER 2
Manual
• Installation
• Graphical User Interface
• Scenario Spreadsheet
• Results
• Urban District Upscaling Tool
• Demo Tool
2.1 Installation
Warning: Warning! The installation has only been tested using Python 3.7.6 (64 bit)! Python 3.8 or newer iscurrently not supported.
2.1.1 Windows
1. Install Python (version 3.5 or higher)
Note: Make sure to select “Add pyton to PATH” at the beginning of the Python installation.
• go to the Python download page
• chose a Python version (e.g., “Python 3.7.6”) and click “download”
• download an installer (e.g., “Windows x86-64 executable installer”)
• execute the installer on your computer
2. Download the Spreadsheet Energy System Model Generator from GIT as .zip folder.
11
SESMG, Release 0.1.1
3. Extract the .zip folder into any directory on the computer.
4. Download the CBC-solver from here
5. Extract the CBC solver into the folder of the Spreadsheet Energy System Model Generator
6. Install “Graphviz”
• go to Graphviz download page
• select and download the graphviz version for your device (e.g. graphviz-2.38.msi for Windows)
Note: Make sure to select the correct installation location for Graphviz!!
• Execute the installation manager you just downloaded. Choose the following directory for the installation:“C:\Program Files (x86)\Graphviz2.38" (should be the default settings)
7. Execute the “Windows_installation.cmd” file.
Note: If you receive a “Your computer has been protected by Windows” error message, click “More Information,”and then “Run Anyway”.
8. The Spreadsheet Energy System Model Generator has been installed.
2.1.2 MacOS
1. Install Python (version 3.5 or higher)
Note: Make sure to select “Add pyton to PATH” at the beginning of the Python installation.
• go to the Python download page
• chose a Python version (e.g., “Python 3.7.6”) and click “download”
• download an installer (e.g., “Python 3.7.6 macOS 64-bit installer”)
• execute the installer on your computer
2. Download the Spreadsheet Energy System Model Generator from GIT as .zip folder.
3. Extract the .zip folder into any directory on the computer.
Note: If your device does not have homebrew installed, install it by typing /bin/bash -c "$(curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" in your termi-nal.
4. Excecute the “MacOS_installation.command” file.
5. The Spreadsheet Energy System Model Generator has been installed.
2.1.3 Linux
1. Install Python (version 3.5 or higher)
• go to https://phoenixnap.com/kb/how-to-install-python-3-ubuntu/
12 Chapter 2. Manual
SESMG, Release 0.1.1
• use Python3.7 instead of Python3.8
Note: Make sure that the alias python3 is set to Python3.7.x. If not use update-alternatives to change it and test istafterwards.
1.1 Update alternatives:
$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2
1.2 Testing:
$ python3 --version
2. Download the Spreadsheet Energy System Model Generator from GIT as .zip folder.
3. Extract the .zip folder into any directory on the computer.
4. Install PIP
$ sudo apt-get install python3-pip
5. Install tkinter
$ sudo apt-get install python3.7-tk
6. Install Graphviz
$ sudo apt-get install graphviz
7. Install the CBC-Solver
$ sudo apt-get install coinor-cbc
8. Execute the “Linux_installtion.sh” file. By first going to the path of the SESMG directory and then running thefollowing:
$ sudo sh Linux_installation.sh
9. The Spreadsheet Energy System Model Generator has been installed.
2.2 Graphical User Interface
1. Fill in the spreadsheet document according to the instructions in the “Scenario Spreadsheet” chapter.
2. Execute the Run_SESMG_for_**your operating System** file in the main folder.
Note: If you receive a “Your computer has been protected by Windows” error message or a similiar one, click “MoreInformation,” and then “Run Anyway” (or your operating system specific way to run the programm anyway).
Description of the GUI functions
Select the xlsx-scenario to be executed.
With the result processing parameters one has the possibility to decide,
• whether xlsx files should be created or not (1)
• whether a console log should be created or not (2)
• whether the Plotly Dash should be created or not (3)
2.2. Graphical User Interface 13
SESMG, Release 0.1.1
Fig. 1: The display may vary depending on the operating system. The function “Switch Criteria” is not completelyimplemented.
14 Chapter 2. Manual
SESMG, Release 0.1.1
Now there are three functions for eventing with the scenario choosen:
1. Displays the currently selected xlsx-scenario as graph.
2. Modeling and optimization of the selected xlsx-scenario with subsequent output of results.
3. Display of the latest optimized scenario (only can be used if an optimization run was done in the currentsession).
The functions under the topic Results are used to analyze results older then the current session:
1. Choose the results directory of the results to be displayed.
2. Execute the programm to start plotly dash.
Note: The detailed modelling results are also stored within the “results” folder.
2.2.1 Timeseries preperation
Using the timeseries preparation-options, the modeled time system can be reduced so that not all time steps areconsidered with the modeling. Such a simplification allows shorter runtimes, but may lead to a reduction in thequality of the results [1].
Warning: All time series simplifications can currently only be applied at an output time resolution of hours with8760 time steps (i.e. one whole year).
GUI Settings
Different possibilities of time series simplification are applicable, for this the following specifications must be de-posited in the SESMG GUI:
• Algorithm: Indication of the simplification algorithm to be applied.
• Index: Algorithm specific configuration.
• Criterion: Criterion according to which cluster algorithms are applied.
• Period: Time periods which are clustered together (weeks, days, hours)
• Season: Time periods within which clustering takes place (year, seasons, months)
Available Algorithms
The following algorithms are applicable and must be specified with the following additional information:
2.2. Graphical User Interface 15
SESMG, Release 0.1.1
al-go-rithm
description index criterion period sea-son
k_meansThe k-means algorithm clusters the time periods(see period) in such a way; that the squared de-viation of the cluster centers is minimal. Fromthe time periods of one cluster the mean is cal-culated and returned as reference period of thecluster. For the decision the vector of a singleparameter (see criterion) over the period durationis considered [1].
number of clusters tobe considered. Thenumber of clustersequals the numberof returned referencedays.
Clusteringcriterionto be con-sidered(tempera-ture; dhi;heat de-mand;electricitydemand)
Periodlengthto beclus-tered(hours;days; orweeks)
–
av-er-ag-ing
successive time periods (e.g. two consecutivedays) are averaged and combined into one seg-ment.
number of periods tobe averaged
– lengthof peri-ods tobe av-eraged(hours;days;weeks)
–
slic-ingA
every n-th period is selected and consideredwithin the modeling
index = n (every n-thperiod is selected inthe modeling)
– lengthof pe-riodsto besliced(hours;days;weeks)
–
slic-ingB
every n-th period is deleted and removed fromthe modeling
index = n (every n-thperiod is removed)
– lengthof pe-riodsto besliced(hours;days;weeks)
–
down-sam-plingA
Adaption of the temporal resolution. Every n-thperiod (selected by index column) is used for themodeling. For example; the resolution can bechanged from a 1-hourly to a 3-hourly (index =3) temporal resolution [1].
index = n (setting thenew resolution)
– – –
down-sam-plingB
Adaption of the temporal resolution. Every n-thperiod (selected by index column) is deleted forthe modeling.
index = n (determina-tion of the time stepsto be deleted)
– – –
heuris-ticse-lec-tion
representative time periods of a time series are se-lected from certain selection criteria
applied selectionscheme (availableschemes are listedwithin the sesmgfolder SESMGpro-gram_filestechnical_datahierarchical_selection_schemes.xlsx
– lengthof peri-ods tobe se-lected(days orweeks)
–
ran-domsam-pling
a given number of random periods are selectedand used as representatives
number of periods tobe selected.
– lengthof peri-ods tobe se-lectedran-domly(days orweeks
–
16 Chapter 2. Manual
SESMG, Release 0.1.1
k-means / k-medoids
“The k-clustering algorithm divides a time series into a given number k of clusters so that the squared deviation of thecluster centers of gravity is minimal. The procedure is well described by Green et al. [2]. k-means-clustering as wellas k-medoids-clustering are carried out using the python libraries ‘‘scikit-learn”, respectively ‘‘scikit-learn-extra”.” [1]Different cluster criteria (1. temperature, 2. solar radiation, 3. electricity demand) as well as different periods (daysand weeks) can be applied. To apply the criterion “electricity demand”, a column “el_demand_sum” must be insertedin the scenario.xlsx file in the weather-data sheet, which defines the reference consumption.
averaging
“In averaging, successive time periods (e.g. two consecutive days) are averaged and combined into one segment” [1].Values of different numbers of days and weeks can be applied.
slicing A/B
“In slicing every $n$-th period is selected, e.g. every second day, and subsequently recombined to a reduced timeseries.” [1] Slicing A: every n-th period is selected and considered within the modeling. Slicing B: every n-th periodis deleted and removed from the modeling.
downsampling A/B
“The temporal resolution of an entire time series is changed. For example, the resolution can be changed from a1-hourly to a 3-hourly temporal resolution.” [1] “On the one hand it allows the consideration of every $n$-th hour[downsampling A]. Thereby the number of modeled time steps must be at least halved ($n$=2). To allow a smallertime series reduction, the possibility to remove every $n$-th hour was also implemented [downsampling B]” [1].
heuristic selection
“In heuristic selection, representative time periods of a time series are selected from certain selection criteria” [1]“Based on the approach of Poncelet et al. heuristic selection scheme[s are] carried out” [1]
Available selection schemes:
index period criterion temperature solar radiation electricity demand1 2 year hp, lv – –2 4 year hp, lv ha, la –3 8 summer, winter hp, lv ha, la –4 16 winter, spring, summer, fall hp, lv ha, la –5 24 winter, spring, summer, fall hp, lv ha, la ha, la
Acronyms: hp=highest peak, lv=lowest valley, ha=highest average, la=lowest average
Furthere schemes can be added here: https://github.com/chrklemm/SESMG/blob/master/program_files/technical_data/hierarchical_selection_schemes.xlsx
2.2. Graphical User Interface 17
SESMG, Release 0.1.1
random sampling
“In random sampling, a predetermined number of random periods (e.g. days or weeks) are selected and used asrepresentatives.” [1] “The python library ‘‘random” is utilized. To ensure reproducability, a ‘‘seed” is defined, so thatwith each run the same random periods will be selected. Furthermore, a random time series of e.g. 10 periods therebyautomatically makes up 10 periods of a random time series of, e.g. 20 periods” [1]
Further Adjustments
Depending on the simplification applied, further adjustments to the energy system must be made automatically.
Adjustment of time series of non-divisible length: “For a time series’ adjustments, the simplification factor shouldideally be divisible by the length of the given time series without remainder. For example, out of 365 days, everyfifth day can be selected via slicing without any problems (365/5=73), but every tenth day results in a remainder(365/10=36.5). In order to be able to simplify the time series correctly, in such cases the given time series is shortenedso far that the calculation is correct. For slicing with every tenth day, for example, the time series would be shortenedto 360 days (360/10=36). In sampling methods, the selected periods are strung together and merged into a new timeseries. The individual sample periods are partially assigned new time stamps” [1].
Variable cost factor: “To ensure the correct consideration of the relationship between variable and periodical (annual)costs in the case of shortened time series, variable costs are multiplied by the variable cost factor” [1]:
variable cost factor = original number of timesteps / new number of timesteps
2.2.2 References
[1] Klemm C. Model-based run-time and memory optimization for a mixed-used multi-energy system model with highspatial resolution, unpublished at the time of publication of this documentation, 2022.
[2] Green, Richard, Iain Staffell, and Nicholas Vasilakos. Divide and Conquer? k-Means Clustering of DemandData Allows Rapid and Accurate Simulations of the British Electricity System. IEEE Transactions on EngineeringManagement 61.2 (2014): 251-260.
2.3 Scenario Spreadsheet
For the modeling and optimization of an energy system, parameters for all system components must be given in themodel generator using the enclosed .xlsx file (editable with Excel, LibreOffice, . . . ). The .xlsx file is divided into nineinput sheets. In the “energysystem” sheet, general parameters are defined for the time horizon to be examined, inthe sheets “buses”, “sinks”, “sources”, “transformers”, “storages” and “links” corresponding components are defined.In the sheet “time series”, the performance of individual components can be stored. In the “weather data” sheet, therequired weather data is stored. When completing the input file, it is recommended to enter the energy system step bystep and to perform test runs in between, so that potential input errors are detected early and can be localized moreeasily. In addition to the explanation of the individual input sheets, an example energy system is built step by step inthe following subchapters. The input file for this example is stored in the program folder “examples” and viewed onGitHub. The following units are used throughout:
• capacity/performance in kW,
• energy in kWh,
• angles in degrees, and
• costs in cost units (CU).
18 Chapter 2. Manual
SESMG, Release 0.1.1
Cost units are any scalable quantity used to optimize the energy system, such as euros or grams of carbon dioxideemissions.
2.3.1 Energysystem
Within this sheet, the time horizon and the temporal resolution of the model is defined. The following parameters haveto be entered:
• start date: Start of the modelling time horizon. Format: “YYYY-MM-DD hh:mm:ss”;
• end date: End date of the modelling time horizon. Format: “YYYY-MM-DD hh:mm:ss”; and
• temporal resolution: For the modelling considered temporal resolution. Possible inputs: “a” (years), “d”(days), “h” (hours) “min” (minutes), “s” (seconds), “ms” (milliseconds).
• periods: Number of periods within the time horizon (one year with hourly resolution equals 8760 periods).
• constraint cost limit in (CU): Value in order to set a limit for the whole energysystem, e.g. carbon dioxideemissions. Set this field to “None” in order to ignore the limit. If you want to set a limit, you have to set specificvalues for each components seen below.
Table 1: Exemplary input for the energy systemstart date end date temporal resolution periods constraint cost limit
(CU)2012-01-01 00:00:00 2012-12-30 23:00:00 h 8760 None
2.3.2 Competition Constraints
The spreadsheet “Competition Constraints” allows you to match two components against a predefined limit. Forexample, an area competition. If you do not want to use this spreadsheet, it simply remains empty. To use thisworksheet, the following values must be filled in:
• component 1: First component that lays claim to the parameter which size set as the limit.
• factor 1: Factor that defines how many units of the target unit component 1 needs to provide 1 kW of power.
• component 2: Second component that lays claim to the parameter which size set as the limit.
• factor 2: Factor that defines how many units of the target unit component 2 needs to provide 1 kW of power.
• limit: Maximum size suitable for providing power (e.g. roof area for providing electricity and heat).
Table 2: Exemplary input for the competition constraints sheetcomponent 1 factor 1 component 2 factor 2 limit
unit/KW unit/kW unitID_photovoltaic_elecitricity_source 5.26 ID_solar_thermal_source 1.79 168
2.3.3 Buses
Within this sheet, the buses of the energy system are defined. The following parameters need to be entered:
• label: Unique designation of the bus. The following format is recommended: “ID_energy sector_bus”.
• comment: Space for an individual comment, e.g. an indication of which measure this component belongs to.
• active: Specifies whether the bus shall be included to the model. 0 = inactive, 1 = active.
2.3. Scenario Spreadsheet 19
SESMG, Release 0.1.1
• excess: Specifies whether a sink is to be generated, which consumes excess energy. 0 = no excess sink will begenerated; 1 = excess sink will be generated.
• shortage: Specifies whether to generate a shortage source that can compensate energy deficits or not. 0 = noshortage source will be generated; 1 = shortage source will be generated.
• excess costs in (CU/kWh): Assigns a price per kWh to the release of energy to the excess sink. If the excesssink was deactivated, the fill character “0” is used.
• shortage costs in (CU/kWh): Assigns a price per kWh to the purchase of energy from the shortage source. Ifthe shortage source was deactivated, the fill character “0” is used.
• excess constraint costs in (CU/kWh): Assigns a price per kWh to the release of energy to the excess sinkreferring to the constraint limit set in the “energysystem” sheet. If the excess sink was deactivated, the fillcharacter “0” is used. If not considering constraints fill character “0” is used.
• shortage constraint costs in (CU/kWh): Assigns a price per kWh to the purchase of energy from the shortagesource referring to the constraint limit set in the “energysystem” sheet. If the shortage source was deactivated,the fill character “0” is used. If not considering constraints fill character “0” is used.
Table 3: Exemplary input for the buses sheetlabel comments ac-
tiveex-cess
short-age
ex-cesscosts
short-agecosts
excessconstraintcosts
shortageconstraintcosts
(CU/kWh)(CU/kWh) (CU/kWh) (CU/kWh)ID_electricity_bus 1 0 1 0.000 0.300 0.00 474.00ID_heat_bus 1 1 0 0.000 0.000 0.00 0.00ID_gas_bus 1 0 1 0.000 0.070 0.00 0.00ID_cooling_bus chiller 1 1 0 0.000 0.000 0.00 0.00ID_pv_bus 1 1 0 -0.068 0.000 -56.00 0.00ID_hp_electricity_busheat pumps 1 1 1 0.000 0.220 0.00 474.00dis-trict_electricity_bus
delivering electr. toneighb. subsystems
0 0 0 0.000 0.000 0.00 0.00
dis-trict_heat_bus
delivering heat toneighb. subsystems
0 0 0 0.000 0.000 0.00 0.00
dis-trict_chp_electricity_bus
0 0 1 0.000 0.000 -375.00 0.00
dis-trict_gas_bus
0 0 1 0.000 0.070 0.00 0.00
2.3.4 Sinks
Within this sheet, the sinks of the energy system are defined. The following parameters need to be entered:
• label: Unique designation of the sink. The following format is recommended: “ID_energy sector_sink”.
• comment: Space for an individual comment, e.g. an indication of which measure this component belongs to.
• active: Specifies whether the sink shall be included to the model. 0 = inactive, 1 = active.
• fixed: Indicates whether it is a fixed sink or not. 0 = not fixed; 1 = fixed.
• input: Space for an individual comment, e.g. an indication of which measure this component belongs to.
• load profile: Specifies the basis onto which the load profile of the sink is to be created. If the Richardson toolis to be used, “richardson” has to be inserted. For standard load profiles, its acronym is used. If a time series is
20 Chapter 2. Manual
SESMG, Release 0.1.1
Fig. 2: Graph of the energy system, which is created by entering the example components. The non-active componentsare not included in the graph above.
used, “timeseries” must be entered and must be provided in the Time series sheet. If the sink is not fixed, the fillcharacter “x” has to be used.
• nominal value in (kW): Nominal performance of the sink. Required when “time series” has been entered intothe “load profile”. When SLP or Richardson is used, use the fill character “0” here.
• annual demand in (kWh/a): Annual energy demand of the sink. Required when using the Richardson Tool orstandard load profiles. When using time series, the fill character “0” is used.
• occupants [RICHARDSON]: Number of occupants living in the respective building. Only required when usingthe Richardson tool, use fill character “0” for other load profiles.
• building class [HEAT SLP ONLY]: BDEW building classes that coincide with the building locations are ex-plained here.
• wind class [HEAT SLP ONLY]: wind classification for building location (0=not windy, 1=windy)
2.3. Scenario Spreadsheet 21
SESMG, Release 0.1.1
Table 4: Exemplary input for the sinks sheetlabel comment ac-
tivefixed input load
pro-file
nom-inalvalue
annualde-mand
oc-cu-pants
build-ingclass
windclass
(kW) (kWh/a) (richard-son)
(heatslp)
(heatslp)
ID_electricity_sinkH0 standardload profilesink
1 1 ID_electricity_bush0 0 5000.0 0 0 0
ID_heat_sinkEFH standardload profilesink
1 1 ID_heat_busefh 0 30000.0 0 3 0
ID_cooling_sinkfixed timeseriescooling demand
0 1 ID_cooling_bustime-series
1 0 0 0 0
Fig. 3: Graph of the energy system, which is created by entering the example components. The non-active componentsare not included in the graph above.
2.3.5 Sources
Within this sheet, the sources of the energy system are defined. Technology specific data (see 2nd line), must be filledin only if the respective technology is selected otherwise use 0. The following parameters have to be entered:
• label: Unique designation of the source. The following format is recommended: “ID_energy sector_source”.
• comment: Space for an individual comment, e.g. an indication of which measure this component belongs to.
• active: Specifies whether the source shall be included to the model. 0 = inactive, 1 = active.
• fixed: Indicates whether it is a fixed source or not. 0 = not fixed; 1 = fixed.
22 Chapter 2. Manual
SESMG, Release 0.1.1
• output: Specifies which bus the source is connected to.
• technology: Technology type of source. Input options: “photovoltaic”, “windpower”, “timeseries”, “other”,“solar_thermal_flat_plate”, “concentrated_solar_power”. Time series are automatically generated for photo-voltaic systems and wind turbines. If “timeseries” is selected, a time series must be provided in the Time seriessheet.
Costs
• variable costs in (CU/kWh): Defines the variable costs incurred for a kWh of energy drawn from the source.
• variable constraint costs in (CU/kWh): Defines the variable costs incurred for a kWh of energy drawn fromthe source referring to the constraint limit set in the “energysystem” sheet. If not considering constraints fillcharacter “0” is used.
• existing capacity in (kW): Existing capacity of the source before possible investments.
• min. investment capacity in (kW): Minimum capacity to be installed in case of an investment.
• max. investment capacity in (kW): Maximum capacity that can be added in the case of an investment. If noinvestment is possible, enter the value “0” here.
• periodical costs in (CU/(kW a)): Costs incurred per kW for investments within the time horizon.
• periodical constraint costs in (CU/(kW a)): Costs incurred per kW for investments within the time horizonreferring to the constraint limit set in the “energysystem” sheet. If not considering constraints fill character “0”is used.
• Non-Convex Investment: Specifies whether the investment capacity should be defined as a mixed-integer vari-able, i.e. whether the model can decide whether NOTHING OR THE INVESTMENT should be implemented.Explained here.
• Fix Investment Costs in (CU/a): Fixed costs of non-convex investments (in addition to the periodic costs).
Wind
• Turbine Model: Reference wind turbine model. Possible turbine types are listed here.
• Hub Height: Hub height of the wind turbine. Which hub heights are possible for the selected reference turbinecan be viewed here.
PV
• Modul Model: Module name, according to the database used. Possible Modul Models are presented here.
• Inverter Model: Inverter name, according to the database used. Possible Inverter Models are presented here.
• Azimuth: Specifies the orientation of the PV module in degrees. Values between 0 and 360 are permissible (0= north, 90 = east, 180 = south, 270 = west). Use fill character “0” for other technologies.
• Surface Tilt: Specifies the inclination of the module in degrees (0 = flat). Use fill character “0” for othertechnologies.
• Albedo: Specifies the albedo value of the reflecting floor surface. Only required for photovoltaic sources, usefill character “0” for other technologies.
• Altitude: Height (above mean sea level) in meters of the photovoltaic module. Only required for photovoltaicsources, use fill character “0” for other technologies.
2.3. Scenario Spreadsheet 23
SESMG, Release 0.1.1
• Latitude: Geographic latitude (decimal number) of the photovoltaic module. Only required for photovoltaicsources, use fill character “0” for other technologies.
• Longitude: Geographic longitude (decimal number) of the photovoltaic module. Only required for photovoltaicsources, use fill character “0” for other technologies.
Concentrated Solar Power
• Azimuth: Specifies the orientation of the PV module in degrees. Values between 0 and 360 are permissible (0= north, 90 = east, 180 = south, 270 = west). Use fill character “0” for other technologies.
• Surface Tilt: Specifies the inclination of the module in degrees (0 = flat). Use fill character “0” for othertechnologies.
• ETA 0: Optical efficiency of the collector. Use fill character “0” for other technologies.
• A1: Collector specific linear heat loss coefficient. Use fill character “0” for other technologies.
• A2: Collector specific quadratic heat loss coefficient. Use fill character “0” for other technologies.
• C1: Collector specific thermal loss parameter. Only required for Concentrated Solar Power source, use fillcharacter “0” for other technologies.
• C2: Collector specific thermal loss parameter. Only required for Concentrated Solar Power source, use fillcharacter “0” for other technologies.
• Temperature Inlet in (°C): Inlet temperature of the solar heat collector module. Use fill character “0” for othertechnologies.
• Temperature Difference in (°C): Temperature Difference between in- and outlet temperature of the solar heatcollector module. Use fill character “0” for other technologies.
• Cleanliness: Cleanliness of a parabolic through collector. Only required for Concentrated Solar Power source,use fill character “0” for other technologies.
• Electric Consumption: Electric consumption of the collector system. Example: If value is set to 0,05, theelectric consumption is 5 % of the energy output. Use fill character “0” for other technologies.
• Peripheral Losses: Heat loss coefficient for losses in the collector’s peripheral system. Use fill character “0”for other technologies.
Exemplary values for concentrated_solar_power technology:
Table 5: Exemplary values for concentrated_solar_power technology(The parameters refer to Janotte, N; et al)
Cleanliness ETA 0 A1 A2 C1 C2solar heat solar heat solar heat solar heat solar heat solar heat0.9 0.816 -0.00159 0.0000977 0.0622 0.00023
Solar Thermal Flatplate
• Azimuth: Specifies the orientation of the PV module in degrees. Values between 0 and 360 are permissible (0= north, 90 = east, 180 = south, 270 = west). Use fill character “0” for other technologies.
• Surface Tilt: Specifies the inclination of the module in degrees (0 = flat). Use fill character “0” for othertechnologies.
• ETA 0: Optical efficiency of the collector. Use fill character “0” for other technologies.
• A1: Collector specific linear heat loss coefficient. Use fill character “0” for other technologies.
24 Chapter 2. Manual
SESMG, Release 0.1.1
• A2: Collector specific quadratic heat loss coefficient. Use fill character “0” for other technologies.
• Temperature Inlet in (°C): Inlet temperature of the solar heat collector module. Use fill character “0” for othertechnologies.
• Temperature Difference in (°C): Temperature Difference between in- and outlet temperature of the solar heatcollector module. Use fill character “0” for other technologies.
• Electric Consumption: Electric consumption of the collector system. Example: If value is set to 0,05, theelectric consumption is 5 % of the energy output. Use fill character “0” for other technologies.
• Peripheral Losses: Heat loss coefficient for losses in the collector’s peripheral system. Use fill character “0”for other technologies.
• Conversion Factor in m2/kW: The factor is explainded here.
Timeseries
If you have choosen the technology “timeseries”, you have to include a timeseries in the Time series sheet or usedefault one.
Commodity
If you have choosen the technology “other”, the solver has the opportunity to continuously adjust the power.
Table 6: Exemplary input for the sources sheetla-bel
com-ment
ac-tive
fixedtech-nol-ogy
out-put
in-put
ex-ist-ingca-pac-ity
min.in-vest-mentca-pac-ity
max.in-vest-mentca-pa-pc-ity
non-convexin-vest-ment
fixin-vest-mentcosts
vari-ablecosts
pe-ri-od-i-calcosts
vari-ablecon-straintcosts
pe-ri-od-i-calcon-straintcosts
Tur-bineModel
HubHeight
tech-nol-ogydatabase
in-verterdatabase
ModulModel
In-verterModel
AlbedoAl-ti-tude
Az-imuth
Sur-faceTilt
Lat-i-tude
Lon-gi-tude
ETA0
A1A2C1C2Tem-per-a-tureIn-let
Tem-per-a-tureDif-fer-ence
Con-ver-sionFac-tor
Pe-riph-eralLosses
Elec-tricCon-sump-tion
Clean-li-ness
so-larheat
(kW)(kW)(kW) (CU/a)(CU/kWh)(CU/(kWa))
(CU/kWh)(CU/(kWa))
wind-power
wind-power
PVPVPVPVPV(m)|PV
(°) (°) (°) (°) so-larheat
so-larheat
so-larheat
so-larheat
so-larheat
(°C)|so-larheat
(°C)|solarheat
(sqm/kW)|so-larheat
so-larheat
so-larheat
so-larheat
ID_photovoltaic_electricity_source1 1 pho-to-voltaic
ID_pv_busNone0 0 20 0 0 0 90 56 0 0 0 San-di-aMod
san-di-ain-verter
Pana-sonic_VBHN235SA06B__2013_
ABB__MICRO_0_25_I_OUTD_US_240__240V_0.1860 18035 52.137.360 0 0 0 0 0 0 0 0 0 0
ID_solar_thermal_source1 1 so-lar_thermal_flat_plate
ID_heat_busID_electricity_bus0 0 20 0 0 0 40 25 0 0 0 0 0 0 0 0 0 20 10 52.137.360.7191.0630.0050 0 40 15 1.790.050.060
wind_turbine0 1 wind-power
elec-tric-ity_bus
None0 0 30 0 0 0 1009 0 E-126/4200
1350 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2.3.6 Transformers
Within this sheet, the transformers of the energy system are defined.
The following parameters have to be entered:
2.3. Scenario Spreadsheet 25
SESMG, Release 0.1.1
Fig. 4: Graph of the energy system, which is created by entering the example components of sources sheet. Thenon-active components are not included in the graph above.
• label: Unique designation of the transformer. The following format is recommended: “ID_energy sec-tor_transformer”.
• comment: Space for an individual comment, e.g. an indication of which measure this component belongs to.
• active: Specifies whether the transformer shall be included to the model. 0 = inactive, 1 = active.
• transformer type: Indicates what kind of transformer it is. Possible entries: “GenericTransformer” for lineartransformers with constant efficiencies; “GenericCHP” for transformers with varying efficiencies; “compres-sion_heat_transformer”; “absorption_heat_transformer”.
• mode: Specifies, if a compression or absorption heat transformer is working as “chiller” or “heat_pump”.Only required if “transformer type” is set to “compression_heat_transformer” or “absorption_heat_transformer”.Otherwise has to be set to “None”, “none”, “0”.
• input: Specifies the bus from which the input to the transformer comes from.
• output: Specifies bus to which the output of the transformer is forwarded to. For CHP Transformers it shouldbe the electric output.
• output2: Specifies the bus to which the output of the transformer is forwarded to, if there are several outputs. Ifthere is no second output, the fill character “0” must be entered here.
Costs
• variable input costs in (CU/kWh): Variable costs incurred per kWh of input energy supplied.
• variable output costs in (CU/kWh): Variable costs incurred per kWh of output energy supplied.
• variable output costs 2 in (CU/kWh): Variable costs incurred per kWh of output 2 energy supplied.
26 Chapter 2. Manual
SESMG, Release 0.1.1
• variable input constraint costs in (CU/kWh): Variable constraint costs incurred per kWh of input energysupplied referring to the constraint limit set in the “energysystem” sheet. If not considering constraints fillcharacter “0” is used.
• variable output constraint costs in (CU/kWh): Variable constraint costs incurred per kWh of output energysupplied referring to the constraint limit set in the “energysystem” sheet. If not considering constraints fillcharacter “0” is used.
• variable output constraint costs 2 in (CU/kWh): Variable constraint costs incurred per kWh of output 2 energysupplied referring to the constraint limit set in the “energysystem” sheet. If not considering constraints fillcharacter “0” is used.
• existing capacity in (kW): Already installed capacity of the transformer.
• min investment capacity in (kW): Minimum transformer capacity to be installed.
• max investment capacity in (kW): Maximum installable transformer capacity in addition to the previouslyexisting one.
• periodical costs in (CU/a): Costs incurred per kW for investments within the time horizon.
• periodical constraint costs in (CU/(kW a)): Constraint costs incurred per kW for investments within the timehorizon. If not considering constraints fill character “0” is used.
• Non-Convex Investment: Specifies whether the investment capacity should be defined as a mixed-integer vari-able, i.e. whether the model can decide whether NOTHING OR THE INVESTMENT should be implemented.Explained here.
• Fix Investment Costs in (CU/a): Fixed costs of non-convex investments (in addition to the periodic costs)
Generic Transformer
• efficiency: Specifies the efficiency of the first output. Values between 0 and 1 are allowed entries.
• efficiency2: Specifies the efficiency of the second output, if there is one. Values between 0 and 1 are entered. Ifthere is no second output, the fill character “0” must be entered here.
GenericCHP
• min. share of flue gas loss: Percentage flue gas losses of the operating point with maximum heat extraction.
• max. share of flue gas loss: Percentage flue gas losses of the operating point with minimum heat extraction.
• min. electric power in (kW): Minimum electrical power supply without heat extraction (district heating).
• max. electric power in (kW): Maximum electrical power supply without heat extraction (district heating).
• min. electric efficiency: Specifies the minimum electric efficiency without heat extraction (district heating).Values between 0 and 1 are allowed entries.
• max. electric efficiency: Specifies the minimum electric efficiency without heat extraction (district heating).Values between 0 and 1 are allowed entries.
• minimal thermal output power in (kW): Heat output taken from the exhaust gas via a condenser even in purelyelectric operation.
• electric power loss index: Reduction of the electrical power by “electric power loss index * extracted thermalpower”.
• back pressure: Defines rather the end pressure of “Turbine CHP” is higher than ambient pressure (input valuehas to be “1”) or not (input value has to be “0”). For “Motoric CHP” it has to be “0”.
2.3. Scenario Spreadsheet 27
SESMG, Release 0.1.1
Compression Heat Transformer
The following parameters are only required, if “transformer type” is set to “CompressionHeatTransformer”:
• heat source: Specifies the heat source. Possible heat sources are “GroundWater”, “Ground”, “Air” and “Water”possible.
• temperature high in (°C): Temperature of the high temperature heat reservoir. Only required if “mode” is setto “heat_pump”.
• temperature low in (°C): Cooling temperature needed for cooling demand. Only required if “mode” is set to“chiller”.
• quality grade: To determine the COP of a real machine a scale-down factor (the quality grade) is applied onthe Carnot efficiency (see oemof.thermal).
• area in (sqm): Open spaces for ground-coupled compression heat transformers (GC-CHT).
• length of the geoth. probe in (m): Length of the vertical heat exchanger, only for GC-CHT.
• heat extraction in (kW/(m*a)): Heat extraction for the heat exchanger referring to the location, only for GC-CHT.
• min. borehole area in (sqm): Limited space due to the regeneation of the ground source, only for GC-CHT.
• temp threshold icing: Temperature below which icing occurs (see oemof.thermal). Only required if “mode” isset to “heat_pump”.
• factor icing: COP reduction caused by icing (see oemof.thermal). Only required if “mode” is set to“heat_pump”.
Absorption Heat Transformer
The following parameters are only required, if “transformer type” is set to “AbsorptionHeatTransformer”:
• name: Defines the way of calculating the efficiency of the absorption heat transformer. Possible inputs are:“Rotartica”, “Safarik”, “Broad_01”, “Broad_02”, and “Kuehn”. “Broad_02” refers to a double-effect absorptionchiller model, whereas the other keys refer to single-effect absorption chiller models.
• high temperature in (°C): Temperature of the heat source, that drives the absorption heat transformer.
• chilling temperature in (°C): Output temperature which is needed for the cooling demand.
• electrical input conversion factor: Specifies the relation of electricity consumption to energy input. Example:A value of 0,05 means, that the system comsumes 5 % of the input energy as electric energy.
• recooling temperature difference in (°C): Defines the temperature difference between temperature source forrecooling and recooling cycle.
• heat capacity of source: Defines the heat capacity of the connected heat source e.g. extracted waste heat.
28 Chapter 2. Manual
SESMG, Release 0.1.1
Table 7: Exemplary input for the transformers sheetla-bel
com-ment
ac-tive
trans-formertype
modein-put
out-put
out-put2
ef-fi-ciency
ef-fi-ciency2
ex-ist-ingca-pac-ity
min.in-vest-mentca-pac-ity
max.in-vest-mentca-pac-ity
non-convexin-vest-ment
fixin-vest-mentcosts
vari-ablein-putcosts
vari-ableout-putcosts
vari-ableout-putcosts2
pe-ri-od-i-calcosts
vari-ablein-putcon-straintcosts
vari-ableout-putcon-straintcosts
vari-ableout-putcon-straintcosts2
pe-ri-od-i-calcon-straintcosts
heatsource
tem-per-a-turehigh
tem-per-a-turelow
qual-itygrade
arealengthofthegeoth.probe
heatex-trac-tion
min.bore-holearea
temp.thresh-oldic-ing
fac-toric-ing
namehightem-per-a-ture
chill-ingtem-per-a-ture
elec-tri-calin-putcon-ver-sionfac-tor
re-cool-ingtem-per-a-turedif-fer-ence
min.shareoffluegasloss
max.shareoffluegasloss
min.elec-tricpower
max.elec-tricpower
min.elec-tricef-fi-ciency
max.elec-tricef-fi-ciency
min-i-malther-malout-putpower
elec.powerlossin-dex
backpres-sure
(kW)(kW)(kW) (CU/a)(CU/kWh)(CU/kWh)(CU/kWh)(CU/(kWa))
(CU/kWh)(CU/kWh)(CU/kWh)(CU/(kWa))
(°C)(°C) (m2)(m)(kW/(m*a))(m2)(°C) (°C)(°C) (°C) (kW)(kW) (kW)
ID_gasheating_transformer1 Gener-ic-Trans-former
0 ID_gas_busID_heat_busNone0.850 10 0 20 0 0 0 0 0 70 0 2000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID_GCHP_transformerground-coupledheatpump
1 com-pres-sion_heat_transformer
heat_pumpID_hp_electricity_busID_heat_busNone1 0 0 0 20 0 0 0 0 0 115.570 0 0 0 Ground60 0 0.610001000.051003 0.80 0 0 0 0 0 0 0 0 0 0 0 0 0
ID_ASCH_transformerairsourcechiller
1 com-pres-sion_heat_transformer
chillerID_hp_electricity_busID_cooling_busNone1 0 0 0 20 0 0 0 0 0 1000 0 0 0 Air0 -10
0.40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID_AbsCH_transformerab-sorp-tionchiller
1 ab-sorp-tion_heat_transformer
chillerID_hp_electricity_busID_cooling_busNone1 0 0 0 20 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 Kuehn85 10 0.056 0 0 0 0 0 0 0 0 0
ID_ASHP_transformerairsourceheatpump
1 com-pres-sion_heat_transformer
heat_pumpID_hp_electricity_busID_heat_busNone1 0 0 0 20 0 0 0 0 0 112.780 0 0 0 Air60 0 0.40 0 0 0 3 0.80 0 0 0 0 0 0 0 0 0 0 0 0 0
ID_chp_transformer0 Gener-ic-Trans-former
0 dis-trict_gas_bus
dis-trict_chp_electricity_bus
dis-trict_heat_bus
0.350.550 0 20 0 0 0 0 0 50 0 3751300 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2.3.7 Storages
Within this sheet, the sinks of the energy system are defined. The following parameters have to be entered:
• label: Unique designation of the storage. The following format is recommended: “ID_energy sector_storage”.
• comment: Space for an individual comment, e.g. an indication of which measure this component belongs to.
• active: Specifies whether the storage shall be included to the model. 0 = inactive, 1 = active.
• storage type: Defines whether the storage is a “Generic” or a “Stratified” sorage. These two inputs are possible.
• bus: Specifies which bus the storage is connected to.
• input/capacity ratio (invest): Indicates the performance with which the storage can be charged (see also here).
• output/capacity ratio (invest): Indicates the performance with which the storage can be discharged (see alsohere).
2.3. Scenario Spreadsheet 29
SESMG, Release 0.1.1
Fig. 5: Graph of the energy system, which is created by entering the example components. The non-active componentsare not included in the graph above.
• efficiency inflow: Specifies the charging efficiency.
• efficiency outflow: Specifies the discharging efficiency.
• initial capacity: Specifies how far the storage is loaded at time 0 of the simulation. Value must be between 0and 1.
• capacity min: Specifies the minimum amount of storage that must be loaded at any given time. Value must bebetween 0 and 1.
• capacity max: Specifies the maximum amount of storage that can be loaded at any given time. Value must bebetween 0 and 1.
Costs
• existing capacity in (kW): Previously installed capacity of the storage.
• min. investment capacity in (kW): Minimum storage capacity to be installed.
• max. investment capacity in (kW): Maximum in addition to existing capacity, installable storage capacity.
• Non-Convex Investment: Specifies whether the investment capacity should be defined as a mixed-integer vari-able, i.e. whether the model can decide whether NOTHING OR THE INVESTMENT should be implemented.Explained here.
• Fix Investment Costs in (CU/a): Fixed costs of non-convex investments (in addition to the periodic costs)
• variable input costs: Indicates how many costs arise for charging with one kWh.
• variable output costs: Indicates how many costs arise for charging with one kWh.
• periodical costs in (CU/a): Costs incurred per kW for investments within the time horizon.
30 Chapter 2. Manual
SESMG, Release 0.1.1
• variable input constraint costs: Indicates how many costs arise for charging with one kWh referring to theconstraint limit set in the “energysystem” sheet. If not considering constraints fill character “0” is used.
• variable output constraint costs: Indicates how many costs arise for charging with one kWh referring to theconstraint limit set in the “energysystem” sheet. If not considering constraints fill character “0” is used.
• periodical constraint costs in (CU/a): Costs incurred per kW for investments within the time horizon referringto the constraint limit set in the “energysystem” sheet. If not considering constraints fill character “0” is used.
Generic Storage
• capacity loss (Generic only): Indicates the storage loss per time unit. Only required, if the “storage type” is setto “Generic”.
Stratified Storage
• diameter in (m) | (Stratified Storage): Defines the diameter of a stratified thermal storage, which is necessaryfor the calculation of thermal losses.
• temperature high in (°C) | (Stratified Storage): Outlet temperature of the stratified thermal storage.
• temperature low in (°C) | (Stratified Storage): Inlet temperature of the stratified thermal storage.
• U value in (W/(sqm*K)) | (Stratified Storage): Thermal transmittance coefficient
Table 8: Exemplary input for the storages sheetla-bel
com-ment
ac-tive
stor-agetype
busin-put/capacityra-tio
out-put/capacityra-tio
ef-fi-ciencyin-flow
ef-fi-ciencyout-flow
ini-tialca-pac-ity
ca-pac-itymin
ca-pac-itymax
ex-ist-ingca-pac-ity
min.in-vest-mentca-pac-ity
max.in-vest-mentca-pac-ity
non-convexin-vest-ment
fixin-vest-mentcosts
vari-ablein-putcosts
vari-ableout-putcosts
pe-ri-od-i-calcosts
vari-ablein-putcon-straintcosts
vari-ableout-putcon-straintcosts
pe-ri-od-i-calcon-straintcosts
ca-pac-ityloss
di-am-e-ter
tem-per-a-turehigh
tem-per-a-turelow
Uvalue
(in-vest)
(in-vest)
(kWh)(kWh)(kWh) (CU/a)(CU/kWh)(CU/kWh)(CU/(kWha))
(CU/kWh)(CU/kWh)(CU/(kWha))
GenericStor-age
(m)|Strat-i-fiedStor-age
(°C)|Strat-i-fiedStor-age
Strat-i-fiedStor-age
(W/(m2*K))|Strat-i-fiedStor-age
ID_battery_storage1 GenericID_electricity_bus0.170.171 0.980 0.1 1 0 0 100 0 0 0 0 70 0 0 400 0 0 0 0 0ID_thermal_storage1 GenericID_heat_bus0.170.171 0.980 0.1 0.9 0 0 100 0 0 0 20 35 0 0 100 0 0 0 0 0ID_stratified_thermal_storage0 Strat-
i-fied
ID_heat_bus0.2 0.2 1 0.980 0.050.950 0 100 0 0 0 20 35 0 0 100 0 0.8 60 40 0.04
dis-trict_battery_storage
0 Genericdis-trict_electricity_bus
0.170.171 0.980 0.1 1 0 0 10000 0 0 0 10 0 0 10 0 0 0 0 0
2.3.8 Links
Within this sheet, the links of the energy system are defined. The following parameters have to be entered:
2.3. Scenario Spreadsheet 31
SESMG, Release 0.1.1
Fig. 6: Graph of the energy system, which is created after entering the example components. The non-active compo-nents are not included in the graph above.
• label: Unique designation of the link. The following format is recommended: “ID_energy sector_transformer”
• comment: Space for an individual comment, e.g. an indication of which measure this component belongs to.
• active: Specifies whether the link shall be included to the model. 0 = inactive, 1 = active.
• bus1: First bus to which the link is connected. If it is a directed link, this is the input bus.
• bus2: Second bus to which the link is connected. If it is a directed link, this is the output bus.
• (un)directed: Specifies whether it is a directed or an undirected link. Input options: “directed”, “undirected”.
• efficiency: Specifies the efficiency of the link. Values between 0 and 1 are allowed entries.
Costs
• variable output costs in (CU/kWh): Specifies the efficiency of the first output. Values between 0 and 1 areallowed entries.
• variable constraint costs in (CU/kWh): Costs incurred per kWh referring to the constraint limit set in the“energysystem” sheet. If not considering constraints fill character “0” is used.
• existing capacity in (kW): Already installed capacity of the link.
• min. investment capacity in (kW): Minimum, in addition to existing capacity, installable capacity.
• max. investment capacity in (kW): Maximum capacity to be installed.
• periodical costs in (CU/(kW a)): Costs incurred per kW for investments within the time horizon.
• Non-Convex Investment: Specifies whether the investment capacity should be defined as a mixed-integer vari-able, i.e. whether the model can decide whether NOTHING OR THE INVESTMENT should be implemented.Explained here.
32 Chapter 2. Manual
SESMG, Release 0.1.1
• Fix Investment Costs in (CU/a): Fixed costs of non-convex investments (in addition to the periodic costs)
Table 9: Exemplary input for the link sheetlabel com-
mentac-tive
(un)directedbus1 bus2 ef-fi-ciency
ex-ist-ingca-pac-ity
min.in-vest-mentca-pac-ity
max.in-vest-mentca-pac-ity
non-convexin-vest-ment
fixin-vest-mentcosts
vari-ableout-putcosts
pe-ri-od-i-calcosts
vari-ablecon-straintcosts
pe-ri-od-icalcon-straintcosts
(kW) (kW) (kW) (CU/a)(CU/kWh)(CU/(kWa))
(CU/kWh)(CU/(kWa))
ID_pv_to_ID_electricity_link1 di-rected
ID_pv_busID_electricity_bus1 0 0 0 0 0 0 0 0 0
ID_electricity_to_ID_hp_electricity_bus1 di-rected
ID_electricity_busID_hp_electricity_bus1 0 0 0 0 0 0 0 0 0
dis-trictheat_directed_link
0 di-rected
dis-trict_heat_bus
ID_heat_bus0.85 0 0 0 0 0 0 0 0 0
dis-trictheat_undirected_link
0 undi-rected
dis-trict_heat_bus
ID_heat_bus0.85 0 0 0 0 0 0 0 0 0
dis-trict_electricity_link
0 di-rected
dis-trict_electricity_bus
ID_electricity_bus1 0 0 0 0 0 0.14380 0 0
dis-trict_chp_to_district_electricity_bus
0 di-rected
dis-trict_chp_electricity_bus
dis-trict_electricity_bus
1 0 0 0 0 0 0.14380 0 0
ID_pv_to_district_electricity_link0 di-rected
ID_pv_busID_electricity_bus1 0 0 0 0 0 0.14380 0 0
Fig. 7: Graph of the energy system, which is created by entering the example components. The non-active componentsare not included in the graph above.
2.3. Scenario Spreadsheet 33
SESMG, Release 0.1.1
2.3.9 Time Series
Within this sheet, time series of components of which no automatically created time series exist, are stored. Morespecifically, these are sinks to which the property “load profile” have been assigned as “timeseries” and sources withthe “technology” property “timeseries”. The following parameters have to be entered:
• timestamp: Points in time to which the stored time series are related. Should be within the time horizon definedin the sheet “timesystem”.
• timeseries: Time series of a sink or a source which has been assigned the property “timeseries” under theattribute “load profile” or “technology. Time series contain a value between 0 and 1 for each point in time,which indicates the proportion of installed capacity accounted for by the capacity produced at that point intime. In the header line, the name must rather be entered in the format “componentID.fix” if the componententers the power system as a fixed component or it requires two columns in the format “componentID.min” and“componentID.max” if it is an unfixed component. The columns “componentID.min/.max” define the range thatthe solver can use for its optimisation.
34 Chapter 2. Manual
SESMG, Release 0.1.1
Table 10: Exemplary input for time series sheettimes-tamp
residen-tial_electricity_demand.actual_value
fixed_timeseries_electricty_source.fixun-fixed_timeseries_electricty_source.min
un-fixed_timeseries_electricty_source.max
fixed_timeseries_electricity_sink.fixun-fixed_timeseries_electricity_sink.min
un-fixed_timeseries_electricity_sink.max
fixed_timeseries_cooling_demand_sink.fix
2012-01-0100:00:00
0.559061982 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 100
2012-01-0101:00:00
0.533606486 0.041667 0.000000 0.500000 0.041667 0.000000 0.500000 100
2012-01-0102:00:00
0.506058757 0.083333 0.000000 0.333333 0.083333 0.000000 0.333333 100
2012-01-0103:00:00
0.504140877 0.125000 0.000000 0.250000 0.125000 0.000000 0.250000 100
2012-01-0104:00:00
0.507104873 0.166667 0.000000 0.200000 0.166667 0.000000 0.200000 100
2012-01-0105:00:00
0.511376515 0.208333 0.000000 0.166667 0.208333 0.000000 0.166667 100
2012-01-0106:00:00
0.541801064 0.250000 0.000000 0.142857 0.250000 0.000000 0.142857 100
2012-01-0107:00:00
0.569261616 0.291667 0.000000 0.125000 0.291667 0.000000 0.125000 100
2012-01-0108:00:00
0.602998867 0.333333 0.000000 0.111111 0.333333 0.000000 0.111111 100
2012-01-0109:00:00
0.629064598 0.375000 0.000000 0.100000 0.375000 0.000000 0.100000 100
2.3.10 Weather Data
If electrical load profiles are simulated with the Richardson tool, heating load profiles with the demandlib or pho-tovoltaic systems with the feedinlib, weather data must be stored here. The weather data time system should be inconformity with the model’s time system, defined in the sheet “timesystem”.
• timestamp: Points in time to which the stored weather data are related.
• dhi: diffuse horizontal irradiance in W/m2
2.3. Scenario Spreadsheet 35
SESMG, Release 0.1.1
• dirhi: direct horizontal irradiance in W/m2
• pressure: air pressure in Pa
• windspeed: wind speed, measured at 10 m height, in unit m/s
• z0: roughness length of the environment in units m
• ground_temp: constant ground temperature at 100 m depth
• water_temp: varying water temperature of a river depending on the air temperature
• groundwater_temp: constant temperatur of the ground water at 6 - 10 m depth in North Rhine-Westphalia
Table 11: Exemplary input for weather datatimestamp dhi dirhi pres-
suretemper-ature
wind-speed
z0 ground_tempwa-ter_temp
groundwa-ter_temp
2012-01-0100:00:00
0.00 0.00 98405.70 10.33 7.2 0.15 13.7 14.62 13.06
2012-01-0101:00:00
0.00 0.00 98405.70 10.33 7.8 0.15 13.7 14.62 13.06
2012-01-0102:00:00
0.00 0.00 98405.70 10.48 7.7 0.15 13.7 14.71 13.06
2012-01-0103:00:00
0.00 0.00 98405.70 10.55 7.7 0.15 13.7 14.75 13.06
2012-01-0104:00:00
0.00 0.00 98405.70 10.93 7.8 0.15 13.7 14.99 13.06
2012-01-0105:00:00
0.00 0.00 98405.70 10.90 8.5 0.15 13.7 14.97 13.06
2012-01-0106:00:00
0.00 0.00 98405.70 10.88 8.5 0.15 13.7 14.96 13.06
2012-01-0107:00:00
0.00 0.00 98405.70 11.22 7.9 0.15 13.7 15.17 13.06
2012-01-0108:00:00
0.00 0.00 98405.70 11.68 8.7 0.15 13.7 15.46 13.06
2012-01-0109:00:00
0.56 0.56 98405.70 11.87 8.6 0.15 13.7 15.57 13.06
2012-01-0110:00:00
13.06 13.06 98405.70 11.65 8.0 0.15 13.7 15.44 13.06
2.4 Results
2.4.1 Interactive Results
If the Spreadsheet Energy System Model Generator was executed via the exe.cmd-file, a browser window with inter-active results will be opened automatically after successful modeling. Alternatively, the results of the last modellingrun can be accessed by executing the Interactive_Results.py file.
The results interface has the following elements:
• Table with a summary of the modelling (1).
– Total System Costs: Total costs of the primary optimization criterion (in the example: total monetarycosts).
36 Chapter 2. Manual
SESMG, Release 0.1.1
Fig. 8: Screenshots of the interactive results browser interface
2.4. Results 37
SESMG, Release 0.1.1
– Total Constraint Costs: Total costs of the secondary optimization criterion (in the example: totalcarbon dioxide emissions).
– Total Variable Costs: Costs per kWh transformed/used/supplied energy
– Total Periodical Costs: Annual costs per kW(h) of invested plant capacity (only applied for investedcapacity, not for existing capacity)
– Total Energy Demand: Total energy demand of the systems’ sinks.
– Total Energy Usage: Total energy inserted to the energy system (via sources).
• Graph of the energy system (2).
• Table with information about every component (3): The entries can be filtered and sorted according to theircontent.
• Plot, where time series of the different components can be shown (5). With the help of a selection window(drop-down menu and search function) (4) time series to be shown can be selected. With the help of a numberof tools (6) the graphs can be scaled, sections can be displayed and images can be saved.
2.4.2 Results as Spreadsheets and Log-Files
The results of the modeling are stored in the “results” folder in two formats: - as summarizing log files, under - asdetailed xlsx-files.
The log-file gives an overview of which components are created and which of the investment options should beimplemented. In addition, it is indicated which costs for the supply of the energy system are incurred in the optimizedcase. For each implemented bus, an xlsx-file is created in which incoming and outgoing energy flows are specified foreach time step of the model are.
2.5 Urban District Upscaling Tool
Documentation to be completed soon.
2.5.1 Using the Upscaling Tool
The upscaling tool can be used with the following steps:
1. Fill the “pre-scenario”-xlsx-sheet as described below.
2. Fill the “standard-parameters”-xlsx-sheet as described below.
3. Execute the upscaling tool to generate a model with the structure described below.
4. Execute the automatically generated scenario-xlsx-sheet using the main SESMG application.
38 Chapter 2. Manual
SESMG, Release 0.1.1
2.5. Urban District Upscaling Tool 39
SESMG, Release 0.1.1
2.5.2 Upscaling Model
Table 12: Componentscomponent system level descriptionsub-system electricity bus sub-system The electric distribution within sub-systems is consid-
ered to be loss free. Therefore, the sub-system elec-tricity bus represents the entire distribution system of asub-system [1].
sub-system electricity de-mand
sub-system The sub-system electricity demand-sink is directlyconnected to the sub-system electricity bus [1].
sub-system electricity im-port
sub-system Due to different prices for electricity import, ashortage/import source is connected to every sub-systemssub-system electricity bus [1].
photovoltaic systemdecentral battery storage sub-systemrenovation measures sub-systemgas heating system sub-systemsolar heat system sub-systemsurface competition con-straint
sub-system
heat pumps sub-systemelectric heating system sub-systemdecentral thermal storage sub-systemelectricity exchange main-systemdistrict heating system main-systembiomass heating plant main-systemcentral heat storage main-systemnatural gas CHP main-systembiogas CHP main-systemcentral thermal storage main-systemcentral hydrogen system main-system
2.5.3 Pre-Scenario
Table 13: pre-scenario input columnscolumn descriptionlabel n.ncomment n.nashp n.n. . . . . .
2.5.4 Standard Parameters
2.5.5 Clustering
2.6 References
[1] Klemm, C., Budde J., Vennemann P., Model Structure for urban energy system optimization models, unpublished
40 Chapter 2. Manual
SESMG, Release 0.1.1
at the time of publication of this documentation, 2021.
2.7 Demo Tool
With the help of the demo tool a descriptive introduction to energy system modeling can be given. The demo tool hasbeen implemented for training purposes and is not intended for the actual analysis of a real energy system.
Users have the possibility to integrate different energy supply technologies into a defined municipal energy system. Ifpossible, the technologies should be dimensioned in such a way that the monetary costs of the entire system and/or thecarbon dioxide emissions are reduced.
With the help of the demo tool the chosen energy supply scenario can be simulated by simply entering performancevalues (monetary costs and CO2 emissions) and then compared graphically with the stored optimized scenarios.
2.7.1 Instruction
Fig. 9: Interface of the Demo Tool
1: Tab to select the demo tool
2: Input of the supply scenario to be simulated
3: Start of the simulation
4: Output of results
2.7. Demo Tool 41
SESMG, Release 0.1.1
5: Storage of the intermediate results shown in (4) for display in the results output (8 and 10)
6: Input of already known simulation results (e.g. from previous simulation runs). By using this function, computingtime can be saved.
7: Storage of the values from (6) for display in the result output
8: Display of a scatter plot for all saved scenarios
9: Adoption of optimized and status-quo scenarios in the output of results
10: Display of a bar plot for all saved scenarios
11: Overview of the stored system parameters
42 Chapter 2. Manual
CHAPTER 3
Troubleshooting
• Troubleshooting
3.1 Troubleshooting
During execution of the model generator, error messages and associated error messages may occur.
3.1.1 Contributing to the troubleshooting
Were you able to solve a bug that was not listed here yet? Help other users and report it by following these simplesteps:
1. Open https://github.com/chrklemm/SESMG/tree/master/docs/troubleshooting
2. Open “troubleshooting-installation.csv” or “troubleshooting-modelling.csv”, depending on whether your errorconcerns the installation or the modeling process.
3. Click on the pencil icon in the upper right corner to edit the file.
4. Add a line to the csv file describing your problem. The line consists of three columns “Error Message”, “PossibleError Cause” and “Debugging”. The columns are separated by commas. Do not use any other commas in yourerror description.
5. Describe below what you have changed and click “propse changes”.
6. Click “Create pull request”
7. Name your pull request and click “create pull request”.
8. That’s it, thanks for your contribution!
43
SESMG, Release 0.1.1
3.1.2 Installation
Error I-001: numpy.generic objects
Error Message: Cannot interpret attribute ‘dtype’ of ‘numpy.generic’ objects’ as a data type
Possible Error Cause: possible module (e.g., demandlib) not actual
Debugging: upgrade module in the installation.cmd (pip install demandlib –upgrade)
Error I-002: port 443
Error Message: HTTPSConnectionPool(host=’pypi.python.org’ port=443), due to a timeout
Possible Error Cause: A package named in the error message was not installed correctly
Debugging: Reinstall the package manually in the virtual environment as follows: 1. open a terminal 2. navigateto your SESMG folder 3. navigate to the scripts-subfolder: cd Scripts 4. start the virtual environment: start/b activate.bat 5. install the missing package as follows: `pip install --default-timeout=100'PACKAGE-NAME` (see also here)
Error I-XXX: Vorlage
Error Message: Possible Error Cause: Debugging:
3.1.3 Modeling
General debugging:
Pay attention to the correct spelling:
• Pay attention to correct upper and lower case.
• Do not use spaces in the entire spreadsheet (except for the “comment” columns).
• Make sure that every column of the used lines is filled. Columns that are not used can be filled with a “0”.
Make sure that the displayed system can stay in balance. - It must always be possible to take off all of the suppliedenergy and vice versa. - The use of excess-sinks and shortage-sources can help to keep the system in balance.
Your error message is not included? Help us and all users by reporting your error message - with or without asolution!. Thank you!
44 Chapter 3. Troubleshooting
SESMG, Release 0.1.1
Error Message Possible Error Cause Debuggingflowsum = source[‘sequences’].sum() KeyEr-ror: ‘sequences’
A system componentwas entered incorrectlyin the input file.
For all components make surethat 1) each column is filledcorrectly and 2) the first com-ponent of a sheet is enteredin the row directly below theheader row and that there areno blank rows between the in-dividual components of a sheet
ApplicationError: Solver (cbc) did not exit nor-mally
A system componentwas entered incorrectlyin the input file.
For all components make surethat 1) each column is filledcorrectly and 2) the first com-ponent of a sheet is enteredin the row directly below theheader row and that there areno blank rows between the in-dividual components of a sheet
df = node_results[‘sequences’] KeyError: ‘se-quences’
The implementedmodel probably has ancircuit. For examplethe excess sink of a buscould achieve higherselling prices thanbuying from a shortagesource. In theory thiscould generate aninfinitely large profit.Such a model cannotbe solved.
Make sure there are no circuitswithin the model.
Memory Error The available memoryis not sufficient to solvethe model.
Take the following measuresgradually until the error nolonger occurs: (1) Restartthe used Python interpreter (2)Close unnecessary programson the computer (3) Make surethat python 64 bit version isused (Python 32 bit can man-age only 2 GB of memory).(4)Start the program on a com-puter with a higher memory.
AttributeError: module ‘time’ has no attribute‘clock’
You are using a Pythonversion not compatiblewith oemof.
Use Pyhton 3.7
ValueError: operands could not be broadcasttogether with shapes (8784 ) (8760 )
The weather datasetcontains the wrongnumber of data pointsfor using feedinlib.
Make sure that the numberof weather data points corre-sponds to the time steps ofthe model (At hourly resolu-tion one year has 8760 timesteps). When simulating a leapyear it is recommended limit-ing the time horizon to 8760hours.
ValueError: pyu-tilib.common._exceptions.ApplicationError:Solver (cbc) did not exit normally
A value for the useof the investment mod-ule (e.g. “min Invest-ment Capacity”) wasnot filled in.
Make sure that all necessarycells of the spreadsheet havebeen filled in.
KeyError: ‘__any component name__’ Incorrectly assignedbus name for theinput or output of acomponent
Check that all bus referencesare correct. Also check for ty-pos.
TypeError: ufunc ‘true_divide’ not supportedfor the input types and the inputs could not besafely coerced to any supported types accord-ing to the casting rule ‘’safe”
The column “annualdemand” was not filledin correctly for a sink.
Make sure to use the “an-nual demand” column for SLPand Richardson sinks and the“nominal value” column fortime series sinks.
AttributeError: ‘str’ object has no attribute‘is_variable_type’
The cost value for anactivated excess sink orshortage source was notcorrectly specified inthe bus sheet
Make sure that all ex-cess/sortage prices consist ofreal numbers. Also check fortypos.
Implicitly replacing the Component attributeequate_InvestmentFlow.invest[districtheat_undirected_linkdistrictheat_bus]_InvestmentFlow.invest[districtheat_undirected_linkheat_bus] (type=<class ‘py-omo.core.base.constraint.SimpleConstraint’>)on block Model with a newComponent (type=<class ‘py-omo.core.base.constraint.AbstractSimpleConstraint’>).This is usually indicative of a mod-elling error. To avoid this warn-ing use block.del_component() andblock.add_component().
This is no user error becausethis error is due to the wayundirected links are imple-mented
KeyError: ‘Index ‘(‘’<oe-mof.solph.network.source.Source:‘ID_phtovoltaic_electricity_source’>’ ‘’<oe-mof.solph.network.bus.Bus: ‘ID_pv_bus’>”0)’ is not valid for indexed component ‘flow”
You probably namedthe busses incorrectly.
Check if all busses are namedcorrectly.
KeyError: ‘ID_photovoltaik_electricity_source’ In this case - PVsources were deacti-vated although theywere still addressed inthe area competition
Make sure that if you have dis-abled pv sources - you do thesame for the competition con-straint.
UserWarning: Optimization ended with statuswarning and termination condition infeasible
the model is not solv-able - probably becausenot enough energy isinserted to sattisfy theenergy demand
make sure that the sources areable to insert enough energy tothe system
Flow: ID_electricity_to_ID_hp_electricity_bus-ID_electricity_bus. This could be caused byNaN-values in your input data.
You have probablyused not allowed spe-cial characters (e.g.m3)
Make sure you have not usedany special characters (e.g.
usem3in-steadofm3)
FutureWarning: Current default for‘dyn_function_h0’ is ‘False’. This is aboutto change to ‘True’. Set ‘False’ explicitly toretain the current behaviour.
the wrong version ofthe feedinlib is used
make sure you are usingfeedinlib==0.0.12
. . . in create_flow_dataframes for index; valuein component[‘sequences’].sum().items():KeyError: ‘sequences’
You have probably en-tered an invalid “trans-former type” within thetransformers sheet
check and correct the trans-former types entered to thesheet
AssertionError: Time discretization of irradi-ance is different from timestep 3600seconds .You need to change the resolution; first!
For the application ofthe richardson tool aweather dataset of a fullyear is required
Add a full year weather dataset to the weather data sheet.
Possible duplicate uids/labels? two components of themodel are having thesame name
rename at least one of the com-ponents
ValueError: Length mismatch: Expected axishas 1 elements; new values have 8760 el-ements Flow: ID_pv_to_ID_electricity_link-ID_pv_bus. This could be caused by NaN-values in your input data.
The model probablyisn’t solvable; becauseof wrong energybal-ance.
Activate necessary excessessinks and shortages sources.
ERROR: Solver (gurobi) returned non-zero re-turn code (1)
reinstall the pyomo-package:1. open a terminal 2. navigateto your SESMG folder 3. nav-igate to the scripts-subfolder:“cd Scripts” 4. start the vir-tual environment: start /b activate.bat 5. rein-stall pyomo: pip installpyomo==5.7.1
df = node_results[‘sequences’] KeyError: ‘se-quences’
The model may possi-bly have an over or un-der supply. This willbreak the calculation.
The bus of the oversupply orundersupply can be localizedby activating excess or short-age.
3.1. Troubleshooting 45
SESMG, Release 0.1.1
46 Chapter 3. Troubleshooting
CHAPTER 4
Sourcecode Documentation
• Python code documentation
4.1 Sourcecode documentation
The Spreadsheet Energy System Model Generator has a hierarchical structure and consists of a total of four workblocks, which in turn consist of various functions and subfunctions. The individual (sub-)functions are documentedwith docstrings according to the PEP 257 standard. Thus, the descriptions of functions, any information about inputand output variables and further details can be easily accessed via the python help function. The model generator’sflow chart is shown in the following figure, including all input and output data, used functions and Python libraries.
Create Energy System. In the first block, the Python library Pandas is used to read the input xlsx-spreadsheet file.Subsequently, an oemof time index (time steps for a time horizon with a resolution defined in the input file) is createdon the basis of the parameters imported. This block is the basis for creating the model. The model does not yet containany system components, these must be added in the following blocks.
Create Objects. In the second block, the system components defined in the xlsxscenario file are created accordingto the oemof specifications, and added to the model. At first, the buses are initialized, followed by the sources, sinks,transformers, storages and links. With the creation of sources, commodity sources are created first and photovoltaicsources second. The creation of sinks is divided into six sub-functions, one for each type of sinks: unfixed sinks, sinkswith a given time series, sinks using standard load profiles (residential heat, commercial heat, electricity) as well assinks using load profiles that were created with the Richardson tool. Although it is untypical to convert a function intoa single sub-function, this alternative was chosen for the creation of transformers and storages. This offers the optionto add further sub-functions such as additional types of transformers and storages lateron. Lastly, the creation of linksis divided into the creation of undirected and directed links.
Optimize Model. Within the third block, the CBC solver is utilized to solve the energy system for minimum costs. Itreturns the “best” scenario. This block only contains one function. Again, further functions may be added lateron, forexample the combination of more than one assessment criterion.
Create Results. In the last block, the scenario as returned from the CBC solver is analyzed and prepared for furtherprocessing. With the first function of this block, the results are saved within xlsx-files. It contains ingoing andoutgoing energy flows for every time step of the entire time horizon. With the second function, a set of statistics forevery component is returned into a log-file. Finally, the results are illustrated as shown in the chapters above.
47
SESMG, Release 0.1.1
Fig. 1: Program flow of the Spreadsheet Energy System Model Generator (grey, center), as well as local inputs andoutputs (bottom) and used Python libraries (top).
48 Chapter 4. Sourcecode Documentation
SESMG, Release 0.1.1
4.1.1 Submodules of program_files
4.1.2 Spreadsheet_Energy_System_Model_Generator module
Spreadsheet-Energy-System-Model-Generator.
creates an energy system from a given spreadsheet data file, solves it for the purpose of least cost optimization, andreturns the optimal scenario results.
The scenario.xlsx-file must contain the following elements:
sheet columnsen-er-gysys-tem
start_date, end_date, holidays, temporal resolution, timezone
buses label, active, excess, shortage, shortage costs /(CU/kWh), excess costs /(CU/kWh)sinks label, active, input, input2, load profile, nominal value /(kW), annual demand /(kWh/a), occupants
[RICHARDSON], building class [HEAT SLP ONLY], wind class [HEAT SLP ONLY], fixedsourceslabel, active, output, technology, variable costs /(CU/kWh), existing capacity /(kW), min. investment ca-
pacity /(kW), max. investment capacity /(kW), periodical costs /(CU/(kW a)), technology database (PVONLY), inverter database (PV ONLY), Modul Model (PV ONLY), Inverter Model (PV ONLY), referencevalue /(kW), Azimuth (PV ONLY), Surface Tilt (PV ONLY), Albedo (PV ONLY), Altitude (PV ONLY),Latitude (PV ONLY), Longitude (PV ONLY)
trans-form-ers
label, active, transformer type, input, output, output2, efficiency, efficiency2, variable input costs/(CU/kWh), variable output costs /(CU/kWh), existing capacity /(kW), max. investment capacity /(kW),min. investment capacity /(kW), periodical costs /(CU/(kW a))
stor-ages
label, active, bus, existing capacity /(kW), min. investment capacity /(kW), max. investment capacity /(kW),periodical costs /(CU/(kW a)), capacity inflow, capacity outflow, capacity loss, efficiency inflow, efficiencyoutflow, initial capacity, capacity min, capacity max, variable input costs, variable output costs
pow-er-lines
label, active, bus_1, bus_2, (un)directed, efficiency, existing capacity /(kW), min. investment capacity /(kW),max. investment capacity /(kW), variable costs /(CU/kWh), periodical costs /(CU/(kW a))
time_seriestimestamp, timeseries for components with fixed input or outputweather_datadates(untitled), dhi, dirhi, pressure, temp_air, windspeed, z0
Docs:
• https://spreadsheet-energy-system-model-generator.readthedocs.io/en/latest/
GIT:
https://github.com/chrklemm/SESMG
Christian Klemm - christian.klemm@fh-muenster.de
4.1. Sourcecode documentation 49
SESMG, Release 0.1.1
program_files.Spreadsheet_Energy_System_Model_Generator.sesmg_main(scenario_file:str, re-sult_path:str,num_threads:int, graph:bool,crite-rion_switch:bool,xlsx_results:bool, con-sole_results:bool,time-series_prep:list,solver:str)
Main function of the Spreadsheet System Model Generator
Parameters
• scenario_file (str ['xlsx']) – The scenario_file must contain the componentsspecified above.
• result_path (str ['folder']) – path of the folder where the results will be saved
• num_threads (int) – number of threads that the method may use
• graph (bool) – defines if the graph should be created
• results (bool) – defines if the results should be created
• plotly (bool) – defines if the plotly dash should be started
Christian Klemm - christian.klemm@fh-muenster.de
4.1.3 data_preparation module
program_files.data_preparation.calculate_cluster_means(data_set, cluster_number:int, cluster_labels, period:str)
Determines weather averages of the individual clusters for a weather dataset, based on predetermined clusterallocation. Caution: weather data set must be available in hourly resolution!
Parameters
• data_set (pd.core.frame.DataFrame) – data_set, the clusters should be appliedto
• cluster_number (int) – Number of clusters
• cluster_labels (np.array) – Chronological list, which days of the weather data setbelongs to which cluster
• period (str) – defines rather days or weeks were selected
Return prep_data_set pandas dataframe containing the prepared weather data set
50 Chapter 4. Sourcecode Documentation
SESMG, Release 0.1.1
program_files.data_preparation.calculate_k_means_clusters(cluster_number: int,weather_data: dict,cluster_criterion: str,period: str)
Applies the k-means algorithm to a list of day-weather-vectors. Caution: weather data set must be available inhourly resolution!
Parameters
• cluster_number (int) – Number of k-mean-clusters
• weather_data (dict) – weather_data, the clusters should be applied to
• cluster_criterion (str) – weather_parameter/column name which should be ap-plied as cluster criterion
• period (str) – defines rather days or weeks were selected
Return model.labelsmodel.labels_ Chronological list, which days of the weather data set belongsto which cluster
program_files.data_preparation.change_optimization_criterion(nodes_data: dict)Swaps the primary optimization criterion (“costs”) with the secondary criterion (“constraint costs”) in the entirescenario. The constraint limit is adjusted.
@ Christian Klemm - christian.klemm@fh-muenster.de
Parameters nodes_data – dictionary containing the parameters of the scenario
:type nodes_data:dict
program_files.data_preparation.data_set_slicing(n_days: int, data_set, period: str)uses every n-th period of the given data_set and cuts the rest out of the data_set
Parameters
• n_days (int) – defines which period is chosen
• data_set (pandas.core.frame.Dataframe) – data to be sliced
• period (str) – defines rather hours, days or weeks were selected
program_files.data_preparation.data_set_slicing2(n_days, data_set, period)cuts out every nth period from the given data_set and leaves the remaining periods for further consideration
Parameters
• n_days (int) – defines which period is sliced
• data_set (pandas.core.frame.Dataframe) – data to be sliced
• period (str) – defines rather hours, days or weeks were selected
program_files.data_preparation.extract_single_periods(data_set, column_name, pe-riod)
Extracts individual periods of a certain column of a weather data set as lists. Caution: weather data set must beavailable in hourly resolution!
Parameters
• data_set – weather data set to be extracted
• column_name – column name of which the extraction should be applied
• period – indicates what kind of periods shall be extracted. Possible arguments: “days”,“weeks”, “hours”.
4.1. Sourcecode documentation 51
SESMG, Release 0.1.1
Return cluster_vectors list, containing a list/vector for every single day
program_files.data_preparation.hierarchical_selection(nodes_data, scheme, period,seasons, scheme_path)
Algorithm for the hierarchical selection of representative time periods of a weather data set. In this embodiment,the following representative periods are selected for every season (winter, spring, summer, fall) are selected:
• Week containing the coldest temperature of the season
• Week with the lowest average sun duration
• Week containing the warmest temperature of the season
• Week with the highest average sun duration
Parameters nodes_data – SESMG-nodes data, containing weather data, energy system parame-ters and timeseries
Returns **nodes_data**(dict): modified SESMG-nodes data, containing weather data, energy sys-tem parameters and timeseries
program_files.data_preparation.k_means_algorithm(clusters: int, criterion: str,nodes_data: dict, period: str)
TODO missing :param clusters: number of clusters chosen in GUI :type clusters: int :param criterion: criterionchosen for k_mean algorithm :type criterion: str :param nodes_data: dictionary containing the excel worksheetsfrom
the used scenario workbook
Parameters period (str) – defines rather days or weeks were selected
program_files.data_preparation.k_means_parameter_adaption(nodes_data: dict, clus-ters: int, period: str)
To be able to work with the adapted weather data set some parameters from nodes_data must be changed.
Parameters
• nodes_data (dict) – system parameters
• clusters (int) – Number of clusters
• period – defines rather hours, days or weeks were selected
program_files.data_preparation.k_means_timeseries_adaption(nodes_data: dict,clusters: int, clus-ter_labels, period:str)
TODO missing :param nodes_data: system parameters :type nodes_data: dict :param clusters: Number ofclusters :type clusters: int :param cluster_labels: Chronological list, which days of the weather
data set belongs to which cluster
Parameters period (str) – defines rather hours, days or weeks were selected
program_files.data_preparation.random_sampling(nodes_data, period, num-ber_of_samples)
program_files.data_preparation.timeseries_averaging(clusters: int, nodes_data: dict,period: str)
Averages the values of the time series, how many values are averaged is defined by the variable clusters.
Parameters
52 Chapter 4. Sourcecode Documentation
SESMG, Release 0.1.1
• clusters (int) – definies how many periods will be averaged
• nodes_data (dict) – dictionary containing the excel worksheets from the used scenarioworkbook
• period (str) – defines rather days or weeks were selected
program_files.data_preparation.timeseries_downsampling(nodes_data: dict,n_timesteps: int, period:str)
uses every n-th period of timeseries and weather data
Parameters
• nodes_data (dict) – system parameters
• n_timesteps (int) – defines which period is chosen
• period (str) – defines rather hours, days or weeks were selected
program_files.data_preparation.timeseries_downsampling2(nodes_data: dict,n_timesteps: int, period:str)
cuts every n-th period of timeseries and weather data
Parameters
• nodes_data (dict) – system parameters
• n_timesteps (int) – defines which period is cut
• period (str) – defines rather hours, days or weeks were selected
program_files.data_preparation.timeseries_preparation(timeseries_prep_param:list, nodes_data: dict,scheme_path: str, re-sult_path: str)
Evaluates the passed parameters for timeseries preparation and starts the corresponding simplification/clusteringalgorithm.
Parameters
• timeseries_prep_param (list) – List of timeseries preparation parameters with thescheme [algorithm, cluster_index, cluster_criterion, cluster_period, cluster_season]
• nodes_data (dict) – Dictionary containing the energy systems data
• scheme_path (str) – Path, where the xlsx-file with possible heuristic selection schemesis stored.
• result_path (str) –
Returns
program_files.data_preparation.timeseries_slicing(n_days: int, nodes_data: dict, pe-riod: str)
uses every n-th period of the given data_set and cuts the rest out of the data_set
Parameters
• n_days (int) – defines which period is chosen
• nodes_data (dict) – data to be sliced
• period (str) – defines rather hours, days or weeks were selected
4.1. Sourcecode documentation 53
SESMG, Release 0.1.1
program_files.data_preparation.timeseries_slicing2(n_days: int, nodes_data: dict, pe-riod: str)
cuts out every nth period from the given data_set and leaves the remaining periods for further consideration
Parameters
• n_days (int) – defines which period is sliced
• nodes_data (dict) – data to be sliced
• period (str) – defines rather hours, days or weeks were selected
4.1.4 create_energy_system module
Functions for creating an oemof energy system.
Christian Klemm - christian.klemm@fh-muenster.de
program_files.create_energy_system.define_energy_system(nodes_data: dict)Creates an energy system.
Creates an energy system with the parameters defined in the given .xlsx-file. The file has to contain a sheetcalled “energysystem”, which has to be structured as follows:
start_date end_date temporal resolutionYYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss h
Parameters nodes_data (dict) – dictionary containing data from excel scenario file
Returns
• esys (oemof.Energysystem) - oemof energy system
Christian Klemm - christian.klemm@fh-muenster.de
program_files.create_energy_system.import_scenario(filepath: str)→ dictImports data from a spreadsheet scenario file.
The excel sheet has to contain the following sheets:
• energysystem
• buses
• transformers
• sinks
• sources
• storages
• powerlines
• time_series
Parameters filepath (str) – path to excel scenario file
Raises
• FileNotFoundError – excel spreadsheet not found
• ValueError – content of excel spreadsheet not readable or empty
54 Chapter 4. Sourcecode Documentation
SESMG, Release 0.1.1
Returns
• nd (dict) - dictionary containing excel sheets
Christian Klemm - christian.klemm@fh-muenster.de
4.1.5 create_objects module
Creates oemof energy system components.
Functions for the creation of oemof energy system objects from a given set of object parameters.
Contributors:
• Christian Klemm - christian.klemm@fh-muenster.de
• Gregor Becker - gb611137@fh-muenster.de
class program_files.create_objects.Links(nodes_data, nodes, bus)Bases: object
Creates links objects as defined in ‘nodes_data’ and adds them to the list of components ‘nodes’.
# TODO Excel columns missing
Parameters
• nodes_data (dict) – dictionary containing data from excel scenario file. The followingdata have to be provided:
– ’active’
– ’label’
– ’(un)directed’
• busd (dict) – dictionary containing the buses of the energy system
• nodes (list) – list of components created before(can be empty)
Christian Klemm - christian.klemm@fh-muenster.de
busd = None
class program_files.create_objects.Sinks(nodes_data: dict, busd: dict, nodes: list,time_series, weather_data)
Bases: object
Creates sink objects.
There are four options for labeling source objects to be created:
• unfixed: a source with flexible time series
• timeseries: a source with predefined time series
• SLP: a VDEW standard load profile component
• richardson: a component with stochastically generated timeseries
Parameters
• nodes_data (dict) – dictionary containing parameters of sinks to be created.The fol-lowing data have to be provided:
– ’label’
4.1. Sourcecode documentation 55
SESMG, Release 0.1.1
– ’active’
– ’fixed’
– ’input’
– ’load profile’
– ’nominal value’
– ’annual demand’
– ’occupants [Richardson]’
– ’building class’
– ’wind class’
• busd (dict) – dictionary containing the buses of the energy system
• nodes (list) – list of components created before(can be empty)
• filepath (str) – path to .xlsx scenario-file containing a “weather data” sheet with time-series for
– ”dhi”(diffuse horizontal irradiation) W / m ^ 2
– ”dirhi”(direct horizontal irradiance) W / m ^ 2
– ”pressure” in Pa
– ”temperature” in °C
– ”windspeed” in m / s
– ”z0”(roughness length) in m
Contributors:
• Christian Klemm - christian.klemm@fh-muenster.de
• Gregor Becker - gregor.becker@fh-muenster.de
busd = None
create_sink(de: dict, timeseries_args: dict)Creates an oemof sink with fixed or unfixed timeseries.
Parameters
• de (dict) – dictionary containing all information for the creation of an oemof sink. Atleast the following key-value-pairs have to be included:
– ’label’
– ’input’
• timeseries_args (dict) – dictionary rather containing the ‘fix-attribute’ or the‘min-’ and ‘max-attribute’ of a sink
Christian Klemm - christian.klemm@fh-muenster.de
nodes_sinks = []
richardson_sink(de: dict, nodes_data: dict, weather_data)Creates a sink with stochastically timeseries.
Creates a sink with stochastically generated input, using richardson.py. Used for the modelling of residen-tial electricity demands. In this context the method uses the create_sink method.
56 Chapter 4. Sourcecode Documentation
SESMG, Release 0.1.1
Parameters
• de (dict) – dictionary containing all information for the creation of an oemof sink. Atleast the following key-value-pairs have to be included:
– ’label’
– ’fixed’
– ’annual demand’
– ’occupants’
• nodes_data (dict) – dictionary containing excel sheets
Christian Klemm - christian.klemm@fh-muenster.de
slp_sink(de: dict, nodes_data: dict, weather_data)Creates a sink with a residential or commercial SLP time series.
Creates a sink with inputs according to VDEW standard load profiles, using oemofs demandlib. Usedfor the modelling of residential or commercial electricity demand. In this context the method uses thecreate_sink method.
Parameters
• de (dict) – dictionary containing all information for the creation of an oemof sink. Atleast the following key-value-pairs have to be included:
– ’label’
– ’load profile’
– ’annual demand’
– ’building class’
– ’wind class’
• filepath (str) – path to .xlsx scenario-file containing a “energysystem” sheet
Christian Klemm - christian.klemm@fh-muenster.de
timeseries_sink(de, nodes_data)Creates a sink object with a fixed input. The input must be given as a time series in the scenario file. Inthis context the method uses the create_sink method.
Parameters
• de (dict) – dictionary containing all information for the creation of an oemof sink. Atleast the following key-value-pairs have to be included:
– ’label’
– ’nominal value’
• filepath (str) – path to .xlsx scenario-file containing a “time_series” sheet
Christian Klemm - christian.klemm@fh-muenster.de
unfixed_sink(de: dict)Creates a sink object with an unfixed energy input and the use of the create_sink method.
Parameters de (dict) – dictionary containing all information for the creation of an oemofsink. For this function the following key-value-pairs have to be included:
• ’label’
4.1. Sourcecode documentation 57
SESMG, Release 0.1.1
• ’nominal value’
Christian Klemm - christian.klemm@fh-muenster.de
class program_files.create_objects.Sources(nodes_data: dict, nodes: list, busd: dict,time_series, weather_data)
Bases: object
Creates source objects.
#def create_source(self, so, timeseries_args, output): Creates an oemof source with fixed or unfixed time-series
There are four options for labeling source objects to be created:
• ‘commodity’: a source with flexible time series
• ‘timeseries’: a source with predefined time series
• ‘photovoltaic’: a photovoltaic component
• ‘wind power’: a wind power component
param nodes_data dictionary containing parameters of sources to be created.The followingdata have to be provided:
• ‘label’
• ‘active’
• ‘fixed’
• ‘output’
• ‘technology’
• ‘variable costs / (CU / kWh)’
• ‘existing capacity / (kW)’
• ‘min.investment capacity / (kW)’
• ‘max.investment capacity / (kW)’
• ‘periodical costs / (CU / (kW a))’
• ‘non-convex investment’
• ‘Fix Investment Cost / (CU/a)’
• ‘Turbine Model (Windpower ONLY)’
• ‘Hub Height (Windpower ONLY)’
• ‘technology database(PV ONLY)’
• ‘inverter database(PV ONLY)’
• ‘Modul Model(PV ONLY)’
• ‘Inverter Model(PV ONLY)’
• ‘Azimuth(PV ONLY)’
• ‘Surface Tilt(PV ONLY)’
• ‘Albedo(PV ONLY)’
• ‘Altitude(PV ONLY)’
58 Chapter 4. Sourcecode Documentation
SESMG, Release 0.1.1
• ‘Latitude(PV ONLY)’
• ‘Longitude(PV ONLY)’
type nodes_data dict
param busd dictionary containing the buses of the energy system
type busd dict
param nodes list of components created before(can be empty)
type nodes list
param filepath path to .xlsx scenario-file containing a “weather data” sheet with timeseries for
• “dhi”(diffuse horizontal irradiation) W / m ^ 2
• “dirhi”(direct horizontal irradiance) W / m ^ 2
• “pressure” in Pa
• “temperature” in °C
• “windspeed” in m / s
• “z0”(roughness length) in m
type filepath str
Contributors:
• Christian Klemm - christian.klemm@fh-muenster.de
• Gregor Becker - gregor.becker@fh-muenster.de
commodity_source(so: dict)Creates an oemof source object with flexible time series (no maximum or minimum) with the use of thecreate_source method.
Parameters so (object) – dictionary containing all information for the creation of an oemofsource. At least the following key-value-pairs have to be included:
• ’label’
Christian Klemm - christian.klemm@fh-muenster.de
create_source(so: dict, timeseries_args: dict, output=None)Creates an oemof source with fixed or unfixed timeseries
Parameters
• so (dict) – dictionary containing all information for the creation of an oemof source. Atleast the following key-value-pairs have to be included:
– ’label’
– ’output’
– ’periodical costs’
– ’min. investment capacity’
– ’max. investment capacity’
– ’existing capacity’
– ’non-convex investment’
4.1. Sourcecode documentation 59
SESMG, Release 0.1.1
– ’fix investment costs’
– ’variable costs’
• timeseries_args (dict) – dictionary rather containing the ‘fix-attribute’ or the‘min-’ and ‘max-attribute’ of a source
Christian Klemm - christian.klemm@fh-muenster.de
pv_source(so: dict, my_weather_pandas_dataframe)Creates an oemof photovoltaic source object.
Simulates the yield of a photovoltaic system using feedinlib and creates a source object with the yield astime series and the use of the create_source method.
Parameters
• so (dict) – dictionary containing all information for the creation of an oemof source. Atleast the following key-value-pairs have to be included:
– ’label’
– ’fixed’
– ’Azimuth (PV ONLY)’
– ’Surface Tilt (PV ONLY)’
– ’Modul Model (PV ONLY)’
– ’Inverter Model (PV ONLY)’
– ’Albedo (PV ONLY)’
– ’Latitude (PV ONLY)’
– ’Longitude (PV ONLY)’
• my_weather_pandas_dataframe (pandas.core.frame.Dataframe) –Dataframe containing:
– ’dirhi’
– ’dhi’
– ’temperature’
– ’windspeed’
Christian Klemm - christian.klemm@fh-muenster.de
solar_heat_source(so, data)Creates a solar thermal collector source object.
Calculates the yield of a solar thermal flat plate collector or a concentrated solar power collector as timeseries by using oemof.thermal and the create_source method.
The following key-value-pairs have to be included in the keyword arguments:
Parameters so (dict) – has to contain the following keyword arguments
• ’input’
• ’technology’:
– ’solar_thermal_flat_plate’ or
– ’concentrated_solar_power’
60 Chapter 4. Sourcecode Documentation
SESMG, Release 0.1.1
• ’Latitude’
• ’Longitude’
• ’Surface Tilt’
• ’Azimuth’
• ’Cleanliness’
• ’ETA 0’
• ’A1’
• ’A2’
• ’C1’
• ’C2’
• ’Temperature Inlet’
• ’Temperature Difference’
• ’Conversion Factor’
• ’Peripheral Losses’
• ’Electric Consumption’
@ Yannick Wittor - yw090223@fh-muenster.de, 27.11.2020
timeseries_source(so: dict, time_series)Creates an oemof source object from a pre-defined timeseries with the use of the create_source method.
Parameters
• so (dict) – dictionary containing all information for the creation of an oemofsource. At least the following key-value-pairs have to be included:
– ’label’
– ’output’
– ’periodical costs’
– ’min. investment capacity’
– ’max. investment capacity’
– ’existing capacity’
– ’non-convex investment’
– ’fix investment costs’
– ’variable costs’
• filepath (str) – path to .xlsx scenario-file containing a “time_series” sheet
Christian Klemm - christian.klemm@fh-muenster.de
windpower_source(so: dict, weather_df_wind)Creates an oemof windpower source object.
Simulates the yield of a windturbine using feedinlib and creates a source object with the yield as timeseries and the use of the create_source method.
Parameters
4.1. Sourcecode documentation 61
SESMG, Release 0.1.1
• so (dict) – dictionary containing all information for the creation of an oemofsource. At least the following key-value-pairs have to be included:
– ’label’
– ’fixed’
– ’Turbine Model (Windpower ONLY)’
– ’Hub Height (Windpower ONLY)’
• weather_df_wind (pandas.core.frame.Dataframe) – Dataframe con-taining:
– ’windspeed’
– ’temperature’
– ’z0’
– ’pressure’
Christian Klemm - christian.klemm@fh-muenster.de
class program_files.create_objects.Storages(nodes_data: dict, nodes: list, busd: dict)Bases: object
Creates oemof storage objects as defined in ‘nodes_data’ and adds them to the list of components ‘nodes’.
Parameters
• nodes_data (dict) – dictionary containing parameters of storages to be created.Thefollowing data have to be provided:
– ’label’
– ’active’
– ’bus’
– ’existing capacity / (kWh)’
– ’min.investment capacity / (kWh)’
– ’max.investment capacity / (kWh)’
– ’non-convex investments’
– ’fix investment costs’
– ’input/capacity ratio (invest)’
– ’output/capacity ratio (invest)’
– ’capacity loss’
– ’efficiency inflow’
– ’efficiency outflow’
– ’initial capacity’
– ’capacity min’
– ’capacity max’
– ’variable input costs’
– ’variable output costs’
62 Chapter 4. Sourcecode Documentation
SESMG, Release 0.1.1
• busd (dict) – dictionary containing the buses of the energy system
• nodes (list) – list of components created before(can be empty)
Christian Klemm - christian.klemm@fh-muenster.de
generic_storage(s)Creates a generic storage object with the parameters given in ‘nodes_data’ and adds it to the list of com-ponents ‘nodes’ —- Keyword arguments: t : obj:’dict’
– dictionary containing all information for the creation of an oemof storage.
stratified_thermal_storage(s, data)Creates a stratified thermal storage object with the parameters given in ‘nodes_data’ and adds it to the listof components ‘nodes’
Parameters s (dict) – has to contain the following keyword arguments: - Standard in-formation on Storages - ‘storage type’: ‘Stratified’ - ‘diameter’ - ‘temperature high’ -‘temperature low’ - ‘U value /(W/(sqm*K))’
@ Yannick Wittor - yw090223@fh-muenster.de, 26.01.2021
class program_files.create_objects.Transformers(nodes_data, nodes, busd,weather_data)
Bases: object
Creates a transformer object. Creates transformers objects as defined in ‘nodes_data’ and adds them to the listof components ‘nodes’.
Parameters
• nodes_data (dict) – dictionary containing data from excel scenario file. The follow-ing data have to be provided:
– label,
– active,
– transformer type,
– input,
– output,
– output2,
– efficiency,
– efficiency2,
– variable input costs,
– variable output costs,
– existing capacity,
– max. investment capacity,
– min. investment capacity,
– periodical costs
• busd (dict) – dictionary containing the buses of the energy system
• nodes (list) – list of components created before(can be empty)
Christian Klemm - christian.klemm@fh-muenster.de
4.1. Sourcecode documentation 63
SESMG, Release 0.1.1
absorption_heat_transformer(tf, data)Creates an absorption heat transformer object with the parameters given in ‘nodes_data’ and adds it to thelist of components ‘nodes’
Parameters
• tf (dict) – has to contain the following keyword arguments - Standard Input in-formation of transformer class - ‘transformer type’: ‘absorption_heat_transformer’ -‘mode’: ‘chiller’ - ‘name’
– name refers to models of absorption heat transformers with different equation pa-rameters. See documentation for possible inputs.
– ’high temperature’
– ’chilling temperature’
– ’electrical input conversion factor’
– ’recooling temperature difference’
• data (dict) – weather data
Yannick Wittor - yw090223@fh-muenster.de
busd = None
compression_heat_transformer(tf: dict, data)Creates a Compression Heat Pump or Compression Chiller by using oemof.thermal and adds it to the listof components ‘nodes’. Parameters are given in ‘nodes_data’ are used .
Parameters
• tf (dict) – has to contain the following keyword arguments
– ’label’
– ’variable input costs / (CU/kWh)’
– ’variable output costs / (CU/kWh)’
– ’min. investment capacity / (kW)’
– ’max. investment capacity / (kW)’
– ’existing capacity / (kW)’
– ’transformer type’: ‘compression_heat_transformer’
– ’mode’:
* ’heat_pump’ or
* ’chiller’
– ’heat source’
– ’temperature high’
– ’temperature low’
– ’quality grade’
– ’area’
– ’length of the geoth. probe’
– ’heat extraction’
64 Chapter 4. Sourcecode Documentation
SESMG, Release 0.1.1
– ’min. borehole area’
– ’temp. threshold icing’
– ’factor icing’
• data (pandas.core.frame.Dataframe) – Dataframe containing all temper-ature information for the low temperature source. At least the following key-value-pairs have to be included:
– ’ground_temp’
– ’groundwater_temp’
– ’temperature’
– ’water_temp’
Raises SystemError – choosen heat source not defined
Janik Budde - Janik.Budde@fh-muenster.de Yannick Wittor - yw090223@fh-muenster.de
create_transformer(tf, inputs, outputs, conversion_factors)TODO Docstring missing
generic_transformer(tf: dict)Creates a Generic Transformer object. Creates a generic transformer with the parameters given in‘nodes_data’ and adds it to the list of components ‘nodes’.
Parameters tf (dict) – dictionary containing all information for the creation of an oemoftransformer. At least the following key-value-pairs have to be included:
• ’label’
• ’input’
• ’output’
• ’output2’
• ’efficiency’
• ’efficiency2’
• ’variable input costs / (CU/kWh)’
• ’variable output costs / (CU/kWh)’
• ’variable output costs 2 / (CU/kWh)’
• ’periodical costs / (CU/kWh)’
• ’min. investment capacity / (kW)’
• ’max. investment capacity / (kW)’
• ’existing capacity / (kW)’
• ’non-convex investment’
• ’fix investment costs / (CU/a)’
Christian Klemm - christian.klemm@fh-muenster.de
genericchp_transformer(tf: dict, nd: dict)Creates a Generic CHP transformer object. Creates a generic chp transformer with the parameters givenin ‘nodes_data’ and adds it to the list of components ‘nodes’.
Parameters
4.1. Sourcecode documentation 65
SESMG, Release 0.1.1
• tf (dict) – dictionary containing all information for the creation of an oemoftransformer. At least the following key-value-pairs have to be included:
– ’label’
– ’input’
– ’output’
– ’output2’
– ’efficiency’
– ’efficiency2’
– ’variable input costs / (CU/kWh)’
– ’variable output costs / (CU/kWh)’
– ’variable output costs 2 / (CU/kWh)’
– ’periodical costs / (CU/kWh)’
– ’min. investment capacity / (kW)’
– ’max. investment capacity / (kW)’
– ’existing capacity / (kW)’
– ’non-convex investment’
– ’fix investment costs / (CU/a)’
• nd (dict) – dictionary containing parameters of the buses to be created.
Christian Klemm - christian.klemm@fh-muenster.de
nodes_transformer = []
program_files.create_objects.buses(nodes_data: dict, nodes: list)→ dictCreates bus objects. Creates bus objects with the parameters given in ‘nodes_data’ and adds them to the list ofcomponents ‘nodes’.
Parameters
• nodes_data (dict) – dictionary containing parameters of the buses to be created.The following parameters have to be provided:
– label,
– active,
– excess,
– shortage,
– shortage costs,
– excess costs
• nodes (list) – list of components created before (can be empty)
Return busd dictionary containing all buses created
Return type dictChristian Klemm - christian.klemm@fh-muenster.de
66 Chapter 4. Sourcecode Documentation
SESMG, Release 0.1.1
4.1.6 create_graph module
program_files.create_graph.create_graph(filepath: str, nodes_data: dict, show: bool, leg-end=False)
Visualizes the energy system as graph.
Creates, using the library Graphviz, a graph containing all components and connections from “nodes_data” andreturns this as a PNG file.
Parameters
• filepath (str) – path where the PNG-result shall be saved
• nodes_data (dict) – dictionary containing data from excel scenario file.
• legend (bool) – specifies, whether a legend will be added to the graph or notChristian Klemm - christian.klemm@fh-muenster.de
4.1.7 optimize_model module
program_files.optimize_model.competition_constraint(om, nd, energy_system)The outflow_competition method is used to optimise the sum of the outflows of two given components multipliedby two different factors (e.g. the space required for a kW) against a given limit.
Parameters
• om (oemof.solph.Model) – oemof solph model to which the constraints will beadded
• nd (dict) – dictionary containing all excel sheets of the spread sheet
• energy_system (oemof.solph.energy_system) – the oemof created en-ergy_system containing all created components
Returns
• om (oemof.solph.Model) - oemof solph Model within the constraints
program_files.optimize_model.constraint_optimization_against_two_values(om:oe-mof.solph.models.Model,limit:float)→oe-mof.solph.models.Model
Function for optimization against two parameters (e.g. monetary, emissions)Parameters
• om (oemof.solph.Model) – oemof solph model to which the constraints will beadded
• limit (int) – maximum value for the second parameter for the whole energysystem
Returns
• om (oemof.solph.Model) - oemof solph Model within the constraints
program_files.optimize_model.least_cost_model(energy_system: oe-mof.solph.network.EnergySystem,num_threads: int, nodes_data: dict,busd: dict, solver: str) → oe-mof.solph.models.Model
4.1. Sourcecode documentation 67
SESMG, Release 0.1.1
Solves a given energy system model. Solves a given energy system for least costs and returns the optimizedenergy system.
Parameters
• energy_system (oemof.solph.Energysystem) – energy system consisting anumber of components
• num_threads (int) – number of threads the solver is allowed to use
• nodes_data (dict) – dictionary containing all components information out of theexcel spreadsheet
• busd (dict) – dictionary containing the buses of the energysystem
Returns
• om (oemof.solph.Model) - solved oemof modelChristian Klemm - christian.klemm@fh-muenster.de
4.1.8 create_results module
Functions for returning optimization results in several forms.
Contributor: Christian Klemm - christian.klemm@fh-muenster.de
class program_files.create_results.Results(nodes_data: dict, optimization_model: oe-mof.solph.models.Model, energy_system: oe-mof.solph.network.EnergySystem, result_path:str, console_log: bool)
Bases: object
Class for preparing Plotly results and logging the results of Cbc-Solver
add_component_to_loc(label, comp_type, capacity=None, variable_costs=None, periodi-cal_costs=None, investment=None, maxinvest=’—’, constraints=None)
adds the given component with its parameters to list of components (loc)
calc_constraint_costs(comp, investment=None, comp_type=None)
static calc_periodical_costs(comp, investment)
calc_variable_costs(comp, comp_type)
comp_capacity = None
comp_input1 = None
comp_input2 = None
comp_output1 = None
comp_output2 = None
console_logging(comp_type, capacity=None, variable_costs=None, periodical_costs=None, in-vestment=None, transformer_type=None)
consists of the different console logging entries and logs the one for the given component
copt = ['ID', 'type', 'input 1/kWh', 'input 2/kWh', 'output 1/kWh', 'output 2/kWh', 'capacity/kW', 'variable costs/CU', 'periodical costs/CU', 'investment/kW', 'max. invest./kW', 'constraints/CU']
create_flow_dataframes(comp, component, excess_or_shortage=None)creates up to 5 pandas series consisting the flows of the given component
df_list_of_components = None
df_result_table = Empty DataFrame Columns: [] Index: []
68 Chapter 4. Sourcecode Documentation
SESMG, Release 0.1.1
esys = None
get_comp_investment(comp, comp_type)
static get_first_node_flow(flow)returns begin of the flow, used to log where the flow comes from
static get_last_node_flow(flow)returns end of the flow, used to log where the flow goes to
static insert_line_end_of_component()
static log_category(component: str)Returns logging info for type of given components. Which is the first step of the logging/ results producingprocess.
Parameters component (str) – component type
results = None
program_files.create_results.charts(nodes_data: dict, optimization_model: oe-mof.solph.models.Model, energy_system: oe-mof.solph.network.EnergySystem)
Plots model results.
Plots the in- and outgoing flows of every bus of a given, optimized energy systemParameters
• nodes_data (dict) – dictionary containing data from excel scenario file
• optimization_model (oemof.solph.Model) – optimized energy system
• energy_system (oemof.solph.Energysystem) – original (unoptimized) en-ergy system
Returns
• plots (matplotlib.plot) plots displaying in and outgoing flows of the energy systems’buses.
Christian Klemm - christian.klemm@fh-muenster.de
program_files.create_results.xlsx(nodes_data: dict, optimization_model: oe-mof.solph.models.Model, filepath: str)
Returns model results as xlsx-files. Saves the in- and outgoing flows of every bus of a given, optimized energysystem as .xlsx file
Parameters
• nodes_data (dict) – dictionary containing data from excel scenario file
• optimization_model (oemof.solph.model) – optimized energy system
• filepath (str) – path, where the results will be stored
Returns
• results (.xlsx) - xlsx files containing in and outgoing flows of the energy systems’ buses.Christian Klemm - christian.klemm@fh-muenster.de
4.1.9 Interactive_Results module
4.1. Sourcecode documentation 69
SESMG, Release 0.1.1
70 Chapter 4. Sourcecode Documentation
CHAPTER 5
Further Information
• Publications
• Related links
• License
• Contact
• Contributors
5.1 Publications
The SESMG is/was used within the following publications, theses and projects.
Your publication/thesis/project is missing? Contact us!
5.1.1 Publications
• Klemm, Christian & Wiese, Frauke (2022): “Indicators for the optimization of sustainable urban energysystems based on energy system modeling”, Energy, Sustainability and Society, 12(1), 1-20, https://doi.org/10.1186/s13705-021-00323-3.
• Klemm, Christian & Vennemann, Peter (2021): “Modellierung und Optimierung urbaner Energiesystemeim Projekt R2Q”, 4. Regenerative Energietechnik Konferenz in Nordhausen 18. - 19. Februar 2021, availablehere (Page 177-188).
• Klemm, Christian & Vennemann, Peter (2021). “Modeling and optimization of multi-energy systems inmixed-use districts: A review of existing methods and approaches”. Renewable and Sustainable EnergyReviews, 135, 110206, https://doi.org/10.1016/j.rser.2020.110206.
71
SESMG, Release 0.1.1
5.1.2 Theses
• Kerkeling, Pascal (2021): “Energetische Optimierung eines kleinen gemischten Quartiers” (Bachelor The-sis), Münster University of Applied Sciences.
• Sivabalasingam, Piriyanha (2021): “Fortschreibung des Energiekonzeptes für ein Quartier mit Hilfe desOpen Energy Modelling Frameworks” (Master Thesis), Münster University of Applied Sciences.
• Budde, Janik (2020): “Wärmepumpen in Stadtquartieren - Untersuchung anhand eines Quartiers inHerne” (Bachelor Thesis), Münster University of Applied Sciences.
• Klemm, Christian (2020): “Modelling and Optimization of Multi-Energy Systems in Mixed-Use Districts:An Exemplary Application” (Master Thesis), Münster University of Applied Sciences.
5.1.3 Projects
• RessourcenPlan im Quartier (R2Q), FH Münster (2019 - 2022)
5.2 Related links
Spreadsheet Energy System Model Generator on GIT
Open Energy Modelling Framework (oemof) documentation
Open Energy Modelling Framework (oemof) on Github
Feedinlib Documentation
Demandlib Documentation
Richardsonpy on Github
R2Q research project
5.3 License
MIT License
Copyright (c) 2020 Christian Klemm
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documen-tation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use,copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whomthe Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of theSoftware.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PAR-TICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHTHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTIONOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFT-WARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
72 Chapter 5. Further Information
SESMG, Release 0.1.1
5.4 Contact
Münster University of Applied Sciences
Christian Klemm
christian.klemm@fh-muenster.de
5.5 Contributors
• Christian Klemm, christian.klemm@fh-muenster.de
• Janik Budde, janik.budde@fh-muenster.de
• Gregor Becker, gregor.becker@fh-muenster.de
• Yannick Wittor, yw090223@fh-muenster.de
• Peter Vennemann, vennemann@fh-muenster.de
5.6 Acknowledgements
The Spreadsheet Energy System Model Generator was carried out within the research project R2Q “Resource Planingfor Urban Districts”. The project was funded by the BMBF within the framework of the Federal Ministry of Educa-tion and Research’s RES:Z “Resource-Efficient Urban Districts” funding programme. The funding measure is partof the flagship initiative “City of the Future” within the BMBF’s framework programme “Research for SustainableDevelopment - FONA3”.
5.4. Contact 73
SESMG, Release 0.1.1
74 Chapter 5. Further Information
Python Module Index
pprogram_files.create_energy_system, 54program_files.create_graph, 67program_files.create_objects, 55program_files.create_results, 68program_files.data_preparation, 50program_files.optimize_model, 67program_files.Spreadsheet_Energy_System_Model_Generator,
49
75
SESMG, Release 0.1.1
76 Python Module Index
Index
Aabsorption_heat_transformer() (pro-
gram_files.create_objects.Transformersmethod), 63
add_component_to_loc() (pro-gram_files.create_results.Results method),68
Bbusd (program_files.create_objects.Links attribute), 55busd (program_files.create_objects.Sinks attribute), 56busd (program_files.create_objects.Transformers
attribute), 64buses() (in module program_files.create_objects), 66
Ccalc_constraint_costs() (pro-
gram_files.create_results.Results method),68
calc_periodical_costs() (pro-gram_files.create_results.Results staticmethod), 68
calc_variable_costs() (pro-gram_files.create_results.Results method),68
calculate_cluster_means() (in module pro-gram_files.data_preparation), 50
calculate_k_means_clusters() (in moduleprogram_files.data_preparation), 50
change_optimization_criterion() (in mod-ule program_files.data_preparation), 51
charts() (in module program_files.create_results), 69commodity_source() (pro-
gram_files.create_objects.Sources method),59
comp_capacity (program_files.create_results.Resultsattribute), 68
comp_input1 (program_files.create_results.Results at-tribute), 68
comp_input2 (program_files.create_results.Results at-tribute), 68
comp_output1 (program_files.create_results.Resultsattribute), 68
comp_output2 (program_files.create_results.Resultsattribute), 68
competition_constraint() (in module pro-gram_files.optimize_model), 67
compression_heat_transformer() (pro-gram_files.create_objects.Transformersmethod), 64
console_logging() (pro-gram_files.create_results.Results method),68
constraint_optimization_against_two_values()(in module program_files.optimize_model), 67
copt (program_files.create_results.Results attribute), 68create_flow_dataframes() (pro-
gram_files.create_results.Results method),68
create_graph() (in module pro-gram_files.create_graph), 67
create_sink() (program_files.create_objects.Sinksmethod), 56
create_source() (pro-gram_files.create_objects.Sources method),59
create_transformer() (pro-gram_files.create_objects.Transformersmethod), 65
Ddata_set_slicing() (in module pro-
gram_files.data_preparation), 51data_set_slicing2() (in module pro-
gram_files.data_preparation), 51define_energy_system() (in module pro-
gram_files.create_energy_system), 54df_list_of_components (pro-
gram_files.create_results.Results attribute),
77
SESMG, Release 0.1.1
68df_result_table (pro-
gram_files.create_results.Results attribute),68
Eesys (program_files.create_results.Results attribute), 68extract_single_periods() (in module pro-
gram_files.data_preparation), 51
Ggeneric_storage() (pro-
gram_files.create_objects.Storages method),63
generic_transformer() (pro-gram_files.create_objects.Transformersmethod), 65
genericchp_transformer() (pro-gram_files.create_objects.Transformersmethod), 65
get_comp_investment() (pro-gram_files.create_results.Results method),69
get_first_node_flow() (pro-gram_files.create_results.Results staticmethod), 69
get_last_node_flow() (pro-gram_files.create_results.Results staticmethod), 69
Hhierarchical_selection() (in module pro-
gram_files.data_preparation), 52
Iimport_scenario() (in module pro-
gram_files.create_energy_system), 54insert_line_end_of_component() (pro-
gram_files.create_results.Results staticmethod), 69
Kk_means_algorithm() (in module pro-
gram_files.data_preparation), 52k_means_parameter_adaption() (in module
program_files.data_preparation), 52k_means_timeseries_adaption() (in module
program_files.data_preparation), 52
Lleast_cost_model() (in module pro-
gram_files.optimize_model), 67Links (class in program_files.create_objects), 55
log_category() (pro-gram_files.create_results.Results staticmethod), 69
Nnodes_sinks (program_files.create_objects.Sinks at-
tribute), 56nodes_transformer (pro-
gram_files.create_objects.Transformers at-tribute), 66
Pprogram_files.create_energy_system (mod-
ule), 54program_files.create_graph (module), 67program_files.create_objects (module), 55program_files.create_results (module), 68program_files.data_preparation (module),
50program_files.optimize_model (module), 67program_files.Spreadsheet_Energy_System_Model_Generator
(module), 49pv_source() (program_files.create_objects.Sources
method), 60
Rrandom_sampling() (in module pro-
gram_files.data_preparation), 52Results (class in program_files.create_results), 68results (program_files.create_results.Results at-
tribute), 69richardson_sink() (pro-
gram_files.create_objects.Sinks method),56
Ssesmg_main() (in module pro-
gram_files.Spreadsheet_Energy_System_Model_Generator),49
Sinks (class in program_files.create_objects), 55slp_sink() (program_files.create_objects.Sinks
method), 57solar_heat_source() (pro-
gram_files.create_objects.Sources method),60
Sources (class in program_files.create_objects), 58Storages (class in program_files.create_objects), 62stratified_thermal_storage() (pro-
gram_files.create_objects.Storages method),63
Ttimeseries_averaging() (in module pro-
gram_files.data_preparation), 52
78 Index
SESMG, Release 0.1.1
timeseries_downsampling() (in module pro-gram_files.data_preparation), 53
timeseries_downsampling2() (in module pro-gram_files.data_preparation), 53
timeseries_preparation() (in module pro-gram_files.data_preparation), 53
timeseries_sink() (pro-gram_files.create_objects.Sinks method),57
timeseries_slicing() (in module pro-gram_files.data_preparation), 53
timeseries_slicing2() (in module pro-gram_files.data_preparation), 53
timeseries_source() (pro-gram_files.create_objects.Sources method),61
Transformers (class in pro-gram_files.create_objects), 63
Uunfixed_sink() (program_files.create_objects.Sinks
method), 57
Wwindpower_source() (pro-
gram_files.create_objects.Sources method),61
Xxlsx() (in module program_files.create_results), 69
Index 79
top related