import math
b=300 #width, in mm
d=800 #effective depth, in mm
Ast=3940 #in sq mm
Asc=795 #in sq mm
top_cover=40 #in mm
fck=15 #in MPa
fy=250 #in MPa
Xc=0.531*d #in mm
fcc=0.446*fck #in MPa
fsc=0.87*fy #in MPa
Mu=(0.36*fck*b*Xc*(d-0.416*Xc)+(fsc-fcc)*Asc*(d-top_cover))/10**6 #in kN-m
print "Moment of resistance of the beam = ",Mu," kN-m"
import math
b=230 #width, in mm
d=600 #effective depth, in mm
Asc=554 #in sq mm
Ast=1524 #in sq mm
top_cover=30 #in mm
fck=15 #in MPa
fy=415 #in MPa
Xc=0.479*d #in mm
fcc=0.446*fck #in MPa
#for d'/d=30/600=0.05 and Fe415 grade steel,
fsc=355 #in MPa
Mu=(0.36*fck*b*Xc*(d-0.416*Xc)+(fsc-fcc)*Asc*(d-top_cover))/10**6 #in kN-m
print "Moment of resistance of the beam = ",Mu," kN-m"
import math
b=250 #width, in mm
d=550 #effective depth, in mm
fck=15 #in MPa
fy=250 #in MPa
M=95 #in kN-m
Mu=1.5*M #factored moment, in kN-m
Mulim=0.149*fck*b*d**2/10**6 #in kN-m
#as Mu<Mulim, no steel required on compression side
print "As factored moment is less than limiting moment, no steel is required on compression side (as per LSM)"
import math
b=225 #width, in mm
d=500 #effective depth, in mm
Asc=125 #in sq mm
Ast=754 #in sq mm
top_cover=50 #in mm
fck=15 #in MPa
fy=500 #in MPa
Xc=0.456*d #in mm
fcc=0.446*fck #in MPa
#for d'/d=50/500=0.1 and Fe500 grade steel,
fsc=412 #in MPa
Mu=(0.36*fck*b*Xc*(d-0.416*Xc)+(fsc-fcc)*Asc*(d-top_cover))/10**6 #in kN-m
print "Moment of resistance of the beam = ",Mu," kN-m"
import math
b=250 #width, in mm
d=500 #effective depth, in mm
Mu=165 #in kN-m
top_cover=50 #in mm
fck=15 #in MPa
fy=250 #in MPa
Xc=0.531*d #in mm
Mulim=0.149*fck*b*d**2/10**6 #in kN-m
Ast1=round(0.36*fck*b*Xc/0.87/fy) #in sq mm
M1=Mu-Mulim #in kN-m
fcc=0.446*fck #in MPa
fsc=0.87*fy #in MPa
Asc=round(M1*10**6/(fsc-fcc)/(d-top_cover)) #in sq mm
Ast2=round((fsc-fcc)*Asc/0.87/fy) #in sq mm
Ast=Ast1+Ast2 #in sq mm
print "Compression steel = ",Asc," sq mm\nTension steel = ",Ast," sq mm"
import math
b=200 #width, in mm
d=300 #effective depth, in mm
Mu=74 #in kN-m
top_cover=30 #in mm
fck=20 #in MPa
fy=415 #in MPa
Xc=0.479*d #in mm
Mulim=0.138*fck*b*d**2/10**6 #in kN-m
Ast1=round(0.36*fck*b*Xc/0.87/fy) #in sq mm
M1=Mu-Mulim #in kN-m
fcc=0.446*fck #in MPa
#for d'/d=30/300=0.1 and Fe415 grade steel,
fsc=353 #in MPa
Asc=round(M1*10**6/(fsc-fcc)/(d-top_cover)) #in sq mm
Ast2=round((fsc-fcc)*Asc/0.87/fy) #in sq mm
Ast=Ast1+Ast2 #in sq mm
print "Compression steel = ",Asc," sq mm\nTension steel = ",Ast," sq mm"
import math
b=200 #width, in mm
d=200 #effective depth, in mm
Mu=32 #in kN-m
top_cover=30 #in mm
fck=20 #in MPa
fy=500 #in MPa
Xc=0.456*d #in mm
Mulim=0.133*fck*b*d**2/10**6 #in kN-m
Ast1=round(0.36*fck*b*Xc/0.87/fy) #in sq mm
M1=Mu-Mulim #in kN-m
fcc=0.446*fck #in MPa
#for d'/d=30/200=0.15 and Fe500 grade steel,
fsc=395 #in MPa
Asc=round(M1*10**6/(fsc-fcc)/(d-top_cover)) #in sq mm
Ast2=round((fsc-fcc)*Asc/0.87/fy) #in sq mm
Ast=Ast1+Ast2 #in sq mm
print "Compression steel = ",Asc," sq mm\nTension steel = ",Ast," sq mm"