true 2d biaxial test

Asked by ceguo

Hi,

In the discussion of #175606, Bruno committed a change of sp.makeCloud to accommodate true 2d tests. Where is the new version code? I recompiled code using version 0.70.0, but still cannot generate packing with 0 thickness. The error info:

num = sp.makeCloud(minCorner=(0,0,0),maxCorner=(0.01,0.01,0),rMean=0.0002,rRelFuzz=.5,periodic=True)
ValueError: The box defined as null volume. Define at least maxCorner of the box, or hSize if periodic.

Also with this zero-thickness packing, how to conduct biaxial test? Still using Peri3dController is OK? Do we need to block the corresponding DOFs? Will the following code work smoothly?

from yade import pack

O.materials.append()
sp = pack.SpherePack()
num = sp.makeCloud(minCorner=(0,0,0),maxCorner=(1,1,0),rMean=0.02,rRelFuzz=.5,periodic=True)
O.bodies.append([utils.sphere(s[0],s[1]) for s in sp])
print num
for p in O.bodies:
   p.state.blockedDOFs = ['z','rx','ry']

O.dt = .5*utils.PWaveTimeStep()
O.engines = [
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb()]), # detect new collisions
   InteractionLoop(
      [Ig2_Sphere_Sphere_Dem3DofGeom()],
      [Ip2_FrictMat_FrictMat_FrictPhys()],
      [Law2_Dem3DofGeom_FrictPhys_CundallStrack()]
   ),
   Peri3dController(
      goal=(-2e5,-2e5,0,0,0,0),
      stressMask=3,
      nSteps=20000,
      doneHook='print "Consolidation finished."; O.pause()',
      maxStrain=.5,
      label='triax'
   ),
   NewtonIntegrator()
]
O.run(); O.wait()

O.engines = [
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb()]), # detect new collisions
   InteractionLoop(
      [Ig2_Sphere_Sphere_Dem3DofGeom()],
      [Ip2_FrictMat_FrictMat_FrictPhys()],
      [Law2_Dem3DofGeom_FrictPhys_CundallStrack()]
   ),
   Peri3dController(
      goal=(2.e-2,-2.e-2,0,0,0,0),
      stressMask=0,
      nSteps=20000,
      doneHook='print "Shear finished."; O.pause()',
      maxStrain=.5,
      label='triax'
   ),
   NewtonIntegrator(),
]
O.run(); O.wait()

Ning

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
Klaus Thoeni (klaus.thoeni) said :
#1

Hi Ning,

you have to check out and compile the trunk version in order to get new
commits. Yade version 0.70.0 will not be updated!

However, I tried it and there is still a problem with the 2d version.

@Bruno, did you test your implementation? Yade is calculating and calculating
but I can't get any packing.

I guess 2d remains still experimental ;-)

Klaus

On Wed, 2 Nov 2011 02:35:44 PM ceguo wrote:
> New question #177203 on Yade:
> https://answers.launchpad.net/yade/+question/177203
>
> Hi,
>
> In the discussion of #175606, Bruno committed a change of sp.makeCloud to
> accommodate true 2d tests. Where is the new version code? I recompiled
> code using version 0.70.0, but still cannot generate packing with 0
> thickness. The error info:
>
> num =
> sp.makeCloud(minCorner=(0,0,0),maxCorner=(0.01,0.01,0),rMean=0.0002,rRelFu
> zz=.5,periodic=True) ValueError: The box defined as null volume. Define at
> least maxCorner of the box, or hSize if periodic.
>
> Also with this zero-thickness packing, how to conduct biaxial test? Still
> using Peri3dController is OK? Do we need to block the corresponding DOFs?
> Will the following code work smoothly?
>
> from yade import pack
>
> O.materials.append()
> sp = pack.SpherePack()
> num =
> sp.makeCloud(minCorner=(0,0,0),maxCorner=(1,1,0),rMean=0.02,rRelFuzz=.5,pe
> riodic=True) O.bodies.append([utils.sphere(s[0],s[1]) for s in sp])
> print num
> for p in O.bodies:
> p.state.blockedDOFs = ['z','rx','ry']
>
> O.dt = .5*utils.PWaveTimeStep()
> O.engines = [
> ForceResetter(),
> InsertionSortCollider([Bo1_Sphere_Aabb()]), # detect new collisions
> InteractionLoop(
> [Ig2_Sphere_Sphere_Dem3DofGeom()],
> [Ip2_FrictMat_FrictMat_FrictPhys()],
> [Law2_Dem3DofGeom_FrictPhys_CundallStrack()]
> ),
> Peri3dController(
> goal=(-2e5,-2e5,0,0,0,0),
> stressMask=3,
> nSteps=20000,
> doneHook='print "Consolidation finished."; O.pause()',
> maxStrain=.5,
> label='triax'
> ),
> NewtonIntegrator()
> ]
> O.run(); O.wait()
>
> O.engines = [
> ForceResetter(),
> InsertionSortCollider([Bo1_Sphere_Aabb()]), # detect new collisions
> InteractionLoop(
> [Ig2_Sphere_Sphere_Dem3DofGeom()],
> [Ip2_FrictMat_FrictMat_FrictPhys()],
> [Law2_Dem3DofGeom_FrictPhys_CundallStrack()]
> ),
> Peri3dController(
> goal=(2.e-2,-2.e-2,0,0,0,0),
> stressMask=0,
> nSteps=20000,
> doneHook='print "Shear finished."; O.pause()',
> maxStrain=.5,
> label='triax'
> ),
> NewtonIntegrator(),
> ]
> O.run(); O.wait()
>
> Ning

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

It is fixed. I didn't try the combination 2D + periodic + rMean without cellSize...

Revision history for this message
ceguo (hhh-guo) said :
#3

Hi Chareyre,

Before I recompile the code, I just want to make sure we can conduct biaxial test on this generated 2D packing and how to?
Will my posted sample code work smoothly?

Ning

Revision history for this message
ceguo (hhh-guo) said :
#4

If we simply want to get a 2d packing without further shear test I think we can use LSMGengeo to do this job, right?

Revision history for this message
Anton Gladky (gladky-anton) said :
#5

Right, but LSMGenGeo does not provide PSD-Input, AFAIK.
You can input Rmax and Rmin only.

Anton

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

Ning,
Yes it should be possible to run 2D tests. Other users did that before IIRC.
I suggest that you recompile the code and try to run your script (I've no time to test myself), then if you find problems you can't fix, come back to us.
I think you will have to define a non-zero size of the periodic cell in the 3rd direction to avoid problems.

p.s. I just discovered another small mistake in pack.py and fixed it. Make sure you update again before recompiling.

Revision history for this message
ceguo (hhh-guo) said :
#7

Hi,

Finally, I made the code work. After using makeCloud() to generate the 2d periodic packing, I had to set O.cell.hSize = Matrix3() to set a nonzero 3rd dimension as suggested by Chareyre. The code is like this:

sp = pack.SpherePack()
sp.makeCloud(minCorner=(0,0,0),maxCorner=(2,2,0),rMean=0.03,rRelFuzz=0.25,periodic=True,seed=12345)
sp.toSimulation()
O.cell.hSize = Matrix3(2,0,0, 0,2,0, 0,0,1)
for p in O.bodies:
   p.state.blockedDOFs = 'zXY'

Now my problem is I want to save the packing for later use. After I save the packing with sp.save() and load the packing with sp.load(), I cannot set O.cell.hSize now. Also I cannot use ymport.gengeoFile() to read a 2d periodic packing file generated by LSMGengeo. (I can read it but cannot set O.cell.hSize and run 2d simulation) How to solve this problem?

Ning

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

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