Kleiner Prototyp für Leistungssimulation eingefügt
This commit is contained in:
22
Leitungssimulation.py
Normal file
22
Leitungssimulation.py
Normal 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)
|
||||
Reference in New Issue
Block a user