← Back to team overview

yade-users team mailing list archive

[Question #673337]: Deformable elements

 

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

hi, i need your help. I got confused reading about contact laws, Pfacet function and this functor law :

Ig2_GridNode_GridNode_GridNodeGeom6D(),
		Ig2_GridConnection_GridConnection_GridCoGridCoGeom(),
		Ig2_Sphere_PFacet_ScGridCoGeom(),
Ig2_PFacet_PFacet_ScGeom()

About the functor: i can't lounch the trunk file[1] becouse of this : from yade.gridpfacet import *. It 's like my yade version doesn't have that lybrary.

[1]https://github.com/yade/trunk/blob/master/examples/pfacet/mesh-pfacet.py


->What are the differences in opening a gts file normally (as i used in the second script, see below) and using Pfacet?

My goal is to make my gts surface deformable. i tryied in two ways: 

1)the first is made by considering the surface facets all clumped togheter, and this clumped object will hit a soil made by sphere bodies. The surface acts as a rigid body(script1). Searching on internet about deformable elements i read about gridPfacet, but it's not so clear to me.

->Does exist a way to make this clumped facets "deformable"?

 here is my example script:

from yade import pack, plot
from yade import export, ymport
from yade import utils
from yade import qt
from yade import plot
import sys,time

################
##box material##
################

idCA=FrictMat(density=2227,frictionAngle=radians(0.5),label='CA',young=30e9,poisson=0.15)
O.materials.append(idCA)

#####################################
########### BOX 1 ###################
#####################################

facets=geom.facetBox((4,0,0),(1.2,1.2,1.2),wallMask=63)

for f in facets:
    f.dynamic=True
    f.state.mass=10
    #f.state.inertia=(0.1,0.5,0.4)
    f.fixed=True
    

clumpID,clumpMembersIds = O.bodies.appendClumped(facets)
clump = O.bodies[clumpID] 
clump.state.mass = 10000 
clump.state.vel=(-18,0,0)
################
##box material##
################

idCA=FrictMat(density=2227,frictionAngle=radians(0.5),label='CA',young=30e9,poisson=0.15)
O.materials.append(idCA)

############################
####### BOX 2 ##############
############################


O.bodies.append(geom.facetBox((0,0,0),(2,2,2),wallMask=29)) 


#################
##soil material##
#################

idSoil=FrictMat(density=1500,frictionAngle=radians(29),label='soil',young=11277647.5,poisson=0.21)	
O.materials.append(idSoil)

############################

pred=pack.inAlignedBox((-2,-2,-2),(2,2,2))
spheres=pack.regularHexa(pred,radius=0.1,gap=0)
O.bodies.append(spheres)



###################
###################
###################

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
   InteractionLoop(
      [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
      [Ip2_FrictMat_FrictMat_FrictPhys()],
      [Law2_ScGeom_FrictPhys_CundallStrack()]
   ),
# TranslationEngine(translationAxis=(-1,0,0),velocity=18,ids=clumpID,label='trans'),
 NewtonIntegrator(gravity=(0,0,-9.81),damping=0),
 ForceRecorder(ids=clumpMembersIds,file='force1.txt',label='fRec',iterPeriod=5),
 PyRunner(command='BlockRotation()',iterPeriod=1),
]

################
####funzioni####
################

def BlockRotation():
     for s in spheres :
        s.state.angVel=(0,0,0)



O.dt=0.8*PWaveTimeStep()
O.saveTmp()

######################################################################
#######################################################################

2) The second way is built filling the gts surface with balls, make them clumped togheter and let them move against the soil. Even in this case the "surface" is acting as a rigid body. I would like to see the balls changing their mutual position but holding togheter (in this way i should see a sort of deformation on my object). i post an example script of my work. As gts surface i used the file horse.coarse.gts. i hope the script follows your rules. As you can see it acts as a rigid body.

################################################################
###############################################################

from yade import pack, plot
from yade import export, ymport
from yade import utils
from yade import qt
from yade import plot
import sys,time

################
##box material##
################

#####################
####### AEREO #######
#####################

surf = gts.read(open('horse.coarse.gts'))

idCA=FrictMat(density=3000,frictionAngle=radians(0.5),label='CA',young=20e8,poisson=0.3)
O.materials.append(idCA)

if surf.is_closed():
	pred=pack.inGtsSurface(surf,noPad=True)
	aabb=pred.aabb()
	dim0=aabb[1][0]-aabb[0][0];
	
        ball=pack.regularHexa(pred,radius=0.005,gap=0,color=(1,0,0))

clumpID,clumpMembersIds = O.bodies.appendClumped(ball)
clump = O.bodies[clumpID] 
clump.state.mass = 400 
clump.state.vel=(-18,0,0)
################
##box material##
################

idCA=FrictMat(density=2227,frictionAngle=radians(0.5),label='CA',young=30e9,poisson=0.15)
O.materials.append(idCA)

############################
####### BOX 2 ##############
############################


O.bodies.append(geom.facetBox((-0.3,0,0),(0.2,0.2,0.1),wallMask=29)) 


#################
##soil material##
#################

idSoil=FrictMat(density=1500,frictionAngle=radians(29),label='soil',young=11277647.5,poisson=0.21)	
O.materials.append(idSoil)

############################

pred=pack.inAlignedBox((-0.5,-0.2,-0.1),(-0.1,0.2,0.1))
spheres=pack.regularHexa(pred,radius=0.02,gap=0)
O.bodies.append(spheres)



###################
###################
###################

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
   InteractionLoop(
      [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
      [Ip2_FrictMat_FrictMat_FrictPhys()],
      [Law2_ScGeom_FrictPhys_CundallStrack()]
   ),
# TranslationEngine(translationAxis=(-1,0,0),velocity=18,ids=clumpID,label='trans'),
 NewtonIntegrator(gravity=(0,0,-9.81),damping=0),
 ForceRecorder(ids=clumpMembersIds,file='force1.txt',label='fRec',iterPeriod=5),
 PyRunner(command='BlockRotation()',iterPeriod=1),
]

################
####funzioni####
################

def BlockRotation():
     for s in spheres :
        s.state.angVel=(0,0,0)



O.dt=0.8*PWaveTimeStep()
O.saveTmp()

############################################
#############################################


->Could be a contact law problem  ? if yes i think i'll have to change even the functor.
 
i'm using this law Law2_ScGeom_FrictPhys_CundallStrack() which is linear elasto-plastic. I read also about these laws :

- Law2_ScGeom6D_CohFrictPhys_CohesionMoment which is An augmented version of Law2_ScGeom_FrictPhys_CundallStrack with cohesion and torques at contacts. Creep is optional. 

- Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM which is usefull for Elastic contact law with cohesion and joints for fractured rock modelling. 

-> which is the most usefull for my goal?

really thanks for your time. I hope my goal is achievable with yade.

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