Showing 1 of 2 files from the diff.

@@ -909,8 +909,8 @@
Loading
909 909
    return index
910 910
911 911
912 -
def create_junctions(net, nr_junctions, pn_bar, tfluid_k, heights_m=0, names=None, index=None,
913 -
                     in_service=True, types="junction", geodata=None, **kwargs):
912 +
def create_junctions(net, nr_junctions, pn_bar, tfluid_k, height_m=0, name=None, index=None,
913 +
                     in_service=True, type="junction", geodata=None, **kwargs):
914 914
    """
915 915
    Convenience function for creating many junctions at once. Parameter 'nr_junctions' specifies \
916 916
    the number of junctions created. Other parameters may be either arrays of length 'nr_junctions' \
@@ -925,18 +925,18 @@
Loading
925 925
    :param tfluid_k: The fluid temperature in [K]. Used as parameter for gas calculations and as\
926 926
            initial value for temperature calculations.
927 927
    :type tfluid_k: Iterable or float
928 -
    :param heights_m: Heights of nodes above sea level in [m]
929 -
    :type heights_m: Iterable or float, default 0
930 -
    :param names: The names for these junctions
931 -
    :type names: Iterable or string, default None
928 +
    :param height_m: Heights of nodes above sea level in [m]
929 +
    :type height_m: Iterable or float, default 0
930 +
    :param name: The names for these junctions
931 +
    :type name: Iterable or string, default None
932 932
    :param index: Force specified IDs if they are available. If None, the index one higher than the\
933 933
            highest already existing index is selected and counted onwards.
934 934
    :type index: Iterable(int), default None
935 935
    :param in_service: True for in_service or False for out of service
936 936
    :type in_service: Iterable or boolean, default True
937 -
    :param types: not used yet - Designed for type differentiation on pandas lookups (e.g. \
937 +
    :param type: not used yet - Designed for type differentiation on pandas lookups (e.g. \
938 938
            household connection vs. crossing)
939 -
    :type types: Iterable or string, default "junction"
939 +
    :type type: Iterable or string, default "junction"
940 940
    :param geodata: Coordinates used for plotting
941 941
    :type geodata: Iterable of (x,y)-tuples, default None
942 942
    :param kwargs: Additional keyword arguments will be added as further columns to the\
@@ -950,8 +950,8 @@
Loading
950 950
    add_new_component(net, Junction)
951 951
952 952
    index = _get_multiple_index_with_check(net, "junction", index, nr_junctions)
953 -
    entries = {"pn_bar": pn_bar,  "type": types, "tfluid_k": tfluid_k, "height_m": heights_m,
954 -
               "in_service": in_service, "name": names}
953 +
    entries = {"pn_bar": pn_bar,  "type": type, "tfluid_k": tfluid_k, "height_m": height_m,
954 +
               "in_service": in_service, "name": name}
955 955
    entries.update(kwargs)
956 956
    _add_entries_to_table(net, "junction", index, entries)
957 957
@@ -966,8 +966,8 @@
Loading
966 966
    return index
967 967
968 968
969 -
def create_sinks(net, junctions, mdot_kg_per_s, scaling=1., names=None, index=None, in_service=True,
970 -
                 types='sink', **kwargs):
969 +
def create_sinks(net, junctions, mdot_kg_per_s, scaling=1., name=None, index=None, in_service=True,
970 +
                 type='sink', **kwargs):
971 971
    """
972 972
    Convenience function for creating many sinks at once. Parameter 'junctions' must be an array \
973 973
    of the desired length. Other parameters may be either arrays of the same length or single \
@@ -981,15 +981,15 @@
Loading
981 981
    :type mdot_kg_per_s: Iterable or float, default None
982 982
    :param scaling: An optional scaling factor to be set customly
983 983
    :type scaling: Iterable or float, default 1
984 -
    :param names: Name tags for the sinks
985 -
    :type names: Iterable or str, default None
984 +
    :param name: Name tags for the sinks
985 +
    :type name: Iterable or str, default None
986 986
    :param index: Force specified IDs if they are available. If None, the index one higher than the\
987 987
            highest already existing index is selected and counted onwards.
988 988
    :type index: Iterable(int), default None
989 989
    :param in_service: True for in service, False for out of service
990 990
    :type in_service: Iterable or bool, default True
991 -
    :param types: Type variables to classify the sinks
992 -
    :type types: Iterable or str, default None
991 +
    :param type: Type variables to classify the sinks
992 +
    :type type: Iterable or str, default None
993 993
    :param kwargs: Additional keyword arguments will be added as further columns to the\
