Re: [Yade-users] [Question #273426]: Calculate the energy released when the bond between two particles breaks

2017-05-03 Thread loiseaurare
Question #273426 on Yade changed:
https://answers.launchpad.net/yade/+question/273426

loiseaurare posted a new comment:
Hi Jerome,

Do you have any more informations about that state function ?
Like, what does mean "broken" from that point of view ? Does it consider the 
initial cohesive interactions only ?
I wasn't able to get that when looking at the yade code...

-- 
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 #630910]: Uniaxial test with CohFrictMat

2017-05-03 Thread loiseaurare
Question #630910 on Yade changed:
https://answers.launchpad.net/yade/+question/630910

Status: Answered => Solved

loiseaurare confirmed that the question is solved:
Hi Jan !

Oh ok, I thought using the O.bodies.dynamic = False on the first loop
would work, like I saw in [2], but I guess this only freezes movement
and not force  development ?

Anyway, thanks, that solved my problem.

-- 
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 #630910]: Uniaxial test with CohFrictMat

2017-05-03 Thread loiseaurare
Question #630910 on Yade changed:
https://answers.launchpad.net/yade/+question/630910

loiseaurare confirmed that the question is solved:
Thanks Jan Stránský, that solved my question.

-- 
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 #629486]: Particle Cylinder

2017-05-03 Thread Klaus Thoeni
Question #629486 on Yade changed:
https://answers.launchpad.net/yade/+question/629486

Klaus Thoeni proposed the following answer:
Hi,

yade has also cylinders with rounded edges. Not sure what exactly you
are after but have a look here:

https://github.com/yade/trunk/tree/master/examples/cylinders

HTH
Klaus

-- 
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 #631016]: How to make clumps from spheres

2017-05-03 Thread Jan Stránský
Question #631016 on Yade changed:
https://answers.launchpad.net/yade/+question/631016

Status: Open => Answered

Jan Stránský proposed the following answer:
Would appreciate some more info. Thanks.
O.bodies.appendClumped((sphere1,sphere2))
Jan

[1] https://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 #631016]: How to make clumps from spheres

2017-05-03 Thread Philip Ho
New question #631016 on Yade:
https://answers.launchpad.net/yade/+question/631016

I want to make two-ball clumps from spheres.  Would appreciate some help. 
Thanks.

#rMean is particles size
utils.readParamsFromTable(rMean=.053,rRelFuzz=.3,maxLoad=1e6,minLoad=1e4)
from yade.params.table import *
from yade import export,pack, plot

#cylinder
O.materials.append(FrictMat(density=2800,young=3e10,poisson=.4,frictionAngle=radians(22),label='walls'))
O.bodies.append(utils.geom.facetCylinder((.5,.5,.75),0.6,1.5,orientation=Quaternion((1,0,0),0),segmentsNumber=16,wallMask=4,material='walls'))
O.bodies.append(utils.geom.facetCylinder((.5,.5,.75),0.6,1.5,orientation=Quaternion((1,0,0),0),segmentsNumber=16,wallMask=2,material='walls'))

#spheres
O.materials.append(FrictMat(density=2650,young=5e8,poisson=.4,frictionAngle=radians(33),label='spheres'))
sp=pack.SpherePack()
sp.makeCloud((0.15,0.15,0.05),(0.9,0.9,3.6),rMean=rMean,rRelFuzz=.0,seed=1)
sp.toSimulation(material='spheres')

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]),
   InteractionLoop(
  
[Ig2_Sphere_Sphere_L3Geom(),Ig2_Facet_Sphere_L3Geom(),Ig2_Wall_Sphere_L3Geom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_L3Geom_FrictPhys_ElPerfPl()]
   ),
   GravityEngine(gravity=(0,0,-9.81)),
   NewtonIntegrator(damping=0.2),
   # the label creates an automatic variable referring to this engine
   # we use it below to change its attributes from the functions called
   PyRunner(command='checkUnbalanced()',realPeriod=2,label='checker'),
]
O.dt=.5*utils.PWaveTimeStep()

def checkUnbalanced():
   # at the very start, unbalanced force can be low as there is only few 
