S235JR.gammaM= 1.00 # Steel material-section appropiate for 3D beam analysis, including shear # deformations. # Attributes: # steel: steel material ( # name: name of the standard steel profile. Types: IPEShape, HEShape, # UPNShape, AUShape, CHSShape # (defined in materials.sections.structural_shapes.arcelor_metric_shapes) beamY_mat= EC3_materials.IPEShape(steel=S235JR,name='IPE_A_450') beamY_mat.defElasticShearSection3d(preprocessor) # ***FE model - MESH*** beamY_mesh=fem.LinSetToMesh(linSet=beamY,matSect=beamY_mat,elemSize=eSize,vDirLAxZ=xc.Vector([1,0,0]),elemType='ElasticBeam3d',coordTransfType='linear') beamY_mesh.generateMesh(preprocessor) # EC3beam definition lstLines=gridGeom.getLstLinRange(beamY_rg) from materials.ec3 import EC3Beam as ec3b ec3beam=ec3b.EC3Beam(name='ec3bm',ec3Shape=None,lstLines=lstLines) ec3beam.setControlPoints() #calculated control points e1S=ec3beam.contrPnt[0][0].getLineSegment(0) v1CP=e1S.getFromPoint()+(e1S.getToPoint()-e1S.getFromPoint())*ec3beam.contrPnt[0][1]
#Lines generation pile_rg=gm.IJKRange((0,0,0),(0,0,1)) pile=gridGeom.genLinOneRegion(ijkRange=pile_rg,setName='pile') # *** MATERIALS *** concrProp=tm.MaterialData(name='concrProp',E=concrete.Ecm(),nu=concrete.nuc,rho=concrete.density()) #Geometric sections #rectangular sections from materials.sections import section_properties as sectpr geomSectPile=sectpr.RectangularSection(name='geomSectPile',b=LeqPile,h=LeqPile) # Elastic material-section pile_mat=tm.BeamMaterialData(name='pile_mat', section=geomSectPile, material=concrProp) pile_mat.setupElasticShear3DSection(preprocessor=prep) # ***FE model - MESH*** pile_mesh=fem.LinSetToMesh(linSet=pile,matSect=pile_mat,elemSize=eSize,vDirLAxZ=xc.Vector([0,1,0]),elemType='ElasticBeam3d',dimElemSpace=3,coordTransfType='linear') fem.multi_mesh(preprocessor=prep,lstMeshSets=[pile_mesh]) # ***BOUNDARY CONDITIONS*** pileBC=sbc.PileFoundation(setPile=pile,pileDiam=fiPile,E=concrete.Ecm(),pileType='endBearing',pileBearingCapacity=bearCap,groundLevel=zGround,soilsProp=soils) pileBC.generateSpringsPile(alphaKh_x=1,alphaKh_y=1,alphaKv_z=1) springs=pileBC.springs springSet=preprocessor.getSets.defSet('springSet') for e in springs: springSet.getElements.append(e) #print 'z:',e.getCooCentroid(True)[2], ' Kx (t/m):',round(e.getMaterials()[0].E*1e-4,2) springSet.fillDownwards() allSets=pile+springSet ''' from postprocess.xcVtk.FE_model import vtk_FE_graphic
geomSectBeam = sectpr.RectangularSection(name='geomSectBeam', b=wBeam, h=hBeam) # Material definition concrete = tm.MaterialData(name='concrete', E=Ec, nu=nuc, rho=densc) beamMat = tm.BeamMaterialData(name='beamMat', section=geomSectBeam, material=concrete) beamMat.setupElasticShear3DSection(prep) #Meshing for l in beamSet.getLines: l.nDiv = nDivLines beam_mesh = fem.LinSetToMesh(linSet=beamSet, matSect=beamMat, elemSize=None, vDirLAxZ=xc.Vector([1, 0, 0]), elemType='ElasticBeam3d', dimElemSpace=3, coordTransfType='linear') beam_mesh.generateMesh(prep) #Boundary conditions modelSpace.fixNode000_FFF(0) endnode = beamSet.getNodes.getNearestNode(geom.Pos3d(0, span, 0)) modelSpace.fixNode000_FFF(endnode.tag) #TENDON #Material prestressingSteel = tm.defCableMaterial(preprocessor=prep, name="prestressingSteel", E=Ep,
preprocessor=FEcase.getPreprocessor prep=preprocessor #short name nodes= prep.getNodeHandler elements= prep.getElementHandler elements.dimElem= 3 modelSpace= predefined_spaces.StructuralMechanics3D(nodes) #Defines the grid=gm.GridModel(prep,xList=[0,L/2,L],yList=[0],zList=[0]) grid.generatePoints() steel_W=astm.A992 #steel W shapes beam=grid.genLinOneXYZRegion([(0,0,0),(L,0,0)],'beam') beam_mat= astm.HSSShape(steel_W,'HSS10X6X1/2') beam_mat.defElasticShearSection3d(prep) beam_mesh= fem.LinSetToMesh(linSet=beam,matSect=beam_mat,elemSize=0.25,vDirLAxZ=xc.Vector([0,1,0]), elemType='ElasticBeam3d') beam_mesh.generateMesh(prep) J= beam_mat.J() Jcomp= 176/(m2in**4) ratio0= abs(J-Jcomp)/Jcomp G= steel_W.G() Gcomp= 11200.0/Pa2ksi ratio1= abs(G-Gcomp)/Gcomp #boundary conditions extr1= grid.getPntXYZ((0,0,0)) modelSpace.fixNode000_0FF(extr1.getNode().tag) extr2= grid.getPntXYZ((L,0,0)) modelSpace.fixNodeF00_0FF(extr2.getNode().tag)
# Elastic material-section appropiate for 3D beam analysis, including shear # deformations. # Attributes: # name: name identifying the section # section: instance of a class that defines the geometric and # mechanical characteristiscs # of a section (e.g: RectangularSection, CircularSection, # ISection, ...) # material: instance of a class that defines the elastic modulus, # shear modulus and mass density of the material riostrEstr_mat= tm.BeamMaterialData(name= 'riostrEstr_mat', section=geomSectRiostrEstr, material=concrProp) riostrEstr_mat.setupElasticShear3DSection(preprocessor=prep) # ***FE model - MESH*** riostrEstr1_mesh=fem.LinSetToMesh(linSet=riostrEstr1,matSect=riostrEstr_mat,elemSize=eSize,vDirLAxZ=xc.Vector([0,-1,0]),elemType='ElasticBeam3d',dimElemSpace=3,coordTransfType='linear') riostrEstr2_mesh=fem.LinSetToMesh(linSet=riostrEstr2,matSect=riostrEstr_mat,elemSize=eSize,vDirLAxZ=xc.Vector([0,-1,0]),elemType='ElasticBeam3d',dimElemSpace=3,coordTransfType='linear') losInfV1_mesh=fem.SurfSetToMesh(surfSet=losInfV1,matSect=losInf_mat,elemSize=eSize,elemType='ShellMITC4') losInfV2_mesh=fem.SurfSetToMesh(surfSet=losInfV2,matSect=losInf_mat,elemSize=eSize,elemType='ShellMITC4') losInfV3_mesh=fem.SurfSetToMesh(surfSet=losInfV3,matSect=losInf_mat,elemSize=eSize,elemType='ShellMITC4') losInfRP1_mesh=fem.SurfSetToMesh(surfSet=losInfRP1,matSect=losInf_mat,elemSize=eSize,elemType='ShellMITC4') losInfRP2_mesh=fem.SurfSetToMesh(surfSet=losInfRP2,matSect=losInf_mat,elemSize=eSize,elemType='ShellMITC4') losSupV1_mesh=fem.SurfSetToMesh(surfSet=losSupV1,matSect=losSup_mat,elemSize=eSize,elemType='ShellMITC4') losSupV2_mesh=fem.SurfSetToMesh(surfSet=losSupV2,matSect=losSup_mat,elemSize=eSize,elemType='ShellMITC4') losSupV3_mesh=fem.SurfSetToMesh(surfSet=losSupV3,matSect=losSup_mat,elemSize=eSize,elemType='ShellMITC4') losSupRP1_mesh=fem.SurfSetToMesh(surfSet=losSupRP1,matSect=losSup_mat,elemSize=eSize,elemType='ShellMITC4') losSupRP2_mesh=fem.SurfSetToMesh(surfSet=losSupRP2,matSect=losSup_mat,elemSize=eSize,elemType='ShellMITC4') murAligV1_mesh=fem.SurfSetToMesh(surfSet=murAligV1,matSect=murAlig_mat,elemSize=eSize,elemType='ShellMITC4')
# material: instance of a class that defines the elastic modulus, # shear modulus and mass density of the material from materials import typical_materials cabl_mat = typical_materials.defCableMaterial(prep, name="cabl_mat", E=Ecabl, prestress=prestrFct * prestrLoss * sigmaPrestr, rho=0.0) # ***FE model - MESH*** cabl_mesh = fem.LinSetToMesh(linSet=cables, matSect=cabl_mat, elemSize=eSize_cabl, vDirLAxZ=xc.Vector([0, 0, 1]), elemType='corot_truss', dimElemSpace=3) cabl_mesh.generateMesh(prep) # mesh this set of lines for e in cables.getElements: e.area = area_cable deck_mesh = fem.SurfSetToMesh(surfSet=deck, matSect=deck_mat, elemSize=eSize_deck, elemType='ShellMITC4') deck_mesh.generateMesh(prep) #mesh the set of surfaces curb_mesh = fem.SurfSetToMesh(surfSet=curb, matSect=curb_mat,
gridGeom.generatePoints() loadedSurf=gridGeom.genSurfOneXYZRegion(xyzRange=((0,0,1),(1,1,1)),setName='loadedSurf') beams=gridGeom.genLinOneXYZRegion(((0,0,1),(1,1,1)),'beams') concrete=EHE_materials.HA30 concrProp=tm.MaterialData(name='concrProp',E=concrete.Ecm(),nu=concrete.nuc,rho=concrete.density()) from materials.sections import section_properties as sectpr geomSect=sectpr.RectangularSection(name='geomSect',b=0.2,h=0.2) linel_mat= tm.BeamMaterialData(name= 'linel_mat', section=geomSect, material=concrProp) linel_mat.setupElasticShear3DSection(preprocessor=prep) beams_mesh=fem.LinSetToMesh(linSet=beams,matSect=linel_mat,elemSize=0.5,vDirLAxZ=xc.Vector([0,0,1]),elemType='ElasticBeam3d',coordTransfType='linear') beams_mesh.generateMesh(prep) surfUnifLoad= loads.UnifLoadSurfNodesDistributed(name= 'surfUnifLoad',surfSet=loadedSurf,loadVector=xc.Vector([0,0,-qUnif,0,0,0])) LC1=lcases.LoadCase(preprocessor=prep,name="LC1",loadPType="default",timeSType="constant_ts") LC1.create() LC1.addLstLoads([surfUnifLoad]) modelSpace.addLoadCaseToDomain('LC1') lp=modelSpace.getCurrentLoadPattern() lIter= lp.loads.getNodalLoadIter totalLoad=0 nLoad=lIter.next()
# UPNShape, AUShape, CHSShape # (defined in materials.sections.structural_shapes.arcelor_metric_shapes) columnZsteel_mat = EC3_materials.HEShape(steel=S235JR, name='HE_200_A') columnZsteel_mat.defElasticShearSection3d(prep) beamXsteel_mat = EC3_materials.IPEShape(steel=S235JR, name='IPE_A_300') beamXsteel_mat.defElasticShearSection3d(prep) # ***FE model - MESH*** # IMPORTANT: it's convenient to generate the mesh of surfaces before meshing # the lines, otherwise, sets of shells can take also beam elements touched by # them beamXconcr_mesh = fem.LinSetToMesh(linSet=beamXconcr, matSect=beamXconcr_mat, elemSize=eSize, vDirLAxZ=xc.Vector([0, 1, 0]), elemType='ElasticBeam3d', dimElemSpace=3, coordTransfType='linear') beamY_mesh = fem.LinSetToMesh(linSet=beamY, matSect=beamY_mat, elemSize=eSize, vDirLAxZ=xc.Vector([1, 0, 0]), elemType='ElasticBeam3d', coordTransfType='linear') columnZconcr_mesh = fem.LinSetToMesh(linSet=columnZconcr, matSect=columnZconcr_mat, elemSize=eSize, vDirLAxZ=xc.Vector([1, 0, 0]), elemType='ElasticBeam3d', coordTransfType='linear')
elemSize=eSize) hastiales_mesh = fem.SurfSetToMesh(surfSet=hastiales, matSect=wall_mat, elemType='ShellMITC4', elemSize=eSize) dintel_mesh = fem.SurfSetToMesh(surfSet=dintel, matSect=deck_mat, elemType='ShellMITC4', elemSize=eSize) fem.multi_mesh(preprocessor=prep, lstMeshSets=[losCim_mesh, hastiales_mesh, dintel_mesh]) murete_i_mesh = fem.LinSetToMesh(linSet=murete_i, matSect=muretes_mat, elemSize=eSize, vDirLAxZ=xc.Vector([0, 0, 1]), elemType='ElasticBeam3d', coordTransfType='linear') murete_i_mesh.generateMesh(prep) # mesh this set of lines murete_d_mesh = fem.LinSetToMesh(linSet=murete_d, matSect=muretes_mat, elemSize=eSize, vDirLAxZ=xc.Vector([0, 0, 1]), elemType='ElasticBeam3d', coordTransfType='linear') murete_d_mesh.generateMesh(prep) # mesh this set of lines overallSet = losCim + hastiales + dintel # ***BOUNDARY CONDITIONS*** # Regions resting on springs (Winkler elastic foundation)
#Materials steel=EC3_materials.S235JR steel.gammaM=1.0 steel_prop=tm.MaterialData(name='steel',E=steel.E,nu=steel.nu,rho=steel.rho) column_mat=EC3_materials.HEShape(steel,'HE_140_B') column_mat.defElasticShearSection3d(prep) beam_mat=EC3_materials.UPNShape(steel,'UPN_80') beam_mat.defElasticShearSection3d(prep) diag_mat=EC3_materials.SHSShape(steel,'SHS50x50x2_5') xcDiagSteel=steel.defElasticMaterial(prep) # ***FE model - MESH*** #Meshing #Steel elements: local Z-axis corresponds to weak axis of the steel shape columns_mesh=fem.LinSetToMesh(columns,column_mat,0.25,xc.Vector([1,0,0])) beams_mesh=fem.LinSetToMesh(beams,beam_mat,0.25,xc.Vector([0,0,1])) fem.multi_mesh(prep,[columns_mesh,beams_mesh],sectGeom='Y') #mesh these sets and creates property 'sectionGeometry' for each element) diagonals_mesh=fem.LinSetToMesh(diagonals,xcDiagSteel,100,xc.Vector([1,0,0]),'Truss',3,None) diagonals_mesh.generateMesh(prep) for e in diagonals.getElements: e.sectionArea=diag_mat.A() #Boundary conditions nodBase=sets.get_set_nodes_plane_XY(setName='nodBase', setBusq=columns, zCoord=zGround, tol=0.001) for n in nodBase.nodes: modelSpace.fixNode('000_000',n.tag) # Wind action