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

Tetra contact

0 votes
6 views
asked Oct 31 by alanbds (160 points)

Hello,

I'm trying to understand and use some contacts on the Tet4.make.

I need to make a sleeper (wood between the railroad trails), and this object needs to be elastic, so I'm looking for some way to make it with Tet4.

import woo
from woo.dem import *
from woo.fem import *
from woo.core import *
import woo.utils
from woo import *
from woo import utils
woo.master.usesApi=10102
mat=woo.utils.defaultMaterial()

S=woo.master.scene=Scene(fields=[DemField(gravity=(0,0,-10))])

# block rotations for now
nn=[Node(dem=DemData(mass=100,blocked='XYZ'),pos=p) for p in [(0,0,0),(1,0,0),(1,1,0),(0,1,0),(0,0,1),(1,0,1),(1,1,1),(0,1,1)]]

t0=Tet4.make([nn[0],nn[1],nn[2],nn[5]],mat=mat,wire=False,fixed=None)
t1=Tet4.make([nn[0],nn[2],nn[3],nn[7]],mat=mat,wire=False,fixed=None)
t2=Tet4.make([nn[0],nn[2],nn[5],nn[7]],mat=mat,wire=False,fixed=None)
t3=Tet4.make([nn[0],nn[4],nn[5],nn[7]],mat=mat,wire=False,fixed=None)
t4=Tet4.make([nn[2],nn[5],nn[6],nn[7]],mat=mat,wire=False,fixed=None)


for n in nn[0:4]: n.dem.blocked='xyzXYZ'

S.dem.par.add([t0,t1,t2,t3,t4])
for p in S.dem.par: p.shape.setRefConf()

m=utils.defaultMaterial()
S.dem.par.add([Sphere.make((.5,.5,2),.3,mat=m)])

S.engines=DemField.minimalEngines(damping=.4)+[IntraForce([In2_Tet4_ElastMat(contacts=True)])]

S.lab.collider.dead=True
S.lab.collider.noBoundOk=True
S.dtSafety=.1
S.saveTmp()

I insert 1 sphere to read the contact between the tetra object and the sphere, but I'm not following the right instructions of contacts.

1 Answer

0 votes
answered Nov 3 by eudoxos (45,130 points)

Hi Alan, the In2_Tet4_ElastMat.contacts says it is not yet implemented. Actually the idea is that tetrahedra as volume elements have no contacts, only their surfaces have. So what you need to do is cover your tetrahedron mesh with Facets (that is, triangle elements without any internal forces, so no Membrane or anything like that); these will carry contact forces to the mesh nodes, and Tetrahedra will then react to those forces by deformation. That means you will have to add In2_Facet to IntraForce, which will do the force transfer. Look at examples/tetra2.py for an inspiration, but please write here if you need more assistance. I am on a trip now so I am not able to send you a full simulation script right now, but can guide you. Hope this helps, Vaclav

commented Nov 10 by alanbds (160 points)

Hi

Great! I was reading about facets and I'm trying here to do that. Thank you for your time!

Regards
Alan

...