n = 1e6 # Axial uniform load. feProblem = xc.FEProblem() preprocessor = feProblem.getPreprocessor nodes = preprocessor.getNodeHandler sectionTest = section_properties.RectangularSection("sectionTest", b=.20, h=.30) # Section geometry. sectionTestMaterial = typical_materials.MaterialData( "sectionTestMaterial", E=7E9, nu=0.3, rho=2500) # Section material. # Problem type modelSpace = predefined_spaces.StructuralMechanics3D(nodes) # Definimos el material defSeccAggregation.defSeccAggregation3d(preprocessor, sectionTest, sectionTestMaterial) nodes.defaultTag = 1 #First node number. nod = nodes.newNodeXYZ(0, 0, 0) nod = nodes.newNodeXYZ(L / 2, 0, 0) nod = nodes.newNodeXYZ(L, 0, 0) # Geometric transformations lin = modelSpace.newLinearCrdTransf("lin", xc.Vector([0, 0, 1])) # Elements definition elements = preprocessor.getElementHandler elements.defaultTransformation = "lin" elements.defaultMaterial = sectionTest.sectionName elements.numSections = 3 # Number of sections along the element. elements.defaultTag = 1 beam3d1 = elements.newElement("ForceBeamColumn3d", xc.ID([1, 2])) beam3d2 = elements.newElement("ForceBeamColumn3d", xc.ID([2, 3]))
feProblem = xc.FEProblem() preprocessor = feProblem.getPreprocessor nodes = preprocessor.getNodeHandler seccTest = section_properties.RectangularSection("test", b=.20, h=.30) # Section geometry. matSeccTest = typical_materials.MaterialData("mattest", E=7E9, nu=0.3, rho=2500) # Section material. # Problem type modelSpace = predefined_spaces.StructuralMechanics3D(nodes) # Definimos el material defSeccAggregation.defSeccAggregation3d(preprocessor, seccTest, matSeccTest) nodes.defaultTag = 1 #First node number. nod = nodes.newNodeXYZ(0, 0, 0) nod = nodes.newNodeXYZ(L, 0, 0) # Geometric transformations lin = modelSpace.newLinearCrdTransf("lin", xc.Vector([0, 0, 1])) # Elements definition elements = preprocessor.getElementHandler elements.defaultTransformation = "lin" elements.defaultMaterial = seccTest.sectionName elements.numSections = 3 # Number of sections along the element. elements.defaultTag = 1 beam3d = elements.newElement("ForceBeamColumn3d", xc.ID([1, 2])) # Constraints
P= 10e3 # Carga uniforme transversal. n= 1e6 # Carga uniforme axial. feProblem= xc.FEProblem() preprocessor= feProblem.getPreprocessor nodes= preprocessor.getNodeHandler sectionTest= section_properties.RectangularSection("sectionTest",b=.20,h=.30) # Section geometry. sectionTestMaterial= typical_materials.MaterialData("sectionTestMaterial",E=7E9,nu=0.3,rho=2500) # Section material. # Problem type modelSpace= predefined_spaces.StructuralMechanics3D(nodes) # Definimos el material defSeccAggregation.defSeccAggregation3d(preprocessor, sectionTest,sectionTestMaterial) nodes.defaultTag= 1 #First node number. nod= nodes.newNodeXYZ(0,0,0) nod= nodes.newNodeXYZ(L/2,0,0) nod= nodes.newNodeXYZ(L,0,0) # Geometric transformations lin= modelSpace.newLinearCrdTransf("lin",xc.Vector([0,0,1])) # Elements definition elements= preprocessor.getElementHandler elements.defaultTransformation= "lin" elements.defaultMaterial= sectionTest.sectionName elements.numSections= 3 # Number of sections along the element. elements.defaultTag= 1 beam3d1= elements.newElement("ForceBeamColumn3d",xc.ID([1,2])) beam3d2= elements.newElement("ForceBeamColumn3d",xc.ID([2,3]))
L= 2 # Bar length. P= 10e3 # Carga uniforme transversal. n= 1e6 # Carga uniforme axial. feProblem= xc.FEProblem() preprocessor= feProblem.getPreprocessor nodes= preprocessor.getNodeHandler seccTest= section_properties.RectangularSection("test",b=.20,h=.30) # Section geometry. matSeccTest= typical_materials.MaterialData("mattest",E=7E9,nu=0.3,rho=2500) # Section material. # Problem type modelSpace= predefined_spaces.StructuralMechanics3D(nodes) # Definimos el material defSeccAggregation.defSeccAggregation3d(preprocessor, seccTest,matSeccTest) nodes.defaultTag= 1 #First node number. nod= nodes.newNodeXYZ(0,0,0) nod= nodes.newNodeXYZ(L,0,0) # Geometric transformations lin= modelSpace.newLinearCrdTransf("lin",xc.Vector([0,0,1])) # Elements definition elements= preprocessor.getElementHandler elements.defaultTransformation= "lin" elements.defaultMaterial= seccTest.sectionName elements.numSections= 3 # Number of sections along the element. elements.defaultTag= 1 beam3d= elements.newElement("ForceBeamColumn3d",xc.ID([1,2])) # Constraints