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

    Status: Needs information => Open

孙灿 gave more information on the question:
I use my code to simulate ground settlement. When I use the default
material, the result is in line with the law of ground settlement, but
when I add the material, the settlement of the particles becomes very
chaotic and does not conform to the actual law.

Code using raw material:

from yade import pack,plot
O.bodies.append(geom.facetBox((0.05, 9, 10), (0.1, 9, 10), wallMask=63))
sp = pack.SpherePack()
sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,18,20), rMean=0.08, rRelFuzz=0)
sp.toSimulation()

for b in O.bodies:
   if isinstance(b.shape,Sphere):
       b.state.blockedDOFs='ZxY'
       b.shape.color=(3.,2.,1.)
O.engines = [
        ForceResetter(),
        InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]),
        InteractionLoop(
                [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),
        PyRunner(command='checkUnbalanced()', realPeriod=2,label="myEngine"),
        PyRunner(command='addPlotData()', iterPeriod=100)
]
O.dt = 0.5 * PWaveTimeStep()
O.trackEnergy = True

shuzu=[]
def checkUnbalanced():
        if unbalancedForce() < .005:
                O.pause()

                zMax = max(b.state.pos[2] for b in O.bodies if 
isinstance(b.shape,Sphere))
                print("Z ",zMax)
                ceng = zMax-0.3
                for b in O.bodies:
                    if isinstance(b.shape,Sphere):
                        #b.state.blockedDOFs='zxy'
                        b.state.vel=(0,0,0)
                        b.state.angVel=(0,0,0) 
                    if b.state.pos[2]>ceng:
                        print(b.id,b.state.pos)
                        shuzu.append(b.id)
                print(shuzu)    
                #zMax = max(b.state.pos[2] for b in O.bodies)

                #zMax = max(b.state.pos[2] for b in O.bodies)
                #print("Z ",zMax)
                #(xdim,ydim,zdim)= aabbDim()

                #print("Height is ",zdim)
def addPlotData():
        plot.addData(i=O.iter, unbalanced=unbalancedForce(), **O.energy)        
O.saveTmp()
from yade import qt
qt.Controller()
qt.View()


Code to add material:

#Material constants 
Density = 2630
FrictionAngle = 2.1
PoissonRatio = 0.5
Young = 300e6
Damp = 0.5
AvgRadius = 0.05
N_particles = 10000

#Wall constants
WDensity = 0
WFrictionAngle = 0.0
WPoissonRatio = 0.1
WYoung = 50e9

#time calculation
startT = O.time
endT = O.time
timeSpent = endT - startT

SphereMat = O.materials.append(FrictMat(young = Young, poisson = PoissonRatio, 
frictionAngle = radians(FrictionAngle), density = Density))
WallMat = O.materials.append(FrictMat(young = WYoung, poisson = WPoissonRatio, 
frictionAngle = radians(WFrictionAngle)))

from yade import pack,plot
O.bodies.append(geom.facetBox((0.05, 9, 10), (0.1, 9, 10), 
wallMask=63,material=WallMat))
sp = pack.SpherePack()
sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,18,20), rMean=0.08, rRelFuzz=0)
sp.toSimulation(material = SphereMat)


for b in O.bodies:
   if isinstance(b.shape,Sphere):
       b.state.blockedDOFs='ZxY'
       b.shape.color=(3.,2.,1.)
 
O.engines = [
        ForceResetter(),
        InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]),
        InteractionLoop(
                [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),
        PyRunner(command='checkUnbalanced()', realPeriod=2,label="myEngine"),
        PyRunner(command='addPlotData()', iterPeriod=100)
]
O.dt = 0.5 * PWaveTimeStep()
O.trackEnergy = True

shuzu=[]
def checkUnbalanced():
        if unbalancedForce() < .005:
                O.pause()
                zMax = max(b.state.pos[2] for b in O.bodies if 
isinstance(b.shape,Sphere))
                print("Z ",zMax)
                ceng = zMax-0.3
                for b in O.bodies:
                    if isinstance(b.shape,Sphere):
                        #b.state.blockedDOFs='zxy'
                        b.state.vel=(0,0,0)
                        b.state.angVel=(0,0,0) 
                    if b.state.pos[2]>ceng:
                        print(b.id,b.state.pos)
                        shuzu.append(b.id)
                print(shuzu)    
                #zMax = max(b.state.pos[2] for b in O.bodies)

                #zMax = max(b.state.pos[2] for b in O.bodies)
                #print("Z ",zMax)
                #(xdim,ydim,zdim)= aabbDim()

                #print("Height is ",zdim)
def addPlotData():
        plot.addData(i=O.iter, unbalanced=unbalancedForce(), **O.energy)        
O.saveTmp()

from yade import qt
qt.Controller()
qt.View()


As can be seen from the 3D image opened by the console, the particles using the 
default material are not quite the same as the particles that add the material. 
The particles of the default material are always randomly distributed, which is 
in line with the actual situation, and the particle accumulation of the added 
material is always somewhat neatly arranged.

-- 
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