contacts, but it does not mean the packing is stable
   if O.iter<1: return 
   # the rest will be run only if unbalanced is < .1 (stabilized packing)
   if utils.unbalancedForce()>.1: return 
   # add plate at the position on the top of the packing
   # the maximum finds the z-coordinate of the top of the topmost particle
   #O.bodies.append(utils.wall(max([b.state.pos[2]+b.shape.radius for b in 
O.bodies if isinstance(b.shape,Sphere)]),axis=2,sense=-1))
   #m=max([b.state.pos[2]+b.shape.radius for b in O.bodies if 
isinstance(b.shape,Sphere)]
   b = len(O.bodies)
   
   #print "number of bodies",b
   #penetrometer
   
O.materials.append(FrictMat(density=2800,young=3e10,poisson=.4,frictionAngle=radians(0),label='shaft'))
   
O.bodies.append(utils.geom.facetCylinder((.5,.5,2.5),0.1,2.0,orientation=Quaternion((1,0,0),0),segmentsNumber=6,wallMask=4,material='shaft'))
   
O.bodies.append(utils.geom.facetCylinder((.5,.5,2.5),0.1,2.0,orientation=Quaternion((1,0,0),0),segmentsNumber=6,wallMask=1,material='shaft'))
   
O.bodies.append(utils.geom.facetCone((.5,.5,1.4),0.1,0.0,0.2,orientation=Quaternion((1,0,0),0),segmentsNumber=6,wallMask=4,material='walls'))
   
   #b = len(O.bodies)
   #print "number of bodies2",b
   #O.pause()
   global 
plate1,plate2,plate3,plate4,plate5,plate6,plate7,plate8,plate9,plate10,plate11,plate12,plate13,plate14,plate15,plate16,plate17,plate18,plate19,plate20,plate21,plate22,plate23,plate24
   plate1=O.bodies[b]  # the last body is the plate
   plate2=O.bodies[b+1]
   plate3=O.bodies[b+2]
   plate4=O.bodies[b+3]
   plate5=O.bodies[b+4]
   plate6=O.bodies[b+5]
   plate7=O.bodies[b+6]  
   plate8=O.bodies[b+7]
   plate9=O.bodies[b+8]
   plate10=O.bodies[b+9]
   plate11=O.bodies[b+10]
   plate12=O.bodies[b+11]
   plate13=O.bodies[b+12]  
   plate14=O.bodies[b+13]
   plate15=O.bodies[b+14]
   plate16=O.bodies[b+15]
   plate17=O.bodies[b+16]
   plate18=O.bodies[b+17]
   plate19=O.bodies[b+18]  
   plate20=O.bodies[b+19]
   plate21=O.bodies[b+20]
   plate22=O.bodies[b+21]
   plate23=O.bodies[b+22]
   plate24=O.bodies[b+23]
   
   # Wall objects are "fixed" by default, i.e. not subject to forces
   # prescribing a velocity will therefore make it move at constant velocity 
(downwards)
   plate1.state.vel=(0,0,-.2)
   plate2.state.vel=(0,0,-.2)
   plate3.state.vel=(0,0,-.2)
   plate4.state.vel=(0,0,-.2)
   plate5.state.vel=(0,0,-.2)
   plate6.state.vel=(0,0,-.2)
   plate7.state.vel=(0,0,-.2)
   plate8.state.vel=(0,0,-.2)
   plate9.state.vel=(0,0,-.2)
   plate10.state.vel=(0,0,-.2)
   plate11.state.vel=(0,0,-.2)
   plate12.state.vel=(0,0,-.2)
   plate13.state.vel=(0,0,-.2)
   plate14.state.vel=(0,0,-.2)
   plate15.state.vel=(0,0,-.2)
   plate16.state.vel=(0,0,-.2)
   plate17.state.vel=(0,0,-.2)
   plate18.state.vel=(0,0,-.2)
   plate19.state.vel=(0,0,-.2)
   plate20.state.vel=(0,0,-.2)
   plate21.state.vel=(0,0,-.2)
   plate22.state.vel=(0,0,-.2)
   plate23.state.vel=(0,0,-.2)
   plate24.state.vel=(0,0,-.2)
   # start plotting the data now, it was not interesting before
   O.engines=O.engines+[PyRunner(command='addPlotData()',iterPeriod=200)]
   #next time, do not call this function anymore, but the next one 
