commit b9eeff6ac4a31c641359c201d9973d5cbd1e6990 Author: Maximilian Eibl Date: Mon Jan 6 13:44:18 2025 +0100 first commit diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/Dieelektrika.iml b/.idea/Dieelektrika.iml new file mode 100644 index 0000000..f571432 --- /dev/null +++ b/.idea/Dieelektrika.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..db8786c --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..92dc167 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/durschl-luft-graph.py b/durschl-luft-graph.py new file mode 100644 index 0000000..1ec5dcb --- /dev/null +++ b/durschl-luft-graph.py @@ -0,0 +1,47 @@ +import matplotlib.pyplot as plt +import numpy as np + +# Daten +data = { + "Länge..mm": [5, 9, 13, 17, 21, 25, 29, 33, 37, 41], + "U..kV": [12.1, 20.1, 28.1, 36.9, 42.5, 48.5, 54.9, 59.5, 64, 68.4], + "U..kV (3kV/mm)": [15, 27, 39, 51, 63, 75, 87, 99, 111, 123], + "ED-Real": [2.42, 2.23, 2.16, 2.17, 2.02, 1.94, 1.89, 1.80, 1.73, 1.67], +} + +# Daten in NumPy-Arrays umwandeln +x = np.array(data["Länge..mm"]) +u1 = np.array(data["U..kV"]) +u2 = np.array(data["U..kV (3kV/mm)"]) +ed_real = np.array(data["ED-Real"]) + +# Diagramm und Subplots erstellen +fig, (ax1, ax2) = plt.subplots(2, 1, sharex=True, figsize=(8, 6)) + +# U..kV und U..kV (3kV/mm) auf dem ersten Subplot darstellen +ax1.plot(x, u1, label="U..kV", marker='o', linestyle='-') # Linien hinzugefügt +ax1.plot(x, u2, label="U..kV (3kV/mm)", marker='x', linestyle='--') # Unterschiedliche Linienart + +# Fläche zwischen den beiden Linien füllen +ax1.fill_between(x, u1, u2, color='red', alpha=0.3, label="Abweichung") + +# Beschriftungen und Titel für den ersten Subplot setzen +ax1.set_ylabel("Spannung (kV)") # Deutlichere Beschriftung +ax1.set_title("Spannung und Abweichung in Abhängigkeit von der Länge") +ax1.legend() +ax1.grid(True) + +# ED-Real auf dem zweiten Subplot darstellen +ax2.plot(x, ed_real, label="ED-Real", marker='o', color='green', linestyle='-') + +# Beschriftungen für den zweiten Subplot setzen +ax2.set_xlabel("Länge (mm)") +ax2.set_ylabel("ED-Real (kV/mm)") # Korrekte Einheit hinzugefügt! +ax2.legend() +ax2.grid(True) + +# Abstand zwischen den Subplots anpassen +plt.tight_layout() + +# Diagramm anzeigen +plt.show() \ No newline at end of file