From 941ee8f17db8ab900d99864f5ccf0d499c34c19c Mon Sep 17 00:00:00 2001
From: Jan Dinkelbach <jdinkelbach@eonerc.rwth-aachen.de>
Date: Mon, 13 Nov 2017 15:36:57 +0100
Subject: [PATCH] started example comparison modelica vs dpsim

---
 examples/Comparison_Modelica_DPsim.py | 28 +++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 examples/Comparison_Modelica_DPsim.py

diff --git a/examples/Comparison_Modelica_DPsim.py b/examples/Comparison_Modelica_DPsim.py
new file mode 100644
index 0000000..f87bfca
--- /dev/null
+++ b/examples/Comparison_Modelica_DPsim.py
@@ -0,0 +1,28 @@
+from dataprocessing.readtools import *
+from dataprocessing.plottools import *
+import matplotlib.pyplot as plt
+from plottingtools.config import *
+
+current_EMT = read_timeseries_Modelica(    r"C:\Workspace\ReferenceExamples\Modelica\Synchronous Generator\UnitTest_Eremia_3rdOrderModel_Euler_1ms.mat", ["synchronousGenerator_Park.i[1]"])
+
+figure_id = 1
+plt.figure(figure_id, figsize=(12,8))
+set_timeseries_labels(current_EMT, ["EMT"])
+plot_timeseries(figure_id, current_EMT, plt_color=blue)
+plt.xlabel('Zeit [s]')
+plt.ylabel('Strom [A]')
+plt.show(block=True)
+
+multi_current_EMT = read_timeseries_Modelica(r"C:\Workspace\ReferenceExamples\Modelica\Synchronous Generator\UnitTest_Eremia_3rdOrderModel_Euler_1ms.mat",[["synchronousGenerator_Park.i[1]"],["synchronousGenerator_Park.i[2]"]])
+
+figure_id = 2
+plt.figure(figure_id, figsize=(12,8))
+set_timeseries_labels(multi_current_EMT, ["Phase a","Phase b","Phase c"])
+plot_timeseries(figure_id, multi_current_EMT)
+plt.xlabel('Zeit [s]')
+plt.ylabel('Strom [A]')
+plt.show(block=True)
+
+
+
+
-- 
GitLab