994 994
            net["sink"] table
995 995
    :return: index - The unique IDs of the created elements
@@ -1004,15 +1004,15 @@
Loading
1004 1004
    index = _get_multiple_index_with_check(net, "sink", index, len(junctions))
1005 1005
1006 1006
    entries = {"junction": junctions, "mdot_kg_per_s": mdot_kg_per_s, "scaling": scaling,
1007 -
               "in_service": in_service, "name": names, "type": types}
1007 +
               "in_service": in_service, "name": name, "type": type}
1008 1008
    entries.update(kwargs)
1009 1009
    _add_entries_to_table(net, "sink", index, entries)
1010 1010
1011 1011
    return index
1012 1012
1013 1013
1014 -
def create_sources(net, junctions, mdot_kg_per_s, scaling=1., names=None, index=None,
1015 -
                   in_service=True, types='source', **kwargs):
1014 +
def create_sources(net, junctions, mdot_kg_per_s, scaling=1., name=None, index=None,
1015 +
                   in_service=True, type='source', **kwargs):
1016 1016
    """
1017 1017
    Convenience function for creating many sources at once. Parameter 'junctions' must be an array \
1018 1018
    of the desired length. Other parameters may be either arrays of the same length or single \
@@ -1026,15 +1026,15 @@
Loading
1026 1026
    :type mdot_kg_per_s: Iterable or float, default None
1027 1027
    :param scaling: An optional scaling factor to be set customly
1028 1028
    :type scaling: Iterable or float, default 1
1029 -
    :param names: Name tags for the sources
1030 -
    :type names: Iterable or str, default None
1029 +
    :param name: Name tags for the sources
1030 +
    :type name: Iterable or str, default None
1031 1031
    :param index: Force specified IDs if they are available. If None, the index one higher than the\
1032 1032
            highest already existing index is selected and counted onwards.
1033 1033
    :type index: Iterable(int), default None
1034 1034
    :param in_service: True for in service, False for out of service
1035 1035
    :type in_service: Iterable or bool, default True
1036 -
    :param types: Type variable to classify the sources
1037 -
    :type types: Iterable or str, default None
1036 +
    :param type: Type variable to classify the sources
1037 +
    :type type: Iterable or str, default None
1038 1038
    :param kwargs: Additional keyword arguments will be added as further columns to the\
1039 1039
            net["source"] table
1040 1040
    :return: index - The unique IDs of the created elements
@@ -1049,16 +1049,16 @@
Loading
1049 1049
    index = _get_multiple_index_with_check(net, "source", index, len(junctions))
1050 1050
1051 1051
    entries = {"junction": junctions, "mdot_kg_per_s": mdot_kg_per_s, "scaling": scaling,
1052 -
               "in_service": in_service, "name": names, "type": types}
1052 +
               "in_service": in_service, "name": name, "type": type}
1053 1053
    entries.update(kwargs)
1054 1054
    _add_entries_to_table(net, "source", index, entries)
1055 1055
1056 1056
    return index
1057 1057
1058 1058
1059 -
def create_pipes(net, from_junctions, to_junctions, std_type, lengths_km, k_mm=1,
1060 -
                 loss_coefficients=0, sections=1, alpha_w_per_m2k=0., text_k=293, qext_w=0.,
1061 -
                 names=None, index=None, geodata=None, in_service=True, types="pipe", **kwargs):
1059 +
def create_pipes(net, from_junctions, to_junctions, std_type, length_km, k_mm=1,
1060 +
                 loss_coefficient=0, sections=1, alpha_w_per_m2k=0., text_k=293, qext_w=0.,
1061 +
                 name=None, index=None, geodata=None, in_service=True, type="pipe", **kwargs):
1062 1062
    """
1063 1063
    Convenience function for creating many pipes at once. Parameters 'from_junctions' and \
1064 1064
    'to_junctions' must be arrays of equal length. Other parameters may be either arrays of the \
@@ -1074,12 +1074,12 @@
Loading
1074 1074
    :type to_junctions: Iterable(int)
1075 1075
    :param std_type: Name of standard type
1076 1076
    :type std_type: str
1077 -
    :param lengths_km: Lengths of the pipes in [km]
1078 -
    :type lengths_km: Iterable or float
1077 +
    :param length_km: Lengths of the pipes in [km]
1078 +
    :type length_km: Iterable or float
1079 1079
    :param k_mm: Pipe roughness in [mm]
1080 1080
    :type k_mm: Iterable or float, default 1
1081 -
    :param loss_coefficients: Additional pressure loss coefficients, introduced by e.g. bends
