Ask Your Question
0

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

asked 2025-02-17 01:33:14 -0600

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.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2025-02-17 02:00:57 -0600

perolofl gravatar image

updated 2025-02-18 12:40:02 -0600

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')
edit flag offensive delete link more

Comments

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

AS gravatar imageAS ( 2025-02-17 11:08:44 -0600 )edit

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 ( 2025-02-17 11:37:21 -0600 )edit

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

AS gravatar imageAS ( 2025-02-17 23:40:39 -0600 )edit

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 ( 2025-02-18 05:33:33 -0600 )edit

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

AS gravatar imageAS ( 2025-02-18 09:10:25 -0600 )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

1 follower

Stats

Asked: 2025-02-17 01:33:14 -0600

Seen: 116 times

Last updated: Feb 18