← Back to team overview

yade-users team mailing list archive

Re: [Question #384899]: VoxelPorosity

 

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

    Status: Needs information => Open

Luis Barbosa gave more information on the question:
Hi, well I'm using O.bodies.append(), as follows:


###################################Aggregate Formation#######################################
rad,gap=.0002,0 #particle radius and gap
r=random.uniform(rmin, rmax) #aggregate radius random according to the class
ag = pack.regularHexa(pack.inSphere((0,0,r),r),radius=rad,gap=gap)
a = len(ag)
c = 0.4*a #percentage of maximum particle removal
n=random.randint(1, int(c)) #number of spheres to exclude randomically

#randomly remove spheres from pack
for i in range(0,len(ag)-n):
	b = ag[random.randint(0,len(ag)-1)]
	O.bodies.append(b)
	ag.remove(b)

########################################Interactions#########################################
O.engines=[
  ForceResetter(),

	InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
	InteractionLoop(
		[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
		[Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1)],
		[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(smoothJoint=False)]
	),

  TranslationEngine(ids=p2,translationAxis=[0,0,-1],velocity=0.03),
  GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.5),
  NewtonIntegrator(damping=0.1,gravity=[0,0,-9.81]),

]

##########################MODULE FOR POROSITY
MEASUREMENT############################

g=r/2
h=3*r/2
VP=utils.voxelPorosity(200,(-g,g,g),(g,-g,h))

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