Question #683949 on Yade changed: https://answers.launchpad.net/yade/+question/683949
Status: Needs information => Open Jinny Kim gave more information on the question: Hello, Jan Stránský, I am sorry for this inconvenience. I have attached the simple version of my simulation code below. It also have the same issue with mine.... It looks like having weird data at iteration of 14, 25, 36, 47 .... (I am using Yade 1.20.0.) ################################# import math import numpy as np import sys import os.path def saveData(): global ids global i p_num=ids+1 pkdID=np.zeros((p_num,1)) p_radii=np.zeros((p_num,1)) x_pos=np.zeros((p_num,1)) y_pos=np.zeros((p_num,1)) z_pos=np.zeros((p_num,1)) x_vel=np.zeros((p_num,1)) y_vel=np.zeros((p_num,1)) z_vel=np.zeros((p_num,1)) x_ang=np.zeros((p_num,1)) y_ang=np.zeros((p_num,1)) z_ang=np.zeros((p_num,1)) p_mass=np.zeros((p_num,1)) eflag=np.zeros((p_num,1)) print(p_num) for k in range(p_num): pkdID[k][0]=O.bodies[k].id x_pos[k][0]=O.bodies[k].state.pos[0] y_pos[k][0]=O.bodies[k].state.pos[1] z_pos[k][0]=O.bodies[k].state.pos[2] x_vel[k][0]=O.bodies[k].state.vel[0] y_vel[k][0]=O.bodies[k].state.vel[1] z_vel[k][0]=O.bodies[k].state.vel[2] x_ang[k][0]=O.bodies[k].state.angVel[0] y_ang[k][0]=O.bodies[k].state.angVel[1] z_ang[k][0]=O.bodies[k].state.angVel[2] p_mass[k][0]=O.bodies[k].state.mass p_radii[k][0]=O.bodies[k].shape.radius f1=open(os.path.join("/home/ae_h1/yzk0056/Desktop/Semesters/2019 Summer Semester/DEM Project/DEMsimulation/Obtain_initial_position/Sim_regular_rotation_Apophis/constant_gravity_2/","Output_"+str(i)+".txt"),"w") for p in range(p_num): f1.write("%d\t%e\t%e\t%e\t%e\t%e\t%e\t%e\t%e\t%e\t%e\t%e\n" % (pkdID[p][0],p_mass[p][0],p_radii[p][0],x_pos[p][0],y_pos[p][0],z_pos[p][0],x_vel[p][0],y_vel[p][0],z_vel[p][0],x_ang[p][0],y_ang[p][0],z_ang[p][0])) f1.close() i+=1 Density=2900 Young=3.3e7 poisson=0.3 c_r = 0.1 r_fc = 0.0 #1st case: low angle of repose frictionAngle=radians(35) sphereColor = (.8,.8,0.)#dirty yellow i=0 from yade import pack, plot, ymport, export ## Import particles iron_ore=FrictMat(young=Young,poisson=poisson,density=Density,frictionAngle=frictionAngle) Mat=O.materials.append(iron_ore) from yade import pack, plot, ymport, export sp=pack.SpherePack() ids=sp.makeCloud(minCorner=(-0.4,-0.2,0.01),maxCorner=(0.4,0.2,1),rMean=2.0e-2,rRelFuzz=0.,num=250000,periodic=False) sp.toSimulation(material=Mat) for pp in O.bodies: ids=pp.id ## Import wall's geometry O.materials.append(FrictMat(young=Young,poisson=poisson,density=Density,frictionAngle=frictionAngle,label='frictionlessWalls')) fctIds = O.bodies.append(geom.facetBox((0.,0.,-0.01),(0.8,0.4,0.0),wallMask=0b110011,color=(1,0,0),wire=False)) g=6.5e-2 itr_num=30000 ## Engines O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_MindlinCapillaryPhys(krot=r_fc,en=c_r,es=c_r)], [Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True)] ), NewtonIntegrator(damping=0,gravity=(0,0,-g),label='NI'), PyRunner(iterPeriod=itr_num,command='saveData()') ] ## time step (how to run the script) O.dt=2.0e-4 # should be 1.0e-6 O.run(14400000) from yade import qt qt.View() ##################################################### Thank you for your help in advance. Sincerely, Jinny Kim -- 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