################################################################ # # # p-y spring and beam model for lateral spreading analysis the # # p-y curve parameters have been reduced to account for the # # presence of the weaker liquefied layer # # # # Pile parameters: D = 0.6, E =3e+007, nu = 0.3 # # Soil parameters: z = 10, T = 2, phi = 36, gamma = 17 # # # # Created By: Chris McGann # # Pedro Arduino # # --University of Washington-- # # # # Python version of lateralSpreadPile.tcl # # # # ---> Basic units are kN and m # # # ################################################################ import math import time import openseespy.opensees as ops ops.wipe() # pile length (m), node spacing (m) and number of p-y springs L = 40.0 dz = 0.5 nSpring = 80 # p-y spring nodes are numbered from the top: node 1 + k (soil end) and 201 + k (pile end) # for spring k = 1..nSpring; pile nodes are 501 (top) to 501 + nSpring (base) #----------------------------------------------------------------------------------------- # 1. CREATE P-Y SPRING NODES AND BOUNDARY CONDITIONS #----------------------------------------------------------------------------------------- ops.model('BasicBuilder', '-ndm', 3, '-ndf', 3) springNodes = range(2, nSpring + 2) # nodes for soil end of the spring for n in springNodes: ops.node(n, 0.0, 0.0, L - dz * (n - 1)) # nodes for pile end of the spring for n in springNodes: ops.node(n + 200, 0.0, 0.0, L - dz * (n - 1)) print('Finshed creating all p-y spring nodes...') # define fixities for the soil end of springs for n in springNodes: ops.fix(n, 1, 1, 1) # define fixities for the pile end of springs for n in springNodes: ops.fix(n + 200, 0, 1, 1) print('Finished creating all p-y spring boundary conditions...') #----------------------------------------------------------------------------------------- # 2. CREATE P-Y SPRING MATERIAL #----------------------------------------------------------------------------------------- # (pult, y50) for the PySimple1 material of each spring, from the top down # (computed by makeInput.m, reduced for the presence of the liquefied layer) pyParams = [ (23.66983, 0.00083), # 2 (54.93742, 0.00136), # 3 (92.76801, 0.00188), # 4 (136.28632, 0.00239), # 5 (184.72733, 0.00290), # 6 (237.38419, 0.00340), # 7 (293.54190, 0.00390), # 8 (352.37876, 0.00438), # 9 (412.80561, 0.00483), # 10 (473.19086, 0.00526), # 11 (530.88085, 0.00562), # 12 (581.35709, 0.00590), # 13 (616.75420, 0.00603), # 14 (623.25659, 0.00594), # 15 (576.53590, 0.00552), # 16 (9.30787, 0.00082), # 17 (10.10868, 0.00086), # 18 (10.92285, 0.00090), # 19 (11.74934, 0.00095), # 20 (12.58721, 0.00099), # 21 (718.23881, 0.00557), # 22 (984.69151, 0.00738), # 23 (1200.82443, 0.00880), # 24 (1380.75888, 0.00990), # 25 (1534.82055, 0.01078), # 26 (1670.51070, 0.01151), # 27 (1793.24680, 0.01212), # 28 (1906.92044, 0.01266), # 29 (2014.31305, 0.01314), # 30 (2117.40302, 0.01358), # 31 (2217.59083, 0.01399), # 32 (2315.86293, 0.01438), # 33 (2412.91052, 0.01476), # 34 (2509.21504, 0.01512), # 35 (2605.10947, 0.01547), # 36 (2700.82215, 0.01581), # 37 (2796.50793, 0.01615), # 38 (2892.27025, 0.01648), # 39 (2988.17673, 0.01681), # 40 (3084.27020, 0.01713), # 41 (3180.57640, 0.01745), # 42 (3277.10936, 0.01776), # 43 (3373.87523, 0.01808), # 44 (3470.87482, 0.01838), # 45 (3568.10549, 0.01869), # 46 (3665.56234, 0.01899), # 47 (3763.23912, 0.01928), # 48 (3861.12878, 0.01958), # 49 (3959.22389, 0.01987), # 50 (4057.51687, 0.02016), # 51 (4156.00020, 0.02044), # 52 (4254.66650, 0.02073), # 53 (4353.50862, 0.02101), # 54 (4452.51967, 0.02129), # 55 (4551.69304, 0.02156), # 56 (4651.02242, 0.02183), # 57 (4750.50177, 0.02210), # 58 (4850.12535, 0.02237), # 59 (4949.88767, 0.02264), # 60 (5049.78354, 0.02290), # 61 (5149.80798, 0.02316), # 62 (5249.95628, 0.02342), # 63 (5350.22393, 0.02368), # 64 (5450.60664, 0.02394), # 65 (5551.10034, 0.02419), # 66 (5651.70112, 0.02444), # 67 (5752.40527, 0.02469), # 68 (5853.20924, 0.02494), # 69 (5954.10964, 0.02518), # 70 (6055.10324, 0.02542), # 71 (6156.18694, 0.02567), # 72 (6257.35780, 0.02591), # 73 (6358.61297, 0.02614), # 74 (6459.94975, 0.02638), # 75 (6561.36555, 0.02662), # 76 (6662.85788, 0.02685), # 77 (6764.42436, 0.02708), # 78 (6866.06270, 0.02731), # 79 (6967.77072, 0.02754), # 80 (7069.54631, 0.02777), # 81 ] for n, (pult, y50) in zip(springNodes, pyParams): ops.uniaxialMaterial('PySimple1', n, 2, pult, y50, 0) print('Finished creating all p-y spring materials...') #----------------------------------------------------------------------------------------- # 3. CREATE P-Y SPRING ELEMENTS #----------------------------------------------------------------------------------------- for n in springNodes: ops.element('zeroLength', n, n, n + 200, '-mat', n, '-dir', 1) print('Finished creating all p-y spring elements...') #----------------------------------------------------------------------------------------- # 4. CREATE PILE NODES AND BOUNDARY CONDITIONS #----------------------------------------------------------------------------------------- ops.model('BasicBuilder', '-ndm', 3, '-ndf', 6) pileNodes = list(range(501, 501 + nSpring + 1)) # create nodes for n in pileNodes: ops.node(n, 0.0, 0.0, L - dz * (n - 501)) print('Finished creating all pile nodes...') # create geometric transformation for vertical pile transTag = 1 ops.geomTransf('Linear', transTag, 0, -1, 0) # create the fixities for the pile nodes (the base node is also fixed vertically) for n in pileNodes[:-1]: ops.fix(n, 0, 1, 0, 1, 0, 1) ops.fix(pileNodes[-1], 0, 1, 1, 1, 0, 1) print('Finished creating all pile boundary conditions...') # create the equalDOF between the pile nodes and the pile end of the springs for n in springNodes: ops.equalDOF(n + 500, n + 200, 1) print('Finished creating all pile-spring equalDOF...') #----------------------------------------------------------------------------------------- # 5. CREATE ELASTIC PILE SECTION #----------------------------------------------------------------------------------------- # pile properties pi = 4.0 * math.atan(1.0) radius = 0.30000 area = pi * radius * radius I = pi * radius * radius * radius * radius / 4.0 J = 2.0 * I E = 30000000.00000 nu = 0.30000 G = E / (2.0 * (1.0 + nu)) nIntPts = 3 secTag = 1 secTag3D = 3 # beam section, no torsion ops.section('Elastic', secTag, E, area, I, I, G, J) # create torsional section ops.uniaxialMaterial('Elastic', 100, 1.e10) # aggregate the beam section ops.section('Aggregator', secTag3D, 100, 'T', '-section', secTag) print('Finished creating all beam materials...') #----------------------------------------------------------------------------------------- # 6. CREATE PILE ELEMENTS #----------------------------------------------------------------------------------------- # Gauss-Legendre integration with nIntPts integration points along each element ops.beamIntegration('Legendre', 1, secTag3D, nIntPts) pileElements = pileNodes[:-1] for n in pileElements: ops.element('dispBeamColumn', n, n, n + 1, transTag, 1) print('Finished creating all beam elements...') #----------------------------------------------------------------------------------------- # 7. CREATE RECORDERS #----------------------------------------------------------------------------------------- # designate recorder timestep dt = 0.5 ops.recorder('Node', '-file', 'pyDisplace.out', '-time', '-nodeRange', 202, 281, '-dof', 1, '-dT', dt, 'disp') ops.recorder('Node', '-file', 'pyForces.out', '-time', '-nodeRange', 2, 81, '-dof', 1, '-dT', dt, 'reaction') ops.recorder('Node', '-file', 'Displacements.out', '-time', '-node', *pileNodes, '-dof', 1, 2, 3, '-dT', dt, 'disp') ops.recorder('Node', '-file', 'Reaction.out', '-time', '-node', *pileNodes, '-dof', 1, 2, 3, '-dT', dt, 'reaction') ops.recorder('Element', '-file', 'globalForces.out', '-time', '-ele', *pileElements, '-dT', dt, 'globalForce') #----------------------------------------------------------------------------------------- # 8. CREATE APPLIED DISPLACEMENT PROFILE #----------------------------------------------------------------------------------------- # path time series: load factor ramps from 0 to 1 over 10 s, then held constant ops.timeSeries('Path', 1, '-time', 0, 10, 10000, '-values', 0, 1, 1, '-factor', 1) ops.pattern('Plain', 10, 1) # displacement of the soil end of the springs: 0.3 m (one pile radius) in the upper # layer (nodes 2-16), decreasing linearly to zero across the liquefied layer (nodes 17-20) spDisp = [0.300] * 15 + [0.225, 0.150, 0.075, 0.000] for n, u in zip(range(2, 21), spDisp): ops.sp(n, 1, u) print('Finished adding all sp constraints for push-over analysis...') #----------------------------------------------------------------------------------------- # 8. CREATE AND EXECUTE THE ANALYSIS #----------------------------------------------------------------------------------------- ops.integrator('LoadControl', 0.05) ops.numberer('RCM') ops.system('BandGeneral') ops.constraints('Transformation') ops.test('NormDispIncr', 1e-5, 20, 1) ops.algorithm('Newton') ops.analysis('Static') startT = time.time() ops.analyze(205) endT = time.time() print('Load Application finished...') print(f'Analysis execution time: {endT - startT:.0f} seconds') ops.wipe()