def getMembranePlateMaterials(preprocessor): ''' return a dictionary with the XC materials for shell elements.''' retval = dict() for key in steel_dict: steelType = steel_dict[key] #retval[key]= typical_materials.defElasticMembranePlateSection(preprocessor, 'xc_'+key,steelType.E,steelType.nu,7850.0,h= 0.0) steel3DName = '3Dmat_' + key steel3d = typical_materials.defElasticIsotropic3d(preprocessor, steel3DName, steelType.E, steelType.nu, rho=steelType.rho) retval[steel3DName] = steel3d plateFiberName = 'plateFiber_' + key # Thickness is assigned later for each element. plateFiber = typical_materials.defMembranePlateFiberSection( preprocessor, name=plateFiberName, h=0.0, nDMaterial=steel3d) retval[key] = plateFiber return retval
feProblem = xc.FEProblem() preprocessor = feProblem.getPreprocessor nodes = preprocessor.getNodeHandler modelSpace = predefined_spaces.StructuralMechanics3D(nodes) # Material definition j2plate = typical_materials.defJ2PlateFibre(preprocessor, "j2plate", E, nu, fy=sg_yield, alpha=alpha, rho=7850.0) plateFiber = typical_materials.defMembranePlateFiberSection(preprocessor, name="plateFiber", h=thickness, nDMaterial=j2plate) # Problem geometry # The “bottom-up method” generates the geometry of the system # going from key points (0D) to lines (1D) and areas (2D) # up to volumes (3D). p1 = modelSpace.newKPoint(0.0, width / 2) p2 = modelSpace.newKPoint(L, width / 2) p3 = modelSpace.newKPoint(L, -width / 2) p4 = modelSpace.newKPoint(0.0, -width / 2.0) s = modelSpace.newSurface([p1, p2, p3, p4]) s.setElemSizeIJ(L / 70, width / 10) #s.nDivI= 50 # Number of divisions on p1->p2 and p3->p4
gridGeom = gm.GridModel(prep, rList, angList, zList, xCentCoo=0, yCentCoo=0) gridGeom.generateCylZPoints() ring = gridGeom.genSurfOneXYZRegion([(r1, 0, 0), (r2, angList[-1], 0)], setName='ring', closeCyl='Y') #out=outHndl.OutputHandler(modelSpace) #out.displayBlocks() steel = tm.defElasticIsotropic3d(preprocessor=preprocessor, name='steel', E=172e9, nu=0.3, rho=matRho) ring_mat = tm.defMembranePlateFiberSection(preprocessor, name='ring_mat', h=t, nDMaterial=steel) ring_mesh = fem.SurfSetToMesh(surfSet=ring, matSect=ring_mat, elemSize=0.5, elemType='ShellMITC4') fem.multi_mesh(prep, [ring_mesh]) # Constraints xcTotalSet = modelSpace.getTotalSet() constrainedNodes = list() for n in xcTotalSet.nodes: modelSpace.fixNode000_FFF(n.tag) constrainedNodes.append(n) #out.displayFEMesh()
# Problem type feProblem = xc.FEProblem() preprocessor = feProblem.getPreprocessor nodes = preprocessor.getNodeHandler modelSpace = predefined_spaces.StructuralMechanics3D(nodes) # Material definition elast3d = typical_materials.defElasticIsotropic3d(preprocessor, "elast3d", E, nu, rho=7850.0) plateFiber = typical_materials.defMembranePlateFiberSection(preprocessor, name="plateFiber", h=t, nDMaterial=elast3d) # Problem geometry # The “bottom-up method” generates the geometry of the system # going from key points (0D) to lines (1D) and areas (2D) # up to volumes (3D). n1 = nodes.newNodeXYZ(0, 0, 0) n2 = nodes.newNodeXYZ(2, 0, 0) n3 = nodes.newNodeXYZ(2, 1, 1) n4 = nodes.newNodeXYZ(0, 1, 1) # Meshing ## Define element
feProblem = xc.FEProblem() preprocessor = feProblem.getPreprocessor nodes = preprocessor.getNodeHandler modelSpace = predefined_spaces.StructuralMechanics3D(nodes) nodes.defaultTag = 1 # First node number. nod1 = nodes.newNodeXYZ(0.0, 0.0, 0.0) nod2 = nodes.newNodeXYZ(L, 0.0, 0.0) nod3 = nodes.newNodeXYZ(L, h, 0.0) nod4 = nodes.newNodeXYZ(0, h, 0.0) # Materials definition ndMat = typical_materials.defElasticIsotropic3d(preprocessor, "elastIso3d", E, 0.3, 0.0) memb1 = typical_materials.defMembranePlateFiberSection(preprocessor, name='memb1', h=h, nDMaterial=ndMat) # Elements definition elements = preprocessor.getElementHandler elements.defaultMaterial = memb1.name elem1 = elements.newElement("ShellMITC4", xc.ID([nod1.tag, nod2.tag, nod3.tag, nod4.tag])) # Constraints constraints = preprocessor.getBoundaryCondHandler spc = constraints.newSPConstraint(nod1.tag, 0, 0.0) spc = constraints.newSPConstraint(nod2.tag, 0, 0.0) spc = constraints.newSPConstraint(nod3.tag, 0, 0.0) spc = constraints.newSPConstraint(nod4.tag, 0, 0.0)
L= 1.0 # Size of plate edge (m) E= 2.1e6*9.81/1e-4 # Elastic modulus nu= 0.3 alpha= 1.2e-5 # Thermal expansion coefficient of the steel AT= 400.0 # Temperature increment (Celsius degrees) h= 0.2 A= L*h feProblem= xc.FEProblem() preprocessor= feProblem.getPreprocessor nodes= preprocessor.getNodeHandler modelSpace= predefined_spaces.StructuralMechanics3D(nodes) # Materials definition steel= typical_materials.defJ2PlateFibre(preprocessor=preprocessor, name='steel', E= E, nu= nu, fy=250e6,alpha=1e-6,rho= 0.0) memb1= typical_materials.defMembranePlateFiberSection(preprocessor,name='ring_mat',h= h ,nDMaterial= steel) # Seed element definition seedElemHandler= preprocessor.getElementHandler.seedElemHandler seedElemHandler.defaultMaterial= memb1.name elem= seedElemHandler.newElement("ShellNLDKGQ",xc.ID([0,0,0,0])) # Block topology (ne-quarter of the plate) L_2= L/2.0 points= preprocessor.getMultiBlockTopology.getPoints pt1= points.newPntFromPos3d(geom.Pos3d(0.0,0.0,0.0)) pt2= points.newPntFromPos3d(geom.Pos3d(L_2,0.0,0.0)) pt3= points.newPntFromPos3d(geom.Pos3d(L_2,L_2,0.0)) pt4= points.newPntFromPos3d(geom.Pos3d(0.0,L_2,0.0)) surfaces= preprocessor.getMultiBlockTopology.getSurfaces s1= surfaces.newQuadSurfacePts(pt1.tag, pt2.tag, pt3.tag, pt4.tag)