Пример #1
0
def sincal_3wt_to_cim_tsi(twt: StdThreeWindingTransformer):
    pte1 = PowerTransformerEnd()
    pte1.rated_s = twt.sn12
    pte1.rated_u = twt.un1
    sct1 = ShortCircuitTest(voltage=twt.uk12, voltage_ohmic_part=twt.ur12)
    pte2 = PowerTransformerEnd()
    pte2.rated_s = twt.sn23
    pte2.rated_u = twt.un2
    pte3 = PowerTransformerEnd()
    sct2 = ShortCircuitTest(voltage=twt.uk23, voltage_ohmic_part=twt.ur23)
    pte3.rated_s = twt.sn31
    pte3.rated_u = twt.un3
    sct3 = ShortCircuitTest(voltage=twt.uk31, voltage_ohmic_part=twt.ur31)
    tsi1: TransformerStarImpedance = transformer_test_to_rx(pte=pte1,
                                                            sc_test=sct1)
    tsi2: TransformerStarImpedance = transformer_test_to_rx(pte=pte2,
                                                            sc_test=sct2)
    tsi3: TransformerStarImpedance = transformer_test_to_rx(pte=pte3,
                                                            sc_test=sct3)
    if twt.flagZ0Input == 1:
        tsi1 = z0z1_r0x0(tsi1, twt, 1)
        tsi2 = z0z1_r0x0(tsi2, twt, 2)
        tsi3 = z0z1_r0x0(tsi3, twt, 3)
    elif twt.flagZ0Input == 2:
        tsi1 = from_r0x0(tsi1, twt, 1)
        tsi2 = from_r0x0(tsi2, twt, 2)
        tsi3 = from_r0x0(tsi3, twt, 3)
    elif twt.flagZ0Input == 3:
        # TODO: Implement this case
        pass
    else:
        raise Exception(f'flagZ0Input : {twt.flagZ0Input} not supported')

    print(
        f'tsi1: r = {round(tsi1.r, 3)}, x = {tsi1.x}, r0: {round(tsi1.r0, 3)}, x0 = {round(tsi1.x0, 3)} '
    )
    print(
        f'tsi2: r = {round(tsi2.r, 3)}, x = {tsi2.x}, r0: {round(tsi2.r0, 3)}, x0 = {round(tsi2.x0, 3)}'
    )
    print(
        f'tsi3: r = {round(tsi3.r, 3)}, x = {tsi3.x}, r0: {round(tsi3.r0, 3)}, x0 = {round(tsi3.x0, 3)}'
    )
Пример #2
0
def entso_e_example():
    # Validation with example 4.3.3.1, p 35. ENTSO-E, COMMON INFORMATION MODEL (CIM) – MODEL EXCHANGE PROFILE 1, Ed 1.
    # https://eepublicdownloads.entsoe.eu/clean-documents/CIM_documents/Grid_Model_CIM/140610_ENTSO-E_CIM_Profile_v1_UpdateIOP2013.pdf
    print('Computing TransformerStartImpedance attributes...')
    pte = PowerTransformerEnd()
    pte.rated_s = 1630e6
    pte.rated_u = 400e3
    sc_test = ShortCircuitTest(power=2020180, voltage=11.85)
    tsi: TransformerStarImpedance = transformer_test_to_rx(pte=pte,
                                                           sc_test=sc_test)
    print(f'r = {tsi.r}, x = {tsi.x}')
def test_compute_star_impedance():
    # Validation parameter from example 4.3.3.1, p 35. ENTSO-E, COMMON INFORMATION MODEL (CIM) – MODEL EXCHANGE PROFILE 1, Ed 1.
    # https://eepublicdownloads.entsoe.eu/clean-documents/CIM_documents/Grid_Model_CIM/140610_ENTSO-E_CIM_Profile_v1_UpdateIOP2013.pdf
    r = 0.1216563664420942
    x = 11.63126562998702
    pte = PowerTransformerEnd()
    pte.rated_s = 1630e6
    pte.rated_u = 400e3
    sc_test = ShortCircuitTest(power=2020180, voltage=11.85)
    nl_test = NoLoadTest()
    tsi: TransformerStarImpedance = transformer_test_to_rx(pte=pte, sc_test=sc_test, nl_test=nl_test)
    assert tsi.r == r
    assert tsi.x == x
Пример #4
0
def sincal_2wt_to_cim(twt: StdTwoWindingTransformer):
    print("Computing TransformerStarImpedance for ThreeWindingTransformer...")
    pte1 = PowerTransformerEnd()
    pte1.rated_s = twt.sn
    pte1.rated_u = twt.un1
    sc_test1 = ShortCircuitTest(voltage=twt.uk, voltage_ohmic_part=twt.ur)
    tsi: TransformerStarImpedance = transformer_test_to_rx(pte=pte1,
                                                           sc_test=sc_test1)
    if twt.flagZ0Input == 1:
        tsi = z0z1_r0x0_from_s2wt(tsi, twt)
    elif twt.flagZ0Input == 2:
        tsi = from_r0x0_for_s2wt(tsi, twt)
    elif twt.flagZ0Input == 3:
        tsi = from_r0R1_for_s2wt(tsi, twt)
    else:
        raise Exception(f'flagZ0Input : {twt.flagZ0Input} not supported')
    print(
        f'tsi: r = {round(tsi.r, 3)}, x = {tsi.x}, r0: {round(tsi.r0, 3)}, x0 = {round(tsi.x0, 3)} '
    )