← Back to team overview

yade-users team mailing list archive

[Question #678056]: three spheres with roling

 

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

I have very simple test 3 spheres and one in middle is moving - question what is wrong and there are no rolling?

# basic simulation showing sphere falling ball gravity,
# bouncing against another sphere representing the support
os.environ['OMP_NUM_THREADS']='8'
import math
import random
# DATA COMPONENTS




promien_k = (3/(4*math.pi))**(1./3) 

young_k = 1e9 
poisson_k = 0.25
density_k = 1
vObnizenia = -0.5*promien_k
frictAngle = atan(0.6) 


#O.materials.append(FrictMat(young=young_k, poisson=poisson_k, density=density_k, frictionAngle=atan(0.3), label='kula'))


O.materials.append(CohFrictMat(young=young_k, poisson=poisson_k, density=density_k, frictionAngle=frictAngle,normalCohesion=0, shearCohesion=0, momentRotationLaw=False, label='kula'))

O.bodies.append([
		utils.sphere(center=(0,0,0),radius=promien_k,fixed=True,material='kula')
		],)
O.bodies.append([
		utils.sphere(center=(0.5*promien_k,0,1.95*promien_k),radius=promien_k,fixed=False,material='kula')
		],)

O.bodies.append([
		utils.sphere(center=(-0.*promien_k,0,3.90*promien_k),radius=promien_k,fixed=False,material='kula')
		],)

O.bodies[1].state.blockedDOFs='zx'
O.bodies[2].state.blockedDOFs='zx'

O.dt=utils.PWaveTimeStep()



#########################################
nazwaPliku = "wyniki/kule"
nazwaPlikuIter = "wyniki/Kule_iter_30z"
############### Parametry zapisu c++ ########
print("DT do zapisu")
step = O.dt
PiterSave = 10 #ile zapisow w pliku
PtimeSr = 3*step
PtimeStart = 0. #start zapisu
PdeltaTime = 0.005 #1000*step #skok miedzy zapisami

TimeStartAll=1000000
DeltaTimeAll=10000
################################
################################
# FUNCTIONAL COMPONENTS

# simulation loop -- see presentation for the explanation
O.engines=[
	VppSaveInteractions(fileName=nazwaPlikuIter, iterSave= PiterSave, timeSr = PtimeSr, timeStart = PtimeStart, deltaTime= PdeltaTime,timeStartAll = TimeStartAll,deltaTimeAll = DeltaTimeAll ),
   ForceResetter(),
   PyRunner(command='O.forces.addMove(1,(vObnizenia*O.dt,0,0))',iterPeriod=1),
   InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1),Bo1_Wall_Aabb(),Bo1_Facet_Aabb()]),
   InteractionLoop(
		[Ig2_Sphere_Sphere_ScGeom6D(interactionDetectionFactor=1.3),
		Ig2_Wall_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom6D()],
		[Ip2_FrictMat_FrictMat_FrictPhys(),
		Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=True),
		],
		[Law2_ScGeom_FrictPhys_CundallStrack(),
		]
	),
   # apply gravity force to particles
   GravityEngine(gravity=(0,0,-9.81)),
   # damping: numerical dissipation of energy
   NewtonIntegrator(damping=0.2)
]

# set timestep to a fraction of the critical timestep
# the fraction is very small, so that the simulation is not too fast
# and the motion can be observed


# save the simulation, so that it can be reloaded later, for experimentation
O.saveTmp()
Gl1_Sphere.stripes=True
Gl1_Sphere.quality=1
yade.qt.Controller(), yade.qt.View();

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