Skip to content

Commit

Permalink
Completed an example with matching results. Starting to understand.
Browse files Browse the repository at this point in the history
I am beginning to understand how to iterate over series of neutral axis
locations and curvature values to generate a P-M Interaction diagram.

This is a very rudamentary example but just working through the basics to
understand.

The example is from Design of Concrete Structure by Nilson, Darwin, Dolan
pp. 274-276. I didn't implement the whole thing just used it to check
logic in a few places.
  • Loading branch information
mwhit74 committed May 24, 2017
1 parent 05be9d9 commit efe3ea6
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import math
import matplotlib.pyplot as plt

c_start = 0.0
c_end = 20.0
num_steps = 100
c_step = (c_end-c_start)/num_steps

eu = 0.003
Es = 29000000
fy = 60000
fc = 4000
Ec = 57000*math.sqrt(4000)
h = 20
b = 12
d = 17.5
dp = 2.5
As = 2.0
Asp = 2.0

P = []
M = []

for x in range(num_steps):
if x == 0:
c = c_step
else:
c = c + c_step

phi = math.log(eu/c, 10)

a = 0.85*c
es = eu*(d-c)/c
fs = min(Es*es,fy)
esp = eu*(c-dp)/c
fsp = min(Es*esp,fy)
C = 0.85*fc*a*b
Pn = C-fs*As+fsp*Asp
Mn = C*(h/2-a/2)+Asp*fsp*(h/2-dp)+As*fs*(d-h/2)

out = ('c: {8}\na: {0}\nes: {1}\nfs: {2}\nesp: {3}\nfsp: {4}\nC: {5}\nPn:'
'{6}\nMn: {7}'.format(a,es,fs,esp,fsp,C,Pn,Mn,c))
print out

pause = raw_input(">")

P.append(Pn)
M.append(Mn)


plt.plot(M,P,".")

plt.show()

def beta1(fc):
return 0.85-0.05*(fc-4000)/1000

0 comments on commit efe3ea6

Please sign in to comment.