Kleiner Prototyp für Leistungssimulation eingefügt

This commit is contained in:
MundM99
2025-01-04 08:48:12 +01:00
parent 65a56bb5a2
commit 9c7e5f418a

22
Leitungssimulation.py Normal file
View File

@@ -0,0 +1,22 @@
import numpy as np
import math
import matplotlib as plt
#Units are SI-Units except for cable cross-section
def distance(x1,y1,x2,y2):
distance = math.sqrt(((x2-x1)^2)*((y2-y1)^2))
return distance
def resistance(l,a,rho):
#Calculate the resistance between 2 coordinates
#Add 10% of length for various factors such as transitions and hanging lines
r = l*a*rho
return r
def power_loss(resitance,voltage,power):
loss = (voltage^2)/resistance
return loss
def run():
distance(1,2,3,4)