← Back to team overview

yade-users team mailing list archive

[Question #280730]: gts import and predicates

 

New question #280730 on Yade:
https://answers.launchpad.net/yade/+question/280730

https://www.dropbox.com/s/x0169fplp4eyii7/bed2.gts?dl=0


Hi guys,

I'm importing a gts surface created by Abaqus to YADE. Loading the file and filling it like the example given in dicumentation works well, as expected. 
I also define all the imported facets as one single clump, which this one also works with no peoblem.

However, I'd like to fill a cubic space (preferably by makecloud). The cube includes the imported gts surface. Generated spheres are supposed to be outside the gts surface (in contrary to the given example). This thing, seems to be problematic! 

I'm using the following script. You can also access the gts file here:

https://www.dropbox.com/s/x0169fplp4eyii7/bed2.gts?dl=0

There're two problems: 
1- There're still many spheres inside the gts surface.
2- Is there any way to to this with random packing?

Thanks for sharing ideas and experience.

cheers,
Behzad


O.reset()
from yade import utils, plot
from yade import pack, qt


O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(damping=0.7,gravity=[0,0,-10.0])
]

O.dt=1e-7
#===============Materials Declaration=========================

O.materials.append(FrictMat(young=1e7,poisson=0.3,density=1377,frictionAngle=50, label='wall'))

#=========================================================


walls=aabbWalls([(-0.002,-0.002,-0.001),(0.002,0.002,0.003)],thickness=0.0001,oversizeFactor=1.0,material='wall')
wallIds=O.bodies.append(walls)


bed=gts.read(open('bed2.gts'))


O.bodies.append(pack.gtsSurface2Facets(bed,wire=True))


for x in range(len(O.bodies)):
	if (O.bodies[x]):
		if isinstance(O.bodies[x].shape,Facet):
			O.bodies[x].state.mass=1e-4
			O.bodies[x].state.inertia=(1,1,1)


myList1=[]

for x in range(len(O.bodies)):
	if (O.bodies[x]):
		if isinstance(O.bodies[x].shape,Facet):
			myList1.append(x)

for x in myList1:
	O.bodies[x].shape.color=(0.0,0.1,0.8)

idClump1=O.bodies.clump(myList1)

for x in range(len(O.bodies)):
	if (O.bodies[x]):
		if O.bodies[x].isClump:
			clId=x

O.bodies[clId].dynamic=False


#========Generating the binder=========



bedPred1=pack.inGtsSurface(bed)

mainPred=pack.inAlignedBox((-0.0018,-0.0018,-0.0018),(0.0018,0.0018,0.0018))

pred=mainPred-bedPred1

O.bodies.append(pack.regularOrtho(pred,radius=4e-5,gap=0.0, material='wall'))





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