0

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

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?

marilyn3's avatar
3
marilyn3
asked 2019-02-14 11:12:05 -0500, updated 2019-02-14 11:18:46 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

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.

perolofl's avatar
3.8k
perolofl
answered 2019-02-15 00:35:41 -0500
edit flag offensive 0 remove flag delete 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's avatar marilyn3 (2019-02-15 10:18:44 -0500) edit

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's avatar marilyn3 (2019-02-15 10:20:30 -0500) edit

@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's avatar Gloria.Z (2019-02-16 21:22:09 -0500) edit

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

marilyn3's avatar marilyn3 (2019-02-16 22:22:02 -0500) edit

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's avatar perolofl (2019-02-17 15:46:03 -0500) edit
add a comment see more comments

Your Answer

Login/Signup to Answer