1082 -
    :type loss_coefficients: Iterable or float, default 0
1081 +
    :param loss_coefficient: Additional pressure loss coefficients, introduced by e.g. bends
1082 +
    :type loss_coefficient: Iterable or float, default 0
1083 1083
    :param sections: The number of internal pipe sections. Important for gas and temperature\
1084 1084
            calculations, where variables are dependent on pipe length.
1085 1085
    :type sections: Iterable or int, default 1
@@ -1089,8 +1089,8 @@
Loading
1089 1089
    :type text_k: Iterable or float, default 293
1090 1090
    :param qext_w: External heat feed-in to the pipes in [W]
1091 1091
    :type qext_w: Iterable or float, default 0
1092 -
    :param names: Name tags for these pipes
1093 -
    :type names: Iterable or str, default None
1092 +
    :param name: Name tags for these pipes
1093 +
    :type name: Iterable or str, default None
1094 1094
    :param index: Force specified IDs if they are available. If None, the index one higher than the\
1095 1095
            highest already existing index is selected and counted onwards.
1096 1096
    :type index: Iterable(int), default None
@@ -1100,8 +1100,8 @@
Loading
1100 1100
    :type geodata: array, shape=(no_pipes,2L) or (,2L), default None
1101 1101
    :param in_service: True for in service, False for out of service
1102 1102
    :type in_service: Iterable or bool, default True
1103 -
    :param types: Identifiers for special types of pipes (e.g. below or above ground)
1104 -
    :type types: Iterable or str, default "pipe"
1103 +
    :param type: Identifiers for special types of pipes (e.g. below or above ground)
1104 +
    :type type: Iterable or str, default "pipe"
1105 1105
    :param kwargs: Additional keyword arguments will be added as further columns to the\
1106 1106
            net["pipe"] table
1107 1107
    :return: index - The unique IDs of the created elements
@@ -1109,7 +1109,7 @@
Loading
1109 1109
1110 1110
    :Example:
1111 1111
        >>> pipe_indices = create_pipes(net, from_junctions=[0, 2, 6], to_junctions=[1, 3, 7], \
1112 -
                                        std_type='315_PE_80_SDR_17', lengths_km=[0.2, 1, 0.3])
1112 +
                                        std_type='315_PE_80_SDR_17', length_km=[0.2, 1, 0.3])
1113 1113
1114 1114
    """
1115 1115
    add_new_component(net, Pipe)
@@ -1120,11 +1120,11 @@
Loading
1120 1120
    _check_std_type(net, std_type, "pipe", "create_pipes")
1121 1121
1122 1122
    pipe_parameters = load_std_type(net, std_type, "pipe")
1123 -
    entries = {"name": names, "from_junction": from_junctions, "to_junction": to_junctions,
1124 -
               "std_type": std_type, "length_km": lengths_km,
1123 +
    entries = {"name": name, "from_junction": from_junctions, "to_junction": to_junctions,
1124 +
               "std_type": std_type, "length_km": length_km,
1125 1125
               "diameter_m": pipe_parameters["inner_diameter_mm"] / 1000, "k_mm": k_mm,
1126 -
               "loss_coefficient": loss_coefficients, "alpha_w_per_m2k": alpha_w_per_m2k,
1127 -
               "sections": sections, "in_service": in_service, "type": types, "qext_w": qext_w,
1126 +
               "loss_coefficient": loss_coefficient, "alpha_w_per_m2k": alpha_w_per_m2k,
1127 +
               "sections": sections, "in_service": in_service, "type": type, "qext_w": qext_w,
1128 1128
               "text_k": text_k}
1129 1129
    entries.update(kwargs)
1130 1130
    _add_entries_to_table(net, "pipe", index, entries)
@@ -1134,10 +1134,10 @@
Loading
1134 1134
    return index
1135 1135
1136 1136
1137 -
def create_pipes_from_parameters(net, from_junctions, to_junctions, lengths_km, diameters_m, k_mm=1,
1138 -
                                 loss_coefficients=0, sections=1, alpha_w_per_m2k=0., text_k=293,
1139 -
                                 qext_w=0., names=None, index=None, geodata=None, in_service=True,
1140 -
                                 types="pipe", **kwargs):
1137 +
def create_pipes_from_parameters(net, from_junctions, to_junctions, length_km, diameter_m, k_mm=1,
1138 +
                                 loss_coefficient=0, sections=1, alpha_w_per_m2k=0., text_k=293,
1139 +
                                 qext_w=0., name=None, index=None, geodata=None, in_service=True,
1140 +
                                 type="pipe", **kwargs):
1141 1141
    """
