Example #1
0
feProblem= xc.FEProblem()
preprocessor=  feProblem.getPreprocessor
nodes= preprocessor.getNodeHandler
# 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)

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
section= typical_materials.defElasticSectionFromMechProp3d(preprocessor, "section",sectionProperties)

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



modelSpace.fixNode000_000(1)

loadHandler= preprocessor.getLoadHandler
lPatterns= loadHandler.getLoadPatterns
#Load modulation.
Example #2
0
nod = nodes.newNodeXYZ(0, 0.0, 0.0)
nod = nodes.newNodeXYZ(L, 0.0, 0.0)

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

# 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]))

# Constraints
coacciones = preprocessor.getConstraintLoader
fix_node_6dof.fixNode6DOF(coacciones, 1)

# Loads definition
cargas = preprocessor.getLoadLoader
casos = cargas.getLoadPatterns
feProblem= xc.FEProblem()
preprocessor=  feProblem.getPreprocessor
nodes= preprocessor.getNodeHandler
# 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)

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

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


modelSpace.fixNode000_000(1)

elem=preprocessor.getElementHandler.getElement(1) #element 1

loadHandler= preprocessor.getLoadHandler
lPatterns= loadHandler.getLoadPatterns