Welcome to ask.woodem.org. You may post when you login through your GitHub account.

Using the deformable membrane to move spheres

0 votes
asked Nov 10 by Snowbughappyboy (190 points)

I want to use the deformable membrane to realise the scene as shown in the picture,

The blue is the membrane and the green and the red are two spheres. The black is a facet. When the membrane encounters the small sphere (green sphere 1) , it can bend and pass it. But when the membrane comes across the big sphere (red sphere 2), it's bending deformation is too small to get over the sphere and the big sphere is pushed away.

Here is the code i am using. A cloud of sphere drop on the plane (a facet) and the membrane moves from right to left to push the particles. The movement of the membrane is conducted by setting the upper part of the membrane with a constant velocity. Then the lower part encounters the particles and push it. 

from woo.core import *
from woo.dem import *
from woo.fem import *
#from minieigen import *
import woo, woo.pack, woo.utils, woo.qt, woo.gl
import numpy as np 
import os  


S.gl.demField.nodes = False
S.gl.node.wd = 4
S.gl.membrane.node = False
S.gl.node.len = .05
S.gl.membrane.phiScale = 0.
S.gl.membrane.uScale = 0.
S.gl.membrane.relPhi = 0.
S.dem.gravity=(0, 0, -9.81)  
S.gl.demField.colorBy = 'vel'

ymax, zmax = 10e-3, 10e-3  
ymin = zmin = 0 
xpos = 0 
ydiv, zdiv = 20, 20 
zdivlen = (zmax-zmin)/(zdiv-1)
ff=woo.pack.gtsSurface2Facets(woo.pack.sweptPolylines2gtsSurface([[(xpos, y, z) for y in np.linspace(ymin, ymax, ydiv)] for z in np.linspace(zmin, zmax, zdiv)]), flex=True) 
S.dem.par.add(ff, nodes=True) 
memnodes = []
for en in S.dem.nodes:
    en.dem.inertia = (1.,1.,1.)
    en.dem.blocked= ''
    if en.pos[2] > zmax*0.5:

    en.dem.mass = 0.1 

S.engines = [
    InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()],verletDist=0.01),
    ContactLoop([Cg2_Sphere_Sphere_L6Geom(),Cg2_Facet_Sphere_L6Geom()],[Cp2_FrictMat_FrictPhys()],[Law2_L6Geom_FrictPhys_IdealElPl()],applyForces=False), # forces are applied in IntraForce
    IntraForce([In2_Membrane_ElastMat(thickness=.01, bending=False, bendThickness=.2),In2_Sphere_ElastMat()]),
    PyRunner(100, 'membrane_move()'),
    PyRunner(100, 'pause()'),
#    woo.qt.SnapshotEngine(fileBase='snap', counter=0,),
    woo.qt.VtkExport(stepPeriod=1000, what=VtkExport.spheres|VtkExport.mesh,out='./tmp/p1-'),
#     VtkExport(out='/tmp/membrane',stepPeriod=100,what=VtkExport.spheres|VtkExport.mesh)

# a few spheres falling onto the mesh

sph_mat = FrictMat(young=1e6, density=30000)
sp_cloud_minc = (0e-3, 0, 0.5e-3)
sp_cloud_maxc = (4e-3, 4e-3, 4e-3) 
rmean, rrlzz = 0.2e-3, 0.3 
sp.makeCloud(sp_cloud_minc, sp_cloud_maxc, rMean=rmean, rRelFuzz=rrlzz, periodic=False)
sp.toSimulation(S, mat=sph_mat) 

## creat a wall 
base_mat = FrictMat(young=1e6, density=30000) 
S.dem.par.add([Facet.make([(-20e-3,-20e-3,-1e-3),(50e-3,0,-1e-3),(-20e-3,20e-3,-1e-3)], halfThick=1e-3, mat=base_mat, fixed=True, wire=True)])

def membrane_move():
    if S.time > 2e-3:
        for en in memnodes:
            en.dem.vel[0] = 0.01   
def pause():
    if S.time > 1000e-3:
S.dt = 0.5*woo.utils.pWaveDt(S) 



The current result is that the membrane push all the particles away and there is no bending defromation as expected.  

 I have three questions, 

1. Does this code has the potential to realise my intent. If not, please give me some instructions. 

2. How to determine the inertia, mass and thickness of  stretching and bending of membrane element? Which one is most concerned in my case? 

3. When i change the bending argument = True in the line  of  IntraForce([In2_Membrane_ElastMat(thickness=.01, bending=False, bendThickness=.2),In2_Sphere_ElastMat()]), the errors followed happen, 

WARN  /home/virpc/woo/pkg/fem/Membrane.cpp:356 computeNodalDisplacements: Membrane's in-plane rotation in a node is > 3.1 radians, expect unstability!

Much thanks, 

Xuesong Gao 


commented Nov 11 by eudoxos (48,170 points)

Hi, just a quick comment before going into details: one membrane element itself will not geometrically deform though the nodes will undergo rotation. You will have to discretize the membrane so that it is comprised of multiple elements in the vertical direction. If you assign non-zero thickness, nodal parameters (mass, inertia) should be inferred automatically. Hope this makes some sense, I will try to get back to you with a more elaborate answer.

commented Nov 12 by Snowbughappyboy (190 points)

Mush thanks. I am looking forward to it.

Please log in or register to answer this question.