← Back to team overview

yade-users team mailing list archive

Re: [Question #703571]: How to reset the stiffness of the particles at a later stage?

 

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

孙灿 posted a new comment:
#Material constants(1) 
Density1 = 1836
FrictionAngle1 = 5
PoissonRatio1 = 0.4
Young1 = 1e8
Damp = 0.5
AvgRadius1 = 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

SphereMat1 = O.materials.append(FrictMat(young = Young1, poisson = PoissonRatio1, frictionAngle = radians(FrictionAngle1), density = Density1))
WallMat = O.materials.append(FrictMat(young = WYoung, poisson = WPoissonRatio, frictionAngle = radians(WFrictionAngle)))

from yade import pack,plot
O.bodies.append(geom.facetBox((0.05, 15, 15), (0.1, 15, 15), wallMask=63,material=WallMat))
sp = pack.SpherePack()
sp.makeCloud(Vector3(0.05,0,0),Vector3(0.05,30,30), rMean=0.1, rRelFuzz=0)
sp.toSimulation(material = SphereMat1)

(xdim,ydim,zdim)= aabbDim()
print("Height is ",zdim)

for b in O.bodies:
   if isinstance(b.shape,Sphere):
       b.state.blockedDOFs='ZxY'

       b.shape.color=(0,0,1.)    
 
circleRadius=2
circleCenter = Vector3(0.05,15,6)
#myEngine.dead = True  
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),
	PyRunner(command='li()', realPeriod=2)
]
O.dt = 0.5 * PWaveTimeStep()
O.trackEnergy = True

def checkUnbalanced():
	if unbalancedForce() < .0001:
		O.pause()
                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) 

def addPlotData():
	plot.addData(i=O.iter, unbalanced=unbalancedForce(), **O.energy)

	for b in O.bodies:
		d = (b.state.pos - circleCenter).norm()
		if d < circleRadius:
			O.bodies.erase(b.id)
O.saveTmp()

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


I just need this hole to have a strong stiffness so that it doesn't collapse immediately.

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