First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

For a given PSAS/IDEV file for dynamics, how to detect the total simulation time?

asked Feb 17 '5

AS gravatar image

I need to do this using fortran using a simple user written model. I am aware of using DSRVAL or time variable which keeps updating during run. I need to find simulation time just before end of simulation and use that further.

1 answer

Sort by » oldest newest most voted
0

answered Feb 17 '5

perolofl gravatar image

updated Feb 18 '5

The actual simulation time is available in variable TIME (GET_TIME() in rev 36) in a user written model.

EDIT:

The following Python code after the simulation will print the actual time to progress window:

ierr, run_time = psspy.dsrval('TIME')
psspy.progress(f'Run time = {run_time:.3f} s\n')
link

Comments

I need the time just before simulation is ending with activity BAT_END etc. and not on continuous basis.

AS gravatar imageAS (Feb 17 '5)

It is confusing when you write "using a simple user written model". Why not just use psspy.dsrval('DELT')? It is better to use Python instead of PSAS/IDEV for the contingency.

perolofl gravatar imageperolofl (Feb 17 '5)

I need something of sort total simulation/run time=xx seconds in output file (pdev/odev).

AS gravatar imageAS (Feb 18 '5)

Still not clear, you mention output file, pdev/odev. Do you want something like "Run time = 20.000 s" in progress window?

perolofl gravatar imageperolofl (Feb 18 '5)

Yes sir, I want something like this just before simulation ends.

AS gravatar imageAS (Feb 18 '5)

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: Feb 17 '5

Seen: 116 times

Last updated: Feb 18