(unloadPlate) instead
   #checker.command='unloadPlate()'
   
   checker.command='stopUnloading()'

#def 

[Yade-users] [Question #630997]: SnapshotEngines timeout error!

2017-05-03 Thread Seti
New question #630997 on Yade:
https://answers.launchpad.net/yade/+question/630997

Hi all,

can you please advise me the reason that I face with timeout error by using 
SnapshotEngines in below code? 

# encoding: utf-8
# 2012 ©Bruno Chareyre 
# This variant of triax-basic.py shows the usage of cohesive contact laws and 
moments at contacts

from yade import pack, qt

sp=pack.SpherePack()
## corners of the initial packing
mn,mx=Vector3(0,0,0),Vector3(40,40,40)

## box between mn and mx, avg radius ± ½(20%), 2k spheres
sp.makeCloud(minCorner=mn,maxCorner=mx,rMean=1,rRelFuzz=.5,num=1000)

## create material #0, which will be used as default
O.materials.append(CohFrictMat(alphaKr=0.025,young=100e6,poisson=0.4,density=5000,frictionAngle=radians(36.5),normalCohesion=2.3e6,shearCohesion=2.3e6,momentRotationLaw=True,etaRoll=0.2,label='spheres'))
O.materials.append(FrictMat(young=229e6,poisson=.4,frictionAngle=0,density=0,label='frictionlessWalls'))


## copy spheres from the packing into the scene
O.bodies.append([sphere(center,rad,material='spheres') for center,rad in sp])
## create walls around the packing
walls=aabbWalls(material='frictionlessWalls')
wallIds=O.bodies.append(walls)

triax=TriaxialCompressionEngine(
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,
sigmaIsoCompaction=-50e3,
sigmaLateralConfinement=-50e3,
max_vel=10,
strainRate=0.03,
label="triax"
)

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
#box-sphere interactions will be the simple normal-shear law, 
we use ScGeom for them
[Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom()],
#Boxes will be frictional (FrictMat), so the sphere-box physics 
is FrictMat vs. CohFrictMat, the Ip type will be found via the inheritance tree 
(CohFrictMat is a FrictMat) and will result in FrictPhys interaction physics
#and will result in a FrictPhys

[Ip2_FrictMat_FrictMat_FrictPhys(),Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(label="cohesiveIp")],
#Finally, two different contact laws for sphere-box and 
sphere-sphere

[Law2_ScGeom_FrictPhys_CundallStrack(),Law2_ScGeom6D_CohFrictPhys_CohesionMoment(
useIncrementalForm=True, #useIncrementalForm is turned 
on as we want plasticity on the contact moments
always_use_moment_law=False,  #if we want "rolling" 
friction even if the contact is not cohesive (or cohesion is broken), we will 
have to turn this true somewhere

label='cohesiveLaw'),Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(recordCracks=True)]
),
#VTKRecorder(recorders=['spheres','intr','jcfpm']),


GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.5),
triax,

TriaxialStateRecorder(iterPeriod=1000,file=',jedddi50e3,alphaKr=0.025,150e3,young=100e6,poisson=0.4,density=2600,frictionAngle=radians(36.5),normalCohesion=2.3e6,shearCohesion=2.3e6,etaRoll=0.2,3%portland'),
NewtonIntegrator(damping=.4),
VTKRecorder(fileName='3d-vtk-',recorders=['all'],iterPeriod=1000),
qt.SnapshotEngine(fileBase='3d-',iterPeriod=200,label='snapshot'),
]
O.dt=.5*PWaveTimeStep()



# we must open the view explicitly (limitation of the qt.SnapshotEngine)
qt.View()



from yade import plot
O.engines=O.engines[0:5]+[PyRunner(iterPeriod=500,command='history()',label='recorder')]+O.engines[5:]
def history():
plot.addData(e11=-O.engines[4].strain[0], e22=-O.engines[4].strain[1], 
e33=-O.engines[4].strain[2],
s11=-O.engines[4].stress(0)[0],
s22=-O.engines[4].stress(2)[1],
s33=-O.engines[4].stress(4)[2],
i=O.iter)

