Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Automation" of Column Alignment Chart

Status
Not open for further replies.

MacGruber22

Structural
Jan 30, 2014
802
0
0
US
Has anyone ever tried turning the alignment chart into an excel spreadsheet that allows direct calculation rather than graphically drawing a line between ΨA, ΨB, and K?

RAM concrete does not automatically account for p-delta in concrete columns. This necessitates a hand calc check on whether columns are sway or not, and then hand calc to determine K.

-Mac
 
Replies continue below

Recommended for you

here it is in Python, have only done minimal testing:

Python:
import math


def K_Sway(k, Ga, Gb):
    AISC_C_A_7_2 = (((Ga * Gb * math.pow(math.pi / k, 2)) - 36) / (6 * (Ga + Gb))) - (
        (math.pi / k) / math.tan(math.pi / k)
    )

    return AISC_C_A_7_2


def K_NonSway(k, Ga, Gb):
    AISC_C_A_7_1 = (
        (((Ga * Gb) / 4.0) * math.pow(math.pi / k, 2))
        + (((Ga + Gb) / 2) * (1 - ((math.pi / k) / math.tan(math.pi / k))))
        + ((2 * math.tan(math.pi / (2 * k))) / (math.pi / k))
        - 1
    )

    return AISC_C_A_7_1


def solve_K(Ga, Gb, Sway=True, tol=1e-6, imax=100):
    if Sway:
        ka = 1
        kb = 1e20

        f = K_Sway
    else:
        ka = 0.5
        kb = 1.0

        f = K_NonSway

    fa = f(ka, Ga, Gb)
    error = 1
    esterror = 1
    kc = ka
    i = 0

    while abs(error) >= tol and i <= imax:
        kclast = kc
        kc = (ka + kb) / 2
        fc = f(kc, Ga, Gb)

        if kc != 0:
            esterror = abs((kc - kclast) / kc) * 100

        if esterror < abs(fc):
            error = fc
        else:
            error = esterror

        test = fa * fc

        if test < 0:
            kb = kc
        elif test > 0:
            ka = kc
            fa = fc
        else:
            error = 0

        i += 1

    return {"k": kc, "estimated error": esterror, "k_func error": fc, "iterations": i}


# ACI Column ####

b = 20
h = 28

A = b * h
Ix = b * h * h * h * (1 / 12)
Iy = h * b * b * b * (1 / 12)

rx = math.sqrt(Ix / A)
ry = math.sqrt(Iy / A)

fc = 5000
Ec = 57000 * math.sqrt(fc)
Lc = (20 - 2) * 12

EILcx = ((Ec * Ix) / Lc) * 0.7
EILcy = ((Ec * Iy) / Lc) * 0.7

# Base Joint - Foundation
# AISC Chapter C Commentary
# Pinned Foundation
Gbx = 10
Gby = 10

# Fixed Foundation
# Gbx = 1.0
# Gby = 1.0

# Top Joint
# Framing Perp. to h
bwt = 28.5 * 12
hwt = 12
Lwt = 30 * 12
Iwt = bwt * hwt * hwt * hwt * (1 / 12) * 0.25
fcwt = 5000
Ecwt = 57000 * math.sqrt(fcwt)

bet = 28.5 * 12
het = 12
Let = 30 * 12
Iet = bet * het * het * het * (1 / 12) * 0.25
fcet = 5000
Ecet = 57000 * math.sqrt(fcet)

EILbxt = ((Ecwt * Iwt) / Lwt) + ((Ecet * Iet) / Let)
Gax = EILcx / EILbxt

# Top Joint
# Framing Perp. to b
bnt = 28.5 * 12
hnt = 12
Lnt = 30 * 12
Int = bnt * hnt * hnt * hnt * (1 / 12) * 0.25
fcnt = 5000
Ecnt = 57000 * math.sqrt(fcnt)

bst = 28.5 * 12
hst = 12
Lst = 30 * 12
Ist = bst * hst * hst * hst * (1 / 12) * 0.25
fcst = 5000
Ecst = 57000 * math.sqrt(fcst)

EILbyt = ((Ecnt * Int) / Lnt) + ((Ecst * Ist) / Lst)
Gay = EILcy / EILbyt

