# Fundamental Help on notations

Asked by Surej Kumar on 2018-08-14

Hello

I need some help to understand the notation as I am still learning YADE.

Fundamental Help on notations as I need to modify 2D problem to 3D. The example is from trunk: prepareRVE.py

sp = pack.SpherePack()
size = .24
sp.makeCloud(minCorner=(0,0,.05),maxCorner=(size,size,.05),rMean=.005,rRelFuzz=.4,num=400,periodic=True,seed=1)
sp.toSimulation()
O.cell.hSize = Matrix3(size,0,0, 0,size,0, 0,0,.1)

When I run the above, it is 2D problem : YADE message : min-max volume is null an assume the packing is 2D

So I what is the MinCorner (0,0,0) mean : is that x, y z? and what is the unit, I assume all units is in meter?
as for Matrix3 , is that i, j k ? i is x, j is y and k is z?

If I want to edited that to 3D problem but does not work..

sp = pack.SpherePack()
size = .24
sp.makeCloud(minCorner=(0,0,0),maxCorner=(size,size,.05),rMean=.005,rRelFuzz=.4,num=400,periodic=True,seed=1)
sp.toSimulation()
O.cell.hSize = Matrix3(size,0,0, 0,size,0, 0,0,.1)

same for

sp = pack.SpherePack()
size = .24
sp.makeCloud(minCorner=(0,0,0),maxCorner=(size,size,size),rMean=.005,rRelFuzz=.4,num=400,periodic=True,seed=1)
sp.toSimulation()
O.cell.hSize = Matrix3(size,0,0, 0,size,0, 0,0,.1)

Also question how the size is estimate to 0.24

Thanks and best regards

Surej.

## Question information

Language:
English Edit question
Status:
For:
Assignee:
No assignee Edit question
Last query:
2018-08-15
2018-08-16
 Jan Stránský (honzik) said on 2018-08-15: #1

Hello,

> So I what is the MinCorner (0,0,0) mean : is that x, y z?

yes

> and what is the unit, I assume all units is in meter?

it's arbitrary. Yade just computes numbers, the physical interpretation (i.e. units) is up to you (assuming your units are compatible)
E.g., you assume length to be meters and time to be seconds, you get velocity in m/s
or you can assume lengths to be inches and time to be minutes and you get velocity in inch/minute

> as for Matrix3 , is that i, j k ? i is x, j is y and k is z?

Matrix3 is 3x3 matrix. What do you mean by i,j,k in this case?
The syntax is Matrix3(xx, xy, xz, yx, yy, yz, zx, zy, zz)
In this case, the nonzero terms (xx, yy, zz) corresponds to size of the periodic cell in x,y,z directions. The other terms might be used to skew/rotate it.

> If I want to edited that to 3D problem but does not work..

please always try to be specific why it "does not work". You get error? if yes, what error? Is it still 2D? something completely different?..
I have tried both cases you mentioned and both gave me nice 3D packing..

> Also question how the size is estimate to 0.24

probably to get nice packing for rMean=.005,rRelFuzz=.4,num=400 arguments

cheers
Jan

 Surej Kumar (surej) said on 2018-08-15: #2

I just try to run the packing in 3D but it is taking ages (almost 4 hours sand still not completed for 400 grains.)

TCP python prompt on localhost:9000, auth cookie `dsayuc'
XMLRPC info provider on http://localhost:21000
Running script prepareRVE.py
400
3.16023157237e-05

below is my script

sp = pack.SpherePack()
size =.24
sp.makeCloud(minCorner=(0,0,0),maxCorner=(size,size,.05),rMean=.005,rRelFuzz=0.4,num=400,periodic=True,seed=1)
sp.toSimulation()
O.cell.hSize = Matrix3(size,0,0, 0,size,0, 0,0,.1)
print len(O.bodies)
for p in O.bodies:
p.state.blockedDOFs = 'zXY'
p.state.mass = 2650 * 0.1 * pi * p.shape.radius**2 # 0.1 = thickness of cylindrical particle
inertia = 0.5 * p.state.mass * p.shape.radius**2
p.state.inertia = (.5*inertia,.5*inertia,inertia)

O.dt = utils.PWaveTimeStep()
print O.dt

O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
PeriTriaxController(
dynCell=True,
goal=(-1.e5,-1.e5,0),
relStressTol=.001,
maxUnbalanced=.001,
maxStrainRate=(.5,.5,.0),
doneHook='term()',
label='biax'
),
NewtonIntegrator(damping=.1)
]

def term():
O.engines = O.engines[:3]+O.engines[4:]
print getStress()
print O.cell.hSize
setContactFriction(0.5)
O.cell.trsf=Matrix3.Identity
for p in O.bodies:
p.state.vel = Vector3.Zero
p.state.angVel = Vector3.Zero
p.state.refPos = p.state.pos
p.state.refOri = p.state.ori
O.pause()

O.run();O.wait()

 Jérôme Duriez (jduriez) said on 2018-08-16: #3

Hi,

It its "normal" form the prepareRVE.py example is in the z=cst=0.05 plane, with appropriate definitions of e.g. bodies' state.blockedDOFs and imposed stress state (PeriTriaxController.goal and PeriTriaxController.stressMask) to conform this "2D" point of view.

Here, you cancelled the z=cst=0.05 feature of the numerical model changing the sp.makeCloud() line
(you're very lucky I did the comparison for you, this is typically something you should state yourself in your question---to increase your chances getting help).
But the rest is unchanged..

Your simulation definition thus does not make sense anymore, and there is no surprise it takes ages (because you're somewhat asking to reach a stress state that is impossible to reach with your setup)