##### select channels ierr = psspy.delete_all_plot_channels() # clear channels BusDataDict = getBusData(rawFile) # get all the bus voltages, angles and frequencies for bus in BusDataDict: bus = int(bus) ierr = psspy.voltage_and_angle_channel([-1, -1, -1, bus]) ierr = psspy.bus_frequency_channel([-1, bus]) savFile = rawFileName + '.sav' snpFile = rawFileName + '.snp' ierr = psspy.save(savFile) ierr = psspy.snap([_i,_i,_i,_i,_i],snpFile) """ for event in simList: eventWords = event.split('/') #RawFileIndicator = eventWords[0].strip() linesOutage = eventWords[1].strip() FaultBus = eventWords[2].strip()[1:] # exclude the 'F' at the beginning """
# convert load for i in [1, 2, 3]: ierr = psspy.conl(0, 1, i, [0, 0], [100, 0, 0, 100])[0] # save converted case psspy.save(r'{0}\savnw_C.sav'.format(example_path)) # Load dynamics ierr = psspy.dyre_new([_i, _i, _i, _i], dyr_case, _s, _s, _s) # Set output channels psspy.chsb(sid=0, all=1, status=[-1, -1, -1, 1, 12, 0]) # # Save snapshot psspy.snap(sfile=r'{0}\PythonDynTest.snp'.format(example_path)) # Initialize and run the dynamic scenario psspy.strt(option=0, outfile=out_file) psspy.run(0, 1, 0, 0, 0) # 3-phase fault on bus 151 (default bus fault is a 3phase and there is no bus 151) psspy.dist_bus_fault(ibus=151) # Run to 3 cycles time = 3.0 / 60.0 psspy.run(0, 1 + time, 0, 0, 0) # Clear fault (assuming only part of bus faults) psspy.dist_clear_fault() psspy.dist_branch_trip(ibus=151, jbus=201, id='1')
title2 = 'flatstart' conl = 'Conl.idv' channels = 'channels.idv' mylog = '%s.log'%study # psspy.progress_output(2,mylog,[0,0]) psspy.report_output(2,mylog,[0,0]) psspy.progress(' \n') psspy.progress('***************************************\n') psspy.progress('* MakeCnvSnp %s \n'%study) psspy.progress('*\n') psspy.progress('***************************************\n') psspy.case(mysav) #psspy.runrspnsfile(re_add) #adds RE topology psspy.runrspnsfile(conl) psspy.fnsl((_i,0,_i,_i,_i,_i,_i,0)) psspy.cong(0) psspy.ordr(0) psspy.fact() psspy.tysl(0) psspy.tysl(0) psspy.save('%s_cnv'%study) psspy.dyre_new([1,1,1,1], mydyr, r"""conec.flx""", r"""conet.flx""", r"""compile.bat""") psspy.snap([-1,-1,-1,-1,-1],'%s'%study) psspy.progress_output(1)