Problem about the HarmonicMotionEngine's ids

Asked by hjz

Dear all,
       Thanks for your kind attention. I am making a densest sample for triaxial tests by using the vibration compaction method. So I plan to use the HarmonicMotionEngine to let the bottom wall of the aabbWalls vibrate and to use the TriaxialSterssController to keep the stress of the top wall 14KPa. But that is not useful, because when the HarmonicMotionEngine runs, all walls of the aabbWalls vibrate. What should I do to solve this problem?
        Here is my python script below:
from yade import pack, qt
import math #import mathematical formulae
Gl1_Sphere.stripes=1
qt.Controller(), qt.View() #open the controlling and visualization interfaces

#################################################
##### DEFINING VARIABLES AND MATERIALS ######
#################################################

nRead=utils.readParamsFromTable(
 num_spheres=5000,# number of spheres
 key='_D10', #put you simulation's name here
 unknownOk=True
)
from yade.params import table#the above five lines will be used later for batch execution

num_spheres = table.num_spheres #number of spheres
finalFricDegree = atan(0.25) #contact friction during the deviatoric loading
damp = 0.008 #the non-viscous damping coefficient
key = table.key # put you simulation's name here
young1 = 1e10 #the spheres' Young's moduolus
young2 = 1e12 #the walls' Young's moduolus
mn,mx = Vector3(0.0,0.0,0.0),Vector3(0.110,0.06,0.110) #corners of the initial packing
thick = 0 #the thickness of the walls
#the following lines represent the grain size distribution
dia = [0.003, 0.0031, 0.005, 0.006, 0.007, 0.008, 0.009, 0.01]
phi = [0.0, 0.231, 0.301, 0.460, 0.600, 0.737, 0.870, 1.0]
#create materials for spheres and walls
O.materials.append(FrictMat(young=young1,poisson=0.7,frictionAngle=finalFricDegree,density=7930,label='spheres'))
O.materials.append(FrictMat(young=young2,poisson=0.7,frictionAngle=0,density=0,label='walls'))

##############################
#### GENERATING BODIES #####
##############################

#create walls around the packing
walls=utils.aabbWalls([mn,mx],thickness=thick,oversizeFactor=1.5,material='walls')
wallIds=O.bodies.append(walls)

#use a SpherePack object to generate a random loose particles packing
sp=pack.SpherePack()
sp.makeCloud(minCorner=mn,maxCorner=mx,num=num_spheres,periodic=False,psdSizes=dia,psdCumm=phi,distributeMass=True,seed=1) #"seed" make the "random" generation always the same
O.bodies.append([sphere(center,rad,material='spheres',color=(0,0,1)) for center,rad in sp])

##############################
#### DEFINING ENGINES ####
##############################

#set triaxial engine
triax=TriaxialStressController(
 thickness = thick, #thickness of boxes
 stressMask = 2, #the vertical direction of wall is controlled by rate of strain
 #fix the walls except the top one
 wall_left_activated=False,
 wall_right_activated=False,
 wall_bottom_activated=False,
 wall_back_activated=False,
 wall_front_activated=False,
 internalCompaction = False, #compacting through moving the walls
 stressDamping = 0, #wallDamping=0
 max_vel = 0.1 #the maximum walls velocity
)

newton=NewtonIntegrator(damping=damp) #set non-viscous damping

swing = HarmonicMotionEngine(
 A = (0,0.002,0),
 f = (0,50,0),
 fi = (0,-0.5*math.pi,0),
 ids = wallIds
 )

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
 ),
 GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
 triax,
 swing,
 newton
]

triax.goal2 = -14000
triax.goal1 = triax.goal3 =0

Sincerely
hjz

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#1

>So I plan to use the HarmonicMotionEngine to let the bottom wall of the aabbWalls vibrate and to use the TriaxialSterssController to keep the stress of the top wall 14KPa. But that is not useful, because when the HarmonicMotionEngine runs, all walls of the aabbWalls vibrate. What should I do to solve this problem?

Hello,
I didn't check the script, but isn't it simply because the frequency is too low? At "high enough" frequency I cannot imagine that the top wall will follow the motion of the bottom wall instantaneously since it needs at least the travel time of the sonic wave to perturbate the pressure on the top wall after moving the bottom one.

Revision history for this message
hjz (1341132388-4) said :
#2

>walls=utils.aabbWalls([mn,mx],thickness=thick,oversizeFactor=1.5,material='walls')
>wallIds=O.bodies.append(walls)

>swing = HarmonicMotionEngine(
 A = (0,0.002,0),
 f = (0,50,0),
 fi = (0,-0.5*math.pi,0),
 ids = wallIds
 )

Hi Bruno,
Sorry that I did't explain my problem clearly.My problem is that I can't choose only the bottom one of the aabbWalls to vibrate. When I assigned the id of the bottom wall -- "2" to the HarmonicMotionEngine.ids, the program errors occurred.

Here is the error information below:

Traceback (most recent call last):
  File "/home/hjz/myyade/install/bin/yade-Unknown", line 182, in runScript
    execfile(script,globals())
  File "D-10-sample.py", line 70, in <module>
    ids = 2
TypeError: No registered converter was able to produce a C++ rvalue of type std::vector<int, std::allocator<int> > from this Python object of type int

And I haven't found the source code about HarmonicMotionEngine, so I am not clear about its operating principle. Do you know where it is? Thank you very much.

Regards,
hjz

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#3

The problem is really unrelated to your question.
"ids = 2" should be "ids=[2]", a python list.
Bruno

Revision history for this message
Jérôme Duriez (jduriez) said :
#4

As for the source code of HarmonicMotionEngine, it is in pkg/common/KinematicEngines.*pp
(a search in the search bar of https://github.com/yade/trunk does the trick)

Jerome

Can you help with this problem?

Provide an answer of your own, or ask hjz for more information if necessary.

To post a message you must log in.