Value = getattr(line, 'c:loading') #get value for the loading Name = getattr(line, 'loc_name') # get name of the line Lines=app.GetCalcRelevantObjects('*.ElmLne') Print('%s: P = %.2f MW, Q = %.2f MVAr, loading = %.0f percent' %(name,actPower,reacPower,genloading)) Genloading = getattr(gen,'c:loading') #get loading ReacPower = getattr(gen,'c:q') #get reactive power Name = getattr(gen, 'loc_name') # get name of the generatorĪctPower = getattr(gen,'c:p') #get active power Generators = app.GetCalcRelevantObjects('*.ElmSym')įor gen in Generators: #loop through list #get the generators and their active/reactive power and loading Results for other elements can be added similarly. DIGSILENT POWER FACTORY CRACK FOR WINDOWS HOW TORunning a load flow is quite useless without seeing any results, right? That is why below you can find code on how to get and print the load flow results of generators, lines, and buses. OLoadflow.Execute() #execute load flow Print the results for generators, lines, and buses OLoadflow=app.GetFromStud圜ase('ComLdf') #get load flow object OCase = oFolder_studycase.GetContents(study_case) OFolder_studycase = app.GetProjectFolder('study') #get the study case folder and activate project Then the script is basically ready to run a load flow. The next step is to define the project name and study case. Raise Exception('getting Powerfactory application failed') Run a load flow (r' C:\Program Files\DIgSILENT\PowerFactory 2021 SP1\Python\3.8') Important: a) replace the path (shown in red) with the path to the Python directory of your PowerFactory installation as indicated, b) close PowerFactory before running the script (it is not possible to run the script when an instance of PowerFactory is open). The code below loads the PowerFactory application and throws an error if unsuccessful. It comes with all the needed packages including Spyder, which is a convenient editor to use with Python.Īdvantages: open-source, easy to install, includes the most important packages Load the PowerFactory application with PythonĪt the beginning of every Python script, you need to load the PowerFactory application. DIGSILENT POWER FACTORY CRACK FOR WINDOWS INSTALLScreenshot of the nine-bus system in PowerFactory Install Python (if not installed yet)įor users who have not yet installed Python, I recommend installing the Anaconda distribution. The nine-bus system is available in the example projects in PowerFactory. Before we continue…įor the demonstration, I use a standard nine-bus system as shown below. This post gives a short overview of the Python API for DIgSILENT and provides the basic Python code to jump-start your DIgSILENT PowerFactory automatization. Luckily, DIgSILENT PowerFactory comes with an API interface for Python to do precisely that. However, automatization is also key if you want to carry out a large number of simulations with varying parameters. DIGSILENT POWER FACTORY CRACK FOR WINDOWS MANUALMost people who work with DIgSILENT PowerFactory know that sometimes it is convenient to automatize certain tasks to avoid tedious manual work.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |