yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #16978
Re: [Question #665675]: Facet mesh
Question #665675 on Yade changed:
https://answers.launchpad.net/yade/+question/665675
Description changed to:
Dear All,
I am trying to understand the interaction between a facetbox and sphere.
A sphere falls under gravity in a box. The base of the box can be made
of finer facetmesh. When the sphere interacts in the box, I expect one
real interaction.
The script:
#--------------------------------------------------
#--------------------------------------------------
from yade import pack, qt, export
import numpy as np
#-----
##Defining Box
O.periodic=False
O.bodies.append(geom.facetBox(center=(0.5,0.5,0.5),extents =
(0.5,0.5,0.5), wallMask=1+2+4+8+32 )) # Facetbox except the base
N_mesh = 1 # Change this to 2,3,.. to refine mesh at the bottom
for iX in range(N_mesh):
for iY in range(N_mesh):
O.bodies.append(geom.facetBox(center=( 1.0/float(N_mesh)*(iX+0.5), 1.0/float(N_mesh)*(iY+0.5), 0.5),extents = ( 0.5/float(N_mesh), 0.5/float(N_mesh), 0.5), wallMask=16) )
#-----
O.bodies.append([sphere((0.5,0.5,0.2001),radius=0.2)]) # add a sphere
#-----
##Engine Definition
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()],allowBiggerThanPeriod=True),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
PyRunner(command = 'output()', iterPeriod = 1, label = "checker"),
NewtonIntegrator(gravity=(0,0,-9.81),damping=0.0)
]
#-----
def output():
if (O.iter < 20):
count_intrs = 0.0
for i in O.interactions:
if i.isReal:
count_intrs += 1.0
print "time:", O.time, "Sphere position", (O.bodies[-1].state.pos[2]), "contacts", count_intrs, "force", O.forces.f(O.bodies[-1].id)[2]
else:
print "done"
O.pause()
#-----
O.dt = 5e-1*PWaveTimeStep()
O.run()
#--------------------------------------------------
#--------------------------------------------------
When N_mesh = 1 (corresponding to facetbox with 6 sides), I get two
interactions of sphere with the bottom. For N_mesh>1 (say N_mesh = 2) I
get 6 interactions.
* I expect just one 'real' interaction in all cases. How can I achieve
this in output?
* The force on the sphere is different for different mesh. The position
in time is also slightly different for the two cases. What I am doing
wrong here?
* I read sometime ago on this launchpad that facetmesh should be fine at
the edges and corners for a better result - I can not find it anymore.
Someone has an idea about how fine I should make a facet surface?
Look forward to your input.
Thank you
Nishant
--
You received this question notification because your team yade-users is
an answer contact for Yade.