I don't have a deep level of experience with Dynamics, so I hope that someone can chime in and correct me if I'm wrong.
- You cannot check the angles with Python while PSS/E is actually running the simulation.
That means you'll need to stop simulating for a little bit and check the .out file for the monitored machine angles.
I propose something like this:
- Run for a short period of time after clearing fault (e.g. 1 second)
- Check the .out file using
dyntools
for the machine angle spread - Either take action by tripping generators or continuing the study depending on the outcome of #2
Feel free to adjust the timing above, I've only used 1 second as a guide.