← Back to team overview

yade-users team mailing list archive

[Question #704485]: bodies which are controlled by "setPermF" does not move. Is it right?

 

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

I have assigned permanent forces of 1,000 acting along the z-axis to the facets.
I expected that the facets will move due to the unbalanced forces (because it has no reaction forces).
However, it will not move at all. Does the contacting force of body is different with the conventional forces acting on the rigid body surface?

Thanks in advance.

--
OS : Ubuntu 22.10
YADE : 2022.01a

The followings are MWE
===
from yade import pack, plot
import sys
sys.path.append('/home/jinsun/Dropbox/Yadee/CDSS')

def setGeomVars (): # initialize variables
     width = 0.05
     height = 0.03
     margin = 30
     # Calculate extra length
     dx = width/100/2*margin
     dy = width/100/2*margin
     dz = height/100/2*margin
     saveVars('geoms',loadnow=True,**locals())

setGeomVars ()
from yade.params.geoms import * # load initilized variables

# side pannel
p1s = (-width/2,-width/2-dy,-height/2-dz)
p5s = (-width/2,-width/2-dy,height/2+dz)
p6s = (-width/2,width/2+dy,height/2+dz)
p2s = (-width/2,width/2+dy,-height/2-dz)

side1_1 = utils.facet(vertices=[p1s,p5s,p2s], wire=True, highlight=False) #p1 p5 p2
side1_2 = utils.facet(vertices=[p2s,p5s,p6s], wire=True, highlight=False) #p1 p5 p2
O.bodies.append(side1_1)
O.bodies.append(side1_2)

p4s = (width/2,-width/2-dy,-height/2-dz)
p8s = (width/2,-width/2-dy,height/2+dz)
p7s = (width/2,width/2+dy,height/2+dz)
p3s = (width/2,width/2+dy,-height/2-dz)

side2_1 = utils.facet(vertices=[p4s,p8s,p3s], wire=True, highlight=False) #p1 p5 p2
side2_2 = utils.facet(vertices=[p3s,p8s,p7s], wire=True, highlight=False) #p1 p5 p2
O.bodies.append(side2_1)
O.bodies.append(side2_2)

# front pannel
p1f = (-width/2-dx,-width/2,-height/2-dz)
p5f = (-width/2-dx,-width/2,height/2+dz)
p4f = (width/2+dx,-width/2,-height/2-dz)
p8f = (width/2+dx,-width/2,height/2+dz)

front1 = utils.facet(vertices=[p1f,p5f,p8f], wire=True, highlight=False)
front2 = utils.facet(vertices=[p1f,p8f,p4f], wire=True, highlight=False)
O.bodies.append(front1)
O.bodies.append(front2)

# back pannel
p2b = (-width/2-dx,width/2,-height/2-dz)
p6b = (-width/2-dx,width/2,height/2+dz)
p3b = (width/2+dx,width/2,-height/2-dz)
p7b = (width/2+dx,width/2,height/2+dz)

back1 = utils.facet(vertices=[p2b,p6b,p7b], wire=True, highlight=False)
back2 = utils.facet(vertices=[p2b,p7b,p3b], wire=True, highlight=False)
O.bodies.append(back1)
O.bodies.append(back2)

#bottom pannel
p1bt = (-width/2-dx,-width/2-dy,-height/2)
p2bt = (-width/2-dx,width/2+dy,-height/2)
p3bt = (width/2+dx,width/2+dy,-height/2)
p4bt = (width/2+dx,-width/2-dy,-height/2)

bot1 = utils.facet(vertices=[p1bt,p2bt,p3bt], wire=True, highlight=False)
bot2 = utils.facet(vertices=[p1bt,p4bt,p3bt], wire=True, highlight=False)
O.bodies.append(bot1)
O.bodies.append(bot2)

# create topcap
p5t = (-width/2-dx,-width/2-dy,height/2+2*dz)
p6t = (-width/2-dx,width/2+dy,height/2+2*dz)
p7t = (width/2+dx,width/2+dy,height/2+2*dz)
p8t = (width/2+dx,-width/2-dy,height/2+2*dz)

topcap1 = utils.facet(vertices=[p5t,p6t,p7t], wire=True, highlight=False)
topcap2 = utils.facet(vertices=[p5t,p8t,p7t], wire=True, highlight=False)
O.bodies.append(topcap1)
O.bodies.append(topcap2)

no_bodies = len(O.bodies)
O.bodies[no_bodies-1].shape.highlight = True 
O.bodies[no_bodies-2].shape.highlight = True 

top_caps = range(no_bodies-2, no_bodies) # 

O.materials.append(FrictMat(young=20e6, poisson=0.17, density=2000, label='frictmat')) 

O.engines = [
    ForceResetter(),
    InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]),
    InteractionLoop(
            [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()],  # collision geometry
            [Ip2_FrictMat_FrictMat_FrictPhys()],  # collision "physics"
            [Law2_ScGeom_FrictPhys_CundallStrack()]  # contact law -- apply forces
    ),
    NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.02),
#    PyRunner(command='addData()', iterPeriod=100),
    PyRunner(command='addPlotData()', iterPeriod=100),
#    ForceEngine(force=(0,0,-1000),ids=top_caps, label="ovp"),
#    ServoPIDController(axis=(0,0,1), ids=top_caps, target=servo_targetForce, kD=5.0, kI=5.0, kP=5.0, maxVelocity=-0.01, iterPeriod=100, label="servo_1"),
    DomainLimiter(lo=(-width,-width,-height+2*dz), hi=(width,width,2*height), iterPeriod = 100, label = 'Domain') # destroy balls outside domain in every 100 steps
]

def addPlotData():
    top_cap_force=(O.forces.f(no_bodies-2)[2] + O.forces.f(no_bodies-2)[2])
    top_cap_zdisp=O.bodies[no_bodies-2].state.displ()[2] # direction in z
    plot.addData(i=O.iter, top_cap_force=top_cap_force, w=O.iter, top_cap_zdisp=top_cap_zdisp)

plot.plots={'i':('top_cap_force',), 'w':('top_cap_zdisp',)}
plot.plot()

O.forces.setPermF(O.bodies[-1].id,(0,0,-1000))
O.forces.setPermF(O.bodies[-2].id,(0,0,-1000))

O.dt=0.5*PWaveTimeStep()
O.run()

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