yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #29070
Re: [Question #705744]: Divide numerical periodic microstructure box into smaller grided cubes or boxes
Question #705744 on Yade changed:
https://answers.launchpad.net/yade/+question/705744
Status: Needs information => Open
Mohamed EL SHAMIEH gave more information on the question:
Hello Jan,
Thank you for your quick reply,
My script used for generating my sample is as follows:
for test in range(1, num_tests):
O.reset()
O.periodic=True
O.cell.hSize=Matrix3(Hbox,0,0, 0,Lbox,0, 0,0,Hbox)
# Define the material for balls
O.materials.append(FrictMat(young=young,poisson=poisson,frictionAngle=radians(CompFricDegree),density=dens,label='spheres'))
#-------------Create a periodic packing of spheres
mn,mx=Vector3(0,0,0),Vector3(Hbox,Lbox,Lbox) # corners of the initial packing
sp=pack.SpherePack()
sp.makeCloud(minCorner=mn,maxCorner=mx,num=num_spheres,psdSizes=D_spheres,psdCumm=CumFrac,distributeMass=True,periodic=True)
#add sphere packing to simulation
sp.toSimulation(material='spheres')
#--------------- Define engines for the numerical simulations
O.engines=[
ForceResetter(), #0
InsertionSortCollider([Bo1_Sphere_Aabb()]), #1
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom()], # contact geometry
[Ip2_FrictMat_FrictMat_FrictPhys()], # contact properties
[Law2_ScGeom_FrictPhys_CundallStrack()] # contact forces
), #2
GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), #3, determine step size
NewtonIntegrator(damping=damp) #4
]
newton = O.engines[4]
# Then, we reduce the box dimensions in such a way that the stress state reach the target stress tensor
# First stade of compaction. We compact rapidly the sample until a normal stress exceed 90% of the target confining stress
# Then, we reduce the box dimensions in such a way that the stress state reach the target stress tensor
# First stade of compaction. We compact rapidly the sample until a normal stress exceed 90% of the target confining stress
print("------------ First stade of compaction")
sm.ServoCompaction1(damp,servo_g1,ConfiningStress,0.9,UnbThreshold)
# Second stade of compaction. We compact slowly the sample until all the three normal stresses reach 90% of the targer confining stress
print("------------ Second stade of compaction")
sm.ServoCompaction1(damp,servo_g2,ConfiningStress,1.0,UnbThreshold)
newton.damping = damp # reset the numerical damping
# Reset the friction angle
O.materials[0].frictionAngle=radians(ShearFricDegree) # radians
# for existing contacts, set contact friction directly
for i in O.interactions:
i.phys.tangensOfFrictionAngle=tan(radians(ShearFricDegree))
# Final compaction
sm.FinalCompaction1(damp,servo_g=servo_g2,sigTarget=ConfiningStress,SigThreshold=StressThreshold)
print('final porosity ', utils.porosity())
SaveFileName = TagName + str(test)+".yade.gz"
os.chdir(SavePath)
O.save(SaveFileName)
What I want to develop:
After the final compaction of my sample, First, I want to divide or discritize my domain (3D box size) into equal subdomains (example 100 smaller boxes) (As if a 3D grid)
Then, I want to choose half of these subdomains randomly and impose a criteria to eliminate particle sizes below a specific imposed diameter.
Thus, I will have at the end a new sample of same domain (size) but less number of particles and less porosity...
I need please help regarding this matter by guides or links or documentations.
Thank you in advance Jan, appreciated...
--
You received this question notification because your team yade-users is
an answer contact for Yade.