Commit 1f645174 authored by Markus Mirz's avatar Markus Mirz

added plot example for circuit tests

parent 535c3b82
from dataprocessing.dpsim import *
from dataprocessing.plottools import *
path = 'D:\\path\\to\\logs\\'
logName = 'simulation_name_LeftVector'
logFilename = path + logName + '.csv'
ts_dpsim = read_timeseries_dpsim_cmpl(logFilename)
phasors = get_node_voltage_phasors(ts_dpsim)
print('Print phasors for all nodes at first time step:')
for node, phasor in phasors.items():
print(node + ': ' + str(phasor['abs'].values[0]) + '<' + str(phasor['phase'].values[0]))
print('Print phasors for all nodes at last time step:')
for node, phasor in phasors.items():
print(node + ': ' + str(phasor['abs'].values[-1]) + '<' + str(phasor['phase'].values[-1]))
emt_voltages = get_node_emt_voltages(ts_dpsim, 50)
print('Print EMT voltages for all nodes at last time step:')
for node, voltage in emt_voltages.items():
print(node + ': ' + str(voltage.values[-1]))
# Change node number to fit example
#plot_timeseries(1, phasors['n2']['abs'])
plot_timeseries(2, emt_voltages['n2'])
plt.show()
from dataprocessing.plotdpsim import *
path = 'C:\\Users\\mmi\\git\\PowerSystemSimulation\\gre\\step-dist-init\\'
plot_dpsim_abs(path + 'lvector-ref.csv', 'reference', 2,
path + 'lvector0-local_rm-first-row.csv', 'local', 2)
plot_dpsim_abs(path + 'lvector-ref.csv', 'reference', 2,
path + 'lvector0-netem.csv', 'netem', 2)
plot_dpsim_abs(path + 'lvector-ref.csv', 'reference', 2,
path + 'lvector0-dist.csv', 'dist', 2)
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment