Re: [Yade-users] [Question #683949]: particle position data

2019-10-02 Thread Launchpad Janitor
Question #683949 on Yade changed:
https://answers.launchpad.net/yade/+question/683949

Status: Needs information => Expired

Launchpad Janitor expired the question:
This question was expired because it remained in the 'Needs information'
state without activity for the last 15 days.

-- 
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


Re: [Yade-users] [Question #683949]: particle position data

2019-09-17 Thread Jan Stránský
Question #683949 on Yade changed:
https://answers.launchpad.net/yade/+question/683949

Status: Open => Needs information

Jan Stránský requested more information:
Hello,
I have tried your code (using Yade 2018.02b), but found no "weird data" (did 
not try too much, thought).. Please be more specific (I don't want to check 
2500 lines of data file to find one discrepancy :-)
It would help, if you could create a MWE [1], i.e. minimal from point of both 
code and simulation (number of particles, running time).
cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

-- 
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


Re: [Yade-users] [Question #683949]: particle position data

2019-09-16 Thread Jinny Kim
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=25,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=3
## 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(1440)
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


Re: [Yade-users] [Question #683949]: particle position data

2019-09-16 Thread Jan Stránský
Question #683949 on Yade changed:
https://answers.launchpad.net/yade/+question/683949

Status: Open => Needs information

Jan Stránský requested more information:
Hello,
please provide a complete MWE [1], otherwise we can just guess..
thanks
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

-- 
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


[Yade-users] [Question #683949]: particle position data

2019-09-15 Thread Jinny Kim
New question #683949 on Yade:
https://answers.launchpad.net/yade/+question/683949

Hi all,

I have a question on the data for z position of particles.
I am trying to save z position for all particles in the simulation by using the 
code below and pyrunner.

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've attached some part of data for one particle.

-57.56951   -59.89878   -62.27485   
-64.69759   -67.16690   -69.68262   
-72.24462   -74.85271   -77.50671   
-80.20643   0.1556536   -82.95165   
-85.74216   -88.57772   -91.45811   
-94.38307   -97.35238   -100.3658   
-103.4231   -106.5240   -109.6684   
0.1556609   -112.8559   -116.0866   
-119.3601

Here, the z position decreases. It makes sense because there is only force, 
gravity with a negative z direction. but it looks like having dumb data like 
0.1556536. Do you have any ideas why I got these weird data? Also, 
these weird data look like having the same frequency for all particles. 

Thank you for your help in advance.

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