← Back to team overview

yade-users team mailing list archive

Re: [Question #665793]: Settlement Process doesn't end

 

Question #665793 on Yade changed:
https://answers.launchpad.net/yade/+question/665793

    Status: Needs information => Open

raiden gave more information on the question:
Hello,

This is the one I use for different trials. I tried this one with bigger
YM but simulation doesn't end. it stucks in same unbalance force in the
plot and i doesn't chance even for 90 hours..


readParamsFromTable(YM=10e6, N=1e4, T=2e4, rMean=.02,rRelFuzz=.00,maxLoad=10e1,minLoad=0e1
,vel=1.0,dyad=0.05,peanut=0.05,stick=0.9)
# make rMean, rRelFuzz, maxLoad accessible directly as variables later
from yade.params.table import *

# create box with free top, and ceate loose packing inside the box
import random
from yade import pack, plot
from yade import ymport
from yade import export
from yade import pack,export,qt,ymport
#from yade import qt,plot

#define material for all bodies:
id_Mater=O.materials.append(FrictMat(young=1e15,poisson=0.3,density=7850,frictionAngle=0))  
Mater=O.materials[id_Mater]


## create material #0, which will be used as default
O.materials.append(CohFrictMat(young=YM,poisson=0.4,density=2700,frictionAngle=radians(31),normalCohesion=N,shearCohesion=T, fragile=True, momentRotationLaw=False,etaRoll=0.00, etaTwist=-1, alphaKr=0.0, alphaKtw=0.0, isCohesive=True, label='spheres'))

# create rectangular box from facets

O.bodies.append(geom.facetBox((0.0,0.0,0.0),(0.5,1.0,1.0),wallMask=31,material=Mater))

#create assembly of spheres:
sp=pack.SpherePack()
	#sp.makeCloud((-4.5,-4.5,-10.0),(4.5,4.5,15),rMean=rMean,rRelFuzz=rRelFuzz,num=3000,periodic=False)
sp.makeCloud((-0.45,-0.9,-0.9),(0.45,0.9,0.9),rMean=rMean,rRelFuzz=rRelFuzz,num=10000
,periodic=False)
O.bodies.append([sphere(c,r,material='spheres') for c,r in sp])

relRadList1 = [.1,.1]
relPosList1 = [[.05,0,0],[-.05,0,0]]

relRadList2 = [.05,.1,.05]
relPosList2 = [[.1,0,0],[0,0,0],[-.1,0,0]]

relRadList3 = [.1,.1,.1,.1]
relPosList3 = [[0,.1,0],[0,.3,0],[0,.5,0],[0,.7,0]]

templates= []
templates.append(clumpTemplate(relRadii=relRadList1,relPositions=relPosList1))
templates.append(clumpTemplate(relRadii=relRadList2,relPositions=relPosList2))
templates.append(clumpTemplate(relRadii=relRadList3,relPositions=relPosList3))

O.bodies.replaceByClumps(templates,[dyad,peanut,stick])

print "Motorok bekapcsolasa"
O.engines=[
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
	InteractionLoop(
		#box-sphere interactions will be the simple normal-shear law, we use ScGeom for them
		[Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Facet_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=True, creep_viscosity=.8,neverErase=False, shear_creep=True, twist_creep=False, label='cohesiveLaw')]
	),
   NewtonIntegrator(gravity=(0,0,-9.81),damping=0.8),
   # 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=10,label='checker'),
   PyRunner(command='addPlotData()',realPeriod=10,label='checker'),
 
]
O.dt= 0.5*PWaveTimeStep()

print "Kieg eros"

for i in O.bodies:
  if i.isClumpMember:
    print i.shape.radius


def checkUnbalanced():
 
   if O.iter<5000: return 

   if unbalancedForce()>0.01: return 
   print utils.unbalancedForce()
   O.engines[2].lawDispatcher.functors[1].always_use_moment_law = True

   O.engines[2].physDispatcher.functors[1].setCohesionNow = True
   O.engines[2].physDispatcher.functors[1].setCohesionOnNewContacts = False
   O.engines[2].physDispatcher.functors[1].cohesionDisablesFriction=True
   O.engines=O.engines+[PyRunner(command='addPlotData()',iterPeriod=1)]
   # next time, do not call this function anymore, but the next one (unloadPlate) instead
   #O.run(500)
 #  ----------------------------------------------------------------------------------------------------


   checker.command='stopUnloading()'

def stopUnloading():
 
      export.textClumps("/home/clums.txt")
      print "Save clumps"
      checker.command='addPlotData()'
      print utils.unbalancedForce()

      O.pause()


 #  ----------------------------------------------------------------------------------------------------

def addPlotData():
 # this function adds current values to the history of data, under the names specified  
     plot.addData(i=O.iter,t=O.time,Ek=utils.kineticEnergy(),coordNum=utils.avgNumInteractions(), unForce=utils.unbalancedForce())
        
     yade.plot.matplotlib.rc('mathtext', fontset='stixsans')

plot.plots={'t':(('unForce','r-'),)}

O.run()
plot.labels={'SP':'$Displacement [m]_{}$' , 'F':'$Draft force [N]_{}$'}
plot.plot()


Thanks for help and suggestions. :)

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.