← Back to team overview

yade-users team mailing list archive

[Question #671141]: Positioning a cylinder

 

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

Hi all!

I would like to make a rotary drum. My first idea was to make it with facet.Cylinder command.

My questions are:
1. How can I make that the center line of the drum to be parallel to the x-axis not z-axis?
2. I would like to lift one end, so the drum's axis close some angle with x-axis. How should I do it?
3. Should I use a different command for making a cylinder?

Thanks,
Daniel

Here is a simple code:

from yade import pack, qt

readParamsFromTable(n=1,dens=2092,frict=40.3,E=4e5,coh=1e4,eta=.05)
from yade.params.table import *

#szemcses anyag adatai
particlematerial=CohFrictMat(young=E,poisson=.2,density=dens,frictionAngle=radians(frict),normalCohesion=coh,shearCohesion=coh,momentRotationLaw=True,etaRoll=eta,etaTwist=eta)
O.materials.append(particlematerial)

#sampling
sampling=.01 #second

#keveres parameterei
omega=2*pi*n

#rotary drum material
id_Mater=O.materials.append(FrictMat(young=200e9,poisson=.3,density=7750,frictionAngle=.7))
Mater=O.materials[id_Mater]

#rotary drum geometry
drum=O.bodies.append(geom.facetCylinder((0,0,0),radius=1,height=2,orientation=Quaternion((1,0,0),0),segmentsNumber=10,wallMask=4,color=(.3,.3,.3)))

#generating particles
sp=pack.SpherePack()
sp.makeCloud((-.1,-.1,.1),(.1,.1,.6),rMean=.02,rRelFuzz=0)
sp.toSimulation(material=particlematerial, color=(1,1,1))

#Engines
O.engines=[
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
	InteractionLoop(
		[Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Facet_Sphere_ScGeom()],

		[Ip2_FrictMat_FrictMat_FrictPhys(),Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(label="cohesiveIp")],
		[Law2_ScGeom_FrictPhys_CundallStrack(),Law2_ScGeom6D_CohFrictPhys_CohesionMoment(
			useIncrementalForm=True,
			always_use_moment_law=True,
			label='cohesiveLaw')]
	),
   NewtonIntegrator(gravity=(0,0,-9.81),damping=.5),
   RotationEngine(rotateAroundZero=True,zeroPoint=(0,0,0),rotationAxis=(0,0,1),angularVelocity=omega, ids = drum),
   PyRunner(command='start()',realPeriod=2,label='checker'),

]

O.dt=.001*PWaveTimeStep()
O.step()

def start():
   if O.iter<1: return
   O.engines[2].lawDispatcher.functors[1].always_use_moment_law = True
   O.engines[2].physDispatcher.functors[1].setCohesionOnNewContacts = True
   checker.command='stop()'

def stop():
    if O.time<10: return
    O.pause()



O.saveTmp()
v=qt.View()
v.eyePosition=(0,-3,.5);v.upVector=(0,0,1);v.viewDir=(0,3,.5)

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