e2nIEE / pandapipes
1
# Copyright (c) 2020-2021 by Fraunhofer Institute for Energy Economics
2
# and Energy System Technology (IEE), Kassel, and University of Kassel. All rights reserved.
3
# Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
4

5 1
import os
6 1
from pandapipes.io.file_io import from_json
7 1
from pandapipes import pp_dir
8 1
try:
9 1
    import pplog as logging
10 1
except ImportError:
11 1
    import logging
12

13 1
logger = logging.getLogger(__name__)
14

15 1
heat_tranfer_modelica_path = os.path.join(pp_dir, "networks", "network_files",
16
                                   "openmodelica_test_networks", "heat_transfer_cases")
17

18 1
def heat_transfer_delta():
19
    """
20

21
    :return: net - OpenModelica network converted to a pandapipes network
22
    :rtype: pandapipesNet
23

24
    :Example:
25
        >>> pandapipes.networks.simple_heat_transfer_networks.heat_transfer_delta()
26

27
    """
28 1
    return from_json(os.path.join(heat_tranfer_modelica_path, "delta.json"))
29

30

31 1
def heat_transfer_delta_2sinks():
32
    """
33

34
    :return: net - OpenModelica network converted to a pandapipes network
35
    :rtype: pandapipesNet
36

37
    :Example:
38
        >>> pandapipes.networks.simple_heat_transfer_networks.heat_transfer_delta_2sinks()
39

40
    """
41 1
    return from_json(os.path.join(heat_tranfer_modelica_path, "delta_2sinks.json"))
42

43

44 1
def heat_transfer_heights():
45
    """
46

47
    :return: net - OpenModelica network converted to a pandapipes network
48
    :rtype: pandapipesNet
49

50
    :Example:
51
        >>> pandapipes.networks.simple_heat_transfer_networks.heat_transfer_heights()
52

53
    """
54 1
    return from_json(os.path.join(heat_tranfer_modelica_path, "heights.json"))
55

56

57 1
def heat_transfer_one_pipe():
58
    """
59

60
    :return: net - OpenModelica network converted to a pandapipes network
61
    :rtype: pandapipesNet
62

63
    :Example:
64
        >>> pandapipes.networks.simple_heat_transfer_networks.heat_transfer_one_pipe()
65

66
    """
67 1
    return from_json(os.path.join(heat_tranfer_modelica_path, "one_pipe.json"))
68

69

70 1
def heat_transfer_one_source():
71
    """
72

73
    :return: net - OpenModelica network converted to a pandapipes network
74
    :rtype: pandapipesNet
75

76
    :Example:
77
        >>> pandapipes.networks.simple_heat_transfer_networks.heat_transfer_one_source()
78

79
    """
80 1
    return from_json(os.path.join(heat_tranfer_modelica_path, "one_source.json"))
81

82

83 1
def heat_transfer_section_variation():
84
    """
85

86
    :return: net - OpenModelica network converted to a pandapipes network
87
    :rtype: pandapipesNet
88

89
    :Example:
90
        >>> pandapipes.networks.simple_heat_transfer_networks.heat_transfer_section_variation()
91

92
    """
93 1
    return from_json(os.path.join(heat_tranfer_modelica_path, "section_variation.json"))
94

95

96 1
def heat_transfer_t_cross():
97
    """
98

99
    :return: net - OpenModelica network converted to a pandapipes network
100
    :rtype: pandapipesNet
101

102
    :Example:
103
        >>> pandapipes.networks.simple_heat_transfer_networks.heat_transfer_t_cross()
104

105
    """
106 1
    return from_json(os.path.join(heat_tranfer_modelica_path, "t_cross.json"))
107

108

109 1
def heat_transfer_two_pipes():
110
    """
111

112
    :return: net - OpenModelica network converted to a pandapipes network
113
    :rtype: pandapipesNet
114

115
    :Example:
116
        >>> pandapipes.networks.simple_heat_transfer_networks.heat_transfer_two_pipes()
117

118
    """
119 1
    return from_json(os.path.join(heat_tranfer_modelica_path, "two_pipes.json"))

Read our documentation on viewing source code .

Loading