yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #13311
[Question #372295]: specific number of spheres in randomDennsePack
New question #372295 on Yade:
https://answers.launchpad.net/yade/+question/372295
Hi all,
I have tried to write a script for modelling uniaxial compression test. I need to introduce 2 different materials and also identify the percentage of each material in my script.
I do not know how I should introduce percentage of each material in my sample.
Please note, I need to control size of spheres and number of spheres separately so SpheresInCell could not help me in this issue.
Please let me know how I should modify my code.
Cheers
Elli
Here is the script
################
from yade import pack,plot
idParticulate1=O.materials.append(CohFrictMat(young=30e9,poisson=0.2,alphaKr=3000,alphaKtw=3000,density=2700,frictionAngle=0.6,isCohesive=True,momentRotationLaw=True,normalCohesion=-3.5e6,shearCohesion=-10e6,etaRoll=-3))
idParticulate2=O.materials.append(CohFrictMat(young=30e9,poisson=0.2,alphaKr=3000,alphaKtw=3000,density=2700,frictionAngle=0.6,isCohesive=True,momentRotationLaw=True,normalCohesion=-3.5,shearCohesion=-10,etaRoll=-3))
mat1,mat2 = [O.materials[i] for i in (0,1)]
##############################
########################
pred=pack.inCylinder((0,0,0),(0,0,0.2),0.05)
TS1=pack.randomDensePack(pred,radius=0.002,material=idParticulate1)
O.bodies.append(TS1)
TS2=pack.randomDensePack(pred,radius=0.008,material=idParticulate2)
O.bodies.append(TS2)
bb=uniaxialTestFeatures()
negIds,posIds,axis,crossSectionArea=bb['negIds'],bb['posIds'],bb['axis'],bb['area']
O.dt=1e-5*PWaveTimeStep()
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.5,label='bo1s')]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom6D(interactionDetectionFactor=1.5,label='ig2ss')],
[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False)],
[Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]
),
NewtonIntegrator(),
UniaxialStrainer(strainRate=-0.05,axis=axis,asymmetry=0,posIds=posIds,negIds=negIds,crossSectionArea=crossSectionArea,blockDisplacements=False,blockRotations=False,setSpeeds=False,label='strainer'),
PyRunner(virtPeriod=1e-6/0.5,realPeriod=1,command='addPlotData()',label='plotDataCollector',initRun=True)
]
bo1s.aabbEnlargeFactor=1.0
ig2ss.interactionDetectionFactor=1.0
plot.plots={'eps':('sigma')}
def addPlotData():
yade.plot.addData(t=O.time,i=O.iter,eps=-strainer.strain,sigma=-strainer.avgStress)
O.run(500000000,True)
plot.plots={'eps':('sigma')}
plot.plot(subPlots=False)
plot.saveDataTxt('uniax22')
--
You received this question notification because your team yade-users is
an answer contact for Yade.