/
std_types.py
1495 lines (1370 loc) · 51.3 KB
/
std_types.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# -*- coding: utf-8 -*-
# Copyright (c) 2016-2024 by University of Kassel and Fraunhofer Institute for Energy Economics
# and Energy System Technology (IEE), Kassel. All rights reserved.
import pandas as pd
import warnings
try:
import pandaplan.core.pplog as logging
except ImportError:
import logging
logger = logging.getLogger(__name__)
def create_std_type(net, data, name, element="line", overwrite=True, check_required=True):
"""
Creates type data in the type database. The parameters that are used for
the loadflow have to be at least contained in data. These parameters are:
- c_nf_per_km, r_ohm_per_km, x_ohm_per_km and max_i_ka (for lines)
- sn_mva, vn_hv_kv, vn_lv_kv, vk_percent, vkr_percent, pfe_kw, i0_percent, shift_degree* (for transformers)
- sn_hv_mva, sn_mv_mva, sn_lv_mva, vn_hv_kv, vn_mv_kv, vn_lv_kv, vk_hv_percent, vk_mv_percent, vk_lv_percent,
vkr_hv_percent, vkr_mv_percent, vkr_lv_percent, pfe_kw, i0_percent, shift_mv_degree*, shift_lv_degree* (for 3-winding-transformers)
additional parameters can be added and later loaded into pandapower with the function
"parameter_from_std_type".
** only considered in loadflow if calculate_voltage_angles = True
The standard type is saved into the pandapower library of the given network by default.
INPUT:
**net** - The pandapower network
**data** - dictionary of standard type parameters
**name** - name of the standard type as string
**element** - "line", "trafo" or "trafo3w"
EXAMPLE:
>>> line_data = {"c_nf_per_km": 0, "r_ohm_per_km": 0.642, "x_ohm_per_km": 0.083, "max_i_ka": 0.142, "type": "cs", "q_mm2": 50, "alpha": 4.03e-3}
>>> pandapower.create_std_type(net, line_data, "NAYY 4×50 SE", element='line')
>>> # Three phase line creation:
>>> pandapower.create_std_type(net, {"r_ohm_per_km": 0.1941, "x_ohm_per_km": 0.07476991,
"c_nf_per_km": 1160., "max_i_ka": 0.421,
"endtemp_degree": 70.0, "r0_ohm_per_km": 0.7766,
"x0_ohm_per_km": 0.2990796,
"c0_nf_per_km": 496.2}, name="unsymmetric_line_type",element = "line")
>>> #Three phase transformer creation
>>> pp.create_std_type(net, {"sn_mva": 1.6,
"vn_hv_kv": 10,
"vn_lv_kv": 0.4,
"vk_percent": 6,
"vkr_percent": 0.78125,
"pfe_kw": 2.7,
"i0_percent": 0.16875,
"shift_degree": 0,
"vector_group": vector_group,
"tap_side": "lv",
"tap_neutral": 0,
"tap_min": -2,
"tap_max": 2,
"tap_step_degree": 0,
"tap_step_percent": 2.5,
"tap_phase_shifter": False,
"vk0_percent": 6,
"vkr0_percent": 0.78125,
"mag0_percent": 100,
"mag0_rx": 0.,
"si0_hv_partial": 0.9,}, name='Unsymmetric_trafo_type', element="trafo")
"""
if type(data) != dict:
raise UserWarning("type data has to be given as a dictionary of parameters")
if check_required:
if element == "line":
required = ["c_nf_per_km", "r_ohm_per_km", "x_ohm_per_km", "max_i_ka"]
elif element == "trafo":
required = ["sn_mva", "vn_hv_kv", "vn_lv_kv", "vk_percent", "vkr_percent",
"pfe_kw", "i0_percent", "shift_degree"]
elif element == "trafo3w":
required = ["sn_hv_mva", "sn_mv_mva", "sn_lv_mva", "vn_hv_kv", "vn_mv_kv", "vn_lv_kv",
"vk_hv_percent", "vk_mv_percent", "vk_lv_percent", "vkr_hv_percent",
"vkr_mv_percent", "vkr_lv_percent", "pfe_kw", "i0_percent", "shift_mv_degree",
"shift_lv_degree"]
elif element == "fuse":
required = ["fuse_type", "i_rated_a"]
else:
raise ValueError("Unkown element type %s" % element)
for par in required:
if par not in data:
raise UserWarning("%s is required as %s type parameter" % (par, element))
library = net.std_types[element]
if overwrite or not (name in library):
library.update({name: data})
def create_std_types(net, data, element="line", overwrite=True, check_required=True):
"""
Creates multiple standard types in the type database.
INPUT:
**net** - The pandapower network
**data** - dictionary of standard type parameter sets
**element** - "line", "trafo" or "trafo3w"
EXAMPLE:
>>> linetypes = {"typ1": {"r_ohm_per_km": 0.01, "x_ohm_per_km": 0.02, "c_nf_per_km": 10, "max_i_ka": 0.4, "type": "cs"},
>>> "typ2": {"r_ohm_per_km": 0.015, "x_ohm_per_km": 0.01, "c_nf_per_km": 30, "max_i_ka": 0.3, "type": "cs"}}
>>> pp.create_std_types(net, data=linetypes, element="line")
"""
for name, typdata in data.items():
create_std_type(net, data=typdata, name=name, element=element, overwrite=overwrite,
check_required=check_required)
def copy_std_types(to_net, from_net, element="line", overwrite=True):
"""
Transfers all standard types of one network to another.
INPUT:
**to_net** - The pandapower network to which the standard types are copied
**from_net** - The pandapower network from which the standard types are taken
**element** - "line" or "trafo"
**overwrite** - if True, overwrites standard types which already exist in to_net
"""
for name, typdata in from_net.std_types[element].items():
create_std_type(to_net, typdata, name, element=element, overwrite=overwrite)
def load_std_type(net, name, element="line"):
"""
Loads standard type data from the linetypes data base. Issues a warning if
linetype is unknown.
INPUT:
**net** - The pandapower network
**name** - name of the standard type as string
**element** - "line", "trafo" or "trafo3w"
OUTPUT:
**typedata** - dictionary containing type data
"""
library = net.std_types[element]
if name in library:
return library[name]
else:
raise UserWarning("Unknown standard %s type %s" % (element, name))
def std_type_exists(net, name, element="line"):
"""
Checks if a standard type exists.
INPUT:
**net** - pandapower Network
**name** - name of the standard type as string
**element** - type of element ("line" or "trafo")
OUTPUT:
**exists** - True if standard type exists, False otherwise
"""
library = net.std_types[element]
return name in library
def delete_std_type(net, name, element="line"):
"""
Deletes standard type parameters from database.
INPUT:
**net** - pandapower Network
**name** - name of the standard type as string
**element** - type of element ("line" or "trafo")
"""
library = net.std_types[element]
if name in library:
del library[name]
else:
raise UserWarning("Unknown standard %s type %s" % (element, name))
def available_std_types(net, element="line"):
"""
Returns all standard types available for this network as a table.
INPUT:
**net** - pandapower Network
**element** - type of element ("line" or "trafo")
OUTPUT:
**typedata** - table of standard type parameters
"""
std_types = pd.DataFrame(net.std_types[element]).T
try:
return std_types.infer_objects()
except AttributeError:
with warnings.catch_warnings():
warnings.simplefilter("ignore")
return std_types.convert_objects()
def parameter_from_std_type(net, parameter, element="line",fill=None):
"""
Loads standard types data for a parameter, which can be used to add an additional parameter,
that is not included in the original pandapower datastructure but is available in the standard
type database.
INPUT:
**net** - pandapower network
**parameter** - name of parameter as string
**element** - type of element ("line" or "trafo")
**fill** - fill-value that is assigned to all lines/trafos without
a value for the parameter, either because the line/trafo has no type or because the
type does not have a value for the parameter
EXAMPLE:
import pandapower as pp
import pandapower.networks as pn
net = pn.simple_mv_open_ring_net()
pp.parameter_from_std_type(net, "q_mm2")
"""
if parameter not in net[element]:
net[element][parameter] = fill
for typ in net[element].std_type.unique():
if pd.isnull(typ) or not std_type_exists(net, typ, element):
continue
typedata = load_std_type(net, name=typ, element=element)
if parameter in typedata:
util = net[element].loc[net[element].std_type == typ].index
net[element].loc[util, parameter] = typedata[parameter]
if fill is not None:
net[element].loc[pd.isnull(net[element][parameter]).values, parameter] = fill
def change_std_type(net, eid, name, element="line"):
"""
Changes the type of a given element in pandapower. Changes only parameter that are given
for the type.
INPUT:
**net** - pandapower network
**eid** - element index (either line or transformer index)
**element** - type of element ("line" or "trafo")
**name** - name of the new standard type
"""
type_param = load_std_type(net, name, element)
table = net[element]
for column in table.columns:
if column in type_param:
table.at[eid, column] = type_param[column]
table.at[eid, "std_type"] = name
def find_std_type_by_parameter(net, data, element="line", epsilon=0.):
"""
Searches for a std_type that fits all values given in the data dictionary with the margin of
epsilon.
INPUT:
**net** - pandapower network
**data** - dictionary of standard type parameters
**element** - type of element ("line" or "trafo")
**epsilon** - tolerance margin for parameter comparison
OUTPUT:
**fitting_types** - list of fitting types or empty list
"""
fitting_types = []
assert epsilon >= 0
for name, stp in net.std_types[element].items():
for p, v in list(data.items()):
if isinstance(v, float):
if abs(v - stp[p]) > epsilon:
break
elif stp[p] != v:
break
else:
fitting_types.append(name)
return fitting_types
def find_std_type_alternative(net, data, element = "line", voltage_rating = "", epsilon = 0.):
"""
Searches for a std_type that fits all values given in the standard types library with the margin of
epsilon.
INPUT:
**net** - pandapower network
**data** - dictionary of standard type parameters
**element** - type of element ("line" or "trafo")
**voltage_rating** - voltage rating of the cable ("HV" or "MV" or "LV")
**epsilon** - tolerance margin for parameter comparison
OUTPUT:
**fitting_types** - list of fitting types or empty list
"""
assert epsilon >= 0
linetypes = basic_line_std_types()
possible_alternatives = []
fitting_types = []
for p, v in linetypes.items():
if voltage_rating == v.get("voltage_rating"):
possible_alternatives.append((p, v))
for name, stp in possible_alternatives:
for p, v in list(data.items()):
if isinstance(v, float):
if abs(v - stp[p]) > epsilon:
break
elif stp[p] != v:
break
else:
fitting_types.append(name)
return fitting_types
def add_zero_impedance_parameters(net):
"""
Adds all parameters required for zero sequence impedance calculations.
INPUT:
**net** - pandapower network
zero sequence parameters of lines and transformers in pandapower networks
are entered using std_type.
This function adds them to the pandas dataframe
OUTPUT:
Now, net has all the zero sequence parameters
"""
parameter_from_std_type(net, "vector_group", element="trafo")
parameter_from_std_type(net, "vk0_percent", element="trafo")
parameter_from_std_type(net, "vkr0_percent", element="trafo")
parameter_from_std_type(net, "mag0_percent", element="trafo")
parameter_from_std_type(net, "mag0_rx", element="trafo")
parameter_from_std_type(net, "si0_hv_partial", element="trafo")
parameter_from_std_type(net, "c0_nf_per_km")
parameter_from_std_type(net, "r0_ohm_per_km")
parameter_from_std_type(net, "x0_ohm_per_km")
parameter_from_std_type(net, "endtemp_degree")
# add zero seq. parameters for ext_grid and apply standard values
if 's_sc_max_mva' not in net.ext_grid.columns:
net.ext_grid['s_sc_max_mva'] = 1000
if 'rx_max' not in net.ext_grid.columns:
net.ext_grid['rx_max'] = 0.1
if 'x0x_max' not in net.ext_grid.columns:
net.ext_grid['x0x_max'] = 1
if 'r0x0_max' not in net.ext_grid.columns:
net.ext_grid['r0x0_max'] = 0.1
def add_temperature_coefficient(net, fill=None):
"""
Adds alpha paarameter for calculations of line temperature
Args:
fill: fill value for when the parameter in std_type is missing, e.g. 4.03e-3 for aluminum
or 3.93e-3 for copper
"""
parameter_from_std_type(net, "alpha", fill=fill)
def basic_line_std_types():
alpha_al = 4.03e-3
alpha_cu = 3.93e-3
linetypes = {
# Cables, all from S.744, Heuck: Elektrische Energieversorgung - Vierweg+Teubner 2013
# additional MV cables from Werth: Netzberechnung mit Erzeugungsporfilen (Dreiecksverlegung)
# Low Voltage
"NAYY 4x50 SE":
{"c_nf_per_km": 210,
"r_ohm_per_km": 0.642,
"x_ohm_per_km": 0.083,
"max_i_ka": 0.142,
"type": "cs",
"q_mm2": 50,
"alpha": alpha_al,
"voltage_rating": "LV"},
"NAYY 4x120 SE":
{"c_nf_per_km": 264,
"r_ohm_per_km": 0.225,
"x_ohm_per_km": 0.080,
"max_i_ka": 0.242,
"type": "cs",
"q_mm2": 120,
"alpha": alpha_al,
"voltage_rating": "LV"},
"NAYY 4x150 SE":
{"c_nf_per_km": 261,
"r_ohm_per_km": 0.208,
"x_ohm_per_km": 0.080,
"max_i_ka": 0.270,
"type": "cs",
"q_mm2": 150,
"alpha": alpha_al,
"voltage_rating": "LV"},
# Medium Voltage
"NA2XS2Y 1x95 RM/25 12/20 kV":
{"c_nf_per_km": 216,
"r_ohm_per_km": 0.313,
"x_ohm_per_km": 0.132,
"max_i_ka": 0.252,
"type": "cs",
"q_mm2": 95,
"alpha": alpha_al,
"voltage_rating": "MV"},
"NA2XS2Y 1x185 RM/25 12/20 kV":
{"c_nf_per_km": 273,
"r_ohm_per_km": 0.161,
"x_ohm_per_km": 0.117,
"max_i_ka": 0.362,
"type": "cs",
"q_mm2": 185,
"alpha": alpha_al,
"voltage_rating": "MV"},
"NA2XS2Y 1x240 RM/25 12/20 kV":
{"c_nf_per_km": 304,
"r_ohm_per_km": 0.122,
"x_ohm_per_km": 0.112,
"max_i_ka": 0.421,
"type": "cs",
"q_mm2": 240,
"alpha": alpha_al,
"voltage_rating": "MV"},
"NA2XS2Y 1x95 RM/25 6/10 kV":
{"c_nf_per_km": 315,
"r_ohm_per_km": 0.313,
"x_ohm_per_km": 0.123,
"max_i_ka": 0.249,
"type": "cs",
"q_mm2": 95,
"alpha": alpha_al,
"voltage_rating": "MV"},
"NA2XS2Y 1x185 RM/25 6/10 kV":
{"c_nf_per_km": 406,
"r_ohm_per_km": 0.161,
"x_ohm_per_km": 0.110,
"max_i_ka": 0.358,
"type": "cs",
"q_mm2": 185,
"alpha": alpha_al,
"voltage_rating": "MV"},
"NA2XS2Y 1x240 RM/25 6/10 kV":
{"c_nf_per_km": 456,
"r_ohm_per_km": 0.122,
"x_ohm_per_km": 0.105,
"max_i_ka": 0.416,
"type": "cs",
"q_mm2": 240,
"alpha": alpha_al,
"voltage_rating": "MV"},
# additional MV cables
"NA2XS2Y 1x150 RM/25 12/20 kV":
{"c_nf_per_km": 250,
"r_ohm_per_km": 0.206,
"x_ohm_per_km": 0.116,
"max_i_ka": 0.319,
"type": "cs",
"q_mm2": 150,
"alpha": alpha_al,
"voltage_rating": "MV"},
"NA2XS2Y 1x120 RM/25 12/20 kV":
{"c_nf_per_km": 230,
"r_ohm_per_km": 0.253,
"x_ohm_per_km": 0.119,
"max_i_ka": 0.283,
"type": "cs",
"q_mm2": 120,
"alpha": alpha_al,
"voltage_rating": "MV"},
"NA2XS2Y 1x70 RM/25 12/20 kV":
{"c_nf_per_km": 190,
"r_ohm_per_km": 0.443,
"x_ohm_per_km": 0.132,
"max_i_ka": 0.220,
"type": "cs",
"q_mm2": 70,
"alpha": alpha_al,
"voltage_rating": "MV"},
"NA2XS2Y 1x150 RM/25 6/10 kV":
{"c_nf_per_km": 360,
"r_ohm_per_km": 0.206,
"x_ohm_per_km": 0.110,
"max_i_ka": 0.315,
"type": "cs",
"q_mm2": 150,
"alpha": alpha_al,
"voltage_rating": "MV"},
"NA2XS2Y 1x120 RM/25 6/10 kV":
{"c_nf_per_km": 340,
"r_ohm_per_km": 0.253,
"x_ohm_per_km": 0.113,
"max_i_ka": 0.280,
"type": "cs",
"q_mm2": 120,
"alpha": alpha_al,
"voltage_rating": "MV"},
"NA2XS2Y 1x70 RM/25 6/10 kV":
{"c_nf_per_km": 280,
"r_ohm_per_km": 0.443,
"x_ohm_per_km": 0.123,
"max_i_ka": 0.217,
"type": "cs",
"q_mm2": 70,
"alpha": alpha_al,
"voltage_rating": "MV"},
# High Voltage
"N2XS(FL)2Y 1x120 RM/35 64/110 kV":
{"c_nf_per_km": 112,
"r_ohm_per_km": 0.153,
"x_ohm_per_km": 0.166,
"max_i_ka": 0.366,
"type": "cs",
"q_mm2": 120,
"alpha": alpha_cu,
"voltage_rating": "HV"},
"N2XS(FL)2Y 1x185 RM/35 64/110 kV":
{"c_nf_per_km": 125,
"r_ohm_per_km": 0.099,
"x_ohm_per_km": 0.156,
"max_i_ka": 0.457,
"type": "cs",
"q_mm2": 185,
"alpha": alpha_cu,
"voltage_rating": "HV"},
"N2XS(FL)2Y 1x240 RM/35 64/110 kV":
{"c_nf_per_km": 135,
"r_ohm_per_km": 0.075,
"x_ohm_per_km": 0.149,
"max_i_ka": 0.526,
"type": "cs",
"q_mm2": 240,
"alpha": alpha_cu,
"voltage_rating": "HV"},
"N2XS(FL)2Y 1x300 RM/35 64/110 kV":
{"c_nf_per_km": 144,
"r_ohm_per_km": 0.060,
"x_ohm_per_km": 0.144,
"max_i_ka": 0.588,
"type": "cs",
"q_mm2": 300,
"alpha": alpha_cu,
"voltage_rating": "HV"},
# Overhead Lines, all from S.742f, Heuck: Elektrische Energieversorgung -
# Vierweg+Teubner 2013
# 679/86 110 from S. 362, Flosdorff, Hilgarth: Elektrische Energieverteilung - Teubner 2005
# Low Voltage
"15-AL1/3-ST1A 0.4":
{"c_nf_per_km": 11,
"r_ohm_per_km": 1.8769,
"x_ohm_per_km": 0.35,
"max_i_ka": 0.105,
"type": "ol",
"q_mm2": 16,
"alpha": alpha_al,
"voltage_rating": "LV"},
"24-AL1/4-ST1A 0.4":
{"c_nf_per_km": 11.25,
"r_ohm_per_km": 1.2012,
"x_ohm_per_km": 0.335,
"max_i_ka": 0.140,
"type": "ol",
"q_mm2": 24,
"alpha": alpha_al,
"voltage_rating": "LV"},
"48-AL1/8-ST1A 0.4":
{"c_nf_per_km": 12.2,
"r_ohm_per_km": 0.5939,
"x_ohm_per_km": 0.3,
"max_i_ka": .210,
"type": "ol",
"q_mm2": 48,
"alpha": alpha_al,
"voltage_rating": "LV"},
"94-AL1/15-ST1A 0.4":
{"c_nf_per_km": 13.2,
"r_ohm_per_km": 0.3060,
"x_ohm_per_km": 0.29,
"max_i_ka": 0.350,
"type": "ol",
"q_mm2": 94,
"alpha": alpha_al,
"voltage_rating": "LV"},
# Medium Voltage
"34-AL1/6-ST1A 10.0":
{"c_nf_per_km": 9.7,
"r_ohm_per_km": 0.8342,
"x_ohm_per_km": 0.36,
"max_i_ka": 0.170,
"type": "ol",
"q_mm2": 34,
"alpha": alpha_al,
"voltage_rating": "MV"},
"48-AL1/8-ST1A 10.0":
{"c_nf_per_km": 10.1,
"r_ohm_per_km": 0.5939,
"x_ohm_per_km": 0.35,
"max_i_ka": 0.210,
"type": "ol",
"q_mm2": 48,
"alpha": alpha_al,
"voltage_rating": "MV"},
"70-AL1/11-ST1A 10.0":
{"c_nf_per_km": 10.4,
"r_ohm_per_km": 0.4132,
"x_ohm_per_km": 0.339,
"max_i_ka": 0.290,
"type": "ol",
"q_mm2": 70,
"alpha": alpha_al,
"voltage_rating": "MV"},
"94-AL1/15-ST1A 10.0":
{"c_nf_per_km": 10.75,
"r_ohm_per_km": 0.3060,
"x_ohm_per_km": 0.33,
"max_i_ka": 0.350,
"type": "ol",
"q_mm2": 94,
"alpha": alpha_al,
"voltage_rating": "MV"},
"122-AL1/20-ST1A 10.0":
{"c_nf_per_km": 11.1,
"r_ohm_per_km": 0.2376,
"x_ohm_per_km": 0.323,
"max_i_ka": 0.410,
"type": "ol",
"q_mm2": 122,
"alpha": alpha_al,
"voltage_rating": "MV"},
"149-AL1/24-ST1A 10.0":
{"c_nf_per_km": 11.25,
"r_ohm_per_km": 0.1940,
"x_ohm_per_km": 0.315,
"max_i_ka": 0.470,
"type": "ol",
"q_mm2": 149,
"alpha": alpha_al,
"voltage_rating": "MV"},
"34-AL1/6-ST1A 20.0":
{"c_nf_per_km": 9.15,
"r_ohm_per_km": 0.8342,
"x_ohm_per_km": 0.382,
"max_i_ka": 0.170,
"type": "ol",
"q_mm2": 34,
"alpha": alpha_al,
"voltage_rating": "MV"},
"48-AL1/8-ST1A 20.0":
{"c_nf_per_km": 9.5,
"r_ohm_per_km": 0.5939,
"x_ohm_per_km": 0.372,
"max_i_ka": 0.210,
"type": "ol",
"q_mm2": 48,
"alpha": alpha_al,
"voltage_rating": "MV"},
"70-AL1/11-ST1A 20.0":
{"c_nf_per_km": 9.7,
"r_ohm_per_km": 0.4132,
"x_ohm_per_km": 0.36,
"max_i_ka": 0.290,
"type": "ol",
"q_mm2": 70,
"alpha": alpha_al,
"voltage_rating": "MV"},
"94-AL1/15-ST1A 20.0":
{"c_nf_per_km": 10,
"r_ohm_per_km": 0.3060,
"x_ohm_per_km": 0.35,
"max_i_ka": 0.350,
"type": "ol",
"q_mm2": 94,
"alpha": alpha_al,
"voltage_rating": "MV"},
"122-AL1/20-ST1A 20.0":
{"c_nf_per_km": 10.3,
"r_ohm_per_km": 0.2376,
"x_ohm_per_km": 0.344,
"max_i_ka": 0.410,
"type": "ol",
"q_mm2": 122,
"alpha": alpha_al,
"voltage_rating": "MV"},
"149-AL1/24-ST1A 20.0":
{"c_nf_per_km": 10.5,
"r_ohm_per_km": 0.1940,
"x_ohm_per_km": 0.337,
"max_i_ka": 0.470,
"type": "ol",
"q_mm2": 149,
"alpha": alpha_al,
"voltage_rating": "MV"},
"184-AL1/30-ST1A 20.0":
{"c_nf_per_km": 10.75,
"r_ohm_per_km": 0.1571,
"x_ohm_per_km": 0.33,
"max_i_ka": 0.535,
"type": "ol",
"q_mm2": 184,
"alpha": alpha_al,
"voltage_rating": "MV"},
"243-AL1/39-ST1A 20.0":
{"c_nf_per_km": 11,
"r_ohm_per_km": 0.1188,
"x_ohm_per_km": 0.32,
"max_i_ka": 0.645,
"type": "ol",
"q_mm2": 243,
"alpha": alpha_al,
"voltage_rating": "MV"},
# High Voltage
# c acd x values are estimated for 4 m conductor distance, single bundle and "Donaumast"
"48-AL1/8-ST1A 110.0":
{"c_nf_per_km": 8,
"r_ohm_per_km": 0.5939,
"x_ohm_per_km": 0.46,
"max_i_ka": 0.210,
"type": "ol",
"q_mm2": 48,
"alpha": alpha_al,
"voltage_rating": "HV"},
"70-AL1/11-ST1A 110.0":
{"c_nf_per_km": 8.4,
"r_ohm_per_km": 0.4132,
"x_ohm_per_km": 0.45,
"max_i_ka": 0.290,
"type": "ol",
"q_mm2": 70,
"alpha": alpha_al,
"voltage_rating": "HV"},
"94-AL1/15-ST1A 110.0":
{"c_nf_per_km": 8.65,
"r_ohm_per_km": 0.3060,
"x_ohm_per_km": 0.44,
"max_i_ka": 0.350,
"type": "ol",
"q_mm2": 94,
"alpha": alpha_al,
"voltage_rating": "HV"},
"122-AL1/20-ST1A 110.0":
{"c_nf_per_km": 8.5,
"r_ohm_per_km": 0.2376,
"x_ohm_per_km": 0.43,
"max_i_ka": 0.410,
"type": "ol",
"q_mm2": 122,
"alpha": alpha_al,
"voltage_rating": "HV"},
"149-AL1/24-ST1A 110.0":
{"c_nf_per_km": 8.75,
"r_ohm_per_km": 0.1940,
"x_ohm_per_km": 0.41,
"max_i_ka": 0.470,
"type": "ol",
"q_mm2": 149,
"alpha": alpha_al,
"voltage_rating": "HV"},
"184-AL1/30-ST1A 110.0":
{"c_nf_per_km": 8.8,
"r_ohm_per_km": 0.1571,
"x_ohm_per_km": 0.4,
"max_i_ka": 0.535,
"type": "ol",
"q_mm2": 184,
"alpha": alpha_al,
"voltage_rating": "HV"},
"243-AL1/39-ST1A 110.0":
{"c_nf_per_km": 9,
"r_ohm_per_km": 0.1188,
"x_ohm_per_km": 0.39,
"max_i_ka": 0.645,
"type": "ol",
"q_mm2": 243,
"alpha": alpha_al,
"voltage_rating": "HV"},
"305-AL1/39-ST1A 110.0":
{"c_nf_per_km": 9.2,
"r_ohm_per_km": 0.0949,
"x_ohm_per_km": 0.38,
"max_i_ka": 0.74,
"type": "ol",
"q_mm2": 305,
"alpha": alpha_al,
"voltage_rating": "HV"},
"490-AL1/64-ST1A 110.0":
{"c_nf_per_km": 9.75,
"r_ohm_per_km": 0.059,
"x_ohm_per_km": 0.37,
"max_i_ka": 0.960,
"type": "ol",
"q_mm2": 490,
"alpha": alpha_al,
"voltage_rating": "HV"},
"679-AL1/86-ST1A 110.0":
{"c_nf_per_km": 9.95,
"r_ohm_per_km": 0.042,
"x_ohm_per_km": 0.36,
"max_i_ka": 1.150,
"type": "ol",
"q_mm2": 679,
"alpha": alpha_al,
"voltage_rating": "HV"},
# Transmission System
# The following values of c and x depend on the geometries of the overhead line
# Here it is assumed that for x the 220kV line uses twin conductors and the 380kV line uses
# quad bundle conductor. The c values are estimated.
"490-AL1/64-ST1A 220.0":
{"c_nf_per_km": 10,
"r_ohm_per_km": 0.059,
"x_ohm_per_km": 0.285,
"max_i_ka": 0.96,
"type": "ol",
"q_mm2": 490,
"alpha": alpha_al,
"voltage_rating": "HV"},
"679-AL1/86-ST1A 220.0":
{"c_nf_per_km": 11.7,
"r_ohm_per_km": 0.042,
"x_ohm_per_km": 0.275,
"max_i_ka": 1.150,
"type": "ol",
"q_mm2": 679,
"alpha": alpha_al,
"voltage_rating": "HV"},
"490-AL1/64-ST1A 380.0":
{"c_nf_per_km": 11,
"r_ohm_per_km": 0.059,
"x_ohm_per_km": 0.253,
"max_i_ka": 0.96,
"type": "ol",
"q_mm2": 490,
"alpha": alpha_al,
"voltage_rating": "HV"},
"679-AL1/86-ST1A 380.0":
{"c_nf_per_km": 14.6,
"r_ohm_per_km": 0.042,
"x_ohm_per_km": 0.25,
"max_i_ka": 1.150,
"type": "ol",
"q_mm2": 679,
"alpha": alpha_al,
"voltage_rating": "HV"}
}
return linetypes
def basic_trafo_std_types():
trafotypes = {
# derived from Oswald - Transformatoren - Vorlesungsskript Elektrische Energieversorgung I
# another recommendable references for distribution transformers is Werth:
# Netzberechnung mit Erzeugungsprofilen
"160 MVA 380/110 kV":
{"i0_percent": 0.06,
"pfe_kw": 60,
"vkr_percent": 0.25,
"sn_mva": 160,
"vn_lv_kv": 110.0,
"vn_hv_kv": 380.0,
"vk_percent": 12.2,
"shift_degree": 0,
"vector_group": "Yy0",
"tap_side": "hv",
"tap_neutral": 0,
"tap_min": -9,
"tap_max": 9,
"tap_step_degree": 0,
"tap_step_percent": 1.5,
"tap_phase_shifter": False},
"100 MVA 220/110 kV":
{"i0_percent": 0.06,
"pfe_kw": 55,
"vkr_percent": 0.26,
"sn_mva": 100,
"vn_lv_kv": 110.0,
"vn_hv_kv": 220.0,
"vk_percent": 12.0,
"shift_degree": 0,
"vector_group": "Yy0",
"tap_side": "hv",
"tap_neutral": 0,
"tap_min": -9,
"tap_max": 9,
"tap_step_degree": 0,
"tap_step_percent": 1.5,
"tap_phase_shifter": False},
# compare to IFT Ingenieurbüro data and Schlabbach book
"63 MVA 110/20 kV":
{"i0_percent": 0.04,
"pfe_kw": 22,
"vkr_percent": 0.32,
"sn_mva": 63,
"vn_lv_kv": 20.0,
"vn_hv_kv": 110.0,
"vk_percent": 18,
"shift_degree": 150,
"vector_group": "YNd5",
"tap_side": "hv",
"tap_neutral": 0,
"tap_min": -9,
"tap_max": 9,
"tap_step_degree": 0,
"tap_step_percent": 1.5,
"tap_phase_shifter": False},
"40 MVA 110/20 kV":
{"i0_percent": 0.05,
"pfe_kw": 18,
"vkr_percent": 0.34,
"sn_mva": 40,
"vn_lv_kv": 20.0,
"vn_hv_kv": 110.0,
"vk_percent": 16.2,
"shift_degree": 150,
"vector_group": "YNd5",
"tap_side": "hv",
"tap_neutral": 0,
"tap_min": -9,
"tap_max": 9,
"tap_step_degree": 0,
"tap_step_percent": 1.5,
"tap_phase_shifter": False},
"25 MVA 110/20 kV":
{"i0_percent": 0.07,
"pfe_kw": 14,
"vkr_percent": 0.41,
"sn_mva": 25,
"vn_lv_kv": 20.0,
"vn_hv_kv": 110.0,
"vk_percent": 12,
"shift_degree": 150,
"vector_group": "YNd5",
"tap_side": "hv",
"tap_neutral": 0,
"tap_min": -9,
"tap_max": 9,
"tap_step_degree": 0,
"tap_step_percent": 1.5,
"tap_phase_shifter": False},
"63 MVA 110/10 kV":
{"sn_mva": 63,
"vn_hv_kv": 110,
"vn_lv_kv": 10,
"vk_percent": 18,
"vkr_percent": 0.32,
"pfe_kw": 22,
"i0_percent": 0.04,
"shift_degree": 150,
"vector_group": "YNd5",
"tap_side": "hv",
"tap_neutral": 0,
"tap_min": -9,