#calculate maximum sag
import math
#Given data :
L=200.#**m
w=0.7#**kg
T=1400.#**kg
S=w*L**2./(8.*T)#**,m
print '%s %.2f' %("maximum sag(m) :",S)#
#calculate Height above the ground
import math
#Given data :
W=680.##kg/km
L=260.##m
U_strength=3100.##kg
SF=2.##safety factor
Clearance=10.##m
T=U_strength/SF##kg
w=W/1000.##kg
S=w*L**2./(8.*T)##,m
h=Clearance+S##m
print '%s %.1f' %("Height above the ground(m) :",h)#
#calculate Horizontal component of tension,Maximum sag,Sag will be half at the point where x coordinate(in m) will be
import math
import numpy
from numpy import roots
#Given data :
w=700./1000.##kg/m
L=300.##m
Tmax=3500.##kg
S_T0=w*L**2./8.##,m
#Tmax=T0+w*S
#T0**2-T0*Tmax-w*S_T0=0
polynomial=([1, -Tmax, -w*S_T0])#
T0=numpy.roots(polynomial)##kg
T0=T0[0]##+ve sign taken
print '%s %.2f' %("Horizontal component of tension in kg is : ",T0)#
S=S_T0/T0##m
print '%s %.4f' %("Maximum sag in m : ",S)#
y=S/2.##m
x=math.sqrt(2.*y*T0/w)##m
print '%s %.f' %("Sag will be half at the point where x coordinate(in m) will be : ",x)#
#calculate Maximum sag
import math
#Given data :
L=150.##m
wc=1.##kg
A=1.25##cm**2
U_stress=4200.##kg/cm**2
Pw=100.##kg/m**2(Wind pressure)
SF=4.##factor of safety
W_stress=U_stress/SF##kg/cm**2
T=W_stress*A##kg
d=math.sqrt(A/(math.pi/4.))##cm
w_w=Pw*d*10.**-2##kg
wr=math.sqrt(wc**2.+w_w**2.)##kg
S=wr*L**2./8./T##m
print '%s %.2f' %("Maximum sag(m)",S)#
#calculate Sag(meter)
import math
#Given data :
L=160.##m
d=0.95##cm
wc=0.65##kg/m
U_stress=4250.##kg/cm**2
Pw=40.##kg/m**2(Wind pressure)
SF=5.##factor of safety
W_stress=U_stress/SF##kg/cm**2
T=W_stress*math.pi/4.*d**2.##kg
w_w=Pw*d*10.**-2##kg
wr=math.sqrt(wc**2.+w_w**2.)##kg
S=wr*L**2./8./T##m
print '%s %.2f' %("Sag(meter)",round(S))#
#calculate Sag in still air,Maximum Sag
import math
#Given data :
L=180.##m
D=1.27##cm
Pw=33.7##kg/m**2(Wind pressure)
r=1.25##cm
wc=1.13##kg/cm**2
U_stress=4220.##kg/cm**2
SF=5.##factor of safety
W_stress=U_stress/SF##kg/cm**2
T=W_stress*math.pi/4.*D**2.##kg
S=wc*L**2./8./T##msag in air
print '%s %.2f' %("Sag in still air(meter)",S)#
w1=2890.3*r*10.**-2*(D+r)*10.**-2##kg/m
w_w=Pw*(D+2.*r)*10.**-2##kg
wr=math.sqrt((wc+w1)**2.+w_w**2.)##kg
Smax=wr*L**2./8./T##msag in air
print '%s %.3f' %("Maximum Sag(meter)",Smax)#
#calculate Maximum Sag
import math
#Given data :
D=19.5##mm
wc=0.85##kg/m
L=275.##m
Pw=39.##kg/m**2(Wind pressure)
r=13.##mm
U_stress=8000.##kg/cm**2
SF=2.##factor of safety
rho_i=910.##kg/m**3(density of ice)
T=U_stress/SF##kg
wi=rho_i*math.pi*r*10.**-3*(D+r)*10.**-3##kg
w_w=Pw*(D+2.*r)*10.**-3##kg
wr=math.sqrt((wc+wi)**2.+w_w**2)##kg
Smax=wr*L**2./8./T##msag in air
print '%s %.3f' %("Maximum Sag(meter)",Smax)#
#calculate
import math
#Given data :
wc=1.##kg/m
L=280.##m
D=20.##mm
r=10.##mm
Pw=40.##kg/m**2(Wind pressure)
rho_i=910.##kg/m**3(density of ice)
U_stress=10000.##kg/cm**2
SF=2.##factor of safety
wi=rho_i*math.pi*r*10.**-3*(D+r)*10.**-3##kg
w_w=Pw*(D+2.*r)*10.**-3##kg
wr=math.sqrt((wc+wi)**2.+w_w**2.)##kg(Resultant force per m length of conductor)
T=U_stress/SF##kg
Smax=wr*L**2./8./T##msag in air
print '%s %.1f' %("Maximum Sag(meter)",Smax)#
#calculate Sag in inclined direction,Sag in vertical direction,Height of lowest cross arm
import math
#Given data :
L=250.##m
D=1.42##cm
wc=1.09##kg/m
Pw=37.8##kg/m**2(Wind pressure)
r=1.25##cm
Lis=1.43##m(insulator string length)
Clearance=7.62##m
rho_i=913.5##kg/m**3(density of ice)
stress=1050.##kg/cm**2
T=stress*math.pi/4.*D**2##kg
wi=rho_i*math.pi*r*10.**-2*(D+r)*10.**-2##kg
w_w=Pw*(D+2.*r)*10.**-2##kg
wr=math.sqrt((wc+wi)**2+w_w**2.)##kg(Resultant force per m length of conductor)
Smax=wr*L**2./8./T##max sag in air
print '%s %.4f' %("Sag in inclined direction(meter)",Smax)#
Sdash=Smax*(wc+wi)/wr##max sag in air
print '%s %.2f' %("Sag in vertical direction(meter)",Sdash)#
h=Clearance+Sdash+Lis##m
print '%s %.2f' %("Height of lowest cross arm(m)",h)#
#calculate Distance of lowest point,minimum point of catenary above the ground
import math
#Given data :
wc=0.35##kg/m
stress=800.##kg/cm**2
L=160.##m
SF=2.##safety factor
h=70.-65.##m
T=stress/SF##kg
x=L/2.+T*h/(wc*L)##m
print '%s %.2f' %("Distance of lowest point(m)",x)#
S1=wc*x**2/SF/T##max sag in air
xmin=70.-S1##m
print '%s %.4f' %("minimum point of catenary above the ground(m)",xmin)#
#calculate Slant sag,Vertical Sag
import math
#Given data :
L=200.##m
h=10.##m
D=2.##cm
wc=2.3##kg/m
Pw=57.5##kg/m**2(wind pressure)
SF=4.##safety factor
stress=4220.##kg/cm**2
w_w=Pw*D*10.**-2##kg
wr=math.sqrt(wc**2.+w_w**2.)##kg
f=stress/SF##kg/cm**2
T=f*math.pi/4.*D**2.##kg
x=L/2.-T*h/(wr*L)##m
S1=wr*x**2./2./T##max sag in air
print '%s %.4f' %("Slant sag(m)",S1)#
Sdash=wc*x**2./2./T##vertical sag
print '%s %.4f' %("Vertical Sag(meter)",Sdash)#
#calculate Vertical Sag
import math
#Given data :
wc=1.925##kg/m
A=2.2##cm**2
f=8000.##kg/cm**2
L=600.##m
h=15.##m
D=2.##cm
SF=5.##safety factor
wi=1.##kg(load)
w=wi+wc##kg
T=f*A/SF##kg
x=L/2.-T*h/(w*L)##m
S2=w*(L-x)**2./2./T##m
print '%s %.2f' %("Vertical Sag(meter)",S2)#
#calculate Mid point P is "+string(Point_P)+" meter below point B or "+string(80-Point_P)+" meter above the water level
import math
#Given data :
h=80.-50.##m
L=300.##m
T=2000.##kg
w=0.844##kg/m
x=L/2.-T*h/(w*L)##m
d_PO=L/2.-x##m
d_BO=L-x##m
Smid=w*(L/2.-x)**2./2./T##m
S2=w*(L-x)**2./2./T##m
Point_P=S2-Smid##m
print '%s %.3f %s %.3f %s' %("Mid point P is ",Point_P," meter below point B or ",80-Point_P," meter above the water level.")#
#calculate Stringing Tension
import math
#Given data :
S1=25.##m
S2=75.##m
Point_P=45.##m
L1=250.##m
L2=125.##m(mid point)
w=0.7##kg/m
h1=S2-S1##m(for points A & B)
h2=Point_P-S1##m(for points A & B)
#h1=w*L1/2/T*[L1-2*x]
#h2=w*L2/2/T*[L2-2*x]
x=(L1-h1/h2/L1*L2*L2)/(-h1/h2/L1*L2*2.+2.)##m
T=(L1-2.*x)/(h1/w/L1*2.)##kg
print '%s %.2f' %("Stringing Tension(kg)",T)#
#calculate Clearance of the lowest point from ground,Minimum clearance
import math
#Given data :
L=300.##m
slope=1./20.#
w=0.80##kg/m
hl=30.##m
T0=1500.##kg
CD=L##m
tan_alfa=slope#
ED=CD*tan_alfa##m
AC=hl##m
BE=hl##m
BD=BE+ED##m
#S1=w*x1**2/2/T0##m
#S2=w*(L-x1)**2/2/T0##m
h=15.##m
ED=h##m
x1=L/2.-T0*h/w/L##m
S1=w*x1**2./2./T0##m
S2=w*(L-x1)**2./2./T0##m
OG=AC-S1-x1*tan_alfa##m
Clearance=OG##m
print '%s %.5f' %("Clearance of the lowest point from ground(m)",Clearance)#
#y=x*tan_alfa-OG##m
#C1=w*x**2/2/T0-(x/20-OG)
x=T0/20./w##m(Byy putting dC1/dx=0)
C1=w*x**2./2./T0-(x/20.-OG)##m
print '%s %.2f' %("Minimum clearance(m)",C1)#
#calculate Sag at erection
import math
import numpy
from numpy import roots
#Given data :
L=250.##m
D=19.5##mm
A=2.25*10.**-4##m**2.
wc=0.85##kg/m
t1=35.##degree C
t2=5.##degree C
Pw=38.5##kg/m**2
alfa=18.44*10.**-6##per degree C
E=9320.##kg/mm**2
E=9320.*10.**6.##kg/m**2
Breaking_Load=8000.##kg
SF=2.##Safety factor
T1=Breaking_Load/SF##kg
f1=T1/A##kg/m**2
w_w=Pw*D*10.**-2##kg
w1=math.sqrt(wc**2.+w_w**2.)##kg
w2=wc#
#f2**2.*[(f2-f1)+w1*L**2.*E/24./f1**2./A**2.+(t2-t1)*E]=w2*L**2.*E/24./A**2.
#f2**3-f2**2.*f1-w2*L**2.*E/24./A**2.=0
P=([1, -1.0674*10.**7, 0, -3463.84*10.**17.])#
f2=numpy.roots(P)#
f2=numpy.real(f2[0])##kg/m**2
S=w2*L**2./8./f2/A##m
print '%s %.1f' %("Sag at erection(m)",S)#