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

Ask Your Question
0

Getting y matrix through conet crashes pss e

asked Feb 27 '19

marilyn3 gravatar image

updated Feb 27 '19

I am using this api CALL OUTPUTYMATRIX in the conet subrutine , i need it for printing the ybus elements in the progress window , before running a simulation i use this code, but pss e crashes , i want to know if its possible to use this api during dynamic simulation in a user model for example

 SUBROUTINE CONET

  INCLUDE 'COMON4.INS'

  IF (.NOT. IFLAG) GO TO 9000

   WHEN (MODE.EQ.1 .OR. KPAUSE.EQ.2)
  . 
  .  CALL OUTPUT_Y_MATRIX(0,1,1,0, 'x.txt', 0)
  ...FIN
  ELSE RETURN

  9000 CONTINUE
  RETURN
  END

2 answers

Sort by » oldest newest most voted
0

answered Feb 28 '19

perolofl gravatar image

The last argument in the subroutine call should be an integer variable, e.g. IERR. You have entered a constant.

Isn't it easier to just call the python API before the first run command, instead of calling it in Fortran from CONET?

link

Comments

@perolofl thanks , i want to do this with the conet subroutine in fortran because i want to know if it is possible to get the data of the admittance matrix during a dynamic simulation through an user model, i need some values of the Ybus so i want to know if its possible to do this

marilyn3 gravatar imagemarilyn3 (Feb 28 '19)

Does it work after changing to IERR?

perolofl gravatar imageperolofl (Mar 1 '19)

no , still crashes pss e , i used 0 as the IERR code , but anyway cant do the initialize activity because it just stops working

marilyn3 gravatar imagemarilyn3 (Mar 1 '19)

Can you show the call statement you are using?

perolofl gravatar imageperolofl (Mar 1 '19)

im using this code in CONET, then create dll gui and the cload4 command , i call the ymatrix output in mode 1 because i think i will print the ybus in the initialization strt WHEN (MODE.EQ.1) . . CALL OUTPUT_Y_MATRIX(0,1,1,1, 'OFILE.txt',0) ...FIN ELSE RETUN

marilyn3 gravatar imagemarilyn3 (Mar 1 '19)
0

answered Feb 28 '19

jfconroy gravatar image

I agree that Python is the easier way to get what you want.

The following is a lot more work, but it might be a preferred option for you, if you want to avoid writing/using Python code for every simulation. You could also consider writing a CCT model instead of a CONEC model. This is a v33+ feature. This type of model can be written as a DLL with the functionality that you want, and unlike a CONEC model it does not have to be compiled at run time. I'd advise you to get your CONEC code working correctly before you try to convert it to a CCT model.

https://w3.usa.siemens.com/smartgrid/...

Happy coding!

link

Comments

thanks a lot for the suggestion, i am currently using the version 32 of PSSE so for me its not possible use a cct model type , i want to know tho if its possible to get the values of the Ybus during dynamic simulation through an user model , do you know if its possible??

marilyn3 gravatar imagemarilyn3 (Feb 28 '19)

It should be possible to get the Ybus through a user model, but you will have to write, test and debug this model to get it working (whether you write it as a CONEC model or something else). That seems like a lot of work when you can achieve the same objective using Python coding.

jfconroy gravatar imagejfconroy (Mar 1 '19)

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 27 '19

Seen: 699 times

Last updated: Feb 28 '19