Support : Knowledge base

Knowledge Base

Welcome to OPAL-RT’s Knowledge Base

OPAL-RT offers a repository of support information for optimal use of its technology.

Loading…

Please note that OPAL-RT knowledge base is not fully optimized for mobile platforms.

For optimal experience, use a desktop computer.

Reference Number: AA-02126// Views: AA-02126// Created: 2023-02-13 15:38:46// Last Updated: 2023-02-13 15:55:25
HowTo
How to change parameters in Hypersim using python API: multiple different components

This KB gives example of how to change parameters for the following commonly used blocks in Hypersim. The items include for the most part parameters from blocks that may not be straightforward


a)a) Update three phase component RESISTANCE, each phase individually

b)b) Update three phase component source (amplitude)

c)c) Change parameters from dropdown lists: Case 1: Enabling/ disabling a source

d)d) Change parameters from dropdown lists: Case 2: series ('s')/parallel ('P') operation of a 3-phase source

e)e) Changing parameters from dropdown lists: Case 3: loadflow type PV('G')/ PQ ('C') / SWING ('E')

 

A demo script is provided, where model  "HVAC_500kV_6Bus.ecf" is used for didactic purposes, component names in the script exist in the aforementioned model. Users can reuse the presented commands into their own scripts by changing the reference to the Hypersim components accordingly.

 

a)Update three phase component RESISTANCE, each phase individually: 

HyWorksApi.setComponentParameter('Ld1', 'R', '64.1,65.2,61.5')

Ld1_value= HyWorksApi.getComponentParameter('Ld1', 'R')

print ('Ld1 RAW value is now ' )

print( Ld1_value )

 

b)Update three phase component source (amplitude)

NOTE: Setpoint for threephase source is given in peak line-ground value. The interface mask displays in RMS Line-Line, so  a 20,000v setting through the API will display as 24,494.897 in the hypersim componet’s mask

HyWorksApi.setComponentParameter('Ge1', 'module', '20000,20000,20000')

Ge1_amplitude_new= HyWorksApi.getComponentParameter('Ge1', 'module')

print ('Ge1_amplitude_new value is now ' )

print( Ge1_amplitude_new)

 

c)Change parameters from dropdown lists: Case 1: Enabling/ disabling a source

HyWorksApi.setComponentParameter('Ge1', 'set', '0')

Ge1_status_new= HyWorksApi.getComponentParameter('Ge1', 'set')

print ('Ge1_amplitude_status is now ' )

print( Ge1_status_new)

 

d)Change parameters from dropdown lists: Case 2: series ('s')/parallel ('P') operation of a 3-phase source

HyWorksApi.setComponentParameter('Ge1', 'connection', 'P')

Ge1_connection_new= HyWorksApi.getComponentParameter('Ge1', 'connection')

print ('Ge1_connection is now ' )

print( Ge1_connection_new)

 

 

e)Changing parameters from dropdown lists: Case 3: loadflow type PV('G')/ PQ ('C') / SWING ('E')

NOTE: letter in parenthesis indicate the argument to BE used in the setComponentParameter command

 

HyWorksApi.setComponentParameter('Ge1', 'type', 'G')

Ge1_type_new= HyWorksApi.getComponentParameter('Ge1', 'type')

print ('Ge1_type is now ' )

print( Ge1_type_new)


HANDS_ON_9_MULTIPLE_PARAMETER_CHANGE.py 3.6 Kb 3.6 Kb
HVAC_500kV_6Bus.zip 12.5 Kb 12.5 Kb