Describe the bug
One cause of #1341
The source impedance related attribute sk does not align with the source input: skss_max and skss_min which are corresponding to max and min voltage correction factor. Its does not get scaled by c at the moment.
Script for hand calculation and replication of bug:
import math
# Note that s_base is irrelevant to calculations and only help in explaination.
# Results should be the same whatever s_base is chosen.
s_base = 1e6
u_rated_source_node = 100e3
z_base_source_node = u_rated_source_node * u_rated_source_node / s_base
def calculate(skss, c):
# calculation within PGM
z_k_pu = 1.0 / (skss / s_base)
z_k_ohms = z_k_pu * z_base_source_node
i_f = c * u_rated_source_node / (z_k_ohms * math.sqrt(3))
print(f"c={c} PGM i_f result: {i_f}")
print(f"c={c} PGM z_k_pu result: {z_k_pu}")
print(f"c={c} PGM z_k_ohms result: {z_k_ohms}")
print(f"\n")
# Hand calculation
i_f = skss / (u_rated_source_node * math.sqrt(3))
print(f"c={c} Hand calculation result: {i_f}")
z_k_ohms = c * u_rated_source_node / (i_f * math.sqrt(3))
z_k_pu = z_k_ohms / z_base_source_node
print(f"c={c} Hand calculation z_k_pu result: {z_k_pu}")
print(f"c={c} Hand calculation z_k_ohms result: {z_k_ohms}")
print(f"\n")
calculate(skss=900e6, c=1.0)
calculate(skss=1000e6, c=1.1)
Gives
c=1.0 PGM i_f result: 5196.152422706632
c=1.0 PGM z_k_pu result: 0.0011111111111111111
c=1.0 PGM z_k_ohms result: 11.11111111111111
c=1.0 Hand calculation result: 5196.152422706633
c=1.0 Hand calculation z_k_pu result: 0.001111111111111111
c=1.0 Hand calculation z_k_ohms result: 11.111111111111109
c=1.1 PGM i_f result: 6350.852961085885
c=1.1 PGM z_k_pu result: 0.001
c=1.1 PGM z_k_ohms result: 10.0
c=1.1 Hand calculation result: 5773.5026918962585
c=1.1 Hand calculation z_k_pu result: 0.0011
c=1.1 Hand calculation z_k_ohms result: 11.0
Note that the equations should be:
ikss = c * u_rated / (sqrt3 * z_k_ohms)
skss = sqrt3 * u_rated * ikss
By definition in IEC 60909, the voltage scaling applies to calculating ikss using a specific prefault voltage. conversion to skss, ie. grid strength is not on the basis of prefault voltage but on the rated voltage at the conencted node.
Implementation
Hence we should scale y_ref depending on the c factor either at source, main_core / main_model or at short circuit solver.
The results obtained for minimum short circuit scaling stays the same. Only the maximum scaling calculations are affected.
Describe the bug
One cause of #1341
The source impedance related attribute
skdoes not align with the source input:skss_maxandskss_minwhich are corresponding to max and min voltage correction factor. Its does not get scaled bycat the moment.Script for hand calculation and replication of bug:
Gives
Note that the equations should be:
By definition in IEC 60909, the voltage scaling applies to calculating ikss using a specific prefault voltage. conversion to skss, ie. grid strength is not on the basis of prefault voltage but on the rated voltage at the conencted node.
Implementation
Hence we should scale y_ref depending on the c factor either at source, main_core / main_model or at short circuit solver.
The results obtained for minimum short circuit scaling stays the same. Only the maximum scaling calculations are affected.