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

Ask Your Question
0

Changing VAR(L) during dynamic simulation

asked Feb 20 '14

Diz gravatar image

Hello everyone, Is it possible to input the time series value in VAR (L) in a model during dynamic simulation ? I am trying to do a manipulation where I want to have my reference VAR(1) value equal to the input value to make the error zero. It can be done manually but its a problem when you have large data.

Comments

thanks yfwing for your response. I am not sure how to call a user-defined model in conec.flx, is it just like below Subroutine conec C include 'common4.ins' C call PVEU1 C return where PVEU1 is the model. If above is correct, then how to enter the data file ? Any example if you have ?

Diz gravatar imageDiz (Feb 20 '14)

yfwing, I appreciate your response. Can you add a comment line in each code to explain what each line is doing ?

Diz gravatar imageDiz (Feb 25 '14)

2 answers

Sort by » oldest newest most voted
0

answered Feb 20 '14

yfwing gravatar image

updated Feb 25 '14

I believe that you can modify your conec.flx to call a user-defined model and in the model you can read your data file and set the var values.

An example as follows,

`      SUBROUTINE CONEC
C
      INCLUDE 'COMON4.INS'
      INTEGER IU
C
      IF (MODE.NE.2) RETURN
      IU = 10
      CALL GENCHK(1, '1', II, 'IN CONEC')
      IF (II.EQ.0) RETURN
      OPEN(UNIT=IU, ACCESS= 'APPEND', FILE = 'output.txt')
      WRITE(IU, 5) TIME, PMECH(II), (VAR(JJ), JJ=100, 103)
5     FORMAT(F10.5, F5.2, 4F10.5)
      CLOSE(IU)
C
      RETURN
      END

`

link
0

answered Feb 21 '14

EBahr gravatar image

I am not sure exactly what you are trying to do, or if you are working with a normal model or a user model, but I would take a look at the API and look at the ierr = psspy.change_var(number, newval) function. You might need to do some DOCU parsing to get the VAR number if you want it to be automatic.

link

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 20 '14

Seen: 1,460 times

Last updated: Feb 25 '14