Exemplo n.º 1
0
__email__ = "*****@*****.**"

NumDiv = 2
R = 2.0
cos225 = math.cos(math.radians(22.5))
sin225 = math.sin(math.radians(22.5))
cos45 = math.cos(math.radians(45))
sin45 = cos45
cos675 = math.cos(math.radians(67.5))
sin675 = math.sin(math.radians(67.5))

# Problem type
feProblem = xc.FEProblem()
preprocessor = feProblem.getPreprocessor
nodes = preprocessor.getNodeHandler
modelSpace = predefined_spaces.SolidMechanics3D(nodes)
# Define materials
elast = typical_materials.defElasticMaterial(preprocessor, "elast", 3000)

seedElemHandler = preprocessor.getElementHandler.seedElemHandler
seedElemHandler.defaultMaterial = elast.name
seedElemHandler.dimElem = 3  # Dimension of element space
seedElemHandler.defaultTag = 1  #Tag for the next element.
truss = seedElemHandler.newElement("Truss", xc.ID([0, 0]))
truss.sectionArea = 10.0
points = preprocessor.getMultiBlockTopology.getPoints
pt = points.newPntIDPos3d(1, geom.Pos3d(R, 0.0, 0.0))
pt = points.newPntIDPos3d(2, geom.Pos3d(R * cos225, R * sin225, 0.0))
pt = points.newPntIDPos3d(3, geom.Pos3d((R * cos45), (R * sin45), 0.0))
pt = points.newPntIDPos3d(4, geom.Pos3d((R * cos675), (R * sin675), 0.0))
pt = points.newPntIDPos3d(5, geom.Pos3d(0.0, R, 0.0))
Exemplo n.º 2
0
E = 2.1e11  #Young modulus [Pa]
l = 1  #lenght of cables [m]
areaStrut = 1e-4  #cros-section area of struts [m2]
areaCable = 1e-4  #cros-section area of cables [m2]
#sigmaPret=1e-5  #must be >0
sigmaPret = 420e6  #prestressing stress in cables [Pa]

# Model definition
FEcase = xc.FEProblem()
preprocessor = FEcase.getPreprocessor
nodes = preprocessor.getNodeHandler
elements = preprocessor.getElementHandler

# Problem type
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,