Implementing wall loader for gravity

Asked by Temitope on 2017-09-21

Hi,

I am trying to implement a wallLoader runnable for the falling of shpereBody under gravity and then extract the normal impact force on the stationary bottom wall similar to uniaxial compression. I tried modifying the ramp time hoping that the fall under gravity would have implemented before starting to compute the slow down factor but seems not to work now. Kindly assist me with this. More details about the code as follows:

The wall that I want to implement as wall loader runnable was created as body sphere
sim.createSphereBody(name="steel_ball", posn=Vec3(0,50,0), radius=5)

steel_loader = WallLoaderRunnable (
 LsmMpi = sim,
 wallName = "steel_ball",
 vPlate = Vec3(0.0, -2.43, 0.0),
 startTime=0,
 rampTime = 100000
)
sim.addPreTimeStepRunnable(steel_loader)

Here is the code for the wall loader runnable

#import the appropriate ESyS-Particle modules:
from esys.lsm import *
from esys.lsm.util import *

class WallLoaderRunnable (Runnable):
 def __init__ (self,
  LsmMpi=None,
  wallName="steel_ball",
  vPlate=Vec3(0,0,0),
  startTime=0,
  rampTime=100000):

  """
  initialise the runnable and store the paramters
  """
       Runnable.__init__ (self)
      self.sim = LsmMpi
  self.wallName = wallName
  self.Vplate = vPlate
  self.dt = self.sim.getTimeStepSize()
  self.rampTime = rampTime
  self.startTime = startTime
  self.Nt = 0

 def run (self):
  """
  Subroutine to move the specified wall. After self.startTime timesteps, the speed of the wall increases linearly over self.rampTime steps until the desired wall speed is achieved, there after the all is moved at that speed.
  """
  if (self.Nt >= self.startTime):
   #compute the slowdown factor i still accelerating the wall:
   if (self.Nt < (self.startTime + self.rampTime)):
    f = float(self.Nt - self.startTime)/ float(self.rampTime)
   else:
    f = 1.0
   #compute the amount by which to move the wall this timestep:
   Dplate = Vec3(
    f*self.Vplate[0]*self.dt,
    f*self.Vplate[1]*self.dt,
    f*self.Vplate[2]*self.dt
   )
   #instruct the simulation to move the wall:
   self.sim.moveWallBy (self.wallName, Dplate)

  #count the number of timesteps completed thus far
  self.Nt +=1

I look forward to hearing from you.

Kind Regards
Tope

Question information

Language:
English Edit question
Status:
Solved
For:
ESyS-Particle Edit question
Assignee:
No assignee Edit question
Solved by:
Dion Weatherley
Solved:
2017-10-17
Last query:
2017-10-17
Last reply:
2017-10-10
Launchpad Janitor (janitor) said : #1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Temitope (temitope) said : #2

Hi everyone,

Please how can I modify the Wallloader runnable for compression in the tutorial into a gravity? In other words using the wall loader runnable to implement a falling wall under gravity.

I look forward to hearing from you.

kind Regards
Tope

Best Dion Weatherley (d-weatherley) said : #3

Hi Tope,

So-called "kinematic" objects such as simple Planar Walls, Triangle Mesh Walls or a SphereBody, do not respond to forces the way DEM particles do. More specifically, their motion is not updated by integrating the instantaneous net force acting on such objects.

Kinematic objects can only be moved in ESyS-Particle simulations by explicitly instructing the simulation to do so; usually via a suitable Runnable calling routines like moveWallBy(..), moveSphereBodyBy(..) etc. In some instances, one may obtain the instantaneous net force acting on a kinematic object (from the simulation) and use this to implement time-integration within a Runnable; thus computing the appropriate displacement increment to assign to the kinematic object.

In fact, I once tried this for a SphereBody simulation, to cause the SphereBody to fall under gravitational acceleration. Whilst the SphereBody motion was correctly modelled whilst free-falling under gravity, its motion was not correctly captured once it collided with DEM particles. This is because the force acting between the DEM particles and the SphereBody was instantaneously applied at the SphereBody's centre-of-mass. In reality, even for hardened steel spheres, the sphere will deform at first contact and it will take some time before the sphere's centre-of-mass begins to decelerate in response.

As yet, I have not found a nice, simple solution for this particular problem. In my case, I worked around it by:
1) Initially placing the SphereBody directly above the DEM particles with only a very small gap,
2) Setting the initial velocity of the SphereBody to be commensurate with having previously fallen from a prescribed height (to its current location) under action of gravity alone, and
3) keeping the velocity of the SphereBody constant throughout the duration of the contact with the DEM particles (although perhaps I could have prescribed a time-dependant velocity relationship such that the SphereBody decelerates somewhat during contact).

This workaround was OK for my purposes because the total contact time was very short compared with the time it takes for a real steel ball to decelerate when striking an elastic-brittle object (a rock!).

Cheers,

Dion

Temitope (temitope) said : #4

Thanks Dion Weatherley, that solved my question.