New question #694054 on Yade:
https://answers.launchpad.net/yade/+question/694054

Dear all,

I am very new to yade so I only know a few things. Probably my problem is in 
principle but unfortunately I cannot locate the problem itself more accurately. 
I am just suggesting that it is in the  the FIRST engine. usually it occurs 
about 6000-7000 iters. I am using:
Welcome to Yade 2020.01a 
Using python version: 3.8.5 (default, Jul 28 2020, 12:59:40) 
[GCC 9.3.0]

I would like to ask for help to somehow track the problem that occurs the 
segmentation fault and if it is located then tell me what did I do wrong.
Thank you very much in advance!


from yade import pack, plot, qt
import itertools
qt.View()



#Steel:
EA = 2.1e5          #Young' module of steel
nuA = .3            #Poisson ratio of steel
densA = 7850        #Density of steel
frictAngA = .52     #Friction half cone angle of steel


#Let's define and add the materials to the models:


steel = 
O.materials.append(FrictMat(young=EA,poisson=nuA,density=densA,frictionAngle=frictAngA,label='steel'))


#Creating bodies:

channel = O.bodies.append(geom.facetBox((.005,.025,.1),(.01,.05,.2), 
wallMask=15, material = 'steel'))
trash = O.bodies.append(geom.facetBox((.05,.025,-.15),(.15,.15,.025), 
wallMask=31, material = 'steel'))
lamella1 = O.bodies.append(geom.facetBox((.005,.045,.225),(.01,.0575,.001), 
orientation=Quaternion((1,0,0),1), wallMask=63, material = 'steel'))
lamella2 = O.bodies.append(geom.facetBox((.005,0.005,.1125),(.01,.0575,.001), 
orientation=Quaternion((1,0,0),-1), wallMask=63, material = 'steel'))
lamella3 = O.bodies.append(geom.facetBox((.005,.045,0),(.01,.0575,.001), 
orientation=Quaternion((1,0,0),1), wallMask=63, material = 'steel'))
vane = O.bodies.append(geom.facetBox((.005,.025,-.1),(.01,.0575,.001), wallMask 
= 63, material = 'steel'))



#Creating clumps:  
cl=pack.SpherePack([((0,0,0),.001),((0,0,.00085),.001),((0,0,-.00085),.001),((0,.001,0),.001)])
cl.makeClumpCloud((-0.005,-0.025,-0.1),(.015,.075,.3),[cl],num=5000)
cl.toSimulation() 



#Defining engines and recorders: (I think the problem is here)



O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
   InteractionLoop(
       #handle sphere+sphere and facet+sphere collisions
      [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
      [Ip2_FrictMat_FrictMat_FrictPhys()],
      [Law2_ScGeom_FrictPhys_CundallStrack()]
   ),
   NewtonIntegrator(gravity=(0,0,-9.81),damping=0.4),
   #Limit the quantity of spheres:
   
DomainLimiter(lo=(-0.006,-0.026,-0.11),hi=(.016,.076,.31),iterPeriod=500,label='domLim'),
 
   # call the checkUnbalanced function (defined below) every 2 seconds
   PyRunner(command='checkUnbalanced()',realPeriod=2),
   # call the addPlotData function every 100 steps
   PyRunner(command='addPlotData()',iterPeriod=100),
   
]
O.dt=.5*PWaveTimeStep()


def move():
        if O.iter > 2000  :
                O.engines = O.engines + 
[TranslationEngine(ids=vane,translationAxis=(1,0,0),velocity=.3)] 

                
def stop():
        if O.iter > 4200  :
                O.engines = O.engines + 
[TranslationEngine(ids=vane,translationAxis=(1,0,0),velocity=0)] 
                
                
O.trackEnergy=True

# if the unbalanced forces goes below .00001, the packing is considered 
stabilized, therefore we stop collected data history and stop

def checkUnbalanced():
   if unbalancedForce()<.00001:
      O.pause()
      plot.saveDataTxt('bbb.txt.bz2')


# collect history of data which will be plotted

def addPlotData():
# color particles based on rotation amount
   for b in O.bodies:
                # rot() gives rotation vector between reference and current 
position
      b.shape.color=scalarOnColorScale(b.state.vel.norm(),0,1.)


O.engines=O.engines + [PyRunner(command='move()',iterPeriod = 
1,firstIterRun=2000,iterLast=4200)]
O.engines=O.engines + [PyRunner(command='stop()',iterPeriod = 1)]

O.saveTmp()

-- 
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     : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to