pydae 0.54.0__py3-none-any.whl → 0.54.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pydae/__init__.py +1 -1
- pydae/urisi/urisi_builder.py +1 -1
- pydae/urisi/utils/model2svg.py +45 -5
- {pydae-0.54.0.dist-info → pydae-0.54.1.dist-info}/METADATA +1 -1
- {pydae-0.54.0.dist-info → pydae-0.54.1.dist-info}/RECORD +8 -8
- {pydae-0.54.0.dist-info → pydae-0.54.1.dist-info}/COPYING +0 -0
- {pydae-0.54.0.dist-info → pydae-0.54.1.dist-info}/LICENSE +0 -0
- {pydae-0.54.0.dist-info → pydae-0.54.1.dist-info}/WHEEL +0 -0
pydae/__init__.py
CHANGED
pydae/urisi/urisi_builder.py
CHANGED
pydae/urisi/utils/model2svg.py
CHANGED
|
@@ -19,6 +19,7 @@ class model2svg(svg):
|
|
|
19
19
|
self.set_buses_title()
|
|
20
20
|
self.set_lines_title()
|
|
21
21
|
self.set_transformers_title()
|
|
22
|
+
self.set_sources_title()
|
|
22
23
|
|
|
23
24
|
self.set_lines_currents_colors()
|
|
24
25
|
self.set_buses_voltages_colors()
|
|
@@ -53,27 +54,42 @@ class model2svg(svg):
|
|
|
53
54
|
U_base = bus['U_kV']*1000
|
|
54
55
|
V_base = U_base/np.sqrt(3)
|
|
55
56
|
string = 'Voltages and powers:\n'
|
|
57
|
+
p_total = 0.0
|
|
58
|
+
q_total = 0.0
|
|
56
59
|
for phn in ['an','bn','cn','ng']:
|
|
57
60
|
V = get_v(self.model,bus_name,f'V_{phn}_m')
|
|
58
61
|
V_pu = V/V_base
|
|
59
62
|
|
|
60
63
|
p = 0.0
|
|
61
64
|
q = 0.0
|
|
65
|
+
|
|
62
66
|
if bus_name in load_buses:
|
|
63
67
|
ph = phn[0]
|
|
64
68
|
if not ph == 'n':
|
|
65
69
|
p = self.model.get_value(f'p_load_{bus_name}_{ph}')
|
|
66
70
|
q = self.model.get_value(f'q_load_{bus_name}_{ph}')
|
|
67
71
|
|
|
72
|
+
p_total += p
|
|
73
|
+
q_total += q
|
|
74
|
+
|
|
68
75
|
if not phn == 'ng':
|
|
69
76
|
if q < 0.0:
|
|
70
|
-
string += f"V{phn} = {V:7.1f} V ({V_pu:4.2f} pu), S{phn} = {p/1e3:5.1f} - {np.abs(q)/1e3:5.1f}j kVA \n"
|
|
77
|
+
string += f"V{phn} = {V:7.1f} V ({V_pu:4.2f} pu), S{phn[0]} = {p/1e3:5.1f} - {np.abs(q)/1e3:5.1f}j kVA \n"
|
|
71
78
|
else:
|
|
72
|
-
string += f"V{phn} = {V:7.1f} V ({V_pu:4.2f} pu), S{phn} = {p/1e3:5.1f} + {np.abs(q)/1e3:5.1f}j kVA \n"
|
|
79
|
+
string += f"V{phn} = {V:7.1f} V ({V_pu:4.2f} pu), S{phn[0]} = {p/1e3:5.1f} + {np.abs(q)/1e3:5.1f}j kVA \n"
|
|
73
80
|
|
|
74
81
|
else:
|
|
75
|
-
string += f"V{phn} = {V:7.1f} V ({V_pu:4.2f} pu)\n"
|
|
76
|
-
|
|
82
|
+
string += f"V{phn} = {V:7.1f} V ({V_pu:4.2f} pu), St = {p_total/1e3:5.1f} + {np.abs(q_total)/1e3:5.1f}j kVA \n"
|
|
83
|
+
|
|
84
|
+
v_m_array = get_v(self.model,bus_name,'V_abcn_m')
|
|
85
|
+
v_m_min = np.min(v_m_array)
|
|
86
|
+
v_m_max = np.max(v_m_array)
|
|
87
|
+
max_dev = v_m_max - v_m_min
|
|
88
|
+
v_avg = np.sum(v_m_array)/3
|
|
89
|
+
unbalance = max_dev/v_avg
|
|
90
|
+
string += f"voltage unbalance = {unbalance*100:5.2f} %\n"
|
|
91
|
+
|
|
92
|
+
|
|
77
93
|
if bus['N_nodes'] == 3:
|
|
78
94
|
bus_name = bus['name']
|
|
79
95
|
U_base = bus['U_kV']*1000
|
|
@@ -211,4 +227,28 @@ class model2svg(svg):
|
|
|
211
227
|
string += f"Ic = {np.abs(I_1_c):6.1f} A\tIc = {np.abs(I_2_c):6.1f} A \n"
|
|
212
228
|
string += f"\t\t\t In = {np.abs(I_2_n):6.1f} A \n"
|
|
213
229
|
|
|
214
|
-
self.set_title(f'trafo_{bus_j}_{bus_k}_g',string)
|
|
230
|
+
self.set_title(f'trafo_{bus_j}_{bus_k}_g',string)
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
def set_sources_title(self):
|
|
234
|
+
|
|
235
|
+
for src in self.grid_data['sources']:
|
|
236
|
+
bus = src['bus']
|
|
237
|
+
|
|
238
|
+
I_a = self.model.get_value(f'i_vsc_{bus}_a_m')
|
|
239
|
+
I_b = self.model.get_value(f'i_vsc_{bus}_a_m')
|
|
240
|
+
I_c = self.model.get_value(f'i_vsc_{bus}_a_m')
|
|
241
|
+
|
|
242
|
+
p = self.model.get_value(f'p_{bus}')
|
|
243
|
+
q = self.model.get_value(f'q_{bus}')
|
|
244
|
+
|
|
245
|
+
string = 'Currents:\n'
|
|
246
|
+
string += f"Ia = {I_a:6.1f} A \n"
|
|
247
|
+
string += f"Ib = {I_b:6.1f} A \n"
|
|
248
|
+
string += f"Ic = {I_c:6.1f} A \n"
|
|
249
|
+
string += 'Powers:\n'
|
|
250
|
+
string += f"p = {p/1e3:6.1f} kW\n"
|
|
251
|
+
string += f"q = {q/1e3:6.1f} kvar \n"
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
self.set_title(f'src_{bus}',string)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
pydae/.gitignore,sha256=c1jUQV9WXX3PWrlOzHiKvUWFomLJUrfYogbU7nYwAwc,288
|
|
2
|
-
pydae/__init__.py,sha256=
|
|
2
|
+
pydae/__init__.py,sha256=5Xl8hDbIFcwcha4-6VIUFCHNG3cejkRWVU9qO4q8jWs,106
|
|
3
3
|
pydae/b_pu.py,sha256=FdRRVieJLQDYPwYNWhbXJ0SXvf4jtPdbvIZTKWi16I0,6775
|
|
4
4
|
pydae/bpu.py,sha256=FdRRVieJLQDYPwYNWhbXJ0SXvf4jtPdbvIZTKWi16I0,6775
|
|
5
5
|
pydae/build.py,sha256=ECfc_doyK9PhrjEAlWJGLfirQmpT24XuYNxUgtrXI74,46151
|
|
@@ -453,7 +453,7 @@ pydae/templates/solver_template_v2.py,sha256=ciKWIwlHECY39kjBQJBnow4pA8bKTif8nfB
|
|
|
453
453
|
pydae/templates/unit_test_template.py,sha256=tSRNAwtmcHc4QujOGzZFXDge1vTRiyIcbvemerOFROQ,1117
|
|
454
454
|
pydae/templates/uz_jacs_v2.py,sha256=JzYMbn6N015656BAWrkkOnrrys9akQ1y1GRH60ZJOAY,4340
|
|
455
455
|
pydae/urisi/__init__.py,sha256=r7mgVYduCfuZ_pqaNXp_Y6Y-L3wcOKT4dzBLPsr8oak,105
|
|
456
|
-
pydae/urisi/urisi_builder.py,sha256=
|
|
456
|
+
pydae/urisi/urisi_builder.py,sha256=VagNhnOR4XzXLPvGpwoPbGJJGRkC1Gw_1AdZYUteaLE,13871
|
|
457
457
|
pydae/urisi/xy_0.json,sha256=mA-fx_pCJkcXtZzhO1zRS5GONGvgFs-Gj1gqszaGaR0,842
|
|
458
458
|
pydae/urisi/ess/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
459
459
|
pydae/urisi/ess/bess.ipynb,sha256=Glx6-BcexpCl-j_pu_TJNYD8uN5ouX9F7kina33hOYI,54561
|
|
@@ -539,7 +539,7 @@ pydae/urisi/transformers/transformers.py,sha256=qquEa6j0HXWXqwROcZEifUhm6fZpkSx3
|
|
|
539
539
|
pydae/urisi/transformers/xy_0.json,sha256=2Q_yStbln3nKPxHTbwAloe--eGlI0IGkqY1L7QTJWYI,881
|
|
540
540
|
pydae/urisi/utils/__init__.py,sha256=byp7NSkTjT3waG_5zrUeXPPm8xlebXNGhO7a9orE66k,201
|
|
541
541
|
pydae/urisi/utils/measurements.py,sha256=ubUEMkvGCe_2dEWHu7ID2z1J5ODmG2brUS8fbKpgLyM,4541
|
|
542
|
-
pydae/urisi/utils/model2svg.py,sha256=
|
|
542
|
+
pydae/urisi/utils/model2svg.py,sha256=DTTGpFMkBxT6XVKPcliArXBWTjsQl3Q5WVep4KMggM8,10404
|
|
543
543
|
pydae/urisi/utils/reports.py,sha256=Gge0iIGpNTNGaK-Ex0esYlfLyH3q6VIphabyvmaEc-Y,4944
|
|
544
544
|
pydae/urisi/vsc_ctrls/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
545
545
|
pydae/urisi/vsc_ctrls/ctrl_3ph_4w_droop.py,sha256=iW-34_Dh0SXNvq5Z-pMsNf8JdT8SQFipb5zE1sn7psQ,3638
|
|
@@ -622,8 +622,8 @@ pydae/urisi/vsgs/xy_0.json,sha256=Q6qWPIqEP-w5Qu2twd3S4PX4zMggpNpG2W62e7ry70g,85
|
|
|
622
622
|
pydae/utils/__init__.py,sha256=kwp76qeU2mnwrCexDSF15id9ih12Q0VRL3l-_c6omcQ,184
|
|
623
623
|
pydae/utils/tools.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
624
624
|
pydae/utils/utils.py,sha256=OrKP6NAUGdCOa6gO_MYm8FdvVuIFFSlt4jYkLsrbUtg,1069
|
|
625
|
-
pydae-0.54.
|
|
626
|
-
pydae-0.54.
|
|
627
|
-
pydae-0.54.
|
|
628
|
-
pydae-0.54.
|
|
629
|
-
pydae-0.54.
|
|
625
|
+
pydae-0.54.1.dist-info/COPYING,sha256=QWnWoslbTjQmtlFSRoGF3wxJEJuTJdlEMZ7lHtbGAeQ,1139
|
|
626
|
+
pydae-0.54.1.dist-info/LICENSE,sha256=8hQe1oM4ySdliF3R-NEvR6HqrcGDKvsLFJC3gA1sNjY,1108
|
|
627
|
+
pydae-0.54.1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
|
628
|
+
pydae-0.54.1.dist-info/METADATA,sha256=CvIMhokj1YM76g7mbgZJQ4eDGCdks6YlQbgesZDUxj8,1120
|
|
629
|
+
pydae-0.54.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|