diff --git a/Leitungssimulation.py b/Leitungssimulation.py new file mode 100644 index 0000000..f154811 --- /dev/null +++ b/Leitungssimulation.py @@ -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) \ No newline at end of file