Пример #1
0
# Load
f = 1.5e3  # Load magnitude (kN/m)

# Problem type
feProblem = xc.FEProblem()
preprocessor = feProblem.getPreprocessor
nodes = preprocessor.getNodeLoader
modelSpace = predefined_spaces.StructuralMechanics3D(nodes)
nodes.defaultTag = 1  #First node number.
nod = nodes.newNodeXYZ(0, 0.0, 0.0)
nod = nodes.newNodeXYZ(L, 0.0, 0.0)

# Geometric transformation(s)
lin = modelSpace.newLinearCrdTransf("lin", xc.Vector([0, -1, 0]))
# Materials
sectionProperties = xc.CrossSectionProperties3d()
sectionProperties.A = A
sectionProperties.E = E
sectionProperties.G = G
sectionProperties.Iz = Iz
sectionProperties.Iy = Iy
sectionProperties.J = J
seccion = typical_materials.defElasticSectionFromMechProp3d(
    preprocessor, "seccion", sectionProperties)

# Elements definition
elements = preprocessor.getElementLoader
elements.defaultTransformation = "lin"
elements.defaultMaterial = "seccion"
elements.defaultTag = 1  #Tag for the next element.
beam3d = elements.newElement("ElasticBeam3d", xc.ID([1, 2]))
Пример #2
0
prueba = xc.ProblemaEF()
preprocessor = prueba.getPreprocessor
nodes = preprocessor.getNodeLoader
# Problem type
modelSpace = predefined_spaces.StructuralMechanics3D(nodes)
nodes.defaultTag = 1  #First node number.
nodes.newNodeXYZ(0, 0.0, 0.0)
nodes.newNodeXYZ(L, 0.0, 0.0)

trfs = preprocessor.getTransfCooLoader
lin = trfs.newLinearCrdTransf3d("lin")
lin.xzVector = xc.Vector([0, 0, 1])

# Materials
caracMecSeccion = xc.CrossSectionProperties3d()
caracMecSeccion.A = A
caracMecSeccion.E = E
caracMecSeccion.G = G
caracMecSeccion.Iz = Iz
caracMecSeccion.Iy = Iy
caracMecSeccion.J = J
seccion = typical_materials.defElasticSectionFromMechProp3d(
    preprocessor, "seccion", caracMecSeccion)

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