Exemplo n.º 1
0
 def getCrossSectionProperties2D(self,material):
   '''Return a CrossSectionProperties object with the
      2D properties of the section.'''
   retval= xc.CrossSectionProperties2d()
   retval.E= material.E
   retval.A= self.A()
   retval.I= self.Iz()
   retval.G= material.G()
   retval.Alpha= self.alphaY()
   return retval
Exemplo n.º 2
0
                  # point on which the load is applied

prueba= xc.ProblemaEF()
preprocessor=  prueba.getPreprocessor
nodes= preprocessor.getNodeLoader
# Problem type
modelSpace= predefined_spaces.StructuralMechanics2D(nodes)
nodes.defaultTag= 1 #First node number.
nodes.newNodeXY(0,0.0)
nodes.newNodeXY(L,0.0)

trfs= preprocessor.getTransfCooLoader
lin= trfs.newLinearCrdTransf2d("lin")

# Materials
caracMecSeccion= xc.CrossSectionProperties2d()
caracMecSeccion.A= A; caracMecSeccion.E= E; caracMecSeccion.G= G;
caracMecSeccion.I= Iz; 
seccion= typical_materials.defElasticSectionFromMechProp2d(preprocessor, "seccion",caracMecSeccion)

# Elements definition
elementos= preprocessor.getElementLoader
elementos.defaultTransformation= "lin"
elementos.defaultMaterial= "seccion"
elementos.defaultTag= 1 #Tag for the next element.
beam2d= elementos.newElement("elastic_beam_2d",xc.ID([1,2]));



coacciones= preprocessor.getConstraintLoader
fix_node_3dof.fixNode000(coacciones,1)
# Load
F = 1.5e3  # Load magnitude (kN)

feProblem = xc.FEProblem()
preprocessor = feProblem.getPreprocessor
nodes = preprocessor.getNodeHandler
# Problem type
modelSpace = predefined_spaces.StructuralMechanics2D(nodes)
nodes.defaultTag = 1  #First node number.
nodes.newNodeXY(0, 0.0)
nodes.newNodeXY(L, 0.0)

lin = modelSpace.newLinearCrdTransf("lin")
# Materials
sectionProperties = xc.CrossSectionProperties2d()
sectionProperties.A = A
sectionProperties.E = E
sectionProperties.G = G
sectionProperties.I = Iz
seccion = typical_materials.defElasticSectionFromMechProp2d(
    preprocessor, "seccion", sectionProperties)

# Elements definition
elements = preprocessor.getElementHandler
elements.defaultTransformation = "lin"
elements.defaultMaterial = "seccion"
elements.defaultTag = 1  #Tag for the next element.
beam2d = elements.newElement("ElasticBeam2d", xc.ID([1, 2]))

modelSpace.fixNode000(1)