Ask Your Question
1

Fortran Conversion from v34 to v36

asked 2025-07-29 20:13:52 -0500

abkakar gravatar image

I am converting a PSSE v34 Fortran code to PSSE v36 Fortran code. I am facing following issues, and it would be great if someone can help me.

1: I have used ADINTN, MODCNX and NUMCNX functions in v34. They are giving error in v36. What are the alternatives for them? 2: I have made a wrapper for UEL2 but when i call UEL2 from the wrapper like (CALL UEL2(I, ISLOT)), it is also throwing error in v36 although it works fine in v34. UEL2 is available in the model library of PSSE v36. How to define and use it in a wrapper?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2025-08-06 07:02:27 -0500

patelamarh gravatar image

updated 2025-08-19 07:15:15 -0500

THE ADINTN must be changed to the MODE 5 and MODE 7 logic example as shown in uexs_VINDP.for (also the same in uexs_obsolete.for) in the example files, i.e., using Docuheading and SHOW_MODEL_INDICIES. You don't have to write the bus name (the model details of where it is connected will now be written out by call to docuheading as shown in uexs_VINDP.for)

You can't write any longer to IPRT directly. You will have to write to DBUF01 (as shown in usexs_VINDP.for) and flush out contents of DBUF01 to the report windw using the call to REPORTS as shown in uexs_VINDP.for.

Regarding using MODCNX and NUMCNX:

You can use the API MDLIND to get the values of J0, K0, L0, M0 (4 calls to MDLIND) and then you can remove the use of MODCNX and NUMCNX. Note that it is adequate to compute the values of J0 etc in MODE 4 or MODE 1 (at initialization), store these values and use it repeatedly during simulation (in MODE 2). By doing this you would have avoided repeated calls to MDLIND.

To use UEL2 as a macro call, please change that to UEL2CDUM which can be found in the latest version (36.3.1 as of this comment).

edit flag offensive delete link more

Comments

Question: How do you store the starting indices (J0, K0, L0 and M0) during simulation?

perolofl gravatar imageperolofl ( 2025-08-06 11:09:55 -0500 )edit

Storing them is a design choice, suggested it just to avoid repeated calculations. Users can use for example INTICN(M) through INTICN(M+3) to store the values of J0, K0, L0 and M0 and use the associated get/set APIs. INTICNs are indexed the same as ICON and can be used as integer scratch locations.

patelamarh gravatar imagepatelamarh ( 2025-08-06 12:15:12 -0500 )edit

I prefer to use the standard design using GET_STRTIN to get all indices before the MODE selection. Then it will always be correct. In your solution it will not be possible to do DYDA or DOCU directly after reading the dyr file and before initialisation.

perolofl gravatar imageperolofl ( 2025-08-07 02:15:58 -0500 )edit

Also you may need to use dummy ICONs in order to store the indices. This will complicate dyr record and confuse the user.

perolofl gravatar imageperolofl ( 2025-08-07 02:17:41 -0500 )edit

Hi Amar, now I see your username! Welcome to psspy.org. You will find a lot of useful input for PTI here.

perolofl gravatar imageperolofl ( 2025-08-07 02:42:48 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: 2025-07-29 20:13:52 -0500

Seen: 409 times

Last updated: Aug 19