⚡A python micro-framework for steady-state simulation and data analysis of electrical distribution systems modeled on OpenDSS.
Mode support: Static and Time-series.
The purpose of DSSData is to facilitate the steady-state simulation of modern electrical distribution systems, such as microgrids, smart grids, and smart cities.
With DSSData you can easily make your own super new fancy operation strategies with storage or generators, probabilistic simulation, or simple impact studies of a distributed generator. See an example in our Tutorial.
All you need is your base distribution system modeled in OpenDSS!!!
We built the DSSData for you just write what you want in a simple function, plugin on a power flow mode, and run.
You don't need anymore write a routine to run each power flow per time.
We strongly recommend the use of virtual environments manager.
pip install dssdata
First, comment any solve
, output command (e.g: show
), or solve configurations (e.g: set mode=Snap
) from your .dss
file.
NOTE: Any Monitor
is needed to get the data.
Supposing that you file is in the path master.dss
:
from dssdata import SystemClass
from dssdata.pfmodes import run_static_pf
from dssdata.tools import voltages
distSys = SystemClass(path="master.dss", kV=[13.8, 0.230], loadmult=1.0)
[voltageDataFrame] = run_static_pf(distSys, tools=[voltages.get_all])
print(voltageDataFrame)
First, comment any solve
, output command (e.g: show
), or solve configurations (e.g: set mode=daily stepsize=5m time=...
) from your .dss
file.
NOTE: Any Monitor
is needed to get the data.
NOTE: The Loadshape
must be defined in the .dss
file
Supposing that you file is in the path master.dss
:
from dssdata import SystemClass
from dssdata.pfmodes import cfg_tspf, run_tspf
from dssdata.tools import lines, voltages
distSys = SystemClass(path="master.dss", kV=[13.8], loadmult=1.2)
cfg_tspf(distSys, step_size="5m", initial_time=(0, 0))
[voltageDataFrame] = run_tspf(distSys, tools=[voltages.get_all], num_steps=288)
print(voltageDataFrame)
We provide an full API documentation and examples in the DSSData Documentation.
If you find DSSData useful in your work, we kindly request that you cite it as below:
@software{Monteiro_felipemarkson_dssdata_2022,
author = {Monteiro, Felipe},
doi = {10.5281/zenodo.6784237},
license = {MIT},
month = {6},
title = {{felipemarkson/dssdata}},
url = {https://github.com/felipemarkson/dssdata},
year = {2022}
}
See our Issue section, our Development Guidelines, and our Code of conduct.