← Back to team overview

yade-users team mailing list archive

Re: [Question #245072]: exciting box

 

Question #245072 on Yade changed:
https://answers.launchpad.net/yade/+question/245072

    Status: Open => Answered

Klaus Thoeni proposed the following answer:
Hi,

applying forces to facets which are non-dynamic forces has no effect as
Jan already mentioned.

Have a look at this:

# -*- coding: utf-8 -*-
from yade import qt

## PhysicalParameters
Young = 30e9
Poisson = 0.2
Density=1000
# Append a material
mat=O.materials.append(FrictMat(young=Young,poisson=Poisson,density=Density,frictionAngle=.5))

facets=O.bodies.append(utils.geom.facetBox((.5,.5,.5),(.5,.5,.5),wallMask=63,material=mat))
sphere=O.bodies.append([sphere([0.5,0.5,0.5],.2,material=mat)])

O.engines=[
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
	InteractionLoop(
		# handle sphere+sphere and facet+sphere collisions
		[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
		[Ip2_FrictMat_FrictMat_FrictPhys()],
		[Law2_ScGeom_FrictPhys_CundallStrack()]
	),
	HarmonicMotionEngine(A=[0.4,0,0], f=[5.,0,0.0], fi = [pi/2.,0.0,0.0], ids = facets),
	ForceEngine(force=(0,0,-10.),ids=sphere),
	GlobalStiffnessTimeStepper(timestepSafetyCoefficient=0.01),
	NewtonIntegrator(damping=0.4,gravity=(0,0,-9.81)),
]

O.saveTmp()

## to see it
qt.View()
	
#O.run()

HTH
Klaus

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.