Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
VILLASframework
VILLASdataprocessing
Commits
1f645174
Commit
1f645174
authored
Jan 10, 2018
by
Markus Mirz
Browse files
added plot example for circuit tests
parent
535c3b82
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/DPsim/examples_plot.py
0 → 100644
View file @
1f645174
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
()
examples/DPsim/plot_absolute_example.py
deleted
100644 → 0
View file @
535c3b82
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment