From 70b1a1fab6fb29a65ef2910ce0b181b588aeb554 Mon Sep 17 00:00:00 2001 From: Markus Mirz <mmirz@eonerc.rwth-aachen.de> Date: Wed, 10 Jan 2018 22:28:35 +0100 Subject: [PATCH] addded functions to plot node emt voltages and phasors --- dataprocessing/dpsim.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dataprocessing/dpsim.py b/dataprocessing/dpsim.py index c877d25..6ba3303 100644 --- a/dataprocessing/dpsim.py +++ b/dataprocessing/dpsim.py @@ -10,7 +10,21 @@ def get_node_voltage_phasors(dpsim_timeseries_list): for ts in dpsim_timeseries_list: ts_abs = ts.abs(ts.name + '_abs') ts_phase = ts.phase(ts.name + '_phase') - ts_phasor = [ts_abs, ts_phase] + ts_phasor = {} + ts_phasor['abs'] = ts_abs + ts_phasor['phase'] = ts_phase voltage_phasor_list[ts.name] = ts_phasor return voltage_phasor_list + +def get_node_emt_voltages(timeseries_list, freq): + """Calculate voltage phasors of all nodes + :param timeseries_list: timeseries list retrieved from dpsim results + :return: + """ + voltages_list = {} + for ts in timeseries_list: + ts_emt = ts.dynphasor_shift_to_emt(ts.name, freq) + voltages_list[ts.name] = ts_emt + + return voltages_list -- GitLab