How to fix a Pfacet with node

Asked by Ali Rafiee on 2020-07-24

Hi everybody,

I have a problem with fixing (blocking) a pfacet with nodes.
in fact, I wanted to fix a pfacet just from bottom part, so I fix the below nodes, but this method did not work.
I do not want to completely fix the pfacet, just only lower part.

here is my simple code:

###################################
from yade import qt, pack, utils, ymport, export
from yade.gridpfacet import *
import gts, os.path, locale
import math

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

#### Engines ####
O.engines=[
 ForceResetter(),
 InsertionSortCollider([
  Bo1_GridConnection_Aabb(),Bo1_Sphere_Aabb(),Bo1_PFacet_Aabb(),
 ]),
 InteractionLoop([
  Ig2_Sphere_Sphere_ScGeom(),
                Ig2_Sphere_GridConnection_ScGridCoGeom(),
                Ig2_Sphere_PFacet_ScGridCoGeom(),
                Ig2_GridNode_GridNode_GridNodeGeom6D(),
                Ig2_GridConnection_GridConnection_GridCoGridCoGeom(),
                Ig2_GridConnection_PFacet_ScGeom(),
                #Ig2_PFacet_PFacet_ScGeom(),

 ],
 [
  Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False), # internal cylinder physics
  Ip2_FrictMat_FrictMat_FrictPhys() # physics for external interactions, i.e., cylinder-cylinder interaction
 ],
 [ Law2_ScGeom_FrictPhys_CundallStrack(), # contact law for sphere-sphere
  Law2_ScGeom6D_CohFrictPhys_CohesionMoment(), # contact law for "internal" cylinder forces
  Law2_ScGridCoGeom_FrictPhys_CundallStrack(), # contact law for cylinder-sphere
  Law2_GridCoGridCoGeom_FrictPhys_CundallStrack() # contact law for cylinder-cylinder interaction
 ]
 ),
        GlobalStiffnessTimeStepper(timestepSafetyCoefficient=0.1,label='ts'),
        NewtonIntegrator(gravity=(0,0,-9.81),damping=.1,label='newton'),

]

youngm=1.3e11
poissonm=0.2
densitym=5300*100

##########################################################
O.materials.append(CohFrictMat(young=200e9,poisson=0.3,density=5600,frictionAngle=radians(20),normalCohesion=1e20,shearCohesion=1e20,momentRotationLaw=True,label='cMatx'))
O.materials.append(FrictMat(young=200e9,poisson=0.3,density=5600,frictionAngle=radians(20),label='fMatx'))
##########################################################

##############################################################################################
newob0=len(O.bodies)
print(newob0)

raduis_1=0.005

pf_1_1=O.bodies.append(gridNode([ 8.2928,-0.1, .3],raduis_1,wire=False,fixed=False,material='cMatx',color=[0,0,25]))

pf_1_2=O.bodies.append(gridNode([ 8.4928,-0.1, .3],raduis_1,wire=False,fixed=False,material='cMatx',color=[0,0,25]))

pf_1_3=O.bodies.append(gridNode([ 8.4928,-0.1, 0],raduis_1,wire=False,fixed=True,material='cMatx',color=[0,0,25]))

pf_1_4=O.bodies.append(gridNode([ 8.2928,-0.1, 0],raduis_1,wire=False,fixed=True,material='cMatx',color=[0,0,25]))

pf_1_5=O.bodies.append(gridNode([ 8.2928, 0, .3],raduis_1,wire=False,fixed=False,material='cMatx',color=[0,0,25]))

pf_1_6=O.bodies.append(gridNode([ 8.4928, 0, .3],raduis_1,wire=False,fixed=False,material='cMatx',color=[0,0,25]))

pf_1_7=O.bodies.append(gridNode([ 8.4928, 0, 0],raduis_1,wire=False,fixed=True,material='cMatx',color=[0,0,25]))

pf_1_8=O.bodies.append(gridNode([ 8.2928, 0, 0],raduis_1,wire=False,fixed=True,material='cMatx',color=[0,0,25]))

O.bodies.append( gridConnection(pf_1_1,pf_1_2, raduis_1,material='fMatx',color=[0,0,25] ))

