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

Ask Your Question
0

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

asked Jan 13 '16

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.

2 answers

Sort by » oldest newest most voted
0

answered Jan 20 '16

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.

link

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 (Jan 20 '16)

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 (Jan 21 '16)

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 (Jan 21 '16)

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 (Jan 21 '16)

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 (Jan 22 '16)
0

answered Jan 13 '16

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".

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

Stats

Asked: Jan 13 '16

Seen: 2,918 times

Last updated: Jan 20 '16