first commit

This commit is contained in:
Maximilian Eibl 2025-01-06 13:44:18 +01:00
commit b9eeff6ac4
6 changed files with 84 additions and 0 deletions

8
.idea/.gitignore generated vendored Normal file
View File

@ -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

8
.idea/Dieelektrika.iml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 3.12" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

7
.idea/misc.xml generated Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Python 3.12" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/Dieelektrika.iml" filepath="$PROJECT_DIR$/.idea/Dieelektrika.iml" />
</modules>
</component>
</project>

47
durschl-luft-graph.py Normal file
View File

@ -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()