O.bodies.append( gridConnection(pf_1_2,pf_1_3, raduis_1,material='fMatx',color=[0,0,25] ))

O.bodies.append( gridConnection(pf_1_3,pf_1_1, raduis_1,material='fMatx',color=[0,0,25] ))

O.bodies.append( gridConnection(pf_1_1,pf_1_4, raduis_1,material='fMatx',color=[0,0,25] ))

O.bodies.append( gridConnection(pf_1_4,pf_1_3, raduis_1,material='fMatx',color=[0,0,25] ))

O.bodies.append( gridConnection(pf_1_5,pf_1_6, raduis_1,material='fMatx',color=[0,0,25] ))

O.bodies.append( gridConnection(pf_1_6,pf_1_7, raduis_1,material='fMatx',color=[0,0,25] ))

O.bodies.append( gridConnection(pf_1_7,pf_1_5, raduis_1,material='fMatx',color=[0,0,25] ))

O.bodies.append( gridConnection(pf_1_5,pf_1_8, raduis_1,material='fMatx',color=[0,0,25] ))

O.bodies.append( gridConnection(pf_1_8,pf_1_7, raduis_1,material='fMatx',color=[0,0,25] ))

O.bodies.append( gridConnection(pf_1_4,pf_1_8, raduis_1,material='fMatx',color=[0,0,25] ))

O.bodies.append( gridConnection(pf_1_5,pf_1_4, raduis_1,material='fMatx',color=[0,0,25] ))

O.bodies.append( gridConnection(pf_1_5,pf_1_1, raduis_1,material='fMatx',color=[0,0,25] ))

O.bodies.append( gridConnection(pf_1_3,pf_1_7, raduis_1,material='fMatx',color=[0,0,25] ))

O.bodies.append( gridConnection(pf_1_6,pf_1_3, raduis_1,material='fMatx',color=[0,0,25] ))

O.bodies.append( gridConnection(pf_1_6,pf_1_2, raduis_1,material='fMatx',color=[0,0,25] ))

#O.step()

O.bodies.append( pfacet(pf_1_1,pf_1_2,pf_1_3,wire=False,material='fMatx',color=[0,0,25] ))

O.bodies.append( pfacet(pf_1_1,pf_1_4,pf_1_3,wire=False,material='fMatx',color=[0,0,25] ))

O.bodies.append( pfacet(pf_1_5,pf_1_6,pf_1_7,wire=False,material='fMatx',color=[0,0,25] ))

O.bodies.append( pfacet(pf_1_5,pf_1_8,pf_1_7,wire=False,material='fMatx',color=[0,0,25] ))

O.bodies.append( pfacet(pf_1_4,pf_1_8,pf_1_5,wire=False,material='fMatx',color=[0,0,25] ))

O.bodies.append( pfacet(pf_1_5,pf_1_1,pf_1_4,wire=False,material='fMatx',color=[0,0,25] ))

O.bodies.append( pfacet(pf_1_3,pf_1_7,pf_1_6,wire=False,material='fMatx',color=[0,0,25] ))

O.bodies.append( pfacet(pf_1_6,pf_1_2,pf_1_3,wire=False,material='fMatx',color=[0,0,25] ))

###
newob1=len(O.bodies)
print(newob1)

Id_clump1=[]

for gg in range(newob0,newob1):
    Id_clump1.append(gg)

#print(Id_clump1)
clumpp_1=O.bodies.clump(Id_clump1)

#O.bodies[clumpp_1].state.blockedDOFs='xyzXYZ'

newob0=len(O.bodies)
O.step()

O.run(100000)

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

Thanks a lot
Ali

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Klaus Thoeni
Solved:
2020-07-27
Last query:
2020-07-27
Last reply:
2020-07-25
Best Klaus Thoeni (klaus.thoeni) said : #1

Hi Ali,

you can't just fix a node of a clump. A clump is one body and DOFs are related to the clump and not the elements forming the clump.
Delete the lines after Id_clump1=[] and you will see it works.

Klaus

Ali Rafiee (ali-rafiee) said : #2

Hi Klaus,
Thank you very much.

So, There is not a way to fix an element inside a clump.

Ali

Ali Rafiee (ali-rafiee) said : #3

Thanks Klaus Thoeni, that solved my question.