Ask Your Question

Mutenda's profile - activity

2019-10-01 16:49:53 -0500 received badge  Popular Question (source)
2019-10-01 16:49:53 -0500 received badge  Famous Question (source)
2019-10-01 16:49:53 -0500 received badge  Notable Question (source)
2018-10-12 14:01:40 -0500 received badge  Famous Question (source)
2018-09-27 02:02:19 -0500 commented answer Bus net MW injection or extraction - Through flow

Ok, thank you

2018-09-27 02:01:59 -0500 received badge  Notable Question (source)
2018-09-27 00:28:54 -0500 commented question Bus net MW injection or extraction - Through flow

Yes, it is total of power flowing into the bus from branches, transformers, HVDC, FACTS etc.

2018-09-25 11:33:15 -0500 received badge  Popular Question (source)
2018-09-23 05:02:08 -0500 asked a question Bus net MW injection or extraction - Through flow

Hi,.

Is there a function to extract total MW injection into a bus or total MW out of a bus?

Regards

2018-07-28 12:20:25 -0500 received badge  Enthusiast
2018-07-27 07:04:55 -0500 asked a question Unkown error # 5. PRGRS (OPNWNO/OPNTMP)

Hi,.

Please assist with resolving the error I encounter when running the following:

import os, sys

PSSE_LOCATION = 'C:\\Program Files (x86)\\PTI\\PSSE34\\PSSPY27\\'
sys.path.append(PSSE_LOCATION)
os.environ['PATH'] = (PSSE_LOCATION + os.environ['PATH'])   

import psse34
import psspy
psspy.throwPsseExceptions = True
import redirect
redirect.psse2py()

psspy.psseinit(10000)
2017-07-06 21:41:33 -0500 received badge  Famous Question (source)
2017-05-19 23:59:26 -0500 received badge  Notable Question (source)
2017-05-19 09:31:18 -0500 received badge  Famous Question (source)
2017-05-19 09:31:18 -0500 received badge  Notable Question (source)
2017-05-19 09:31:18 -0500 received badge  Popular Question (source)
2017-05-18 08:32:40 -0500 answered a question Unable to save to txt

The command "psspy.psseinit(12000)" is now before the main for loop. The code still generates multiple headers.

2017-05-18 08:30:44 -0500 received badge  Popular Question (source)
2017-05-16 13:17:19 -0500 received badge  Editor (source)
2017-05-16 12:02:48 -0500 asked a question Unable to save to txt

The code below is creating multiple headers. What am i doing wrong?

import os, sys
PSSE_LOCATION = r"C:\Program Files (x86)\PTI\PSSE33\PSSBIN"
sys.path.append(PSSE_LOCATION)
os.environ['PATH'] = os.environ['PATH'] + ';' +  PSSE_LOCATION

import glob
import psspy
import redirect
##redirect.psse2py()
for CASE in glob.glob(os.path.join('C:\\Users\\tshipam\\Desktop\\SAPP temp\\PSSE Engine mode\\', '*.sav')):

psspy.psseinit(12000)
psspy.case(CASE)
psspy.throwPsseException = True

psspy.fdns([1,0,0,0,0,0,99,0])

conFile = open('report.txt', 'w')
conFile.write('Started writing to file by Mutenda Tshipala')
conFile.write('\n\n')

# Redirect generated reports to a file
psspy.report_output(islct=2, filarg="./" + 'report' + '.txt', options=[0])
##psspy.report_output(islct=2, filarg="./" + 'report' + FileNumber + '.txt', options=[0])    

# Run any functions that create a report
psspy.lout(0,1)

Output PTI INTERACTIVE POWER SYSTEM SIMULATOR--PSS(R)E TUE, MAY 16 2017 19:21 TXGPMASTERPROJECT 2016 TX2016 POST TDP-2017 BASE CASE %MVA FOR TRANSFORMERS POWERFACTORY 15.2.3 DATE: 2/26/2017, TIME: 10:53:06 AM %MVA FOR NON-TRANSFORMER BRANCHES

X------- FROM BUS ------X AREA VOLT GEN LOAD SHUNT X---------- TO BUS ----------X TRANSFORMER RATING BUS# X-- NAME --X BASKV ZONE PU/KV ANGLE MW/MVAR MW/MVAR MW/MVAR BUS# X-- NAME --X BASKV AREA CKT MW MVAR RATIO ANGLE % SET A

11 HPSC1B      400.00   12 1.0407   18.6     0.0      0.0     0.0 -----------------------------------------------------------------------------
                       112 416.26            0.0      0.0     0.0     16 HPSC1A      400.00   12  1   -171.0    25.7                   12  1455
                                                                     380 POSDN4      400.00   13  1    171.0   -25.7                   16  1109

. . .

TXGPMASTERPROJECT 2016 TX2016 POST TDP-2017 BASE CASE %MVA FOR TRANSFORMERS POWERFACTORY 15.2.3 DATE: 2/26/2017, TIME: 10:53:06 AM %MVA FOR NON-TRANSFORMER BRANCHES

X------- FROM BUS ------X AREA VOLT GEN LOAD SHUNT X---------- TO BUS ----------X TRANSFORMER RATING BUS# X-- NAME --X BASKV ZONE PU/KV ANGLE MW/MVAR MW/MVAR MW/MVAR BUS# X-- NAME --X BASKV AREA CKT MW MVAR RATIO ANGLE % SET A

58 KAPPA7      765.00    5 1.0415   13.5     0.0      0.0     0.0 -----------------------------------------------------------------------------
                       178 796.77            0.0      0.0     0.0     55 GAMMA7      765.00   10  1   -499.2    -8.6                   12  4174
                                                                      70 STERKUS7    765.00    5  1    304.9   -65.3                    4  7243
                                                                  3WNDTR KAPPA 765/40 WND 1       1    194.3    73.9  1.000RG          10  2000
2017-05-16 11:59:38 -0500 answered a question psspy.lout and save to txt

import os, sys

PSSELOCATION = r"C:\Program Files (x86)\PTI\PSSE33\PSSBIN" sys.path.append(PSSELOCATION) os.environ['PATH'] = os.environ['PATH'] + ';' + PSSE_LOCATION

import glob import psspy import redirect

redirect.psse2py()

FileNumber = 1

Loop through cases

for CASE in glob.glob(os.path.join('C:\Users\tshipam\Desktop\SAPP temp\PSSE Engine mode\', '*.sav')):

psspy.psseinit(12000)
psspy.case(CASE)
psspy.throwPsseException = True

#psspy.fnsl(
    #options1=0, # disable tap stepping adjustment.
    #options5=0, # disable switched shunt adjustment.
#)

psspy.fdns([1,0,0,0,0,0,99,0])

conFile = open('report.txt', 'w')
conFile.write('Started writing to file by Mutenda Tshipala')
conFile.write('\n\n')

# Redirect generated reports to a file
psspy.report_output(islct=2, filarg="./" + 'report' + '.txt', options=[0])
##psspy.report_output(islct=2, filarg="./" + 'report' + FileNumber + '.txt', options=[0])    

# Run any functions that create a report
psspy.lout(0,1)

# Redirect reports back to the default      
psspy.report_output(islct=2, options=[0])

##conFile.write('Finished writing to file by Mutenda Tshipala')
conFile.close()
2017-05-12 11:18:43 -0500 asked a question psspy.lout and save to txt

Hi,.

How can i save the bus based report [ psspy.lout(0,1)] to text file?

Regards