print 'Number of elements: ', len(O.bodies)
print 'Box Volume: ',  triax.boxVolume
#plot.plots={'i':(('e11',"bo"),('e22',"ro"),('e33',"go"),None,('s11',"bx"),('s22',"rx"),('s33',"gx"))}
plot.plots={'e22':'s22'}
plot.plot()

print "computing, be patient..."
#First run without moment and without cohesion
O.run(12,True)

#This will reload the autosaved compacted sample
O.reload()

#second run with rolling friction
O.engines[2].lawDispatcher.functors[1].always_use_moment_law = True
O.run(12,True)
O.reload()

#third run with rolling friction + cohesion
O.engines[2].lawDispatcher.functors[1].always_use_moment_law = True
#We assign cohesion to all contacts at the next iteration
O.engines[2].physDispatcher.functors[1].setCohesionNow = True
O.run(12,True)
#plot.saveDataTxt('200,45')
##or even generate a script for gnuplot. Open another terminal and type  
"gnuplot 

Re: [Yade-users] [Question #630995]: VTK does not work in my code

2017-05-03 Thread Seti
Question #630995 on Yade changed:
https://answers.launchpad.net/yade/+question/630995

Status: Answered => Solved

Seti confirmed that the question is solved:
Thanks Jan Stránský, that solved my question.

-- 
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 #630995]: VTK does not work in my code

2017-05-03 Thread Seti
Question #630995 on Yade changed:
https://answers.launchpad.net/yade/+question/630995

Summary changed to:
VTK does not work in my code

-- 
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 #630995]: VTK does not work for me!

2017-05-03 Thread Seti
New question #630995 on Yade:
https://answers.launchpad.net/yade/+question/630995

Hi all, 

Can anyone tell me why VTK and Snapshot don’t work in below script?

# encoding: utf-8
# 2012 ©Bruno Chareyre 
# This variant of triax-basic.py shows the usage of cohesive contact laws and 
moments at contacts

from yade import pack, qt

sp=pack.SpherePack()
## corners of the initial packing
mn,mx=Vector3(0,0,0),Vector3(40,40,40)

## box between mn and mx, avg radius ± ½(20%), 2k spheres
sp.makeCloud(minCorner=mn,maxCorner=mx,rMean=1,rRelFuzz=.5,num=1000)

## create material #0, which will be used as default
O.materials.append(CohFrictMat(alphaKr=0.025,young=100e6,poisson=0.4,density=2600,frictionAngle=radians(36.5),normalCohesion=2e6,shearCohesion=2e6,momentRotationLaw=True,etaRoll=0.2,label='spheres'))
O.materials.append(FrictMat(young=229e6,poisson=.4,frictionAngle=0,density=0,label='frictionlessWalls'))


## copy spheres from the packing into the scene
O.bodies.append([sphere(center,rad,material='spheres') for center,rad in sp])
## create walls around the packing
walls=aabbWalls(material='frictionlessWalls')
wallIds=O.bodies.append(walls)

triax=TriaxialCompressionEngine(
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,
sigmaIsoCompaction=-150e3,
sigmaLateralConfinement=-150e3,
max_vel=10,
strainRate=0.03,
label="triax"
)

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
#box-sphere interactions will be the simple normal-shear law, 
we use ScGeom for them
[Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom()],
#Boxes will be frictional (FrictMat), so the sphere-box physics 
is FrictMat vs. CohFrictMat, the Ip type will be found via the inheritance tree 
(CohFrictMat is a FrictMat) and will result in FrictPhys interaction physics
#and will result in a FrictPhys

[Ip2_FrictMat_FrictMat_FrictPhys(),Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(label="cohesiveIp")],
#Finally, two different contact laws for sphere-box and 
sphere-sphere

[Law2_ScGeom_FrictPhys_CundallStrack(),Law2_ScGeom6D_CohFrictPhys_CohesionMoment(
useIncrementalForm=True, #useIncrementalForm is turned 
on as we want plasticity on the contact moments
always_use_moment_law=False,  #if we want "rolling" 
friction even if the contact is not cohesive (or cohesion is broken), we will 
have to turn this true somewhere

label='cohesiveLaw'),Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(recordCracks=True)]
),
#VTKRecorder(recorders=['spheres','intr','jcfpm']),


GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.5),
triax,

TriaxialStateRecorder(iterPeriod=1000,file=',jedddi150e3,alphaKr=0.025,150e3,young=100e6,poisson=0.4,density=2600,frictionAngle=radians(36.5),normalCohesion=2e6,shearCohesion=2e6,etaRoll=0.2,2%portland'),
NewtonIntegrator(damping=.4),
VTKRecorder(fileName='3d-vtk-',recorders=['all'],iterPeriod=1000),
qt.SnapshotEngine(fileBase='3d-',iterPeriod=200,label='snapshot'),
]
O.dt=.5*PWaveTimeStep()



# we must open the view explicitly (limitation of the qt.SnapshotEngine)
qt.View()



from yade import plot
O.engines=O.engines[0:5]+[PyRunner(iterPeriod=500,command='history()',label='recorder')]+O.engines[5:7]
def history():
plot.addData(e11=-O.engines[4].strain[0], e22=-O.engines[4].strain[1], 
e33=-O.engines[4].strain[2],
s11=-O.engines[4].stress(0)[0],
s22=-O.engines[4].stress(2)[1],
s33=-O.engines[4].stress(4)[2],
i=O.iter)

print 'Number of elements: ', len(O.bodies)
print 'Box Volume: ',  triax.boxVolume
#plot.plots={'i':(('e11',"bo"),('e22',"ro"),('e33',"go"),None,('s11',"bx"),('s22',"rx"),('s33',"gx"))}
plot.plots={'e22':'s22'}
plot.plot()

print "computing, be patient..."
#First run without moment and without cohesion
O.run(12,True)

#This will reload the autosaved compacted sample
O.reload()

#second run with rolling friction
O.engines[2].lawDispatcher.functors[1].always_use_moment_law = True
O.run(12,True)
O.reload()

#third run with rolling friction + cohesion
O.engines[2].lawDispatcher.functors[1].always_use_moment_law = True
#We assign cohesion to all contacts at the next iteration
O.engines[2].physDispatcher.functors[1].setCohesionNow = True
O.run(12,True)
#plot.saveDataTxt('200,45')
##or even generate a script for gnuplot. Open another terminal and type  
"gnuplot plotScriptKEY.gnuplot:
#plot.saveGnuplot('200,45')
## 

Re: [Yade-users] [Question #629486]: Particle Cylinder

2017-05-03 Thread Jan Stránský
Question #629486 on Yade changed:
https://answers.launchpad.net/yade/+question/629486

Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

> I'm new to Yade

welcome :-)

Unfortunately, there is not (yet) cylindrical particle (meaning "sharp"
cylinder) implemented. Instead of one cylindrical particle, you can use
a set of clumped spheres approximating a cylinder.

If you choose this option, see e.g. [1] how to make clouds.

cheers
Jan

[1] https://answers.launchpad.net/yade/+question/403901

-- 
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 #630281]: randomDensePack explodes because of penetrationDepth

2017-05-03 Thread Tina Asia
Question #630281 on Yade changed:
https://answers.launchpad.net/yade/+question/630281

Tina Asia confirmed that the question is solved:
Thanks Jan Stránský, that solved my question.

-- 
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 #630281]: randomDensePack explodes because of penetrationDepth

2017-05-03 Thread Tina Asia
Question #630281 on Yade changed:
https://answers.launchpad.net/yade/+question/630281

Status: Answered => Solved

Tina Asia confirmed that the question is solved:
Thanks Jan,

Sorry for my carelessness!

Thanks for your patience!

Tina

-- 
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 #630281]: randomDensePack explodes because of penetrationDepth

2017-05-03 Thread Jan Stránský
Question #630281 on Yade changed:
https://answers.launchpad.net/yade/+question/630281

Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Tina,
you need O.step() before setting unp:

###
O.dt = 0
O.step() # here
for i in O.interactions:
i.phys.unp = i.geom.penetrationDepth
O.dt=0.3e-7
###

cheers
Jan

-- 
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 #630281]: randomDensePack explodes because of penetrationDepth

2017-05-03 Thread Tina Asia
Question #630281 on Yade changed:
https://answers.launchpad.net/yade/+question/630281

