from part import * from material import * from section import * from assembly import * from step import * from interaction import * from load import * from mesh import * from job import * from sketch import * from visualization import * ##################define variables########################### d =6.300 tI =1.460 tII=2.000 l=60.000 b=75.000 A=20.000 a=5.000 la=2 F=2000 v=3 AnzahlNodesArea=20 AnzahlNodesBias=20 Bias=5 ElementHöheBlech=10 SizeBlech=1.6 SizeSchraube=0.45 numCPUS=2 Job=1 #######################parts################################# m=mdb.Model(name='Lochleibung') del mdb.models['Model-1'] m.Sketch(name='__profile__', sheetSize=200.0) m.sketches['__profile__'].Line(point1=(A-d/2, 0), point2=(0,0)) m.sketches['__profile__'].Line(point1=(0,0), point2=(0,b/2)) m.sketches['__profile__'].Line(point1=(0,b/2), point2=(l,b/2)) m.sketches['__profile__'].Line(point1=(l,b/2), point2=(l,0)) m.sketches['__profile__'].Line(point1=(l,0), point2=(A+d/2,0)) m.sketches['__profile__'].ArcByCenterEnds(center=(A,0), direction=CLOCKWISE, point1=(A-d/2, 0), point2=(A+d/2, 0)) BTI=m.Part(dimensionality=THREE_D, name='BTI', type=DEFORMABLE_BODY) BTI.BaseSolidExtrude(depth=tI, sketch=m.sketches['__profile__']) del m.sketches['__profile__'] m.Sketch(name='__profile__', sheetSize=200.0) m.sketches['__profile__'].Line(point1=(A-d/2, 0), point2=(2*A-l,0)) m.sketches['__profile__'].Line(point1=(2*A-l,0), point2=(2*A-l,b/2)) m.sketches['__profile__'].Line(point1=(2*A-l,b/2), point2=(2*A,b/2)) m.sketches['__profile__'].Line(point1=(2*A,b/2), point2=(2*A,0)) m.sketches['__profile__'].Line(point1=(2*A,0), point2=(A+d/2,0)) m.sketches['__profile__'].ArcByCenterEnds(center=(A,0), direction=CLOCKWISE, point1=(A-d/2, 0), point2=(A+d/2, 0)) BTII=m.Part(dimensionality=THREE_D, name='BTII', type=DEFORMABLE_BODY) BTII.BaseSolidExtrude(depth=tII, sketch=m.sketches['__profile__']) del m.sketches['__profile__'] m.Sketch(name='__profile__', sheetSize=200.0) m.sketches['__profile__'].ObliqueConstructionLine(point1=(0.0, -100.0), point2=(0.0, 100.0)) m.sketches['__profile__'].Line(point1=(0.0, 0.0),point2=(d/2.0, 0.0)) m.sketches['__profile__'].Line(point1=(d/2.0, 0),point2=(d/2, (tI+tII))) m.sketches['__profile__'].Line(point1=(d/2, (tI+tII)),point2=(0, tI+tII)) m.sketches['__profile__'].Line(point1=(0.0, tI+tII),point2=(0.0, 0.0)) S=m.Part(dimensionality=THREE_D, name='Schraube', type=DEFORMABLE_BODY) S.BaseSolidRevolve(angle=180.0,flipRevolveDirection=OFF, sketch=m.sketches['__profile__']) del m.sketches['__profile__'] m.parts['Schraube'].ReferencePoint(point= m.parts['Schraube'].InterestingPoint( m.parts['Schraube'].edges[8], MIDDLE)) ####################material properties############################# m.Material(name='Aluminium') m.Material(name='Stahl') m.materials['Aluminium'].Elastic(table=((70000.0,0.33),)) m.materials['Stahl'].Elastic(table=((210000.0,0.2),)) m.materials['Aluminium'].Plastic(table=((180, 0.0), (220, 0.02), (273, 0.05), (200, 0.1), )) m.materials['Stahl'].Plastic(table=( (494.46, 0.0), (494.46, 0.0006667), (494.46, 0.0028889), (494.46, 0.005111), (494.46, 0.00733), (528.884, 0.012), (604.26, 0.051839), (659.167, 0.0921), (709.752, 0.147), (805.29, 0.372), (1006.7, 1.2), (1211.01, 1.477),)) m.HomogeneousSolidSection(material='Aluminium', name='Bleche', thickness=1.0) m.HomogeneousSolidSection(material='Stahl', name='Schraube', thickness=1.0) BTI.SectionAssignment(region=Region(cells=BTI.cells[0:1]), sectionName='Bleche') BTII.SectionAssignment(region=Region(cells=BTII.cells[0:1]), sectionName='Bleche') S.SectionAssignment(region=Region(cells=S.cells[0:1]), sectionName='Schraube') ##############Assembly################## m.rootAssembly.DatumCsysByDefault(CARTESIAN) IBTI=m.rootAssembly.Instance(dependent=OFF, name='BTI-1', part=BTI) IBTII=m.rootAssembly.Instance(dependent=OFF, name='BTII-1', part=BTII) IS=m.rootAssembly.Instance(dependent=OFF, name='Schraube-1', part=S) m.rootAssembly.EdgeToEdge(fixedAxis=IBTI.edges[2], flip=ON, movableAxis=IBTII.edges[0]) m.rootAssembly.Coaxial(fixedAxis=IBTI.faces[5], flip=OFF, movableAxis=IS.faces[1]) m.rootAssembly.FaceToFace(clearance=0.0, fixedPlane=IBTI.faces[6], flip=OFF, movablePlane=IS.faces[2]) #########################step######################### m.StaticStep(description='Contact', initialInc=0.1,name='Contact', nlgeom=ON, previous='Initial') m.StaticStep(description='Belastung', initialInc=0.1,name='Belastung', previous='Contact') m.FieldOutputRequest(createStepName='Belastung', name='F-Output-2', variables=PRESELECT) m.HistoryOutputRequest(createStepName='Belastung', name='H-Output-2', variables=PRESELECT) m.steps['Contact'].Monitor(dof=1, frequency=1, node=Region(vertices=IBTI.vertices[8:9])) #####################Interaction########################## #####################create surfaces###################### mdb.models['Lochleibung'].rootAssembly.Surface(name='BTI-BTII', side1Faces= mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].faces[7:8]) mdb.models['Lochleibung'].rootAssembly.Surface(name='BTII-BTI', side1Faces= mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].faces[6:7]) mdb.models['Lochleibung'].rootAssembly.Surface(name='BT-S', side1Faces= mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].faces[5:6]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].faces[5:6]) mdb.models['Lochleibung'].rootAssembly.Surface(name='S-BT', side1Faces= mdb.models['Lochleibung'].rootAssembly.instances['Schraube-1'].faces[1:2]) mdb.models['Lochleibung'].ContactProperty('BT-BT') mdb.models['Lochleibung'].interactionProperties['BT-BT'].TangentialBehavior( formulation=FRICTIONLESS) mdb.models['Lochleibung'].ContactProperty('BT-S') mdb.models['Lochleibung'].interactionProperties['BT-S'].TangentialBehavior( formulation=FRICTIONLESS) mdb.models['Lochleibung'].SurfaceToSurfaceContactStd(adjustMethod=NONE, createStepName='Initial', enforcement=SURFACE_TO_SURFACE, interactionProperty='BT-BT', master= mdb.models['Lochleibung'].rootAssembly.surfaces['BTI-BTII'], name='BT-BT', slave=mdb.models['Lochleibung'].rootAssembly.surfaces['BTII-BTI'], sliding= SMALL, thickness=ON) mdb.models['Lochleibung'].SurfaceToSurfaceContactStd(adjustMethod=NONE, createStepName='Initial', enforcement=SURFACE_TO_SURFACE, interactionProperty='BT-S', master= mdb.models['Lochleibung'].rootAssembly.surfaces['S-BT'], name='BT-S', slave=mdb.models['Lochleibung'].rootAssembly.surfaces['BT-S'], sliding= SMALL, thickness=ON) mdb.models['Lochleibung'].Coupling(controlPoint=Region(referencePoints=( mdb.models['Lochleibung'].rootAssembly.instances['Schraube-1'].referencePoints[2], )), couplingType=DISTRIBUTING, influenceRadius=WHOLE_SURFACE, localCsys=None, name='Constraint-1', surface=Region( side1Faces=mdb.models['Lochleibung'].rootAssembly.instances['Schraube-1'].faces[3:5]) , u1=ON, u2=ON, u3=ON, ur1=ON, ur2=ON, ur3=ON) ########################load######################### ##################constraints################### mdb.models['Lochleibung'].DisplacementBC(amplitude=UNSET, createStepName= 'Initial', distribution=UNIFORM, localCsys=None, name='Festlager BTII', region=Region( faces=mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].faces[1:2]) , u1=SET, u2=SET, u3=SET, ur1=UNSET, ur2=UNSET, ur3=UNSET) mdb.models['Lochleibung'].DisplacementBC(amplitude=UNSET, createStepName= 'Initial', distribution=UNIFORM, localCsys=None, name='Verschiebung BTI', region=Region( faces=mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].faces[3:4]) , u1=SET, u2=SET, u3=SET, ur1=UNSET, ur2=UNSET, ur3=UNSET) mdb.models['Lochleibung'].boundaryConditions['Verschiebung BTI'].setValuesInStep( stepName='Belastung', u1=3.0) mdb.models['Lochleibung'].DisplacementBC(amplitude=UNSET, createStepName= 'Belastung', distribution=UNIFORM, fixed=OFF, localCsys=None, name= 'Drehlager S', region=Region(referencePoints=( mdb.models['Lochleibung'].rootAssembly.instances['Schraube-1'].referencePoints[2], )), u1=0.0, u2=0.0, u3=0.0, ur1=UNSET, ur2=UNSET, ur3=UNSET) mdb.models['Lochleibung'].boundaryConditions['Drehlager S'].move('Belastung', 'Contact') mdb.models['Lochleibung'].boundaryConditions['Drehlager S'].move('Contact', 'Initial') mdb.models['Lochleibung'].boundaryConditions['Drehlager S'].setValuesInStep( stepName='Belastung', u1=FREED, ur1=0.0, ur3=0.0) mdb.models['Lochleibung'].boundaryConditions['Drehlager S'].setValues(ur1=SET, ur2=SET, ur3=SET) mdb.models['Lochleibung'].boundaryConditions['Drehlager S'].setValuesInStep( stepName='Belastung', ur2=FREED) #######################partitioning############################ mdb.models['Lochleibung'].rootAssembly.PartitionCellByPlaneThreePoints(cells= mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].cells[0:1]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].cells[0:1]+\ mdb.models['Lochleibung'].rootAssembly.instances['Schraube-1'].cells[0:1], point1= mdb.models['Lochleibung'].rootAssembly.instances['Schraube-1'].vertices[0], point2= mdb.models['Lochleibung'].rootAssembly.instances['Schraube-1'].vertices[5], point3= mdb.models['Lochleibung'].rootAssembly.instances['Schraube-1'].InterestingPoint( mdb.models['Lochleibung'].rootAssembly.instances['Schraube-1'].edges[4], MIDDLE)) m.Sketch(gridSpacing=2.0, name='__profile__', sheetSize=80.0, transform=m.rootAssembly.MakeSketchTransform( sketchPlane=IBTI.faces[11], sketchPlaneSide=SIDE1, sketchUpEdge=IBTI.edges[6],sketchOrientation=RIGHT, origin=(A,0,tI))) m.rootAssembly.projectReferencesOntoSketch(filter=COPLANAR_EDGES, sketch=m.sketches['__profile__']) m.sketches['__profile__'].rectangle(point1=(-d/2-a,0), point2=(d/2+a, d/2+a)) m.rootAssembly.PartitionCellBySketch(cells=IBTI.cells[0:2], sketch=m.sketches['__profile__'], sketchPlane=IBTI.faces[11], sketchUpEdge=IBTI.edges[6]) del m.sketches['__profile__'] m.Sketch(gridSpacing=2.0, name='__profile__',sheetSize=80.0, transform=m.rootAssembly.MakeSketchTransform( sketchPlane=IBTI.faces[13], sketchPlaneSide=SIDE1, sketchUpEdge=IBTI.edges[14],sketchOrientation=RIGHT, origin=(A, 0, tI))) m.rootAssembly.projectReferencesOntoSketch(filter=COPLANAR_EDGES, sketch=m.sketches['__profile__']) m.sketches['__profile__'].Line(point1=(-d/2-a, b/2),point2=(-d/2-a, d/2+a)) m.sketches['__profile__'].Line(point1=(-d/2-a, d/2+a), point2=(d/2+a, d/2+a)) m.sketches['__profile__'].Line(point1=(d/2+a, d/2+a), point2=(d/2+a, b/2)) m.sketches['__profile__'].Line(point1=(d/2+a, b/2), point2=(-d/2-a, b/2)) m.sketches['__profile__'].constraintReferences(vertex1= m.sketches['__profile__'].referenceVertices.findAt((-A, 0), 1)) m.rootAssembly.PartitionCellBySketch(cells=IBTI.cells[0:2], sketch=m.sketches['__profile__'], sketchPlane=IBTI.faces[13], sketchUpEdge=IBTI.edges[14]) del m.sketches['__profile__'] mdb.models['Lochleibung'].rootAssembly.PartitionCellByExtrudeEdge(cells= mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].cells[0:2]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].cells[0:2], edges=(mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[1], mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[5], mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[9], mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[13]), line= mdb.models['Lochleibung'].rootAssembly.datums[1].axis3, sense=REVERSE) mdb.models['Lochleibung'].rootAssembly.PartitionCellByExtrudeEdge(cells= mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].cells[2:4]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].cells[1:2]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].cells[3:4], edges=(mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[9], mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[12], mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[26], mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[28]), line= mdb.models['Lochleibung'].rootAssembly.datums[1].axis3, sense=REVERSE) mdb.models['Lochleibung'].rootAssembly.PartitionCellByPlaneThreePoints(cells= mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].cells[2:3]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].cells[2:3], point1= mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].InterestingPoint( mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].edges[48], CENTER), point2= mdb.models['Lochleibung'].rootAssembly.instances['Schraube-1'].vertices[2], point3= mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].vertices[7]) mdb.models['Lochleibung'].rootAssembly.PartitionCellByPlaneThreePoints(cells= mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].cells[4:5]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].cells[5:6], point1= mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].InterestingPoint( mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].edges[6], CENTER), point2= mdb.models['Lochleibung'].rootAssembly.instances['Schraube-1'].vertices[2], point3= mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].vertices[11]) #####################meshing########################## m.rootAssembly.seedEdgeByNumber(edges= IBTI.edges[34:35]+\ IBTI.edges[37:38]+\ IBTI.edges[48:49]+\ IBTI.edges[62:63]+\ IBTII.edges[34:35]+\ IBTII.edges[40:41]+\ IBTII.edges[52:53]+\ IBTII.edges[63:64], number=ElementHöheBlech) mdb.models['Lochleibung'].rootAssembly.seedEdgeByBias(end1Edges= mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[3:4]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[8:9]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[11:13]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[23:24]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].edges[3:4]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].edges[5:6]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].edges[11:13]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].edges[23:24], end2Edges= mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[1:2]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[14:15]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[20:21]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[49:50]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[52:53]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].edges[1:2]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].edges[14:15]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].edges[20:21]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].edges[54:55]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].edges[58:59], number=AnzahlNodesBias, ratio=Bias) mdb.models['Lochleibung'].rootAssembly.seedEdgeByNumber(edges= mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[10:11]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[22:23]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[44:45]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTI-1'].edges[46:47]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].edges[4:5]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].edges[19:20]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].edges[36:37]+\ mdb.models['Lochleibung'].rootAssembly.instances['BTII-1'].edges[42:43], number=AnzahlNodesArea) m.rootAssembly.seedEdgeByNumber(edges= IBTI.edges[4:5]+\ IBTI.edges[16:17]+\ IBTI.edges[57:59]+\ IBTII.edges[6:7]+\ IBTII.edges[9:10]+\ IBTII.edges[18:19]+\ IBTII.edges[21:22], number=AnzahlNodesArea) m.rootAssembly.seedPartInstance(deviationFactor=0.1, regions=(IBTI, IBTII), size=SizeBlech) m.rootAssembly.seedPartInstance(deviationFactor=0.1, regions=(m.rootAssembly.instances['Schraube-1'], ), size=SizeSchraube) m.rootAssembly.setMeshControls(elemShape=TET, regions= m.rootAssembly.instances['Schraube-1'].cells[0:2], technique=FREE) m.rootAssembly.setElementType(elemTypes=(ElemType( elemCode=C3D8R, elemLibrary=STANDARD, secondOrderAccuracy=OFF, kinematicSplit=AVERAGE_STRAIN, hourglassControl=STIFFNESS, distortionControl=OFF), ElemType(elemCode=C3D6, elemLibrary=STANDARD), ElemType(elemCode=C3D4, elemLibrary=STANDARD)), regions=( IBTI.cells[0:8]+\ IBTII.cells[0:8]+\ m.rootAssembly.instances['Schraube-1'].cells[0:2], )) m.rootAssembly.generateMesh(regions=( IBTI, IBTII, m.rootAssembly.instances['Schraube-1'])) #############################job############################## mdb.Job(contactPrint=OFF, description='JOB2', echoPrint=OFF, explicitPrecision= SINGLE, historyPrint=OFF, model='Lochleibung', modelPrint=OFF, multiprocessingMode=DEFAULT, name='Job', nodalOutputPrecision=SINGLE, numCpus=numCPUS, numDomains=2, parallelizationMethodExplicit=DOMAIN, preMemory= 1000, scratch='', standardMemory=1000, standardMemoryPolicy=MODERATE, type=ANALYSIS, userSubroutine='')