ops.section("Fiber", 1) # Create the concrete core fibers ops.patch("rect", 1, 10, 1, cover - y1, cover - z1, y1 - cover, z1 - cover) # Create the concrete cover fibers (top, bottom, left, right) ops.patch("rect", 2, 10, 1, -y1, z1 - cover, y1, z1) ops.patch("rect", 2, 10, 1, -y1, -z1, y1, cover - z1) ops.patch("rect", 2, 2, 1, -y1, cover - z1, cover - y1, z1 - cover) ops.patch("rect", 2, 2, 1, y1 - cover, cover - z1, y1, z1 - cover) # Create the reinforcing fibers (left, middle, right) ops.layer("straight", 3, 3, As, y1 - cover, z1 - cover, y1 - cover, cover - z1) ops.layer("straight", 3, 2, As, 0.0, z1 - cover, 0.0, cover - z1) ops.layer("straight", 3, 3, As, cover - y1, z1 - cover, cover - y1, cover - z1) # define beam integration np = 5 # number of integration points along length of element ops.beamIntegration("Lobatto", 1, 1, np) # Define column elements # ---------------------- # Geometry of column elements # tag ops.geomTransf("PDelta", 1) # Create the coulumns using Beam-column elements # tag ndI ndJ transfTag integrationTag eleType = "forceBeamColumn" ops.element(eleType, 1, 1, 3, 1, 1) ops.element(eleType, 2, 2, 4, 1, 1) # Define beam element # -----------------------------
ops.section("Fiber", 1) # Create the concrete core fibers ops.patch("rect", 1, 10, 1, cover-y1, cover-z1, y1-cover, z1-cover) # Create the concrete cover fibers (top, bottom, left, right) ops.patch("rect", 2, 10, 1, -y1, z1-cover, y1, z1) ops.patch("rect", 2, 10, 1, -y1, -z1, y1, cover-z1) ops.patch("rect", 2, 2, 1, -y1, cover-z1, cover-y1, z1-cover) ops.patch("rect", 2, 2, 1, y1-cover, cover-z1, y1, z1-cover) # Create the reinforcing fibers (left, middle, right) ops.layer("straight", 3, 3, As, y1-cover, z1-cover, y1-cover, cover-z1) ops.layer("straight", 3, 2, As, 0.0, z1-cover, 0.0, cover-z1) ops.layer("straight", 3, 3, As, cover-y1, z1-cover, cover-y1, cover-z1) # define beam integration np = 5; # number of integration points along length of element ops.beamIntegration("Lobatto", 1, 1, np) # Define column elements # ---------------------- # Geometry of column elements # tag ops.geomTransf("PDelta", 1) # Create the coulumns using Beam-column elements # tag ndI ndJ transfTag integrationTag eleType = "forceBeamColumn" ops.element(eleType, 1, 1, 3, 1, 1) ops.element(eleType, 2, 2, 4, 1, 1) # Define beam element # -----------------------------
RCsection.create(ops, colSec, h, h, 2.5, 1, 2, 3, 3, 0.79, 8, 8, 10, 10, GJ) # Define column elements # ---------------------- PDelta = "OFF" #PDelta = "ON" # Geometric transformation for columns if (PDelta == "OFF"): ops.geomTransf("Linear", 1, 1.0, 0.0, 0.0) else: ops.geomTransf("PDelta", 1, 1.0, 0.0, 0.0) # Number of column integration points (sections) np = 4 ops.beamIntegration("Lobatto", colSec, colSec, np) # Create the nonlinear column elements eleType = "forceBeamColumn" # tag ndI ndJ transfTag integrationTag ops.element(eleType, 1, 1, 5, 1, colSec) ops.element(eleType, 2, 2, 6, 1, colSec) ops.element(eleType, 3, 3, 7, 1, colSec) ops.element(eleType, 4, 4, 8, 1, colSec) ops.element(eleType, 5, 5, 10, 1, colSec) ops.element(eleType, 6, 6, 11, 1, colSec) ops.element(eleType, 7, 7, 12, 1, colSec) ops.element(eleType, 8, 8, 13, 1, colSec) ops.element(eleType, 9, 10, 15, 1, colSec)
Ac = 29.0 Ic = 2000.0 gsecTag = 1 ops.section("Elastic", gsecTag, E, Ag, Ig) csecTag = 2 ops.section("Elastic", csecTag, E, Ac, Ic) transfTag = 1 ops.geomTransf("Linear", transfTag) N = 3 gbiTag = 1 ops.beamIntegration("Lobatto", gbiTag, gsecTag, N) cbiTag = 2 ops.beamIntegration("Lobatto", cbiTag, csecTag, N) leftColTag = 1 ops.element("forceBeamColumn", leftColTag, 1, 2, transfTag, cbiTag) girderTag = 2 ops.element("forceBeamColumn", girderTag, 2, 3, transfTag, gbiTag) rightColTag = 3 ops.element("forceBeamColumn", rightColTag, 3, 4, transfTag, cbiTag) P = 25.0 w = 1.0e-1 tsTag = 1 ops.timeSeries("Constant", tsTag)
# create combined 3D section secTag3D = 3 op.section('Aggregator', secTag3D, 3000, 'T', '-section', 1) ######################################################################################################################################################################### ########################################################################################################################################################################## # elastic pile section #import elasticPileSection #---------------------------------------------------------- # create pile elements #---------------------------------------------------------- op.beamIntegration('Legendre', 1, secTag3D, 3) # we are using gauss-Legendre integration as it is the default integration scheme used in opensees tcl (check dispBeamColumn) for i in range(201, 201+nElePile): op.element('dispBeamColumn', i, i, i+1, 1, 1) print("Finished creating all pile elements...") #---------------------------------------------------------- # create recorders #---------------------------------------------------------- # record information at specified increments timeStep = 0.5 # record displacements at pile nodes op.recorder('Node', '-file', 'pileDisp.out','-time', '-dT', timeStep, '-nodeRange', 201, 200 + nNodePile, '-dof', 1,2,3, 'disp')
def BuildOpsModel(GRS): ops.wipe() ops.model('BasicBuilder', '-ndm', 3, '-ndf', 6) # material matID = 66 matID1 = 67 sY = 235. * un.MPa if GRS.MatNL == False: ops.uniaxialMaterial('Elastic', matID, GRS.Es) else: ops.uniaxialMaterial('Steel4', matID1, sY, GRS.Es, '-kin', 4e-3, 50., 0.05, 0.15, '-ult', 360.* un.MPa, 5., ) ops.uniaxialMaterial('MinMax', matID, matID1, '-min', -0.20, '-max', 0.20) #ops.uniaxialMaterial('Steel4', matID, sY, GRS.Es, '-kin', 1e-2, 50., 0.05, 0.15, '-ult', 360.* un.MPa, 10., ) #ops.uniaxialMaterial('Steel4', matID, sY, GRS.Es, '-kin', 1e-2, 50., 0.05, 0.15) #ops.uniaxialMaterial('ElasticBilin', matID, GRS.Es, 210. * 1e7, sY / GRS.Es) #ops.uniaxialMaterial('ElasticBilin', matID, GRS.Es, 210. * 1e6, sY / GRS.Es) #ops.uniaxialMaterial('ElasticBilin', matID, GRS.Es, 1., sY / GRS.Es) #Oldalnyomasos igy futott le # cross-section CHSid = 99 CHSSection(CHSid, matID, GRS.secD, GRS.secT, 8, 1, GRS.Gs*GRS.secIt) # nodes for i in range(GRS.nbNsAll): ops.node(int(100+i), GRS.nsAll.x[i], GRS.nsAll.y[i], GRS.nsAll.z[i]) # ...create zeroLength element nodes... # end supports if GRS.SupType==0: # all boundary points fixed for deformations for i in range(GRS.nbBns): ops.fix(100+GRS.bn[i], 1, 1, 1, 0, 0, 0) elif GRS.SupType == 1: # oldalnyomasos for i in range(len(GRS.bnX)): ops.fix(100+GRS.bnX[i], 1, 0, 1, 0, 0, 0) for i in range(len(GRS.bnY)): ops.fix(100+GRS.bnY[i], 0, 1, 1, 0, 0, 0) for i in range(len(GRS.bnC)): ops.fix(100+GRS.bnC[i], 1, 1, 1, 0, 0, 0) elif GRS.SupType == 2: # oldalnyomasmentes for i in range(len(GRS.bnX)): ops.fix(100+GRS.bnX[i], 0, 0, 1, 0, 0, 0) for i in range(len(GRS.bnY)): ops.fix(100+GRS.bnY[i], 0, 0, 1, 0, 0, 0) #for i in range(len(GRS.bnC)): # ops.fix(100+GRS.bnC[i], 1, 1, 1, 0, 0, 0) ops.fix(100 + GRS.bnC[0], 1, 1, 1, 0, 0, 0) ops.fix(100 + GRS.bnC[1], 0, 0, 1, 0, 0, 0) ops.fix(100 + GRS.bnC[2], 1, 0, 1, 0, 0, 0) ops.fix(100 + GRS.bnC[3], 0, 0, 1, 0, 0, 0) elif GRS.SupType == 3: # felmerev #NOT WORKING YET pass elif GRS.SupType == 4: # sarkok for i in range(len(GRS.bnC)): ops.fix(100+GRS.bnC[i], 1, 1, 1, 0, 0, 0) elif GRS.SupType == 5: # dome oldalnyomasos for i in range(GRS.nbBns): if i==0: ops.fix(100+GRS.bn[i], 1, 1, 1, 0, 0, 0) elif i==10: ops.fix(100+GRS.bn[i], 0, 1, 1, 0, 0, 0) else: ops.fix(100+GRS.bn[i], 0, 0, 1, 0, 0, 0) elif GRS.SupType == 6: # dome #NOT WORKING YET pass # transformations TRtag = 55 if GRS.GeomNL == 1: TRType = 'Corotational' ops.geomTransf('Corotational', TRtag, 0., 0., 1.) else: TRType = 'Linear' ops.geomTransf('Linear', TRtag, 0., 0., 1.) # integration points gauss = 5 beamIntTag=44 ops.beamIntegration('Lobatto', beamIntTag, CHSid, gauss) # create elements for i in range(GRS.nbElAll): sID = GRS.lsAll.sID[i] eID = GRS.lsAll.eID[i] dx = abs(GRS.nsAll.x[sID] - GRS.nsAll.x[eID]) dy = abs(GRS.nsAll.y[sID] - GRS.nsAll.y[eID]) dz = abs(GRS.nsAll.z[sID] - GRS.nsAll.z[eID]) if dx+dy+dz == 0: ops.equalDOF(eID, sID, 1,2,3,4,5,6) # Grasshopper geomType=4 Zero length elements - should not come here else: ops.element('forceBeamColumn', int(1000 + i), int(100+sID), int(100+eID), TRtag, beamIntTag)