Ask Your Question
0

Accessing and loading user .dll from Python in PSS/e V30

asked 2016-01-13 10:14:21 -0500

anonymous user

Anonymous

Dear All,

I am using Python for PSS/e V30. When I looked at the API for V30, there is no function in PSSE 30 like ADDMODELLIBRARY() in the newer PSS/e Version 33. So, I was wondering if someone can suggest a way to access and load the .dll of user defined model using Python command. I am not able to find it. Can anyone suggest please? Your help would be much appreciated.

Thank you.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2016-01-20 11:01:12 -0500

Sarina gravatar image

Thank you for your answer. I have done the same but I keep on getting the message : "User model is not accessible". Do you know what might have caused that?

Thank you.

edit flag offensive delete link more

Comments

can you confirm that after compiling and linking, a new dsusr.dll is created [delete old one first]? has the model entry in your dyr is calling the right UDM name with the right amount of parameters?

jconto gravatar imagejconto ( 2016-01-20 14:23:22 -0500 )edit

Yes, after compiling and linking new dsusr.dll is created which would replace the old one. I have never deleted the old one but the new one would overwrite the previous one. The model entries of UDM are correct in the .dyr file. Thank you.

Sarina gravatar imageSarina ( 2016-01-20 21:59:40 -0500 )edit

Here is my python code to load respective files. Is there any problem here? Looks like we need to specify powerflow and dynamic modes in PSSeV30 ierr = psspy.powerflowmode() psspy.case("xyz.cnv") psspy.ordr() psspy.fact() psspy.tysl() ierr = psspy.dynamicsmode(1) ierr = psspy.rstr("abc.snp")

Sarina gravatar imageSarina ( 2016-01-21 05:14:23 -0500 )edit

Try repeating your process on another model. Check my tutorial on UDM [uexc.zip] posted at "https://drive.google.com/open?id=0B7uS9L2Woq_7YzYzcGhXT2VQYXc". BTW, I usually quit PSSE before compiling and start it again to perform the run. your code looks OK.

jconto gravatar imagejconto ( 2016-01-21 08:22:11 -0500 )edit

Thank you very much for your comments and suggestion on trying on another example system. I will try on your example system. This is a great help. Thanks a lot.

Sarina gravatar imageSarina ( 2016-01-22 08:07:59 -0500 )edit
0

answered 2016-01-13 11:30:41 -0500

jconto gravatar image

Get the v.30 UDM in *.obj or *.lib or source code since UDMs in dll format are not suported.

PSSe v30 user defined models are usually provided in *.obj or *.lib binary format that need to be compiled using a fortran compiler compatible with the PSSe version, using a compile process recommended by PTI, to create a dsusr.DLL file [compile.bat to compile, cload4 with list of *.obj, *.lib to create dsusr.dll]. This single dsusr.DLL file is loaded automatically by PSSe because it should be located at the working folder, thus including such user defined models into the run. More related information can be found at posting "Create User dll and access it in PSS/E".

edit flag offensive delete link more

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

Stats

Asked: 2016-01-13 10:14:21 -0500

Seen: 2,620 times

Last updated: Jan 20 '16