Skip to content
Preview.dss@modelscript/opendss 10 diagnostic rules
Parser WASM GLR
Diagnostics 10 rules
DAE Arena Lowering
Simulation Native Solvers
Projections Modelica
Live ExampleSolarDistributionFeeder.dss

OpenDSS 12.47 kV Unbalanced Distribution Feeder & PV DER

Three-phase distribution circuit with substation step-down transformer, distribution lines, commercial load, and grid-tied PV inverter.

Playground
Source (10 lines)
1Clear
2New Circuit.Substation12kV basekv=115.0 pu=1.02 phases=3 bus1=SubHV
3New Transformer.SubXfmr Phases=3 Windings=2 XHL=7.5
4~ wdg=1 bus=SubHV conn=Delta kv=115.0 kva=10000
5~ wdg=2 bus=FeederHead conn=Wye kv=12.47 kva=10000
6New Line.Trunk1 Phases=3 Bus1=FeederHead Bus2=MidBus R1=0.18 X1=0.39 Length=2.2 units=km
7New Line.Lateral1 Phases=3 Bus1=MidBus Bus2=SolarBus R1=0.24 X1=0.44 Length=1.4 units=km
8New Load.IndustrialPark Phases=3 Bus1=MidBus kV=12.47 kW=2400 kvar=850 Model=1
9New PVSystem.SolarFarm1 Phases=3 Bus1=SolarBus kV=12.47 kVA=1800 Pmpp=1650 irradiance=0.95
10Solve
OpenDSS Multi-Phase Feeder Topology
Circuit.Substation12kV ModelScript Distribution Single-Line Diagram (SLD) Line: Trunk1 (3Φ) Trunk1 (3Φ) Line: Lateral1 (3Φ) Lateral1 (3Φ) Line: Line: SubHV FeederHead MidBus SolarBus Bus1 Bus2 XFMR SubXfmr 2400kW PV Phases: 3-Phase (3Φ) 2-Phase (2Φ) 1-Phase Lateral (1Φ)
Drag to pan · Click % to reset

OpenDSS Distribution Grids & DERs (.dss) ​

@modelscript/opendss (languages/opendss) provides zero-regex parsing, unbalanced multi-phase power flow solving, distributed energy resource (DER) hosting capacity analysis, linear DAE lowering, and Modelica 3.x projection for EPRI OpenDSS radial and meshed electrical distribution networks.


Supported Extensions & Standards ​

ExtensionFormatDescription
.dssOpenDSS Command DeckDistribution grid feeders, multi-phase line codes, transformers, distributed PV/wind, and loads

Key Capabilities ​

1. Multi-Phase Unbalanced AC Power Flow ​

  • Solves unbalanced radial and weakly meshed 3-phase/4-wire distribution networks via the nodal admittance matrix (Ybus) formulation and Forward-Backward Sweep (FBS):Iinj(V)=YbusV
  • Models constant power (PQ), constant current (I), and constant impedance (Z) loads:Ii(Vi)=(Pi+jQiVi)∗
  • Accurately tracks mutual coupling across multi-conductor overhead lines and underground concentric neutral cables using Carson's equations for earth return path impedance.

2. DER Hosting Capacity & Reverse Power Flow ​

  • Models distributed solar photovoltaic (PVSystem) generators, battery energy storage systems (Storage), and wind generators.
  • Analyzes thermal line loading limits and voltage regulation limits (ANSI C84.1 Range A: 0.95≤|V|≤1.05 p.u.):ΔV≈RPDER+XQDERV0
  • Identifies reverse power flow hazards where generation exceeds local demand, pushing power back through substation transformers into the transmission bulk grid (@modelscript/psse).

3. Direct DAE Lowering ​

  • Compiles lines, transformers, and voltage-dependent loads into @modelscript/runtime's DAEBuilder linear memory arena.
  • Enables co-simulation between distribution feeders, electromagnetic transients in inverter controllers (@modelscript/pscad), and building thermal energy consumption (@modelscript/energyplus).

4. Bidirectional Modelica 3.x Projection ​

  • Projects OpenDSS circuits into standard multi-phase Modelica or OpenIPSL electrical network models with acausal electrical pins (v, i).

Pre-Flight Diagnostics ​

The OpenDSS linter verifies electrical connectivity and DER operating envelopes:

10 rules7 error3 warning Run with msx opendss lint

CodeRuleSeverityMessage
M8401unconnected-bus-nodeerror<elemType> '<elemName>' references undefined bus node '<busName>'.
M8402phase-count-mismatcherrorElement '<elemName>' (<elemPhases> phases) connected to bus '<busName>' with different phase count (<busPhases>).
M8402transformer-impedance-zeroerrorTransformer '<xfmrName>' specifies non-positive leakage reactance (xhl=<xhl>); must be > 0.
M8403load-pf-out-of-rangewarningLoad '<loadName>' specifies power factor (<pf>) outside valid range (0 < |pf| <= 1.0).
M8403transformer-voltage-mismatchwarningTransformer '<xfmrName>' winding <winding> rated voltage (<value> kV) differs from nominal bus voltage (<value> kV).
M8404reverse-power-hosting-riskwarningTotal DER generation capacity on feeder '<feederName>' (<value> kW) exceeds upstream transformer thermal rating (<value> kVA).
M8405missing-circuit-definitionerrorOpenDSS script defines circuit elements without declaring a 'New Circuit' voltage source.
M8406negative-load-powererrorLoad '<loadName>' specifies negative active power (<value> kW); use Generator or Storage for net generation.
M8407zero-or-negative-line-lengtherrorLine '<lineName>' specifies invalid non-positive length (<len>).
M8408missing-line-codeerrorLine '<lineName>' references undefined LineCode '<codeName>'.

Generated from languages/opendss/src/errors.ts. All languages →


CLI Usage ​

bash
# Inspect distribution buses, lines, transformers, and DER units
msx opendss inspect IEEE13NodeFeeder.dss

# Run pre-flight linting and connectivity verification
msx opendss lint IEEE13NodeFeeder.dss

# Solve multi-phase AC power flow and print bus voltages
msx opendss powerflow IEEE13NodeFeeder.dss

# Lower circuit into ModelScript linear DAE arena
msx opendss to-dae IEEE13NodeFeeder.dss

# Project into Modelica 3.x electrical power model
msx opendss to-modelica IEEE13NodeFeeder.dss -o DistributionFeeder.mo

Open-Core under the GNU AGPL v3 License; Enterprise Edition (ee/) under the ModelScript Enterprise License. • Trademark Policy