# yade-users team mailing list archive

## [Question #700274]: Facet in the model disappears

```New question #700274 on Yade:

Hello everyone!
I am trying to compact a mixed specimen of ball and polyhedra.  In this process, I generate a facet as a compaction plate above the specimen. But when the platen was in contact with the specimen, it disappeared immediately.

Here is the script：
import numpy
from pprint import pprint
import random
import math
from random import uniform
from random import randint
from math import *

matP = PolyhedraMat()
matP.density = 2650 #kg/m^3
matP.young = 5.5E9#Pa  5.5E9
#matP.young = 2.75 #Pa 1E7
matP.poisson = 0.25 # 20000/1E7
O.materials.append(matP)

steel= PolyhedraMat()
steel.density = 2600 #kg/m^3
steel.young = 15E9 #inital steel was  15E9
steel.poisson = 0.21
O.materials.append(steel)

sphereballast = CohFrictMat()#
sphereballast.density = 2000
#sphereballast.young = 5.5E8
sphereballast.young = 3E8
sphereballast.possion = 0.5
sphereballast.alphaKr = 2
sphereballast.etaRoll = 1
sphereballast.isCohesive = True
O.materials.append(sphereballast)

h=0
b=0.15 #if the shape or the size of the boundary need to change, dont forget the contact number in wall's velocity.
mpi=math.pi
O.bodies.append(geom.facetBox((0,-0.2,h+0.5*b),(0.162,0.05,0.5*b),material=steel))
O.bodies.append(geom.facetBox((0,0.2,h+0.5*b),(0.162,0.05,0.5*b),material=steel))
O.bodies.append(geom.facetBox((-0.2,0,h+0.5*b),(0.05,0.162,0.5*b),material=steel))
O.bodies.append(geom.facetBox((0.2,0,h+0.5*b),(0.05,0.162,0.5*b),material=steel))
O.bodies.append(geom.facetBox((0.14,0.14,h+0.5*b),(0.05,0.162,0.5*b),orientation=Quaternion((0,0,1),mpi/4),material=steel))
O.bodies.append(geom.facetBox((-0.14,0.14,h+0.5*b),(0.05,0.162,0.5*b),orientation=Quaternion((0,0,1),-mpi/4),material=steel))
O.bodies.append(geom.facetBox((0.14,-0.14,h+0.5*b),(0.05,0.162,0.5*b),orientation=Quaternion((0,0,1),-mpi/4),material=steel))
O.bodies.append(geom.facetBox((-0.14,-0.14,h+0.5*b),(0.05,0.162,0.5*b),orientation=Quaternion((0,0,1),mpi/4),material=steel))

O.bodies.append(utils.wall((0,0,0),2,sense=0,material=steel))

O.bodies.append(ymport.textPolyhedra('/tmp/mpack1.dat',material=matP))
O.bodies.append(ymport.textExt('/tmp/mnsphere1.dat',material=sphereballast))

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Polyhedra_Aabb(),Bo1_Wall_Aabb(),Bo1_Facet_Aabb(),Bo1_Sphere_Aabb()]),
InteractionLoop(
[Ig2_Polyhedra_Polyhedra_PolyhedraGeom(),Ig2_Sphere_Sphere_ScGeom(),Ig2_Sphere_Polyhedra_ScGeom(), Ig2_Facet_Polyhedra_PolyhedraGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom(),Ig2_Wall_Polyhedra_PolyhedraGeom()],
[Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys(), Ip2_FrictMat_PolyhedraMat_FrictPhys(),Ip2_FrictMat_FrictMat_FrictPhys(),Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()],
[Law2_PolyhedraGeom_PolyhedraPhys_Volumetric(),Law2_ScGeom_FrictPhys_CundallStrack(), Law2_ScGeom6D_CohFrictPhys_CohesionMoment()],
),
NewtonIntegrator(damping=0.7,gravity=(0,0,-9.8)),
PyRunner(command='Compact()',iterPeriod=1,label='step'),
PyRunner(command='cycle()',iterPeriod=1),
]

global a
a=1

def Compact():
global a
if a == 1:
ldpltheight=max([b.state.pos[2]+b.shape.radius for b in O.bodies if isinstance(b.shape,Sphere)])
fa1=utils.facet([(0.15,0.15,ldpltheight),(-0.15,0.15,ldpltheight),(-0.15,-0.15,ldpltheight)],wire=False,material=steel)
O.bodies.append(fa1)
fa2=utils.facet([(0.15,0.15,ldpltheight),(0.15,-0.15,ldpltheight),(-0.15,-0.15,ldpltheight)],wire=False,material=steel)
O.bodies.append(fa2)
a=a+1
elif a == 2:
Lastnum1=O.bodies[-2].id
O.bodies[Lastnum1].state.blockedDOFs='xyXYZ'
O.bodies[Lastnum1].state.angVel=(0,0,0)
O.bodies[Lastnum1].state.vel=[0,0,-0.5]
Lastnum=O.bodies[-1].id
O.bodies[Lastnum].state.blockedDOFs='xyXYZ'
O.bodies[Lastnum].state.angVel=(0,0,0)
O.bodies[Lastnum1].state.vel=[0,0,-0.5]

O.dt=0.000001

The vanishing facets I described above are fa1 and fa2. But as you can see, the boundaries in the model are also facets, and these facets work fine.
How did the above problem arise?
xue

--