Cpm model

Asked by Chen Lifan

Hello everyone,
I'm using the cpm model to do a simple 2D unconfined compression test. After generating the packing, I load the packing into the compression test in which I erase the other walls except the upper and the lower walls but it seems that there is no cohesion since the packing explodes after loading. I wonder why there is no cohesion within the particles.

Here is my srcipts for making the packing:

from yade import pack

O.materials.append(CpmMat(young=24e9,frictionAngle=0.,poisson=0.2,density=4800,sigmaT=300.e6,relDuctility=30,epsCrackOnset=1.e-4,isoPrestress=0.,label='concrete'))
O.materials.append(FrictMat(young=2e11,poisson=.4,frictionAngle=0,density=0,label='frictionlessWalls'))
sp = pack.SpherePack()
size = .3
sp.makeCloud(minCorner=(0,0,.05),maxCorner=(size,size,.05),rMean=.005,rRelFuzz=0.2,num=400,periodic=False,seed=1)
O.bodies.append([sphere(center,rad,material='concrete') for center,rad in sp])
walls=aabbWalls(thickness=0,material='frictionlessWalls')
wallIds=O.bodies.append(walls)
#O.bodies.erase(wallIds[4])
#O.bodies.erase(wallIds[5])

#O.cell.hSize = Matrix3(size,0,0, 0,size,0, 0,0,.1)
print len(O.bodies)
r = numpy.zeros(400)
zdim = 5.e-2
for i in range(400):
   p=O.bodies[i]
   p.state.blockedDOFs = 'zXY'
   p.state.mass = 2650 * zdim * 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)
   r[i] = p.shape.radius

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

triax=TriaxialStressController(
   wall_bottom_id=wallIds[2],
   wall_top_id=wallIds[3],
   wall_left_id=wallIds[0],
   wall_right_id=wallIds[1],
   wall_back_id=wallIds[4],
   wall_front_id=wallIds[5],
   internalCompaction=False,
   stressMask = 3, #1 is x, 2 is y, 4 is z, Bitmask, if imposed goal`s are stresses (0 for none, 7 for all, 1 for direction 1, 5 for directions 1 and 3, etc. :ydefault:`7)
   goal1 = -1.e7*(zdim/max(r)/2),
   goal2 = -1.e7*(zdim/max(r)/2), # positive is tension, negative is compression
   #goal1 = -1.e7,
   #goal2 = -1.e7,
   goal3 = 0.,
   max_vel=0.01,
   label = 'triax'
)

O.engines = [
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
   InteractionLoop(
      [Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom()],
      [Ip2_FrictMat_FrictMat_FrictPhys(),
       Ip2_CpmMat_CpmMat_CpmPhys(
          label='cohesiveIp',
          cohesiveThresholdIter=0)],
      [Law2_ScGeom_FrictPhys_CundallStrack(),
       Law2_ScGeom_CpmPhys_Cpm()]
   ),
   triax,
   NewtonIntegrator(damping=.2)
]

while 1:
   O.run(1000,True)
   unb=unbalancedForce()
   area=0.
   for i in range(400):
      p = O.bodies[i]
      area += pi*p.shape.radius**2
   areatotal = triax.width*triax.height
   void=areatotal-area
   voidratio=void/area
   print 'unbalanced force:',unb,'voidratio:',voidratio
   if unb<0.001:
      O.save('rve_1st.yade.gz')
      break

any kind of help is appreciated.

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

please read [1] and provide:
- version of Yade you use
- MWE, showing the explosion (packing creation itself is not really very helpful..)

> I wonder why there is no cohesion within the particles.

without any code, we can just guess..
There might be no cohesion because:
- you did not define cohesion at all
- you did not define cohesion properly
- cohesion is too weak
- cohesion is OK, other factor are problematic (e.g. unrealistic loading, making cohesion apparently vanish)
- ...

A few notes:

> Ig2_Sphere_Sphere_ScGeom6D()

do you need 6D?

> O.save('rve_1st.yade.gz')

I **personally** consider exporting the packing (centers + radii) a better approach.
This way, you can also use independent material for packing creation.

cheers
Jan

Revision history for this message
Jan Stránský (honzik) said :
#2
Revision history for this message
Chen Lifan (chenlifan) said :
#3

Jan, thank you for your advice.
I'm using the yade of version 2018.02b. And below is my scripts for unconfined compression test :
from minieigen import *
from yade import plot
import numpy as np
import math, random

O.load('rve_2nd.yade.gz')
width = triax.width
O.engines = O.engines[:3]+O.engines[4:]
O.bodies.erase(400)
O.bodies.erase(401)
O.bodies.erase(404)
O.bodies.erase(405)
top_wall = O.bodies[403]
bottom_wall = O.bodies[402]
top_wall.state.blockDOFs = 'xyzXYZ'
bottom_wall.state.blockDOFs = 'xyzXYZ'
top_pos = top_wall.state.pos
bottom_pos = bottom_wall.state.pos
height0 = top_pos[1]-bottom_pos[1]
zdim = 5.e-2
wall_area = width*zdim

r = numpy.zeros(400)
for i in range(400):
   r[i] = O.bodies[i].shape.radius
print 'Height: ',height0,'Initial stress: ', getStress()/(zdim/2/max(r))

top_wall.state.vel=(0,-0.0004,0)
O.run()
O.engines += [PyRunner(command='output()',iterPeriod=1000,label='outdata',dead=False)]
globals().update(locals())

fout = file('uniax_without4walls.dat','w')
fout.close()

def output():
   print O.forces.f(403)/wall_area/1.e6
   fout = open('uniax_without4walls.dat','a')
   ystrain = (height0-(top_wall.state.pos[1]-bottom_wall.state.pos[1]))/height0*100
   stress = O.forces.f(403)/wall_area/1.e6
   print>>fout,ystrain,stress[0],stress[1],stress[2]
   fout.close()
   if ystrain >= 2.0:
      O.save('rve_damage_without4walls.yade.gz')
      O.pause()

Revision history for this message
Best Jan Stránský (honzik) said :
#4

> O.load('rve_2nd.yade.gz')

please provide a MWE, W = working. With this, I get
RuntimeError: Simulation file to load doesn't exist: rve_2nd.yade.gz
(note, rve_1st.yade.gz is saved in the first part, should we use this one?)

> O.save(...)
> O.load(...)

Here, it basically means that you continue the simulation from the point where you saved it.
At the saved state, there is no cohesion.
There is no special reason, why cohesion should appear after O.load.

Have a look at examples/concrete [2] how cohesion is used.

For this approach, I suggest to save centers and radii of spheres (e.g. using export.text / ymport.text), not full simulation using O.save / O.load.
This way, you can also use independent (simpler) materials/approach for packing creation.

cheers
Jan

[2] https://gitlab.com/yade-dev/trunk/-/tree/master/examples/concrete

Revision history for this message
Chen Lifan (chenlifan) said :
#5

Thanks Jan Stránský, that solved my question.