#165 Add Schutterwald gas net

Open Jolando Kisse jkisse
Coverage Reach
component_models/abstract_models/branch_models.py component_models/abstract_models/branch_w_internals_models.py component_models/abstract_models/const_flow_models.py component_models/abstract_models/branch_wo_internals_models.py component_models/abstract_models/circulation_pump.py component_models/abstract_models/component_models.py component_models/abstract_models/branch_wzerolength_models.py component_models/abstract_models/node_models.py component_models/abstract_models/__init__.py component_models/abstract_models/node_element_models.py component_models/pipe_component.py component_models/auxiliaries/build_system_matrix.py component_models/auxiliaries/derivative_toolbox.py component_models/auxiliaries/component_toolbox.py component_models/auxiliaries/__init__.py component_models/heat_exchanger_component.py component_models/valve_component.py component_models/ext_grid_component.py component_models/junction_component.py component_models/pump_component.py component_models/circulation_pump_pressure_component.py component_models/circulation_pump_mass_component.py component_models/__init__.py component_models/sink_component.py component_models/source_component.py plotting/collections.py plotting/patch_makers.py plotting/simple_plot.py plotting/generic_geodata.py plotting/__init__.py plotting/plotting_toolbox.py create.py networks/simple_water_networks.py networks/simple_gas_networks.py networks/simple_heat_transfer_networks.py networks/nw_aux.py networks/__init__.py properties/fluids.py properties/properties_toolbox.py properties/__init__.py pipeflow_setup.py pipeflow.py toolbox.py io/io_utils.py io/file_io.py io/convert_format.py io/__init__.py std_types/std_type.py std_types/std_type_toolbox.py std_types/__init__.py topology/create_graph.py topology/__init__.py timeseries/run_time_series.py timeseries/__init__.py idx_branch.py internals_toolbox.py pandapipes_net.py idx_node.py control/run_control.py control/__init__.py __init__.py constants.py

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 3 of 109 files from the diff.
Other files ignored by Codecov
.codacy.yml has changed.

@@ -13,12 +13,12 @@
Loading
13 13
    import logging
14 14
15 15
logger = logging.getLogger(__name__)
16 -
water_stanet_path = os.path.join(pp_dir, "networks", "simple_test_networks", "stanet_test_networks",
16 +
water_stanet_path = os.path.join(pp_dir, "networks", "network_files", "stanet_test_networks",
17 17
                                 "water_cases")
18 -
water_modelica_colebrook_path = os.path.join(pp_dir, "networks", "simple_test_networks",
18 +
water_modelica_colebrook_path = os.path.join(pp_dir, "networks", "network_files",
19 19
                                   "openmodelica_test_networks", "water_cases_colebrook")
20 20
21 -
water_modelica_swamee_path = os.path.join(pp_dir, "networks", "simple_test_networks",
21 +
water_modelica_swamee_path = os.path.join(pp_dir, "networks", "network_files",
22 22
                                   "openmodelica_test_networks", "water_cases_swamee-jain")
23 23
24 24

@@ -4,7 +4,7 @@
Loading
4 4
5 5
import os
6 6
from pandapipes.io.file_io import from_json
7 -
from pandapipes import pp_dir
7 +
from pandapipes import pp_dir, drop_junctions
8 8
from pandapipes.networks.nw_aux import log_result_upon_loading
9 9
10 10
try:
@@ -13,7 +13,7 @@
Loading
13 13
    import logging
14 14
15 15
logger = logging.getLogger(__name__)
16 -
gas_stanet_path = os.path.join(pp_dir, "networks", "simple_test_networks", "stanet_test_networks",
16 +
gas_stanet_path = os.path.join(pp_dir, "networks", "network_files", "stanet_test_networks",
17 17
                               "gas_cases")
18 18
19 19
@@ -231,3 +231,40 @@
Loading
231 231
    log_result_upon_loading(logger, method=method, converter="stanet")
232 232
    net_name = "H_net_N.json" if method.lower() in ["nikuradse", "n"] else "H_net_PC.json"
233 233
    return from_json(os.path.join(gas_stanet_path, "two_pressure_junctions", net_name))
234 +
235 +
236 +
# -------------- Schutterwald network --------------
237 +
def schutterwald(include_houses=True, max_length_house_conn_m=None):
238 +
    """
239 +
    Load natural gas distribution network for a town in the MV Oberrhein region (cf. pandapower).
240 +
241 +
    The default pressure is set to 1 bar. Geodata is provided.
242 +
    Around 1500 houses are connected with theoretical house connection pipes. It is recommended
243 +
    to set a reasonable maximum length for the house connection pipes, e.g. 50 m.
244 +
245 +
    The corresponding publication in which the net has been provided in the supplementary
246 +
    material and more information on building ages etc. is given can be found here:
247 +
    Kisse, J.M.; Braun, M.; Letzgus, S.; Kneiske, T.M. "A GIS-Based Planning Approach for Urban
248 +
    Power and Natural Gas Distribution Grids with Different Heat Pump Scenarios".
249 +
    Energies 2020, 13, 4052 https://doi.org/10.3390/en13164052
250 +
251 +
    :param include_houses: Include 1506 houses as sinks. If False, all sinks and respective
252 +
                           junctions and connection pipes are dropped.
253 +
    :type include_houses: bool, default 'True'
254 +
    :param max_length_house_conn_m: Limit the maximum linear distance between houses and
255 +
                                    distribution grid. All house connection pipes that are longer
256 +
                                    than the given limit are set out of service.
257 +
                                    If None, linear connections for all houses are assumed.
258 +
    :type max_length_house_conn_m: float, default 'None'
259 +
    :return: gas distribution net
260 +
    :rtype: pandapipesNet
261 +
    """
262 +
    net = from_json(os.path.join(pp_dir, 'networks', 'network_files',
263 +
                                 'gas_net_schutterwald_1bar.json'))
264 +
    if not include_houses:
265 +
        drop_junctions(net, net.sink.junction.values)
266 +
267 +
    if max_length_house_conn_m is not None:
268 +
        net.pipe.in_service.loc[(net.pipe.type=="house_connection") &
269 +
                                (net.pipe.length_km > max_length_house_conn_m / 1000)] = False
270 +
    return net

@@ -12,7 +12,7 @@
Loading
12 12
13 13
logger = logging.getLogger(__name__)
14 14
15 -
heat_tranfer_modelica_path = os.path.join(pp_dir, "networks", "simple_test_networks",
15 +
heat_tranfer_modelica_path = os.path.join(pp_dir, "networks", "network_files",
16 16
                                   "openmodelica_test_networks", "heat_transfer_cases")
17 17
18 18
def heat_transfer_delta():

Learn more Showing 1 files with coverage changes found.

Changes in pandapipes/toolbox.py
-16
+16
Loading file...
Files Coverage
pandapipes 0.49% 91.97%
Project Totals (62 files) 91.97%
Loading