Cohfrictmat Spheres Dissappearing on Contact

Asked by Zachary Koszegi-Faulkner

Hello,

I'm fairly new at Yade, currently I'm attempting to simulate the forces involved with breaking a three particle beam of ice, made as a CohFrictMat. The idea being to either place the particles in a vertical organization and collide them with setCohesionOnNewContact=True, or to place them IN contact and use setCohesionNow=True. In both cases facets are used to ensure allignment, the two ends are fixed after movement stops, and then a facet is created to use as an indenter. The problem being that upon starting the simulation using any parameters that allow cohesion, all the particles dissappear. My current physics engine is as follows:

##Sphere, facet, cohesiveFrictionMaterial##
O.engines=[
   ForceResetter(),

 InsertionSortCollider([
Bo1_Sphere_Aabb(),
Bo1_Facet_Aabb()]),

 InteractionLoop(
  [Ig2_Facet_Sphere_ScGeom6D(),Ig2_Sphere_Sphere_ScGeom6D()],

  [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(
setCohesionNow=True,
setCohesionOnNewContacts=False
),Ip2_FrictMat_FrictMat_FrictPhys()],

  [Law2_ScGeom6D_CohFrictPhys_CohesionMoment(
##Moment law causes issues such as dissappearing spheres##
always_use_moment_law=True,
creep_viscosity=1,
neverErase=False,
shear_creep=False,
twist_creep=False,
useIncrementalForm=True
),Law2_ScGeom_FrictPhys_CundallStrack()]
),
   NewtonIntegrator(damping=0.03,label='newton'),
   PyRunner(command='simfunc()', iterPeriod=iterperiod),

   ##VTKrecorder##
  ##VTKRecorder(fileName='test',recorders=['all','force'], iterPeriod=2500)
]

The material "Ice" had the following parameters:

##Assorted variables##
youngMod= 1e19
poisRat= 0.3
pois= 0.5/(1+poisRat)
shearMod= 0.5*pois
normAdh= 3e0
normCoh= 2*youngMod*normAdh
normShearRat= 1
shearCoh= normCoh/normShearRat
bendKr= (2/3)*(1+poisRat)
twistKtw= (2/3)
angle= radians(36)
rhoP= 927

##Ice##
Ice=CohFrictMat(
young=youngMod,
poisson=pois,
frictionAngle=angle,
density=rhoP,
alphaKr=bendKr,
alphaKtw=twistKtw,
isCohesive=True,
momentRotationLaw=True,
normalCohesion=normCoh,
shearCohesion=shearCoh,
label='ice')
O.materials.append(Ice)

I've attempted at experimenting with various young modulii as well as the varients of the physics engine, I've read the majority of documentation on the functions involved, the answer simply hasn't been apparent to me. Any help would be appreciated.

I am using yade-daily 1.11.0 on Kubuntu.

Question information

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

Hi,

Maybe it would have been helpful to state your problem precisely in your question... ;-)
Assuming from your title and one comment in your script that your question is "why my spheres disappear when they touch in contact, especially if I'm using a moment transfer law ?" (.....), a possible answer (first guess) would be a stability problem related with your timestep value.

It seems you do not use any TimeStepper engine, nor define directly the timestep (O.dt)..

In this case, spheres may not have disappeared (in all cases, in fact: Yade does not let disappear bodies unless it is asked directly to do so) but rather went to the moon (divergence in position..)
You might check if bodies still exist, and where they are using O.bodies[..].state.pos

Revision history for this message
Zachary Koszegi-Faulkner (ztkf85) said :
#2

Apologies here's a more specific phrasing:

I am attempting to create a line of three CohFrictMat particles, have them cohear then push the center particle out using a facet, measuring the normal force as it moves.

However, while attempting to set up the simulation, the particles do not "attach" to one another. Instead, if setCohesionNow or setCohesionOnNewContacts or always_use_moment_law, are true, in any order or combination, the particles dissappear immediately as the simulation starts.

Previous attempts using gravity to setup the simulation, have been successful. However, the slightly larger overlap involved causes issues with comparing to real world calculations.

I am currently using: O.dt=PWaveTimeStep()
which is returning: 9.62808392153e-09

Adding :
   print O.bodies[Top].state.pos[1]
   print O.bodies[Mid].state.pos[1]
   print O.bodies[Bot].state.pos[1]

Returns "nan" for all spheres upon the first step. I can attach the full code if required.

Sorry if this is still unclear.

Revision history for this message
Jérôme Duriez (jduriez) said :
#3

Few suggestions :

- did you try other timestep values ?

- if the position becomes "nan" in one time step, maybe could there be something wrong with the parameters. Give a close look to the parameters values that are in the end used by Yade (it is quite easy with the Inspector : "Inspect" button, especially for a 3 particles simulation).
I fear some problems in your parameters definition. For instance, 2/3 is equal in python to 0, because of numeric types (whereas 2./3. = 0.6666666667)

Revision history for this message
Zachary Koszegi-Faulkner (ztkf85) said :
#4

Thank you very much, this fixed the issue. After adding decimals all the laws worked, and the simulation was a success! Previously problem-causing laws now work again as well.