PrepareRVE for 3D problem

Asked by Surej Kumar

Hello,

I am trying to make a RVE for 3D problem and could not able to figure out where I am making mistake. I try to read the manual and still not able to understand.

Can someone help me .. how I can prepare the RVE for 3D. The first part of the code working well and I could see the 3D box with 9000 particles. The second part is giving me the problem (running for 3 days without any output).

1. For 3D problem I command #p.state.blockedDOFs = 'zXY' as I want the compression happen isotropic-ally in all direction as initial state. is that ok?

2. I also changes stressMask=3 to stressMask=7 but still same problem.

3. May I know what is the following command does : O.engines = O.engines[:3]+O.engines[4:]

my python code as below...Appreciate your help.. Thanks Surej.

********
from yade import pack

O.materials.append(FrictMat(young=6.e8,poisson=.8,frictionAngle=.0))

sp = pack.SpherePack()
size =.24
sp.makeCloud(minCorner=(0,0,0),maxCorner=(size,size,size),rMean=.005,rRelFuzz=.4,num=9000,periodic=True,seed=1)
sp.toSimulation()
O.cell.hSize = Matrix3(size,0,0, 0,size,0, 0,0,size)
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,0.5*inertia)

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

print 'packing-part-ok'

print ' starting 2nd part'

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

def term():
   O.engines = O.engines[:3]+O.engines[4:]
   print getStress()
   print O.cell.hSize
   setContactFriction(0.5)
   O.cell.trsf=Matrix3.Identity
   O.cell.velGrad=Matrix3.Zero
   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.save('0.yade.gz')
   O.pause()

O.run();O.wait()

Question information

Language:
English Edit question
Status:
Expired
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jérôme Duriez (jduriez) said :
#1

Hi,

1. and 2. Your problem/mistake is not clear to me, could you elaborate ?
(what is the error message, if any ?)
Also, it seems you started adapting from an existing YADE script, but you do not state which script.

3. O.engines[:3] and O.engines[4:] are two sub-lists extracted from O.engines list.

The "+" concatenates these two lists to create a new one (see the general Python doc for list operations, and more details regarding the :3 or :4 notation -- so-called slice notation in Python)

Which is then affected back to O.engines, updating the engines for the simulation.
In the end, you just removed one engine from the DEM loop.

Try with the general Python example: (in Python interface or in YADE interface, it's the same here)
list = range(0,5)
list[:3] + list[4:]
and check the results of these two lines

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#2

Hi,
A couple hints:

> running for 3 days without any output

Then remove O.run() from script, click "play" instead, and see what happens in the 3D view

> For 3D problem I command #p.state.blockedDOFs = 'zXY' as I want the compression happen isotropic-ally in all direction as initial state. is that ok?

I guess you meant "commented out" instead of "command"? If so, yes this is ok.
I wonder why you started from a 2D example to prepare a 3D simulation, though. 2D is a very special case.
(and as mentioned by Jérôme better declare it clearly when you re-use a script).

I hope it helps

Bruno

Revision history for this message
Surej Kumar (surej) said :
#3

Hi Jerome/Bruno

Yes I was the example script from ..\trunk\examples\FEmxDEM\prepareRVE.py

I will try the suggested check..

Thanks and best regards

Surej.

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.