OpenDSSDirect.py icon indicating copy to clipboard operation
OpenDSSDirect.py copied to clipboard

CapControl PTphase for single phase monitor element can create unexpected behavior

Open nlaws-camus opened this issue 2 months ago • 1 comments

Versions

  • [ ] Python version: 3.10.12
  • [ ] Operating system and version: tested in Google CoLab
  • [ ] OpenDSSDirect.py version number:

DSS C-API Library version 0.14.5 revision 87d85c2622c8281b92255335bc7c09b11191b21d based on OpenDSS SVN 3723 [FPC 3.2.2] (64-bit build) MVMULT INCREMENTAL_Y CONTEXT_API PM 20240329033721; License Status: Open DSS-Python version: 0.15.7 OpenDSSDirect.py version: 0.9.4

Bug

This might be an issue in the source code for OpenDSS, where it checks if PTphase is less than the number of phases, but I just wanted to bring it to your attention.

The problem arises when specifying the CapControl PTPhase value to 3 in a three phase model. With PTPhase=3 in the toy model below the CapControl seems to be ignored. If you change PTphase to 1 or 2 then the States will be [1], even though the load is balanced and the voltage is the same (before control) on all three phases.

import opendssdirect as dss
dss(f"""
Clear
New Circuit.Test bus1=bus1 pu=1 basekv=12.47

New Line.line1 bus1=bus1 bus2=bus2 r0=0.35 x0=0.4 r1=0.1 x0=0.1 length=5 units=kft
New Line.line2 bus1=bus2 bus2=bus3 r0=0.35 x0=0.4 r1=0.1 x0=0.1 length=5 units=kft

New Load.load3 bus1=bus3 kw=1000 kvar=300 kv=12.47

New Transformer.cap_trfx phases=1 buses=[bus2.3 dummy.3] kvs=[7.2 7.2] kvas=[25 25]

New Capacitor.cap1 phases=1 bus1=bus2.3 kvar=300 conn=wye states=[0] kv=7.2

New CapControl.capcontrol Element=Transformer.cap_trfx capacitor=cap1
~ type=voltage onsetting=7200 offsetting=8500 PTphase=3  voltoverride=no
~ eventlog=y ptratio=1

calcvoltagebases
Solve
""")

dss.Capacitors.States()
[0]

nlaws-camus avatar Apr 15 '24 21:04 nlaws-camus