Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 向CSV提供故障电流数据_Python_Api_Fault_Psse - Fatal编程技术网

Python 向CSV提供故障电流数据

Python 向CSV提供故障电流数据,python,api,fault,psse,Python,Api,Fault,Psse,我使用的是IEEE39总线数据。如果系统中只有总线1故障。我可以使用pssarrays.ascc\u currents查看其他总线的贡献电流。但我不知道如何使用python将其他总线的贡献电流数据逐个保存到CSV。 我使用pssever34和python2.7。 我有一个小代码: psspy.short_circuit_units(1) psspy.short_circuit_coordinates(1) sid = 3 all = 0 rprtyp = 2 # or 3 rprlvl = 0

我使用的是IEEE39总线数据。如果系统中只有总线1故障。我可以使用
pssarrays.ascc\u currents
查看其他总线的贡献电流。但我不知道如何使用python将其他总线的贡献电流数据逐个保存到CSV。 我使用pssever34和python2.7。 我有一个小代码:

psspy.short_circuit_units(1)
psspy.short_circuit_coordinates(1)
sid = 3
all = 0
rprtyp = 2 # or 3 
rprlvl = 0 # number of contribution levels
fltbuses=[1]
psspy.bsys(sid,0,[0.0,0.0],0,[],len(fltbuses),fltbuses,0,[],0,[])
rlst = pssarrays.ascc_currents(sid,all,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1.0,"","","",rprtyp,rprlvl)
在psse中,答案是:

    AT BUS_1  /FAULTED BUS IS:  1 / 0 LEVELS AWAY
     FROM                /I+/       AN(I+)  
SYNCHRONOUS MACHINE      /1898.3/   -63.96 
      2                  /3332.5/  -102.76      
     39                  /6649.2/   -87.59   
 INITIAL SYM. S.C. CURRENT(I''k) /11605.3/   -88.14
我知道总三相故障电流api是
rlst.flt3ph.values()
故障总线api是
rlst.fltbus

我找不到有关当前贡献的相应api代码。 我想将这些数据打印到csv

    [SYNCHRONOUS MACHINE][1898.3][-63.96]
          [2][3332.5][-102.76]
         [39][6649.2][-87.59]
[total 3ph fault current][11605.3][-88.14]
提前谢谢