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

Ask Your Question
0

I couldnt find what this functions are for in mode 5 in user model programming

asked Feb 14 '19

marilyn3 gravatar image

updated Feb 14 '19

CALL VLTFR6(VLTI,BASVLT(IB)) IBPTR = 0 CALL ADINTN (JJ,CB1,IBPTR) WRITE(IPRT,17) IBUS,BUSNAM(IB),VLTI,IM,J,CB1,K,L WRITE(IPRT,27) (CON(I),I=J,JJ)

this is a part of a flecs code from the maxex1 model , when mode 5 is executing , i couldnt find in the manual what this functions are and in the code it says that are external, so i would aprecciate if somebody explain this VLTFR6 function and the ADINTN function , also what is IPRT?

1 answer

Sort by » oldest newest most voted
0

answered Feb 15 '19

perolofl gravatar image

Subroutine VLTFR6 converts the real base voltage BASVLT(IB) to a left justified character returned in string VLTI.

Subroutine ADINTN converts the integer JJ to a left justified character returned in string CB1.

VLTI and CB1 are local variables and must be declared as CHARACTER, e.g. CHARACTER*6.

The benefit is that the last CON number can be written left justified in the DOCU report, i.e. immedietaly after the minus sign, see example below, where the CON range is 1-14.

 Model GENROU Bus 101 [NUC-A       21.600] Machine "1 " :

                  C O N S     S T A T E S
                    1-14          1-6

If JJ had been written as an integer the corresponding report would look like:

 Model GENROU Bus 101 [NUC-A       21.600] Machine "1 " :

                  C O N S     S T A T E S
                    1-    14      1-    6

which is not so nice since there are several spaces between the minus sign and the value.

In mode 5, 6 and 7, dynamic models shall write to the Fortran number stored in common variable IPRT.

link

Comments

Thank you so much for this information , i really need some help so if you have more information about model writting i would appreciate it very much , i found another subroutine in the manual which i have no idea of the use, i only know is used in mode 6 its called CONINT

marilyn3 gravatar imagemarilyn3 (Feb 15 '19)

and it has this format SAVE IVEC DATA IVEC/'AB'/ CALL CONINT(IVEC,1,JJ) IF (JJ.NE.0) RETURN i believe this converts charachters to integers? thanks a lot for the help

marilyn3 gravatar imagemarilyn3 (Feb 15 '19)

@marilyn3 Hi, nice to meet you. I learn how to write a simple VSC-HVDC model. could we communicate with each other? what's your email address?Mine is 593790612@qq.com. waiting for you.

Gloria.Z gravatar imageGloria.Z (Feb 17 '19)

Hi Gloria!! I would really appreciate the help, mine is marilyn.barragan@alumno.buap.mx

marilyn3 gravatar imagemarilyn3 (Feb 17 '19)

The usage of CONINT is only applicable to models called by CONEC or CONET. There is no reason to write such a model today since all types of model can be called by PSSE directly, i.e. Table-driven. See POM, chapter 23.6.

perolofl gravatar imageperolofl (Feb 17 '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

2 followers

Stats

Asked: Feb 14 '19

Seen: 1,485 times

Last updated: Feb 15 '19