def staggeredPatternType2(lIndX, lIndY, indZ): '''return a list of grid ranges that delimit a set of staggered patterned surfaces, i.e. in a floor of a buildin from the following parameters: :parameter lIndX: list of X-index that point to the X-coordinates of the strips edges. :parameter lIndY: list of Y-index that point to the Y-coordinates of the strips edges. :parameter indZ: Z-index that points to the Z-coordinate of all the surfaces The first vertex considered is (lIndX[0],lIndY[1],indZ) ''' indSupPatt = [] for i in range(0, len(lIndX) - 1, 2): for j in range(1, len(lIndY) - 1, 2): inds = ijkGrid.IJKRange([lIndX[i], lIndY[j], indZ], [lIndX[i + 1], lIndY[j + 1], indZ]) indSupPatt.append(inds) for i in range(1, len(lIndX) - 1, 2): for j in range(0, len(lIndY) - 1, 2): inds = ijkGrid.IJKRange([lIndX[i], lIndY[j], indZ], [lIndX[i + 1], lIndY[j + 1], indZ]) indSupPatt.append(inds) return indSupPatt
# elemSize: mean size of the elements # vDirLAxZ: direction vector for the element local axis Z # defined as xc.Vector([x,y,z]). This is the direction in which # the Z local axis of the reinforced concrete sections will be # oriented (i.e. in the case of rectangular sections this Z # local axis of the RC section is parallel to the dimension # defined as width of the rectangle) # ranges: lists of grid ranges to delimit the lines of # the type in question beam = model.newMaterialLine(name='beam', material=matBeam, elemType='ElasticBeam3d', elemSize=eSize, vDirLAxZ=xc.Vector([0, -1, 0])) beam.ranges = [ijkGrid.IJKRange([0, 0, 0], [2, 0, 0])] #Dictionary of material-lines allLinList = [beam] conjLines = model.setMaterialLinesMap(allLinList) # Regions resting on springs (Winkler elastic foundation) # name: name to identify the region # wModulus: Winkler modulus of the foundation (springs in Z direction) # cRoz: fraction of the Winkler modulus to apply for friction in # the contact plane (springs in X, Y directions) # ranges: lists of grid ranges to delimit the regions of # the type of foundation in question # winkMod=20e7 # coefHorVerSprings=0.2 # foundationElasticSupports= model.newElasticFoundationRanges('apElT1', wModulus= winkMod,cRoz=coefHorVerSprings)
zBottomGlass = HinfColumn + HSupColumn for i in range(1, int(AnglGlass / AnglIncr) + 1): zList.append(zBottomGlass + RGlass * math.sin(i * incrAngRad)) #auxiliary data lastXpos = len(xList) - 1 lastYpos = len(yList) - 1 lastZpos = len(zList) - 1 # grid of X,Y,Z axes coordinates rejXYZ = model.setGrid(xList, yList, zList) #Displacements of the grid points in a range #syntax: moveRange(ijkGrid.IJKRange([minIindex,minJindex,minKindex],[maxIindex,maxJindex,maxKindex],[dispX,dispY,dispZ]) for k in range(3, lastZpos + 1): r = ijkGrid.IJKRange([lastXpos, 0, k], [lastXpos, lastYpos, k]) deltaXPto = -RGlass * (1 - math.cos((k - 2) * incrAngRad)) mr = ijkGrid.moveRange(r, [deltaXPto, 0.0, 0.0]) rejXYZ.rangesToMove.append(mr) # *** MATERIALS *** concrete = typical_materials.MaterialData(name='concrete', E=EcConcr, nu=cpoisConcr, rho=densConcr) #Fictitious material to represent rigid motion fictMat = typical_materials.MaterialData(name='fictMat', E=Efict, nu=cpoisFict, rho=densFict) #fictMat.G=GFict
# Dictionary of materials matElMembPlat= model.setMaterials([wallsBasement_mat,facadeShearWall_mat,shearWallStaircase_mat,slabs_mat,sqrColumns_mat]) #Mesh parameters and sets # Types of surfaces to be discretized from the defined # material, type of element and size of the elements. # Parameters: # name: name to identify the type of surface # material: name of the material that makes up the surface # elemType: element type to be used in the discretization # elemSize: mean size of the elements # ranges: lists of grid ranges to delimit the surfaces of # the type in question wallBasYmin= model.newMaterialSurface('wallBasYmin', material=wallsBasement_mat, elemType='ShellMITC4',elemSize= eSize) wallBasYmin.ranges= [ ijkGrid.IJKRange([0,0,0],[lastXind,0,2])] wallBasYmax= model.newMaterialSurface('wallBasYmax', material=wallsBasement_mat, elemType='ShellMITC4',elemSize= eSize) wallBasYmax.ranges= [ ijkGrid.IJKRange([0,lastYind,0],[lastXind,lastYind,2])] wallBasXmin= model.newMaterialSurface('wallBasXmin', material=wallsBasement_mat, elemType='ShellMITC4',elemSize= eSize) wallBasXmin.ranges= [ ijkGrid.IJKRange([0,0,0],[0,lastYind,2])] wallBasXmax= model.newMaterialSurface('wallBasXmax', material=wallsBasement_mat, elemType='ShellMITC4',elemSize= eSize) wallBasXmax.ranges= [ ijkGrid.IJKRange([lastXind,0,0],[lastXind,lastYind,2])] columnFacYmin= model.newMaterialSurface('columnFacYmin', material=facadeShearWall_mat, elemType='ShellMITC4',elemSize= eSize) columnFacYmin.ranges= [ ijkGrid.IJKRange([1,1,0],[3,1,lastZind]),ijkGrid.IJKRange([4,1,0],[6,1,lastZind]),ijkGrid.IJKRange([9,1,0],[11,1,lastZind]),ijkGrid.IJKRange([12,1,0],[14,1,lastZind])] columnFacYmax= model.newMaterialSurface('columnFacYmax', material=facadeShearWall_mat, elemType='ShellMITC4',elemSize= eSize) columnFacYmax.ranges= [ ijkGrid.IJKRange([1,lastYind,0],[3,lastYind,lastZind]),ijkGrid.IJKRange([4,lastYind,0],[6,lastYind,lastZind]),ijkGrid.IJKRange([9,lastYind,0],[11,lastYind,lastZind]),ijkGrid.IJKRange([12,lastYind,0],[14,lastYind,lastZind])]
# Parameters: # name: name to identify the type of line # material: name of the material that makes up the line # elemType: element type to be used in the discretization # elemSize: mean size of the elements # vDirLAxZ: direction vector for the element local axis Z # defined as xc.Vector([x,y,z]). This is the direction in which # the Z local axis of the reinforced concrete sections will be # oriented (i.e. in the case of rectangular sections this Z # local axis of the RC section is parallel to the dimension # defined as width of the rectangle) # ranges: lists of grid ranges to delimit the lines of # the type in question botCol= model.newMaterialLine(name='botCol', material= matBotCol, elemType='ElasticBeam3d',elemSize= eSize,vDirLAxZ=xc.Vector([0,-1,0])) botCol.ranges= [ ijkGrid.IJKRange([0,0,0],[0,0,1])] topCol= model.newMaterialLine(name='topCol', material= matTopCol, elemType='ElasticBeam3d',elemSize= eSize,vDirLAxZ=xc.Vector([0,-1,0])) topCol.ranges= [ ijkGrid.IJKRange([0,0,1],[0,0,2])] glsCol= model.newMaterialLine(name='glsCol', material= matGlsCol, elemType='ElasticBeam3d',elemSize= eSize,vDirLAxZ=xc.Vector([0,-1,0])) glsCol.ranges= [ ijkGrid.IJKRange([0,0,2],[0,0,lastZpos])] #Dictionary of material-lines allLinList=[botCol,topCol,glsCol] conjLines= model.setMaterialLinesMap(allLinList) # Regions resting on springs (Winkler elastic foundation) # name: name to identify the region # wModulus: Winkler modulus of the foundation (springs in Z direction)
matElMembPlat = model.setMaterials([matCantlv]) # Types of surfaces to be discretized from the defined # material, type of element and size of the elements. # Parameters: # name: name to identify the type of surface # material: name of the material that makes up the surface # elemType: element type to be used in the discretization # elemSize: mean size of the elements # ranges: lists of grid ranges to delimit the surfaces of # the type in question cantlv = model.newMaterialSurface('cantlv', material=matCantlv, elemType='ShellMITC4', elemSize=eSize) cantlv.ranges = [ijkGrid.IJKRange([0, 0, 0], [lastXpos, lastYpos, lastZpos])] allSurfList = [cantlv] # #Dictionary of material-surfaces conjSup = model.setMaterialSurfacesMap(allSurfList) # Types of lines to be discretized from the defined # material, type of element and size of the elements. # Parameters: # name: name to identify the type of line # material: name of the material that makes up the line # elemType: element type to be used in the discretization # elemSize: mean size of the elements # vDirLAxZ: direction vector for the element local axis Z # defined as xc.Vector([x,y,z]). This is the direction in which
# Dictionary of materials matElMembPlat= model.setMaterials([deckSlab,stiffTBeams,prestBeam]) eSize= 0.5 # Types of surfaces to be discretized from the defined # material, type of element and size of the elements. # Parameters: # name: name to identify the type of surface # material: name of the material that makes up the surface # elemType: element type to be used in the discretization # elemSize: mean size of the elements # ranges: lists of grid ranges to delimit the surfaces of # the type in question deck= model.newMaterialSurface('deck', material=deckSlab, elemType='ShellMITC4',elemSize= eSize) deck.ranges= [ ijkGrid.IJKRange([0,0,lastZpos],[lastXpos,lastYpos,lastZpos]) ] #stiff transverse beams (diaphragms) diaph=model.newMaterialSurface('diaph', material=stiffTBeams, elemType='ShellMITC4',elemSize= eSize) diaph.ranges= [ ijkGrid.IJKRange([posXbeams[0],0,0],[posXbeams[3],0,2]), ijkGrid.IJKRange([posXbeams[0],1,0],[posXbeams[3],1,2]),ijkGrid.IJKRange([posXbeams[0],2,0],[posXbeams[3],2,2]),ijkGrid.IJKRange([posXbeams[0],3,0],[posXbeams[3],3,2])] #Dictionary of material-surfaces conjSup= model.setMaterialSurfacesMap([deck,diaph]) # Types of lines to be discretized from the defined # material, type of element and size of the elements. # Parameters: # name: name to identify the material-line # material: name of the material that makes up the line # elemType: element type to be used in the discretization # elemSize: mean size of the elements # vDirLAxZ: direction vector for the element local axis Z