1142 1142
    Convenience function for creating many pipes at once. Parameters 'from_junctions' and \
1143 1143
    'to_junctions' must be arrays of equal length. Other parameters may be either arrays of the \
@@ -1150,14 +1150,14 @@
Loading
1150 1150
    :param to_junctions: IDs of the junctions on the other side to which the pipes will be \
1151 1151
            connected to
1152 1152
    :type to_junctions: Iterable(int)
1153 -
    :param lengths_km: Lengths of the pipes in [km]
1154 -
    :type lengths_km: Iterable or float
1155 -
    :param diameters_m: The pipe diameters in [m]
1156 -
    :type diameters_m: Iterable or float
1153 +
    :param length_km: Lengths of the pipes in [km]
1154 +
    :type length_km: Iterable or float
1155 +
    :param diameter_m: The pipe diameters in [m]
1156 +
    :type diameter_m: Iterable or float
1157 1157
    :param k_mm: Pipe roughness in [mm]
1158 1158
    :type k_mm: Iterable or float, default 1
1159 -
    :param loss_coefficients: Additional pressure loss coefficients, introduced by e.g. bends
1160 -
    :type loss_coefficients: Iterable or float, default 0
1159 +
    :param loss_coefficient: Additional pressure loss coefficients, introduced by e.g. bends
1160 +
    :type loss_coefficient: Iterable or float, default 0
1161 1161
    :param sections: The number of internal pipe sections. Important for gas and temperature\
1162 1162
            calculations, where variables are dependent on pipe length.
1163 1163
    :type sections: Iterable or int, default 1
@@ -1167,8 +1167,8 @@
Loading
1167 1167
    :type text_k: Iterable or float, default 293
1168 1168
    :param qext_w: External heat feed-in to the pipes in [W]
1169 1169
    :type qext_w: Iterable or float, default 0
1170 -
    :param names: Name tags for these pipes
1171 -
    :type names: Iterable or str, default None
1170 +
    :param name: Name tags for these pipes
1171 +
    :type name: Iterable or str, default None
1172 1172
    :param index: Force specified IDs if they are available. If None, the index one higher than the\
1173 1173
            highest already existing index is selected and counted onwards.
1174 1174
    :type index: Iterable(int), default None
@@ -1178,8 +1178,8 @@
Loading
1178 1178
    :type geodata: array, shape=(no_pipes,2L) or (,2L), default None
1179 1179
    :param in_service: True for in service, False for out of service
1180 1180
    :type in_service: Iterable or bool, default True
1181 -
    :param types: Identifiers for special types of pipes (e.g. below or above ground)
1182 -
    :type types: Iterable or str, default "pipe"
1181 +
    :param type: Identifiers for special types of pipes (e.g. below or above ground)
1182 +
    :type type: Iterable or str, default "pipe"
1183 1183
    :param kwargs: Additional keyword arguments will be added as further columns to the\
1184 1184
            net["pipe"] table
1185 1185
    :return: index - The unique IDs of the created elements
@@ -1187,8 +1187,8 @@
Loading
1187 1187
1188 1188
    :Example:
1189 1189
        >>> pipe_indices = create_pipes_from_parameters(\
1190 -
                net, from_junctions=[0, 2, 6], to_junctions=[1, 3, 7], lengths_km=[0.2, 1, 0.3],\
1191 -
                diameters_m=40e-3)
1190 +
                net, from_junctions=[0, 2, 6], to_junctions=[1, 3, 7], length_km=[0.2, 1, 0.3],\
1191 +
                diameter_m=40e-3)
