Ask Your Question

Cid's profile - activity

2021-10-03 07:28:25 -0500 received badge  Teacher (source)
2021-10-03 07:28:25 -0500 received badge  Necromancer (source)
2020-02-26 00:34:09 -0500 received badge  Enthusiast
2020-02-18 05:25:20 -0500 answered a question PSS/E Crash when using DFAX from Python

I changed to PSSE 34 and the problem dissapeared. Mistery solved!

2020-02-18 05:23:40 -0500 received badge  Popular Question (source)
2020-02-18 05:23:40 -0500 received badge  Famous Question (source)
2020-02-18 05:23:40 -0500 received badge  Notable Question (source)
2020-02-13 01:27:31 -0500 asked a question PSS/E Crash when using DFAX from Python

Hi everyone,

I am experiencing a bad case of PSS/E crash when using DFAX command within a Python Scripts. The DFAX command is included in a certain loop to calculate sensitivities of a bus to a branch flow. Every now and then the script crashes and the process is interrupted.

There is a message when debugging the crash, saying there is an exception not controlled in 0x058A5225 (psseng.dll), access violation trying to read the location 0x1C207A88.

I suspect that there is a problem when the script creates the dfax file, as if the dfax file cannot be accessed many times, or there is a problem when accessing multiple times certain dll. The crashing moment seems to happen randomly, at different moments in the loop.

Any body experiencing this type of problems may give me a clue?

I am using PSSE 33.5

thanks in advance!

2019-01-15 09:18:48 -0500 received badge  Famous Question (source)
2018-10-18 10:43:25 -0500 received badge  Notable Question (source)
2018-09-14 00:40:54 -0500 received badge  Popular Question (source)
2018-09-13 04:53:13 -0500 answered a question Load data retrieval from load flow data

¿Is there any way to expand the results of the "MVA" option (STRING1) of loddt2 into a set of P and Q values? I am only obtaining the complex value of the load.

2018-09-12 05:58:29 -0500 received badge  Editor (source)
2018-09-12 05:56:42 -0500 asked a question Cut and paste Networks by Voltage Level

Hello everyone,

I am trying to do some task which consists of taking one transport network model and one distribution network model, and mixing them (intersect them) and as a result, obtaining a whole network with the best of both.

The original transmission network model (radial 400 kV and 220 kV) has also incorporated the 132 kv level but not complete. The transformers within are 2 winding transformers

The original distribution network model (132 kv, 66 kv) has also the transmission level ( 400 kV and 220 kv but not with the same detail as the transmission network model). This also uses 3 winding transformers.

I have tried to create a Python recursive function to do is this:

  • Starts on one node of a certain voltage level and goes jumping from one bus to another. On each bus check if it is bonding with another voltage level through a transformer. If this is the case, it identifies the transformer on a list.
  • If this bus 1 is attached through a non transformer branch with other bus 2, it erases the branch, change the bus 1 code to 4, and then on the bus 2 executes the same function, and so on (recursive).

This is the code:

def boundfinder(ibus,buses_frontera=[]):
     indicador = psspy.inibrn(ibus,2)
     jmenos=[]
    while indicador==0:
        indicador, jbus, kbus, ickt = psspy.nxtbrn3(ibus)
        zerr,basekvi = psspy.busdat(ibus,'BASE')
        zerr,basekvj = psspy.busdat(jbus,'BASE')
        if kbus !=0:
            print '3 wind trf 1er '+str(ibus)+' 2do '+str(jbus)+' 3rd '+str(kbus)+' id '+str(ickt)
            buses_frontera.append((ibus,jbus,kbus,ickt))
        elif basekvi==basekvj:
            jerr=psspy.purgbrn(ibus,jbus,ickt)
            jmenos.append(jbus)
        else:
            buses_frontera.append((ibus,jbus,"2 windings",ickt))
    jmenos=jmenos[:-1]
    for i in jmenos:
        boundfinder(i,buses_frontera)
    psspy.bus_chng_3(ibus,[4,_i,_i,_i],[_f,_f,_f,_f,_f,_f,_f],_s)
      return buses_frontera

I am relatively new to Python, and as a result i am obtaining mediocre results. I would expect to obtain a network without a certain voltage level (branches erased, buses disconnected and the whole set of boundary nodes with other voltage levels (transformers). So i could export the more interesting voltage levels on each mode and add them on a new model (using Join after comparing the obtained lists of boundary nodes).

I thought this could work with just executing the function on one bus, (assuming that transport is radial), travelling every node on one voltage level, but sometimes gets stuck. If I make an appropiate guess from a central node, it works fine, letting some isolated buses without being disconnected now and then.

My questions: Are my ideas futile because is an easier way to do what i´m trying? I know that i could work with subsystems, but i expect to extend my code to also collect the load and generation which hangs from every boundary bus. In order to match them between models.

Is there a more efficient and/or elegant (pythonic way to do this?)

Have you ... (more)