Ask Your Question
0

Dynamic Simulation data as variable in Python

asked 2016-04-08 15:11:36 -0500

hj gravatar image

Hello.

I want to use PSS/e dynamic simulation result as variables in Python. I can store the dynamic sim. result in .out file but I don't know how to use the result in Python directly.

Please let me know how to do.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-10-06 06:09:34 -0500

perolofl gravatar image

Use module dyntools to get the channel values from a .out file.

import dyntools

outfile = 'TripGen102.out'
chnfobj = dyntools.CHNF('TripGen102.out')
sh_ttl, ch_id, ch_data = chnfobj.get_data()

# extract list with time
t = ch_data.get('time')  

# extract list with values for channel ch
v = ch_data.get(ch)

chid is a dictionary with channel id's and chdata is a dictionary with time and all channel values

edit flag offensive delete link more

Comments

Hi. I am able to extract the time using this code but I don't quite understand how to extract a specific channel. is ch the name of a specific channel in ch_id? please bear with me...i am new to python. So I tried this but it didnt work: print ch_id #to know the channel ids v=ch_id.get('chan id')

Karma1 gravatar imageKarma1 ( 2017-01-17 05:24:49 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Stats

Asked: 2016-04-08 15:11:36 -0500

Seen: 46,625 times

Last updated: Oct 06 '16