Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small adaptions #582

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
fa4d506
Merge pull request #509 from e2nIEE/hotfix_0.8.4
SimonRubenDrauz Feb 2, 2023
c437200
created two biomethane gases
kbensafta Mar 22, 2023
bcfac5b
add biomethanes to call_lib and first effort to add docu about biomet…
kbensafta Mar 23, 2023
9d7b247
added the HHVS to the gas_compostions.txt
kbensafta Mar 24, 2023
29d5dbf
added biomethane to the doc, docstrings and to the tutos.
kbensafta Mar 24, 2023
13e7e72
slight modification in a tuto
kbensafta Mar 24, 2023
70c5a84
separation of connectivity check for hydraulic and thermal calculation:
dlohmeier May 16, 2023
1eecc90
correction in result extraction for branches with internals
dlohmeier May 23, 2023
a171046
another correction in result extraction for branch components with in…
dlohmeier May 23, 2023
5ed7baf
another small correction in result extraction
dlohmeier May 23, 2023
9010add
yet another small correction to make many tests pass again
dlohmeier May 23, 2023
b70fd41
improvement of the heat connectivity check:
dlohmeier Jun 6, 2023
424f0d0
small corrections in pipeflow, tests corrected and one added
dlohmeier Jun 7, 2023
73b97bd
small changes for better consistency and hopefully understandability
dlohmeier Jun 7, 2023
2940a87
extended changelog
dlohmeier Jun 9, 2023
9ad6480
correction of not hard coding calculation mode in result extraction
dlohmeier Jun 12, 2023
8f34a99
small bug fix of missing argument
dlohmeier Jun 12, 2023
cbe1afb
provide BSD license via link to license file (#549)
SteffenMeinecke Jul 21, 2023
c320051
fix: consider ambient pressure in calc. of compression work (#543)
jkisse Jul 26, 2023
5d3b204
Merge remote-tracking branch 'e2nIEE_pandapipes/master' into develop
jkisse Jul 26, 2023
5e486e9
Update release.yml
jkisse Jul 26, 2023
885181f
Merge pull request #552 from jkisse/develop
jkisse Jul 26, 2023
b2de031
release preparation
jkisse Jul 26, 2023
1cbe5b9
Merge pull request #553 from jkisse/fix/remove_badge
jkisse Jul 26, 2023
59cf3c3
Fix/remove 3 7 (#555)
EPrade Jul 31, 2023
0d55a14
Merge remote-tracking branch 'e2nIEE_pandapipes/master' into develop
jkisse Jul 31, 2023
30ceea9
Merge pull request #556 from jkisse/develop
EPrade Jul 31, 2023
6122c84
Merge branch 'develop' into connectivity_separate
dlohmeier Aug 1, 2023
8d8a3af
Adaption get_internal_tables_pandas (#539)
dlohmeier Aug 8, 2023
7d6b3eb
adapted the heat exchanger creation in the stanet converter (#538)
dlohmeier Aug 9, 2023
f87207d
small adaption of T_OUT in pipe component to be derived from nodes
dlohmeier Aug 10, 2023
8ea171b
Merge pull request #557 from dlohmeier/adapt_branch_pit_init
dlohmeier Aug 10, 2023
2779ef8
Update .readthedocs.yml (#558)
jkisse Aug 16, 2023
98d8cdf
Revert "Update .readthedocs.yml (#558)" (#559)
jkisse Aug 18, 2023
a775042
added test to make sure that pipeflow fails for disconnected nets wit…
dlohmeier Aug 30, 2023
4d7286c
slight improvement in test
dlohmeier Aug 30, 2023
a0a0fe3
rearrangement of result extraction:
dlohmeier Aug 30, 2023
dd5faec
Merge branch 'develop' of github.com:e2nIEE/pandapipes into connectiv…
dlohmeier Aug 30, 2023
926bc32
slight correction
dlohmeier Sep 1, 2023
513ef67
Merge pull request #540 from dlohmeier/connectivity_separate
dlohmeier Sep 1, 2023
523015b
internal component arrays
dlohmeier Sep 6, 2023
e983e90
slight adjustment of helper function get_component_array
dlohmeier Sep 8, 2023
ebd60a3
- define calculate_thermal_derivative more gobally
Sep 8, 2023
9fccd73
Merge pull request #561 from dlohmeier/feature/component_pit
dlohmeier Sep 11, 2023
219ea37
pipeflow cancellation if all nodes are out-of-service after the conne…
Sep 12, 2023
9c86f1e
readthedocs.yml deprecation
Sep 12, 2023
5aaa699
pp instead of pandapipes called
Sep 12, 2023
93b96f8
adapted CHANGELOG.rst
Sep 12, 2023
d4cbd90
bugfix in yml
Sep 12, 2023
6a05602
bugfix in yml
Sep 12, 2023
3f648a8
bugfix in yml
Sep 12, 2023
4a6528f
change the names TINIT and T_OUT back
Sep 13, 2023
349c740
Merge branch 'develop' into global_thermal
SimonRubenDrauz Sep 13, 2023
214a987
bugfix
Sep 13, 2023
5959ab3
Merge branch 'develop' into biogas
kbensafta Sep 15, 2023
6a87439
Merge pull request #565 from SimonRubenDrauz/readthedocs.yml
SimonRubenDrauz Sep 15, 2023
1f040ee
removing TINIT from branch variable as it is no solver variable
Sep 15, 2023
9b89642
Merge branch 'develop' into global_thermal
SimonRubenDrauz Sep 15, 2023
c807e62
Merge branch 'develop' into biogas
kbensafta Sep 18, 2023
85fe997
fix formatting error in the documentation
kbensafta Sep 18, 2023
d6f804d
Merge branch 'develop' of https://github.com/e2nIEE/pandapipes into b…
kbensafta Sep 18, 2023
ba8f8c3
Merge branch 'biogas' of https://github.com/kbensafta/pandapipes into…
kbensafta Sep 18, 2023
7d82b3f
Merge pull request #526 from kbensafta/biogas
dlohmeier Sep 19, 2023
7e32238
Merge branch 'develop' of github:e2niee/pandapipes into develop
Sep 29, 2023
32baa21
error in generic geodata: The second part was always missed and only …
Sep 29, 2023
98a8972
removing changes from local develop
Sep 29, 2023
de14ee6
Merge remote-tracking branch 'origin/develop' into global_thermal
Sep 29, 2023
4244569
renaming T_OUT in TOUTINIT, making test/pipeflow more stable
Sep 29, 2023
2aae8dc
Merge branch 'global_thermal' of https://github.com/SimonRubenDrauz/p…
Sep 29, 2023
b7963eb
Merge pull request #563 from SimonRubenDrauz/global_thermal
SimonRubenDrauz Nov 13, 2023
2a98cde
Merge branch 'develop' into bugfix/generic_geodata
SimonRubenDrauz Nov 13, 2023
0380e4b
removing uncommented code
Nov 17, 2023
d5d25ae
Merge pull request #568 from SimonRubenDrauz/bugfix/generic_geodata
SimonRubenDrauz Nov 17, 2023
d69cf9b
small adaptions
Dec 15, 2023
d29ecc9
small adaptions
Dec 15, 2023
1f13d8e
Merge branch 'transient_heat_transfer' into transient_heat_transfer
SimonRubenDrauz Dec 15, 2023
568cf82
Merge remote-tracking branch 'origin/develop' into transient_heat_tra…
Dec 15, 2023
458d483
move the implementations in heat transfer to the derivative calculati…
Dec 15, 2023
59d4ab5
Merge branch 'transient_heat_transfer' of github:e2niee/pandapipes in…
Dec 15, 2023
1cbed3e
Merge branch 'transient_heat_transfer' of https://github.com/SimonRub…
Dec 15, 2023
150a2d8
consider new structure
Dec 15, 2023
e889804
consider new structure
Dec 15, 2023
945788a
test bugfixes
Dec 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest python-igraph pytest-split
python -m pip install pytest igraph pytest-split
if ${{ matrix.python-version != '3.11' }}; then python -m pip install numba; fi
- name: Install pandapipes from TestPyPI
if: ${{ inputs.upload_server == 'testpypi'}}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run_tests_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest python-igraph pytest-split
python -m pip install pytest igraph pytest-split
if ${{ matrix.python-version != '3.11' }}; then python -m pip install numba; fi
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install git+https://github.com/e2nIEE/pandapower@develop#egg=pandapower
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest nbmake pytest-xdist pytest-split python-igraph
python -m pip install pytest nbmake pytest-xdist pytest-split igraph
if ${{ matrix.python-version != '3.11' }}; then python -m pip install numba; fi
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install git+https://github.com/e2nIEE/pandapower@develop#egg=pandapower
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/run_tests_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest python-igraph pytest-split
python -m pip install pytest igraph pytest-split
if ${{ matrix.python-version != '3.11' }}; then python -m pip install numba; fi
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install git+https://github.com/e2nIEE/pandapower@master#egg=pandapower
python -m pip install git+https://github.com/e2nIEE/pandapower@master#egg=pandapower;
pip install .
- name: List all installed packages
run: |
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest nbmake pytest-xdist pytest-split python-igraph
python -m pip install pytest nbmake pytest-xdist pytest-split igraph
if ${{ matrix.python-version != '3.11' }}; then python -m pip install numba; fi
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install git+https://github.com/e2nIEE/pandapower@master#egg=pandapower
Expand Down
11 changes: 6 additions & 5 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.9"

python:
version: 3.7
install:
- method: pip
path: .
extra_requirements:
- docs
- requirements: doc/requirements.txt
14 changes: 14 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ Change Log
- [ADDED] multiple creation of heat exchanger
- [ADDED] support Python 3.11 (now included in test pipeline)
- [CHANGED] dropped support for Python 3.7 (no longer included in test pipeline)
- [CHANGED] connectivity check now separated by hydraulics and heat_transfer calculation, so that also results can differ in some rows (NaN or not)
- [CHANGED] dynamic creation of lookups for getting pit as pandas tables
- [CHANGED] components can have their own internal arrays for specific calculations (e.g. for compressor pressure ratio), so that the pit does not need to include such component specific entries
- [CHANGED] .readthedocs.yml due to deprecation
- [FIXED] in STANET converter: bug fix for heat exchanger creation and external temperatures of pipes added
- [REMOVED] broken travis badge removed from readme

[0.8.5] - 2023-06-19
-------------------------------
- [FIXED] consider ambient pressure in calculation of compression power for pumps/compressors
- [FIXED] np.bool error in pipeflow calculation due to deprecation of np.bool
- [FIXED] use igraph package instead of python-igraph (has been renamed)
- [ADDED] gas specific calculation of heat capacity ration kappa = cp/cv (for pumps/compressors)
- [REMOVED] Python 3.7 removed from test pipeline due to inconsistencies with pandapower

[0.8.4] - 2023-02-02
-------------------------------
Expand Down
4 changes: 0 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
:target: http://pandapipes.readthedocs.io/
:alt: docs

.. image:: https://travis-ci.org/e2nIEE/pandapipes.svg?branch=master
:target: https://travis-ci.org/e2nIEE/pandapipes/branches
:alt: travis

.. image:: https://codecov.io/gh/e2nIEE/pandapipes/branch/master/graph/badge.svg
:target: https://codecov.io/github/e2nIEE/pandapipes?branch=master
:alt: codecov
Expand Down
29 changes: 2 additions & 27 deletions doc/source/about/license.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,7 @@ License
.. highlight:: none


pandapipes is published under the following 3-clause BSD license: ::
pandapipes is published under the following 3-clause BSD license:


Copyright (c) 2020-2023 by Fraunhofer Institute for Energy Economics and
Energy System Technology (IEE) Kassel and individual contributors
(see AUTHORS file for details). All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions
and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of
conditions and the following disclaimer in the documentation and/or other materials provided
with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to
endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.. literalinclude:: ../../../LICENSE

2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
# The short X.Y version.
version = "0.8"
# The full version, including alpha/beta/rc tags.
release = "0.8.4"
release = "0.8.5"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
9 changes: 9 additions & 0 deletions doc/source/fluid_properties/composition.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
;**Biomethane pure**;**Biomethane treated**
methane; 96.15% ; 90.94%
nitrogen; 0.75 % ;0.69 %
carbon dioxide; 2.9 % ;2.68 %
oxygen; 0.2 % ; 0.19 %
propane; 0 % ; 5 %
butane; 0 %; 0.5 %
Wobbe-Index (normal conditions) :math:`[\frac{KWh}{m^3}]` ; 13.9 ; 14.9
HHV (normal conditions) :math:`[\frac{KWh}{m^3}]`; 10.6 ; 11.6
12 changes: 10 additions & 2 deletions doc/source/fluid_properties/create_fluids.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ Fluid from Library
==================

In the fluid library some default fluids are already implemented. Currently it is
possible to work with the default fluids high and low calorific natural
gas (hgas and lgas), hydrogen, methane, water and air. The values are loaded from txt-files in
possible to work with the default fluids:

- ``hgas`` and ``lgas`` (high and low calorific natural gas),
- ``hydrogen``,
- ``methane``,
- ``water``,
- ``biomethane_pure`` and ``biomathane_treated`` (see `here <https://pandapipes.readthedocs.io/en/latest/fluid_properties/fluids.html>`_ for the compositions),
- ``air``.

The values are loaded from txt-files in
the 'pandapipes/properties/[fluid name]' folder.
One of these default fluids can be created and added to an
existing network by calling the following function.
Expand Down
24 changes: 22 additions & 2 deletions doc/source/fluid_properties/fluids.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,29 @@ Fluid Properties in pandapipes

The pipelines in the pandapipes network are run with a certain fluid. This can be
chosen individually for the net from the fluid library or by own creation. The fluids
are defined by certain properties. In the fluid library currently high and low calorific natural
gas (hgas and lgas), hydrogen, methane, water and air are implemented with default properties.
are defined by certain properties.

The following fluids currently exist in the library:

- ``hgas`` and ``lgas`` (high and low calorific natural gas),
- ``hydrogen``,
- ``methane``,
- ``water``,
- ``biomethane_pure`` and ``biomathane_treated`` (compositions below)
- ``air``.


.. Note::
**Biomethane(s)**:
A particularity of injecting biomethane in the gas grid in Germany is the addition of LPG to enhance
the Wobbe-Index and the heating value of the gas and thus make it equivalent to the (high-calorific) natural gas transported
in the grid. This addition is done in a gas treatment unit (Biogaseinspeiseanlage) upstream of the biomethane
feed-in junction. The properties of the biomethane(s) were computed based on the package `CoolProp <http://www.coolprop.org/)>`_.

.. csv-table::
:file: composition.csv
:delim: ;
:widths: 10, 10, 10

The Fluid Class
===============
Expand Down
2 changes: 1 addition & 1 deletion pandapipes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# and Energy System Technology (IEE), Kassel, and University of Kassel. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

__version__ = '0.8.4'
__version__ = '0.8.5'
__format_version__ = '0.8.0'

import pandas as pd
Expand Down
61 changes: 23 additions & 38 deletions pandapipes/component_models/abstract_models/base_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def init_results(cls, net):
return res_table

@classmethod
def extract_results(cls, net, options, branch_results, nodes_connected, branches_connected):
def extract_results(cls, net, options, branch_results, mode):
"""
Function that extracts certain results.

Expand All @@ -43,10 +43,8 @@ def extract_results(cls, net, options, branch_results, nodes_connected, branches
:type options:
:param branch_results:
:type branch_results:
:param nodes_connected:
:type nodes_connected:
:param branches_connected:
:type branches_connected:
:param mode:
:type mode:
:return: No Output.
"""
raise NotImplementedError
Expand Down Expand Up @@ -80,6 +78,15 @@ def adaption_before_derivatives_hydraulic(cls, net, branch_pit, node_pit, idx_lo
def adaption_after_derivatives_hydraulic(cls, net, branch_pit, node_pit, idx_lookups, options):
pass

@classmethod
def adaption_before_derivatives_thermal(cls, net, branch_pit, node_pit, idx_lookups, options):
pass

@classmethod
def adaption_after_derivatives_thermal(cls, net, branch_pit, node_pit, idx_lookups, options):
pass


@classmethod
def create_node_lookups(cls, net, ft_lookups, table_lookup, idx_lookups, current_start,
current_table, internal_nodes_lookup):
Expand Down Expand Up @@ -128,65 +135,43 @@ def create_branch_lookups(cls, net, ft_lookups, table_lookup, idx_lookups, curre
return current_start, current_table

@classmethod
def create_pit_node_entries(cls, net, node_pit):
def create_component_array(cls, net, component_pits):
"""
Function which creates pit branch entries.
Function which creates an internal array of the component in analogy to the pit, but with
component specific entries, that are not needed in the pit.

:param net: The pandapipes network
:type net: pandapipesNet
:param node_pit:
:type node_pit:
:return: No Output.
:param component_pits: dictionary of component specific arrays
:type component_pits: dict
:return:
:rtype:
"""
pass

@classmethod
def create_pit_branch_entries(cls, net, branch_pit):
def create_pit_node_entries(cls, net, node_pit):
"""
Function which creates pit branch entries.

:param net: The pandapipes network
:type net: pandapipesNet
:param branch_pit:
:type branch_pit:
:return: No Output.
"""
pass

@classmethod
def calculate_derivatives_hydraulic(cls, net, branch_pit, node_pit, idx_lookups, options):
"""
Function which creates derivatives.

:param net: The pandapipes network
:type net: pandapipesNet
:param branch_pit:
:type branch_pit:
:param node_pit:
:type node_pit:
:param idx_lookups:
:type idx_lookups:
:param options:
:type options:
:return: No Output.
"""
pass

@classmethod
def calculate_derivatives_thermal(cls, net, branch_pit, node_pit, idx_lookups, options):
def create_pit_branch_entries(cls, net, branch_pit):
"""
Function which creates derivatives.
Function which creates pit branch entries.

:param net: The pandapipes network
:type net: pandapipesNet
:param branch_pit:
:type branch_pit:
:param node_pit:
:type node_pit:
:param idx_lookups:
:type idx_lookups:
:param options:
:type options:
:return: No Output.
"""
pass

Loading
Loading