← Back to team overview

yade-dev team mailing list archive

Re: [Yade-users] Optimized contact detection available

 

Hi, Bruno,
I have prepared a small test-script from "examples/packs.py". It is
similar to one, which is crashes in my case,I could not "catch" a
crash with this test-script, but it seems, BoxFactory creates new
spheres not in the right places:some of particles are "jumping", it
can be caused by the initial overlapping.
Anton



On Fri, Jan 27, 2012 at 7:43 AM, Anton Gladky <gladky.anton@xxxxxxxxx> wrote:
> Ok, I have got a "segmentation fault".
>
> Will try to prepare a simple test-script.
>
> Anton
>
>
>
> On Thu, Jan 26, 2012 at 12:22 PM, Bruno Chareyre
> <bruno.chareyre@xxxxxxxxxxx> wrote:
>> Could you please try bzr3006?
>>
>> B
>>>> I have tried one of my working scripts and the results are not good.
>>>> The new version is dramatically slower. Not sure what is the reason,
>>>> but it seems
>>>> the bottleneck is SpheresFactory which is working with new version
>>>> incorrectly and
>>>> cannot find places for new bodies.
>>>>
>>>> Bruno, is there an opportunity to use both algorithms: old and new one?
>>>>
>>> It is very difficult to keep both logics Anton, it would combine
>>> disadvantages from each side. I should understand what the problem is in
>>> SpheresFactory and fix it. Since I didn't touch this code, I'm really
>>> curious about the problem. Are you doing operations in SpheresFactory at
>>> runtime?
>>> Could you send an example script?
>>>
>>> Bruno
>>>
>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~yade-users
>>> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~yade-users
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>
>>
>> --
>> _______________
>> Bruno Chareyre
>> Associate Professor
>> ENSE³ - Grenoble INP
>> 11, rue des Mathématiques
>> BP 46
>> 38402 St Martin d'Hères, France
>> Tél : +33 4 56 52 86 21
>> Fax : +33 4 76 82 70 43
>> ________________
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~yade-users
>> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~yade-users
>> More help   : https://help.launchpad.net/ListHelp
#!/usr/bin/python
# -*- coding: utf-8 -*-
from yade import pack,ymport,export,log,geom,bodiesHandling
import math

""" This script demonstrates how to use 2 components of creating packings:

1. packing generators pack.regularHexa, pack.regularOrtho etc. generate vertices and filter them
using predicates. (Note that this will be enhanced to irregular packings in the future)

2. predicates are functors returning True/False for points that are given by the packing generator.
Their names are mostly self-explanatory, see their docstrings for meaning of their arguments.

Predicates can be combined using set arithmetics to get their Intersection (p1 & p2), union (p1 | p2),
difference (p1 - p2) and symmetric difference (XOR, p1 ^ p2). This is demontrated on the head (which
has sphere taken off at the back and also a notch) and the body (with cylidrical hole inside).

"""

rad,gap=.15,.02

#Add material
O.materials.append(FrictMat(young=10e9,poisson=.25,frictionAngle=0.5,density=1e3))

#Parameters, which will be passed into spheres and facets creators
kw={'material':0}
kwBoxes={'color':[1,0,0],'wire':False,'dynamic':False,'material':0}
kwMeshes={'color':[1,1,0],'wire':True,'dynamic':False,'material':0}



#Demonstration of HarmonicRotationEngine
#O.bodies.append(pack.regularHexa(pack.inSphere((-15,5,-5),1.5),radius=rad*2.0,gap=rad/3.0,color=(0.5,0.5,0.1),material=0))

oriBody = Quaternion(Vector3(0,0,1),(math.pi/4))
#O.bodies.append(geom.facetBox((0,0,0),(0.5,0.5,1.0),wallMask=15,**kwMeshes))
O.bodies.append(geom.facetBunker((0,0,-1.2),dBunker=1.5,dOutput=0.6,hBunker=1.2,hOutput=0.5,hPipe=0.1,orientation=oriBody,segmentsNumber=4,**kwMeshes))


try:
	from yade import qt
	qt.Controller()
	qt.View()
except ImportError: pass

#log.setLevel('SubdomainBalancer',log.TRACE)

O.engines=[
	#SubdomainBalancer(colorize=True,initRun=True,iterPeriod=100),
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()],label='collider'),
	InteractionLoop(
		[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
		[Ip2_FrictMat_FrictMat_FrictPhys()],
		[Law2_ScGeom_FrictPhys_CundallStrack()],
	),
	GravityEngine(gravity=(0,0,-100)),
	NewtonIntegrator(damping=.3),
		BoxFactory(maxParticles=-1, extents=(0.5,0.5,1.0),center=(0.0,0.0,0.0),vMin=1.0,vMax=1.5,
		rMin=0.025, rMax=0.030,
		vAngle=math.pi/3.0,massFlowRate=150.0,normal=(0.0,0.0,-1.0),label='factory',stopIfFailed=False),
	DomainLimiter(lo=[-0.6,-0.6,-1.2], hi=[0.6,0.6,1.2], iterPeriod=10000)
]


O.dt=1e-5
O.saveTmp()
O.timingEnabled=True

Follow ups

References