kx = solve_K(Gax, Gbx)
kx_nonsway = solve_K(Gax, Gbx, Sway=False)

ky = solve_K(Gay, Gby)
ky_nonsway = solve_K(Gay, Gby, Sway=False)

klrx = kx["k"] * Lc * (1 / rx)
klrx_nonsway = kx_nonsway["k"] * Lc * (1 / rx)
klry = ky["k"] * Lc * (1 / ry)
klry_nonsway = ky_nonsway["k"] * Lc * (1 / ry)

Pu = 542
m1x = 0
m2x = 91.6
m1y = 0
m2y = 26
bdns = 0.505

EIxeff = 0.4 * Ec * Ix * (1 / (1 + bdns))
Pcx = (((math.pi**2) * EIxeff) / (kx["k"] * Lc) ** 2) * (1 / 1000)
Pcx_nonsway = (((math.pi**2) * EIxeff) / (kx_nonsway["k"] * Lc) ** 2) * (1 / 1000)
cmx = 0.6 - (0.4 * (m1x / m2x))
deltax = cmx / (1 - (Pu / (0.75 * Pcx)))
deltax_nonsway = cmx / (1 - (Pu / (0.75 * Pcx_nonsway)))
m2xmin = Pu * (0.6 + (0.03 * b)) * (1 / 12)
m2xmag = max(m2x, m2xmin)
mcx = max(deltax, 1) * m2xmag
mcx_nonsway = max(deltax_nonsway, 1) * m2xmag


EIyeff = 0.4 * Ec * Iy * (1 / (1 + bdns))
Pcy = (((math.pi**2) * EIyeff) / (ky["k"] * Lc) ** 2) * (1 / 1000)
Pcy_nonsway = (((math.pi**2) * EIyeff) / (ky_nonsway["k"] * Lc) ** 2) * (1 / 1000)
cmy = 0.6 - (0.4 * (m1y / m2y))
deltay = cmy / (1 - (Pu / (0.75 * Pcy)))
deltay_nonsway = cmy / (1 - (Pu / (0.75 * Pcy_nonsway)))
m2ymin = Pu * (0.6 + (0.03 * b)) * (1 / 12)
m2ymag = max(m2y, m2ymin)
mcy = max(deltay, 1) * m2ymag
mcy_nonsway = max(deltay_nonsway, 1) * m2ymag
 
If excel is your thing, you can use this VBA code. The varibles used here are just Ga and Gb and picking whether you use sidesway inhibited or sway equations.
The formulae for these are from AISC Commentary Page 16.1-240 (14th edition)

Public Sub K()
Dim Ga, Gb, K As Single
Dim Frame As String
Frame = Range("AE25")
Ga = Range("AG11")
Gb = Range("AG40")
If Frame = "Y" Then GoTo 10
For K = 1 To 20 Step 0.01
If (Ga * Gb * (3.14159 / K) ^ 2 - 36) / (6 * (Ga + Gb)) - (3.14159 / K) / Tan(3.14159 / K) < 0 Then
Range("N24") = K
GoTo 20
End If
Next K
10 For K = 0.5 To 1 Step 0.01
If (Ga * Gb * 3.14159 ^ 2) / (4 * K ^ 2) + (Ga + Gb) * (1 - (3.14159 / K) / (Tan(3.14159 / K))) / 2 + 2 * Tan(3.14159 / (2 * K)) / (3.14159 / K) < 1 Then
Range("N24") = K
GoTo 20
End If
Next K
20 End Sub
 
Thanks. I did find the chart equation. I had presumed it was more of a complicated step function. I was lazy and added a goal seek macro and button. Sometimes the solution is out of bounds, but resetting K to 1 gets it back to a reasonable re-solution.

k_smbiud.png


-Mac
 
The easiest way I know of is to provide a guess for k, then let Excel's Goal Seek function (Data/What-if-Analysis/Goal Seek) solve for k.
 
MacGruber22 - That's the easy part, right? k is going to be between 0.7 and 2.5. I always guess 1.0 and it converges pretty quickly. I set the number of iterations to 100. If I have several of these, I get impatient and change that to 10. Close enough.
 
Status
Not open for further replies.
Back
Top