← Back to team overview

yade-users team mailing list archive

[Question #673130]: Recorder Forces acting on a clump with ForceRecorder

 

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

hi, i have questions about ForceRecorder function.

I am trying to collect forces acting on a surface (is built clumping facets togheter). With my script i'm able to create a file.txt where , theoretically, i ' m saving the force acting on the surface along the x,y,z directions (using the 'ForceRecorder' function). Here i have my first questions:

-> are these forces related to the center of gravity of the surface or to other point?   
-> how is it calculated? is it the sum of all the forces acting on the single facet which built the surface?

I tryied to compare the recorder engine results with the lybrary : O.forces.f() (plot on graph). What i obtained is that the force acting on the 'clumped body' is always zero.

-> why is this difference present? (even if i write from terminal O.forces.f(NumberOfOneClumpedFacet), it returns (0,0,0), or O.forces.f(clumpID).norm(), it still returns (0,0,0)) 

i post a minimal example script where is presented the RecorderEngine, and AddplotData function:

Thanks for your time.

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

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 = 1000 
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),
 PyRunner(command='addPlotData()',iterPeriod=10),
]

################
#### FUNCTION ####
################

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

def addPlotData():
      plot.addData(i=O.time,Force=O.forces.f(clumpID).norm())
plot.plots={'i':('Force')}
plot.plot(subPlots=False)
plot.plot()

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

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