OpenDSS
The following function imports an OpenDSS
feeder into a balanced (positive-sequence) pandapower net. It reads the circuit
through OpenDSSDirect.py (an optional dependency, pip install pandapower[opendss]),
mapping buses, lines (with their LineCode carried through as std_type),
two-winding transformers (at their solved tap), center-tapped split-phase service
transformers (collapsed to a two-winding equivalent), loads, shunt capacitors,
switches and the source.
Positive-sequence is exact for symmetric (e.g. European 3-phase 4-wire) feeders and
a documented approximation for unsymmetrical North-American topology (single-phase
laterals, split-phase), which pandapower’s runpp_3ph cannot represent (see issue
#873). The returned net carries an opendss_import report with element counts,
per-bus phase counts, the OpenDSS-solved voltages and the approximations made.
- pandapower.converter.opendss.from_opendss(path, solve=True)
Build a balanced (positive-sequence) pandapower net from an OpenDSS feeder.
The OpenDSS circuit is compiled through
OpenDSSDirect.pyand its elements are mapped to pandapower as follows:Circuit / Vsource ->
ext_grid: slack,vm_pufrom the source puBus ->
bus:vn_kv= base kV (line-to-line)Line + LineCode ->
line: r/x/c fromR1/X1/C1;LineCode-> std_typeLine (switch / 0 km) ->
switch: open status respectedTransformer (2W) ->
trafo: imported at the solved tapTransformer (3W CT) ->
trafo: center-tapped split-phase mapped to a 2W equivalentLoad ->
load: kW/kvar -> p_mw/q_mvarCapacitor ->
shunt: kvar -> -q_mvar (injection)
Transformers are imported at their solved tap ratio, so on-load tap changers and RegControls are captured as the operating point; the controllers themselves are not re-implemented. Three-winding center-tapped service transformers (two LV windings on the same secondary bus) are collapsed to a balanced two-winding equivalent. Because positive-sequence modeling cannot represent 120/240 V split-phase operation (#873), those LV voltages carry the largest approximation error.
This function requires the optional dependency
OpenDSSDirect.py(pip install pandapower[opendss]).- Parameters:
path (str) – Path to the OpenDSS master
.dssfile, i.e. the file you wouldRedirectto. All transitivelyRedirect-ed component files are followed.solve (bool) – If True, solves the circuit in OpenDSS first and captures the per-bus voltage magnitudes (pu, phase-averaged) in the import report so that a round-trip can be validated without re-solving OpenDSS. Defaults to True.
- Returns:
A balanced net carrying an
opendss_importdiagnostics dict with element counts, per-bus phase counts, the OpenDSS-solved voltages, and the list of approximations or skipped elements encountered during import.- Return type:
pandapowerNet