Ask Your Question

satyan's profile - activity

2021-07-08 07:53:15 -0500 answered a question psspy.case casues python to crash/restart

looks like you havent imported psse34

import psse34
2021-07-08 07:21:04 -0500 received badge  Editor (source)
2021-07-08 07:15:35 -0500 answered a question psspy.case casues python to crash/restart

what is your python version? psse version? I am giving a sample code for psse34 and py2.7

#******************************************

PYTHON INITIALSING AND IMPORTING

Calling of the PSSE location in Python

Ensure you are Python 2.7

Ensure have pip installed matplotlib in python27/scripts directory

**************

import psse34

Including the PSSPY library of PSSE, Redirecting its output to Python Shell and Importing the Default variables

import psspy, arrbox.dfax_pp

psspy.throwPsseException=True

import redirect

redirect.psse2py()

psspy.psseinit()

default integer, float etc constatnts needed

from psspy import _i

from psspy import _f

from psspy import _s

import dyntools import matplotlib.pyplot as plt

import math

print ("\n Python code is ready to run \n")

**************

PYTHON INITIALSING AND IMPORTING END HERE

COPY THIS PART AS IT IS IN FUTURE CASES

**************

***************

Define .sav and .dyr cases

since we have a snapshot file, *.snp

there is a need to open that in GUI

and save the machine data case tab

as filenameofyour_choice.dyr

****************

**********

Input and Files

**********

case_name=r"""D:\mydir\myfile.sav"""

dyr_name =r"""D:\Mydir\mydynfile.dyr"""

outfile = "plot.out"

**********

LOAD FLOW

**********

load case and run loadflow

psspy.case(case_name)

run load flow

psspy.fnsl([0,0,0,0,0,0,0,0])

2021-06-29 01:07:58 -0500 answered a question Understanding dynamic models

GENROU is round rotr model. Basic theory is given in any dynamics book such as Prabha Kundur