Status: Answered => Open

Tina Asia is still having a problem:
Hi Jan,

Thanks for your help, but I still got a explosion. Here is my script:

from yade import pack
from yade import qt,utils

stone=CohFrictMat(young=5.0e10,poisson=0.25,density=2640,frictionAngle=radians(18),isCohesive=True,normalCohesion=4.5e6,shearCohesion=4.5e7,momentRotationLaw=True)
O.materials.append(stone)
steel=CohFrictMat(young=3.06e11,poisson=0.29,density=7861,frictionAngle=0.545,normalCohesion=0,shearCohesion=0)
O.materials.append(steel)

pred=pack.inSphere((0,0,0.5),0.25)
#sphs=pack.regularHexa(pred,radius=0.01,gap=0,material=stone)
sphs=pack.randomDensePack(pred,radius=0.025,rRelFuzz=0,material=stone)
O.bodies.append(sphs)

for i in sphs:
velocity=i.state.vel=(0,0,-25)

O.bodies.append(geom.facetBox((0,0,0.2),(0.3,0.3,0.003),material=steel))

O.engines=[
ForceResetter(),

InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.5),Bo1_Facet_Aabb()]),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom6D(interactionDetectionFactor=1.5),Ig2_Facet_Sphere_ScGeom6D()],
[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True)],
[Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]
),
#VTKRecorder(fileName='post/0deg-',recorders=['all'],iterPeriod=50),

#GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=5,timestepSafetyCoefficient=0.8,defaultDt=PWaveTimeStep()),
NewtonIntegrator(damping=0.3,gravity=(0,0,-9.81)),

]

O.dt = 0
for i in O.interactions:
i.phys.unp = i.geom.penetrationDepth
O.dt=0.3e-7

qt.Controller()
qt.View()


Recently, I have tried many methods:
As it was posted in https://answers.launchpad.net/yade/+question/266828, I 
added this code segment into my script, but also failed:

O.bodies.dynamic=False
O.step()
for j in O.interactions:
j.phys.unp = j.geom.penetrationDepth
O.bodies.dynamic=True
O.dt=0.3e-7

I guess the explosion was a consequence of the repulsive force was
greater than the bonded strength between contacting particles.

Thanks for your patience!

Tina @ Yade

-- 
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 #630910]: Uniaxial test with CohFrictMat

2017-05-03 Thread Jan Stránský
Question #630910 on Yade changed:
https://answers.launchpad.net/yade/+question/630910

Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Manon,

see my answer at [1] and and Jerome's answer #4 at [2]. The  solution is
to use O.dt=0 for the first O.step:

##
O.engines = [...] # without UniaxialStrainer, it does not like O.dt=0
O.dt = 0
O.step()
O.dt=dtSafety*PWaveTimeStep()

for i in O.interactions :
i.phys.unp = i.geom.penetrationDepth

O.engines = O.engines[4:] + [UniaxialStrainer(...)] + O.engines[4:] # put 
UniaxialStrainer to the position in original code
##

cheers
Jan

[1] https://answers.launchpad.net/yade/+question/630281
[2] https://answers.launchpad.net/yade/+question/266828

-- 
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 #630281]: randomDensePack explodes because of penetrationDepth

2017-05-03 Thread Jan Stránský
Question #630281 on Yade changed:
https://answers.launchpad.net/yade/+question/630281

Jan Stránský posted a new comment:
sorry, the reference for previous post :-)

[1] https://answers.launchpad.net/yade/+question/266828

-- 
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 #630281]: randomDensePack explodes because of penetrationDepth

2017-05-03 Thread Jan Stránský
Question #630281 on Yade changed:
https://answers.launchpad.net/yade/+question/630281

Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Tina,

see [1], Jerome's answer #4. The problem is that after InteractionLoop,
the particles are moved by NewtonIntegrator, so i.geom.penetrationDepth
is the old value and setting it as i.phys.unp is nto enough.

One option is setting O.dt=0 for the first step (don't know how it works
with GlobalStiffnessTimeStepper, probably should be deactivated for the
first step?)

O.dt = 0
for i in O.interactions:
  i.phys.unp = i.geom.penetrationDepth
O.dt = ...

then I had no explosion

cheers
Jan

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