sigmaPret = E * 0.00543228 # Prestressing force (pounds) area = 0.00306796 # Area de la sección in inches cuadradas Mass = 0.00073 * area # Masa por unidad de longitud. MassNod = Mass * (l / NumDiv) # Masa por unidad de longitud. fPret = sigmaPret * area # Prestressing force (pounds) # Model definition prueba = xc.ProblemaEF() preprocessor = prueba.getPreprocessor nodes = preprocessor.getNodeLoader # Problem type modelSpace = predefined_spaces.StructuralMechanics2D(nodes) nodes.newSeedNode() # Materials definition typical_materials.defCableMaterial(preprocessor, "cable", E, sigmaPret, Mass) ''' Se definen nodos en los puntos de aplicación de la carga. Puesto que no se van a determinar tensiones se emplea una sección arbitraria de área unidad ''' # Definimos elemento semilla seedElemLoader = preprocessor.getElementLoader.seedElemLoader seedElemLoader.defaultMaterial = "cable" seedElemLoader.dimElem = 2 seedElemLoader.defaultTag = 1 #Tag for the next element. truss = seedElemLoader.newElement("corot_truss", xc.ID([0, 0])) truss.area = area # fin de la definición del elemento semilla puntos = preprocessor.getCad.getPoints pt = puntos.newPntIDPos3d(1, geom.Pos3d(0.0, 0.0, 0.0))
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, prestress=fpi, rho=0.0) #Meshing for l in tendonSet.getLines: l.nDiv = nDivLines tendon_mesh = fem.LinSetToMesh(linSet=tendonSet, matSect=prestressingSteel, elemSize=None, vDirLAxZ=xc.Vector([1, 0, 0]), elemType='Truss', dimElemSpace=3, coordTransfType=None) tendon_mesh.generateMesh(prep) for e in tendonSet.getElements:
nod10= nodes.newNodeXYZ(+3,-1,-1) nod11= nodes.newNodeXYZ(+1,-3,-1) nod12= nodes.newNodeXYZ(+1,-1,-3) # #Sections definition # from materials.sections import section_properties # strutSect=section_properties.CircularSection(name='strutSect',Rext=strutRext,Rint=strutRint) #Materials definition from materials import typical_materials from materials import typical_materials #struts material strutMat=typical_materials.defElasticMaterial(preprocessor=prep, name="strutMat",E=Estruts) #cables materials diagCableMat=typical_materials.defCableMaterial(preprocessor=prep,name='diagCableMat',E=EdiagCable,prestress=sigmaPrestrDiagCable,rho=rhoDiagCable) # Elements definition elements.defaultMaterial='diagCableMat' elements.defaultTag= 1 elements.dimElem= 3 diag1= elements.newElement("CorotTruss",xc.ID([1,2])) diag1.area= diagArea diag2= elements.newElement("CorotTruss",xc.ID([2,3])) diag2.area= diagArea diag3= elements.newElement("CorotTruss",xc.ID([1,3])) diag3.area= diagArea diag4= elements.newElement("CorotTruss",xc.ID([4,5])) diag4.area= diagArea
fPret = sigmaPret * area # Force magnitude de tesado final fPretA = fPret / 2 # Force magnitude de tesado parcial # Model definition feProblem = xc.FEProblem() preprocessor = feProblem.getPreprocessor nodes = preprocessor.getNodeHandler # Problem type modelSpace = predefined_spaces.SolidMechanics2D(nodes) nodes.defaultTag = 1 #First node number. nod = nodes.newNodeXY(0, 0) nod = nodes.newNodeXY(l, 0.0) # Materials definition cable = typical_materials.defCableMaterial(preprocessor, "cable", E, sigmaPretA, 0.0) ''' We define nodes at the points where loads will be applied. We will not compute stresses so we can use an arbitrary cross section of unit area.''' # Elements definition elements = preprocessor.getElementHandler elements.defaultMaterial = cable.name elements.dimElem = 2 # Dimension of element space # sintaxis: truss[<tag>] elements.defaultTag = 1 #Tag for the next element. truss = elements.newElement("Truss", xc.ID([1, 2])) truss.sectionArea = area # Constraints constraints = preprocessor.getBoundaryCondHandler
fPretA= fPret/2 # Force magnitude de tesado parcial # Model definition feProblem= xc.FEProblem() preprocessor= feProblem.getPreprocessor nodes= preprocessor.getNodeHandler # Problem type modelSpace= predefined_spaces.SolidMechanics2D(nodes) nodes.defaultTag= 1 #First node number. nod= nodes.newNodeXY(0,0) nod= nodes.newNodeXY(l,0.0) # Materials definition mat= typical_materials.defCableMaterial(preprocessor, "cable",E,sigmaPretA,0.0) ''' We define nodes at the points where loads will be applied. We will not compute stresses so we can use an arbitrary cross section of unit area.''' # Elements definition elements= preprocessor.getElementHandler elements.defaultMaterial= "cable" elements.dimElem= 2 # Dimension of element space # sintaxis: truss[<tag>] elements.defaultTag= 1 #Tag for the next element. truss= elements.newElement("Truss",xc.ID([1,2])) truss.area= area
# 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 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
modelSpace = predefined_spaces.SolidMechanics3D( nodes) #Defines the dimension of #the space: nodes by three coordinates (x,y,z) and #three DOF for each node (Ux,Uy,Uz) # Model definition nodes.defaultTag = 1 #First node number. nod1 = nodes.newNodeXYZ(0, 0, 0) #node 1 nod2 = nodes.newNodeXYZ(l, 0, 0) #node 2 nod3 = nodes.newNodeXYZ(0, l, 0) nod4 = nodes.newNodeXYZ(l, l, 0) # Materials definition cable = typical_materials.defCableMaterial(preprocessor, name="cable", E=E, prestress=sigmaPret, rho=0.0) #uniaxial bilinear prestressed material. The stress strain ranges #from slack (large strain at zero stress) to taught #(linear with modulus E). #rho= effective self weight (gravity component of weight per # volume transverse to the cable) strutMat = typical_materials.defElasticMaterial( preprocessor, name="strutMat", E=E) #elastic uniaxial material # Elements definition elements.defaultMaterial = "cable" elements.defaultTag = 1 #First element number. elements.dimElem = 3 ctruss1 = elements.newElement("CorotTruss", xc.ID([1, 2]))
area= 0.00306796 # Section area in square inches. Mass= 0.00073*area # Mass per unit length. MassNod= Mass*(l/NumDiv) # Mass per unit length. fPret= sigmaPret*area # Prestressing force (pounds) # Model definition feProblem= xc.FEProblem() preprocessor= feProblem.getPreprocessor nodes= preprocessor.getNodeHandler # Problem type modelSpace= predefined_spaces.StructuralMechanics2D(nodes) nodes.newSeedNode() # Materials definition typical_materials.defCableMaterial(preprocessor, "cable",E,sigmaPret,Mass) ''' We define nodes at the points where loads will be applied. We will not compute stresses so we can use an arbitrary cross section of unit area.''' # Seed element definition seedElemHandler= preprocessor.getElementHandler.seedElemHandler seedElemHandler.defaultMaterial= "cable" seedElemHandler.dimElem= 2 # Dimension of element space seedElemHandler.defaultTag= 1 #Tag for the next element. truss= seedElemHandler.newElement("CorotTruss",xc.ID([0,0])) truss.area= area # seed element definition ends points= preprocessor.getMultiBlockTopology.getPoints
nodes= prep.getNodeHandler modelSpace= predefined_spaces.StructuralMechanics3D(nodes) #Exact parabola from model.geometry import geom_utils a,b,c=geom_utils.fit_parabola(x=np.array([0,lBeam/2.0,lBeam]), y=np.array([eEnds,eMidspan,eEnds])) x_parab_rough,y_parab_rough,z_parab_rough=geom_utils.eq_points_parabola(0,lBeam,n_points_rough,a,b,c,angl_Parab_XZ) #Tendon definition, layout and friction losses tendon=presconc.PrestressTendon([]) tendon.roughCoordMtr=np.array([x_parab_rough,y_parab_rough,z_parab_rough]) #Interpolated 3D spline tendon.pntsInterpTendon(n_points_fine,smoothness=1,kgrade=3) #Material prestressingSteel= tm.defCableMaterial(preprocessor=prep, name="prestressingSteel",E=Ep,prestress=0.0,rho=0.0) tendon.creaTendonElements(preprocessor=prep,materialName="prestressingSteel",elemTypeName='Truss',crdTransfName=None,areaTendon=Aps,setName='tendonSet') # Losses of prestressing due to friction lssFrict=tendon.getLossFriction(coefFric=mu,k=k,sigmaP0_extr1=fpi,sigmaP0_extr2=0.0) tendon.applyStressToElems(stressMtr=tendon.stressAfterLossFriction) # Losses of prestressing due to anchorage slip (loss due to friction must be # previously calculated lssAnch=tendon.getLossAnchor(Ep=Ep,anc_slip_extr1=deltaL,anc_slip_extr2=0.0) tendon.applyStressLossToElems(stressLossMtr=lssAnch) stressAfterLossAnch=tendon.stressAfterLossFriction-lssAnch #loss in nodes of tendon # check lstMat=[e.getMaterial() for e in tendon.lstOrderedElems] lstStress=[m.getStress() for m in lstMat]
# 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 from materials import typical_materials cabl_mat = typical_materials.defCableMaterial(prep, name="cabl_mat", E=Ecabl, prestress=sigmaPret, 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