Connect a rod vertically to a horizontal pipe

Asked by Hashir Ahmad

I have made a geometry in which a cylindrical column is kept horizontally inside a sand box. I want to connect a rod vertically to the pipe, such that inside the box, the rod and column make an inverted T shaped figure.

So, far I have written the code for placing the column inside the sand box. I can create a vertical rod, but how to connect the two?
Here's my code:

from yade import pack
from yade import ymport
from yade import plot
from yade import qt

young=5e6

mColumn = O.materials.append(CohFrictMat(young= young,poisson= 0.3,density= 2e3,frictionAngle=radians(0.5),isCohesive= True, normalCohesion= 170e7,shearCohesion=85e7))

def createSandBox(length, height, width, radSpheres, variance, color):
  boxpred = pack.inAlignedBox((0,0.5,-0.5),(length,height,width)) - pack.inCylinder((0.25,1,0), (1.75,1,0), 0.3)
  packing = pack.randomDensePack(boxpred, spheresInCell = 500, radius=radSpheres, rRelFuzz=variance, color=color, returnSpherePack = False)
  return O.bodies.append(packing)

def createStoneColumn(centerBottom, centerTop, radCyl, radSpheres, variance, mat, color):
  cylpred = pack.inCylinder(centerBottom, centerTop, radius=radCyl)
  packing = pack.randomDensePack(cylpred, spheresInCell = 500, radius=radSpheres, rRelFuzz=variance, material=mat, color=color, returnSpherePack = False)
  return O.bodies.append(packing)

idBox = createSandBox(2,1.5,0.5,3e-2,0,(1,0.917,0.659))
idStone = createStoneColumn((0.25,1,0),(1.75,1,0),0.3,2e-2,0, mColumn, (1,0.646,0.361))

Regards
Hashir

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hi Hashir,
have a look at [1]

#### example
from yade import pack
pipe = pack.inCylinder((0,0,0),(10,0,0),3)
rod = pack.inCylinder((5,0,0),(5,0,10),2)
predicate = pipe | rod
packing = pack.randomDensePack(predicate,radius=.3,spheresInCell=200)
O.bodies.append(packing)
####

cheers
Jan

[1] https://yade-dem.org/doc/user.html#boolean-operations-on-predicates

Can you help with this problem?

Provide an answer of your own, or ask Hashir Ahmad for more information if necessary.

To post a message you must log in.