New question #706855 on Yade: https://answers.launchpad.net/yade/+question/706855
I have a question when generating the geogrid sample. When I increased the number of nodes (e.g., "nbL" from 10 to 60), the "Segmentation fault " appears in the terminal. I have confirmed that the program woks normally if only unidirectional ribs are generated. My script is attched below: ___________________________________________________________________ # -*- encoding=utf-8 -*- from builtins import zip from builtins import range from yade.gridpfacet import * from yade import pack,ymport,export,geom,bodiesHandling, plot,utils,qt import pylab import matplotlib; matplotlib.rc('axes',grid=True) #### tensile control leftTensilePos = 0.002 rightTensilePos = 0.098 O.engines = [ ForceResetter(), InsertionSortCollider([ Bo1_GridConnection_Aabb(), ]), InteractionLoop( [Ig2_GridNode_GridNode_GridNodeGeom6D()], [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True, setCohesionOnNewContacts=False)], [Law2_ScGeom6D_CohFrictPhys_CohesionMoment()] ), NewtonIntegrator(gravity=(0, 0, -10), damping=0.1, label='newton'), #VTKRecorder(iterPeriod=10000, recorders=['spheres','facets','boxes','stress','colors','intr'], fileName='vtkrecorder/p1-'), PyRunner(command='history()',iterPeriod=1), PyRunner(command='plotAddData1()',iterPeriod=100), ] spherematid = O.materials.append( CohFrictMat( young=1.74e9,#1.74e9, alphaKr=2, alphaKtw=2, poisson=0.5, density=800, frictionAngle=radians(10), normalCohesion=9e9, shearCohesion=9e9, momentRotationLaw=True, label='spheremat' ) ) print('spherematid',spherematid) ### Parameters of a rectangular grid ### L = 2.1 #length [m] aperture size = 30 mm, grid_gap=35 mm l = 2.1 #width [m] nbL =60 #number of grids for the length [#] nbl =60 #number of grids for the width [#] nbLL = nbL+1 nbll = nbl+1 #number of nodes for the width rrr = 0.0025 #L / 100. #radius color = [255. / 255., 102. / 255., 0. / 255.] nodesIds1 = [] #Create all nodes first : for i in range(0, nbLL): for j in range(0, nbll): nodesIds1.append(O.bodies.append(gridNode([i * L / nbL, j * l / nbl, 0], rrr, wire=True, fixed=False, material='spheremat', color=color))) #print(nodesIds[:-1]) ConnectionIds1 = [] #Create connection between the nodes for i in range(0, len(nodesIds1)): for j in range(i + 1, len(nodesIds1)): dist = (O.bodies[i].state.pos - O.bodies[j].state.pos).norm() if (dist <= l / nbl * 1.01): ConnectionIds1.append(O.bodies.append(gridConnection(i, j, rrr, color=color))) # print(ConnectionIds1) leftNode1 = [O.bodies[s] for s in nodesIds1 if O.bodies[s].state.pos[0]<leftTensilePos] #left node rightNode1 = [O.bodies[s] for s in nodesIds1 if O.bodies[s].state.pos[0]>rightTensilePos]#right node for s in leftNode1: s.shape.color = (1,0,0) s.dynamic = False vel = 0 def history(): for s in leftNode1: s.shape.color = (1,0,0) s.state.blockedDOFs = 'xyzXYZ' s.state.vel = (-vel,0,0) def plotAddData1(): f_leftNode1 = sum(O.forces.f(b.id)[0] for b in leftNode1) f_rightNode1 = sum(O.forces.f(b.id)[0] for b in rightNode1) f_both1 = .5*(-f_rightNode1+f_leftNode1) f1 =f_leftNode1 strain1 = (rightNode1[0].state.displ()[0] - leftNode1[0].state.displ()[0]) / (mx-mm)*100 #[%] height1=rightNode1[0].state.refPos[2]-rightNode1[0].state.pos[2] plot.addData( i = O.iter, f_both1 = f_both1, height1 = height1, strain1 = strain1, ) plot.plots = { 'i':('height1',), } plot.plot() O.dt = 0.5*PWaveTimeStep() O.saveTmp() qt.View() -- You received this question notification because your team yade-users is an answer contact for Yade. _______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp