← Back to team overview

yade-dev team mailing list archive

Re: [Bug 666246] [NEW] periodic boundary don't work with Ig2_*_ScGeom

 

Hi Sergei,

For Sphere-sphere :
Looking at ViscoelasticPM code, the problem cannot come from Ig2 
functors, as their precomputing features are not used.
In the script below, Law2_ScGeom_FrictPhys_CundallStrack replaces 
Law2_ScGeom_ViscElPhys_Basic, and it behaves normally.
Most probably, periodicity is simply not handled in 
Law2_ScGeom_ViscElPhys_Basic, or there is an instability due to the law 
itself.
The simplest way to implement periodicity in a law is to use shear 
values precomputed in Ig2 functors (see example in 
Law2_ScGeom_FrictPhys_CundallStrack). Your code will also be shorter.

For sphere-facet :
There is indeed a problem (and changing the Law doesn't fix it). I can't 
guess if it is directly linked to Ig2 functor or not. Please let us know 
if you spot the problem more precisely (is there only an AABB 
intersection detected?).

Bruno


# -*- coding: utf-8
#=============BEGIN SCRIPT TEST PERIODIC WITH 
Ig2_Sphere_Sphere_ScGeom==========
# -*- coding: utf-8

from yade import utils

sphereRadius=0.1
tc=0.001# collision time
en=0.3 # normal restitution coefficient
es=0.3 # tangential restitution coefficient
density=2700
frictionAngle=radians(35)#
#params=utils.getViscoelasticFromSpheresInteraction(tc,en,es)
#sphereMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle,**params))
sphereMat=O.materials.append(FrictMat(young=5.0e6,poisson=1.0,frictionAngle=frictionAngle,density=2600.0,label='spheres'))

# Spheres
sphId=O.bodies.append([
  utils.sphere( (i*0.2+0.1,0.5,0.2), 0.1, material=sphereMat) for i in 
range(5)
  ])
O.bodies[sphId[-1]].state.vel=(0.5,0.5,0)

## Engines
O.engines=[
  ForceResetter(),
  InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
  InteractionLoop(
   [Ig2_Sphere_Sphere_ScGeom()],
   [Ip2_FrictMat_FrictMat_FrictPhys()],
   [Law2_ScGeom_FrictPhys_CundallStrack(traceEnergy=True,label="dry")]
   #[Ip2_ViscElMat_ViscElMat_ViscElPhys()],
   #[Law2_ScGeom_ViscElPhys_Basic()],
  ),
  NewtonIntegrator(damping=0),
]

O.periodic=True
O.cell.refSize=Vector3(1,1,1)

O.dt=.01*tc

O.saveTmp()
#==========================END======================

-- 
periodic boundary don't work with ViscEl classes
https://bugs.launchpad.net/bugs/666246
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.

Status in Yet Another Dynamic Engine: New

Bug description:
Periodic boundary don't work with Ig2_Facet_Sphere_ScGeom and Ig2_Sphere_Sphere_ScGeom functors.


#=============BEGIN SCRIPT TEST PERIODIC WITH Ig2_Sphere_Sphere_ScGeom==========
# -*- coding: utf-8

from yade import utils

sphereRadius=0.1
tc=0.001# collision time 
en=0.3  # normal restitution coefficient
es=0.3  # tangential restitution coefficient
density=2700
frictionAngle=radians(35)# 
params=utils.getViscoelasticFromSpheresInteraction(tc,en,es)
sphereMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle,**params))


# Spheres
sphId=O.bodies.append([
	utils.sphere( (i*0.2+0.1,0.5,0.2), 0.1, material=sphereMat) for i in range(5)
	])
O.bodies[sphId[-1]].state.vel=(0.5,0.5,0)

## Engines 
O.engines=[
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
	InteractionLoop(
		[Ig2_Sphere_Sphere_ScGeom()],
		[Ip2_ViscElMat_ViscElMat_ViscElPhys()],
		[Law2_ScGeom_ViscElPhys_Basic()],
	),
	NewtonIntegrator(damping=0),
]

O.periodic=True
O.cell.refSize=Vector3(1,1,1)

O.dt=.01*tc

O.saveTmp()
#==========================END======================


#=============BEGIN SCRIPT TEST PERIODIC WITH Ig2_Facet_Sphere_ScGeom==========
# -*- coding: utf-8

from yade import utils

sphereRadius=0.1
tc=0.001# collision time 
en=0.3  # normal restitution coefficient
es=0.3  # tangential restitution coefficient
density=2700
frictionAngle=radians(35)# 
params=utils.getViscoelasticFromSpheresInteraction(tc,en,es)
facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,**params)) 
sphereMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle,**params))

floor
n=5.
s=1./n
for i in range(0,n):
	for j in range(0,n):
		O.bodies.append([
			utils.facet( [(i*s,j*s,0.1),(i*s,(j+1)*s,0.1),((i+1)*s,(j+1)*s,0.1)],material=facetMat),
			utils.facet( [(i*s,j*s,0.1),((i+1)*s,j*s,0.1),((i+1)*s,(j+1)*s,0.1)],material=facetMat),
		])

# Spheres
sphId=O.bodies.append([
	utils.sphere( (0.5,0.5,0.2), 0.1, material=sphereMat),
	])
O.bodies[sphId[-1]].state.vel=(0.5,0,0)

## Engines 
O.engines=[
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
	InteractionLoop(
		[Ig2_Facet_Sphere_ScGeom()],
		[Ip2_ViscElMat_ViscElMat_ViscElPhys()],
		[Law2_ScGeom_ViscElPhys_Basic()],
	),
	GravityEngine(gravity=[0,0,-9.81]),
	NewtonIntegrator(damping=0),
]

O.periodic=True
O.cell.refSize=Vector3(1,1,1)

O.dt=.01*tc

O.saveTmp()
#==========================END======================





References