e2nIEE / pandapower
Showing 1 of 1 files from the diff.

@@ -322,6 +322,53 @@
Loading
322 322
    Iabc_hv_ka = np.abs(sequence_to_phase(I012_hv_ka))
323 323
    Iabc_lv_ka = np.abs(sequence_to_phase(I012_lv_ka))
324 324
325 +
    # current calculation for trafo lv side for vector groups with zero seq. gap (Dyn, Yzn)
326 +
    # in this case, the currents of elemnts that go out from the trafo are summed and the sum applied to the trafo lv side
327 +
    gap_trafo_index = np.where(I012_lv_ka[0] == 0)[0]
328 +
    if len(gap_trafo_index > 0):
329 +
        for i_trafo in gap_trafo_index:
330 +
            Iabc_sum = [0, 0, 0]
331 +
            lv_bus = net.trafo.lv_bus[i_trafo]
332 +
            V_bus_abc = np.array([[net.res_bus_3ph['vm_a_pu'][lv_bus] * net.bus['vn_kv'][lv_bus]],
333 +
                                  [net.res_bus_3ph['vm_b_pu'][lv_bus] * net.bus['vn_kv'][lv_bus]],
334 +
                                  [net.res_bus_3ph['vm_c_pu'][lv_bus] * net.bus['vn_kv'][lv_bus]]])
335 +
336 +
            # Branch Elements
337 +
            i_branch = np.where(ppc0['branch'][:, F_BUS] == lv_bus)[0]
338 +
            if len(i_branch > 0):
339 +
                I_branch_012 = I012_f[:, i_branch]
340 +
                I_branch_abc = sequence_to_phase(I_branch_012)
341 +
                for x in range(len(I_branch_abc[0])):
342 +
                    Iabc_sum += abs(I_branch_abc[:, x])
343 +
344 +
            # Loads
345 +
            load_index = np.where(net.asymmetric_load['bus'] == lv_bus)[0]
346 +
            if len(load_index > 0):
347 +
                S_load_abc = abs(np.array([net.res_asymmetric_load_3ph['p_a_mw'][load_index]
348 +
                                           + (1j * net.res_asymmetric_load_3ph['q_a_mvar'][load_index]),
349 +
                                           net.res_asymmetric_load_3ph['p_b_mw'][load_index]
350 +
                                           + (1j * net.res_asymmetric_load_3ph['q_b_mvar'][load_index]),
351 +
                                           net.res_asymmetric_load_3ph['p_c_mw'][load_index]
352 +
                                           + (1j * net.res_asymmetric_load_3ph['q_c_mvar'][load_index])]))
353 +
                I_load_abc = S_load_abc / (V_bus_abc / np.sqrt(3))
354 +
                for x in range(len(I_load_abc[0])):
355 +
                    Iabc_sum += I_load_abc[:, x]
356 +
357 +
            # Sgens
358 +
            sgen_bus_index = np.where(net.asymmetric_sgen['bus'] == lv_bus)[0]
359 +
            if len(sgen_bus_index > 0):
360 +
                S_sgen_abc = abs(np.array([net.res_asymmetric_sgen_3ph['p_a_mw'][sgen_bus_index]
361 +
                                           + (1j * net.res_asymmetric_sgen_3ph['q_a_mvar'][sgen_bus_index]),
362 +
                                           net.res_asymmetric_sgen_3ph['p_b_mw'][sgen_bus_index]
363 +
                                           + (1j * net.res_asymmetric_sgen_3ph['q_b_mvar'][sgen_bus_index]),
364 +
                                           net.res_asymmetric_sgen_3ph['p_c_mw'][sgen_bus_index]
365 +
                                           + (1j * net.res_asymmetric_sgen_3ph['q_c_mvar'][sgen_bus_index])]))
366 +
                I_sgen_abc = S_sgen_abc / (V_bus_abc / np.sqrt(3))
367 +
                for x in range(len(I_sgen_abc[0])):
368 +
                    Iabc_sum -= I_sgen_abc[:, x]
369 +
370 +
            Iabc_lv_ka[:, i_trafo] = Iabc_sum
371 +
325 372
    # geting complex values of the sequence current
326 373
#    Iabc_hv_ka_complex = sequence_to_phase(I012_hv_ka)
327 374
#    Iabc_lv_ka_complex = sequence_to_phase(I012_lv_ka)
Files Coverage
pandapower 87.69%
setup.py 0.00%
Project Totals (168 files) 87.62%

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