Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simulation of individual devices as unit tests #213

Open
9 of 12 tasks
bjpalmer opened this issue Jul 15, 2024 · 12 comments
Open
9 of 12 tasks

Add simulation of individual devices as unit tests #213

bjpalmer opened this issue Jul 15, 2024 · 12 comments
Assignees

Comments

@bjpalmer
Copy link
Contributor

bjpalmer commented Jul 15, 2024

A collection of .dyr files has been created that run with the case9.raw file and test indivual devices used in dynamic simulation. These currently consist of

  • case9_GAST.dyr
  • case9_GENROU.dyr
  • case9_GENROU_ESST1A.dyr
  • case9_GENROU_ESST1A_WSIEG1.dyr
  • case9_GENROU_EXDC1.dyr
  • case9_GENROU_EXDC1_WSIEG1.dyr
  • case9_GENSAL.dyr
  • case9_GENSAL_ESST1A.dyr
  • case9_GENSAL_ESST1A_WSIEG1.dyr
  • case9_HYGOV.dyr
  • case9_REGCA1_REECA1_REPCA1.dyr
  • case9_SEXS.dyr

The cases that have been checked are running, the unchecked cases are not running.

@bjpalmer
Copy link
Contributor Author

@abhyshr, @yliu250, GENROU_ESST1A simulation are failing for a similar reason to the one identified in issue #212. The GENSAL simulation is also failing due to the solver failing to converge.

@yliu250
Copy link
Collaborator

yliu250 commented Jul 15, 2024

@bjpalmer @abhyshr , I can take a look at this issue. Which branch is it?

@bjpalmer
Copy link
Contributor Author

I've been working in fixes/dyn_sim. I need to add the GENSAL and GENROU_ESST1A test cases to the build and check it in. I will let you know when this is complete.

@bjpalmer
Copy link
Contributor Author

Sorry about the delay. I added input files for the GENROU_ESST1A and GENSAL devices to applications/data_sets/input/ds. These use the corresponding .dyr files located in applications/data_sets/dyr. You will need to move these to the application build directory by hand. They currently don't work. I'll continue testing other configurations to find out which ones are working and add them to the build.

@yliu250
Copy link
Collaborator

yliu250 commented Jul 17, 2024

@bjpalmer , which branch is it?

@bjpalmer
Copy link
Contributor Author

fixes/dyn_sim

@bjpalmer
Copy link
Contributor Author

All the GENROU tests seem to be running at this point in the fixes/dyn_sim branch. Just need to get the GENSAL tests working.

@bjpalmer
Copy link
Contributor Author

The GENSAL test (input_unit_GENSAL.xml) is failing once the dynamic simulation starts. The output to standard out at failure is

   Bus Voltages and Phase Angles

   Bus Number      Phase Angle      Voltage Magnitude
          1          0.000000             1.000000
          2          9.668741             1.000000
          3          4.771073             1.000000
          4         -2.406644             0.987007
          5         -4.017264             0.975472
          6          1.925602             1.003375
          7          0.621545             0.985645
          8          3.799120             0.996185
          9         -4.349934             0.957621
Monitoring generators:
  Bus:        1 Generator ID: 1 
Generator Watch Frequency: 1

and the output to standard error is

terminate called after throwing an instance of 'gridpack::Exception'
  what():  0: PETSc KSP diverged after 0 iterations, reason: -9
[node006:09809] *** Process received signal ***
[node006:09809] Signal: Aborted (6)
[node006:09809] Associated errno: Unknown error 32767 (32767)
[node006:09809] Signal code:  (-19112)
[node006:09809] [ 0] /lib64/libc.so.6[0x31d14326a0]
[node006:09809] [ 1] /lib64/libc.so.6(gsignal+0x35)[0x31d1432625]
[node006:09809] [ 2] /lib64/libc.so.6(abort+0x175)[0x31d1433e05]
[node006:09809] [ 3] /share/apps/gcc/12.1.0/lib64/libstdc++.so.6(+0xa58c9)[0x2aaaac8f38c9]
[node006:09809] [ 4] /share/apps/gcc/12.1.0/lib64/libstdc++.so.6(+0xb11ca)[0x2aaaac8ff1ca]
[node006:09809] [ 5] /share/apps/gcc/12.1.0/lib64/libstdc++.so.6(+0xb1235)[0x2aaaac8ff235]
[node006:09809] [ 6] /share/apps/gcc/12.1.0/lib64/libstdc++.so.6(+0xb1487)[0x2aaaac8ff487]
[node006:09809] [ 7] dsf2.x[0x66c17e]
[node006:09809] [ 8] dsf2.x[0x66c846]
[node006:09809] [ 9] dsf2.x[0x44023f]
[node006:09809] [10] dsf2.x[0x66d8b3]
[node006:09809] [11] dsf2.x[0x44023f]
[node006:09809] [12] dsf2.x[0x5202c2]
[node006:09809] [13] dsf2.x[0x521189]
[node006:09809] [14] dsf2.x[0x5218cd]
[node006:09809] [15] dsf2.x[0x521945]
[node006:09809] [16] dsf2.x[0x410703]
[node006:09809] [17] dsf2.x[0x4109f6]
[node006:09809] [18] /lib64/libc.so.6(__libc_start_main+0xfd)[0x31d141ed5d]
[node006:09809] [19] dsf2.x[0x410079]
[node006:09809] *** End of error message ***

@abhyshr, it looks like the linear solve is failing to converge. Any ideas on this?

@abhyshr
Copy link
Collaborator

abhyshr commented Oct 30, 2024

Do you have -pc_factor_shift_type NONZERO for the dynamics simulation solver in the xml file?

@abhyshr
Copy link
Collaborator

abhyshr commented Oct 30, 2024

and are you using the same network file as used for the other tests?

@bjpalmer
Copy link
Contributor Author

bjpalmer commented Oct 31, 2024

All files are using the same 9 bus .raw file (case9.raw). I wasn't using the -pc_factor_shift_type NONZERO option, but I just put it in and got the same result.

This is the complete PETSc options block for the dynamic simulation

        <PETScOptions>
          -ksp_type richardson
          -pc_type lu
          -pc_factor_mat_solver_type superlu_dist
          -pc_factor_shift_type NONZERO
          -ksp_max_it 1
        </PETScOptions>

@bjpalmer
Copy link
Contributor Author

bjpalmer commented Nov 6, 2024

The actual error is

PETSc KSP diverged after 0 iterations, reason: -9

According to the documentation, this suggests a nan or Inf showed up somewhere. Is it possible there is a divide by zero when setting up the matrix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants