diff --git a/dataprocessing/__init__.py b/dataprocessing/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/PlotTools.py b/dataprocessing/plottools.py similarity index 100% rename from PlotTools.py rename to dataprocessing/plottools.py diff --git a/PlotToolsDPsim.py b/dataprocessing/plottoolsDPsim.py similarity index 100% rename from PlotToolsDPsim.py rename to dataprocessing/plottoolsDPsim.py diff --git a/ReadTools.py b/dataprocessing/readtools.py similarity index 100% rename from ReadTools.py rename to dataprocessing/readtools.py diff --git a/CompareModelicaPLECS.py b/examples/CompareModelicaPLECS.py similarity index 60% rename from CompareModelicaPLECS.py rename to examples/CompareModelicaPLECS.py index 5e6ace1b5393ec96bdb6897a01a3ab4c1a2eba90..369325e132754b16baa57df8dafe0a362bcd9b70 100644 --- a/CompareModelicaPLECS.py +++ b/examples/CompareModelicaPLECS.py @@ -1,21 +1,23 @@ -from ReadTools import * -from PlotTools import * +from dataprocessing.readtools import * +from dataprocessing.plottools import * import matplotlib.pyplot as plt import numpy as np +results_path = r'\\tsclient\N\Research\German Public\ACS0049_SINERGIEN_bsc\Data\WorkData\SimulationResults\InductionMachine\results' + ### --- Read in section --- ### # Stator currents -stator_currents_mo = read_time_series_Modelica(r'\\tsclient\N\Diss\jdi\Documents\MachineModeling\results\Modelica3hpMachine.mat', ['inductionMachineSquirrelCage.i[1]', 'inductionMachineSquirrelCage.i[2]', 'inductionMachineSquirrelCage.i[3]']) -stator_currents_pls = read_time_series_PLECS(r'\\tsclient\N\Diss\jdi\Documents\MachineModeling\results\PLECS3hpMachineStatorCurrents.csv') +stator_currents_mo = read_time_series_Modelica(results_path + r'\Modelica3hpMachineRRFs.mat', ['inductionMachineSquirrelCage.i[1]', 'inductionMachineSquirrelCage.i[2]', 'inductionMachineSquirrelCage.i[3]']) +stator_currents_pls = read_time_series_PLECS(results_path + r'\PLECS3hpMachineStatorCurrents.csv') # Rotor currents -rotor_currents_mo = read_time_series_Modelica(r'\\tsclient\N\Diss\jdi\Documents\MachineModeling\results\Modelica3hpMachine.mat', ['inductionMachineSquirrelCage.i_qd0r[1]', 'inductionMachineSquirrelCage.i_qd0r[2]']) -rotor_currents_pls = read_time_series_PLECS(r'\\tsclient\N\Diss\jdi\Documents\MachineModeling\results\PLECS3hpMachineRotorCurrentsDqRRFs.csv') +rotor_currents_mo = read_time_series_Modelica(results_path + r'\Modelica3hpMachineRRFs.mat', ['inductionMachineSquirrelCage.i_qd0r[1]', 'inductionMachineSquirrelCage.i_qd0r[2]']) +rotor_currents_pls = read_time_series_PLECS(results_path + r'\PLECS3hpMachineRotorCurrentsDqRRFs.csv') rotor_currents_pls[1].values = -rotor_currents_pls[1].values # transformation DQ0->QD0 # Torque and speed -torque_speed_mo = read_time_series_Modelica(r'\\tsclient\N\Diss\jdi\Documents\MachineModeling\results\Modelica3hpMachine.mat', ['inductionMachineSquirrelCage.T_e', 'inductionMachineSquirrelCage.omega_rm']) -torque_speed_pls = read_time_series_PLECS(r'\\tsclient\N\Diss\jdi\Documents\MachineModeling\results\PLECS3hpMachineTorqueSpeed.csv') +torque_speed_mo = read_time_series_Modelica(results_path + r'\Modelica3hpMachineRRFs.mat', ['inductionMachineSquirrelCage.T_e', 'inductionMachineSquirrelCage.omega_rm']) +torque_speed_pls = read_time_series_PLECS(results_path + r'\PLECS3hpMachineTorqueSpeed.csv') torque_speed_mo[1].values = torque_speed_mo[1].values/2/np.pi*60 # transformation to r/min ### --- Plot section --- ### diff --git a/DynPh_EMT_Comparison.ipynb b/examples/DynPh_EMT_Comparison.ipynb similarity index 100% rename from DynPh_EMT_Comparison.ipynb rename to examples/DynPh_EMT_Comparison.ipynb diff --git a/DynamicPhasorBasics.ipynb b/examples/DynamicPhasorBasics.ipynb similarity index 100% rename from DynamicPhasorBasics.ipynb rename to examples/DynamicPhasorBasics.ipynb diff --git a/Examples.ipynb b/examples/Examples.ipynb similarity index 100% rename from Examples.ipynb rename to examples/Examples.ipynb diff --git a/setup.py b/setup.py new file mode 100644 index 0000000000000000000000000000000000000000..c2c9bb57cba94b9f6e9771557e263cac827ec95e --- /dev/null +++ b/setup.py @@ -0,0 +1,7 @@ +from setuptools import setup, find_packages + +setup(name="dataprocessing", + version="0.1", + packages=find_packages(), +) +