1192 1192
1193 1193
    """
1194 1194
    add_new_component(net, Pipe)
@@ -1196,10 +1196,10 @@
Loading
1196 1196
    index = _get_multiple_index_with_check(net, "pipe", index, len(from_junctions))
1197 1197
    _check_branches(net, from_junctions, to_junctions, "pipe")
1198 1198
1199 -
    entries = {"name": names, "from_junction": from_junctions, "to_junction": to_junctions,
1200 -
               "std_type": None, "length_km": lengths_km, "diameter_m": diameters_m, "k_mm": k_mm,
1201 -
               "loss_coefficient": loss_coefficients, "alpha_w_per_m2k": alpha_w_per_m2k,
1202 -
               "sections": sections, "in_service": in_service, "type": types, "qext_w": qext_w,
1199 +
    entries = {"name": name, "from_junction": from_junctions, "to_junction": to_junctions,
1200 +
               "std_type": None, "length_km": length_km, "diameter_m": diameter_m, "k_mm": k_mm,
1201 +
               "loss_coefficient": loss_coefficient, "alpha_w_per_m2k": alpha_w_per_m2k,
1202 +
               "sections": sections, "in_service": in_service, "type": type, "qext_w": qext_w,
1203 1203
               "text_k": text_k}
1204 1204
    entries.update(kwargs)
1205 1205
    _add_entries_to_table(net, "pipe", index, entries)
@@ -1209,8 +1209,8 @@
Loading
1209 1209
    return index
1210 1210
1211 1211
1212 -
def create_valves(net, from_junctions, to_junctions, diameters_m, opened=True, loss_coefficients=0,
1213 -
                  names=None, index=None, types='valve', **kwargs):
1212 +
def create_valves(net, from_junctions, to_junctions, diameter_m, opened=True, loss_coefficient=0,
1213 +
                  name=None, index=None, type='valve', **kwargs):
1214 1214
    """
1215 1215
     Convenience function for creating many pipes at once. Parameters 'from_junctions' and \
1216 1216
    'to_junctions' must be arrays of equal length. Other parameters may be either arrays of the \
@@ -1223,20 +1223,20 @@
Loading
1223 1223
    :param to_junctions: IDs of the junctions on the other side to which the valves will be \
1224 1224
            connected to
1225 1225
    :type to_junctions: Iterable(int)
1226 -
    :param diameters_m: The valve diameters in [m]
1227 -
    :type diameters_m: Iterable or float
1226 +
    :param diameter_m: The valve diameters in [m]
1227 +
    :type diameter_m: Iterable or float
1228 1228
    :param opened: Flag to show if the valves are opened and allow for fluid flow or if they are\
1229 1229
            closed to block the fluid flow.
1230 1230
    :type opened: Iterable or bool, default True
1231 -
    :param loss_coefficients: The pressure loss coefficients introduced by the valve shapes
1232 -
    :type loss_coefficients: Iterable or float, default 0
1233 -
    :param names: Name tags for the valves
1234 -
    :type names: Iterable or str, default None
1231 +
    :param loss_coefficient: The pressure loss coefficients introduced by the valve shapes
1232 +
    :type loss_coefficient: Iterable or float, default 0
1233 +
    :param name: Name tags for the valves
1234 +
    :type name: Iterable or str, default None
1235 1235
    :param index: Force specified IDs if they are available. If None, the index one higher than the\
1236 1236
            highest already existing index is selected and counted onwards.
1237 1237
    :type index: Iterable(int), default None
1238 -
    :param types: Identifiers for special types of valves (e.g. below or above ground)
1239 -
    :type types: Iterable or str, default "valve"
1238 +
    :param type: Identifiers for special types of valves (e.g. below or above ground)
1239 +
    :type type: Iterable or str, default "valve"
1240 1240
    :param kwargs: Additional keyword arguments will be added as further columns to the\
1241 1241
            net["valve"] table
1242 1242
    :return: index - The unique IDs of the created elements
@@ -1244,7 +1244,7 @@
Loading
1244 1244
1245 1245
    :Example:
1246 1246
        >>> create_valves(net, from_junctions=[0, 1, 4], to_junctions=[1, 5, 6], \
1247 -
                opened=[True, False, True], diameters_m=4e-3, names=["valve_%d" for d in range(3)])
1247 +
                opened=[True, False, True], diameter_m=4e-3, name=["valve_%d" for d in range(3)])
1248 1248
1249 1249
    """
1250 1250
    add_new_component(net, Valve)
@@ -1252,9 +1252,9 @@
Loading
1252 1252
    index = _get_multiple_index_with_check(net, "valve", index, len(from_junctions))
1253 1253
    _check_branches(net, from_junctions, to_junctions, "valve")
1254 1254
1255 -
    entries = {"name": names, "from_junction": from_junctions, "to_junction": to_junctions,
1256 -
               "diameter_m": diameters_m, "opened": opened, "loss_coefficient": loss_coefficients,
1257 -
               "type": types}
1255 +
    entries = {"name": name, "from_junction": from_junctions, "to_junction": to_junctions,
1256 +
               "diameter_m": diameter_m, "opened": opened, "loss_coefficient": loss_coefficient,
1257 +
               "type": type}
1258 1258
    entries.update(kwargs)
1259 1259
    _add_entries_to_table(net, "valve", index, entries)
1260 1260
Files Coverage
pandapipes 91.69%
Project Totals (62 files) 91.69%
425.1
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading