← Back to team overview

yade-users team mailing list archive

[Question #660999]: How to fill inside a gts file with spheres

 

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

Hello everyone,

I have looked the questions [1] that had already posted on the YADE community and i did not find a correct way to solve my problem.

Let me describe step by step what i am doing on this project.

Basically, i have created a gts file based on stl file (stl2gts -r <filename.stl> filename.gts. There is no issue on this part of simulation.

Then, i have imported the gts file on the YADE by the code below and also there is no issue on this part of simulation.
___________________________________________________________
"import gts
surf=gts.read(open('filename.gts'))
O.bodies.append(pack.gtsSurface2Facets(surf,wire=False))"
____________________________________________________________

Finally, i have tried to fill my predicate (gts) with sphere inside of my gts geometry. However, the spheres are filling outside my gts file (around the body). So, my question is How Do I fill inside my gts file? Is there any specific code to do it?

My completely Yade code is below:

#########################################
#!/usr/bin/python
# -*- coding: utf-8 -*-

from yade.pack import *
from yade import pack,export,qt
from math import *
from yade import plot
from yade import ymport
import gts

 surf=gts.read(open('filename.gts'))

if surf.is_closed():
         pred=pack.inGtsSurface(surf)
         aabb=pred.aabb()
         dim0=aabb[1][0]-aabb[0][0]; radius=dimk0/40.
         O.bodies.append(pack.regularHexa(pred,radius=radius,gap=0))

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

O.dt=.7*PWaveTimeStep()
O.saveTmp()
O.timingEnabled=True
O.trackEnergy=True
qt.View()
###################################################


[1] Just one more comment, I would like to share all questions that I have looked to find a answer for this question.

https://answers.launchpad.net/yade/+question/643823
https://answers.launchpad.net/yade/+question/247095
https://answers.launchpad.net/yade/+question/254316
https://answers.launchpad.net/yade/+question/295158
https://answers.launchpad.net/yade/+question/402952
https://answers.launchpad.net/yade/+question/406791
https://answers.launchpad.net/yade/+question/280730
https://answers.launchpad.net/yade/+question/497350
https://answers.launchpad.net/yade/+question/247095
https://answers.launchpad.net/yade/+question/257199


Hope i have provided all information to understand what i am looking for getting to do.

I will be waiting for one answer about this case.

Thanks an advance.

Felipe Silva





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