← Back to team overview

yade-users team mailing list archive

[Question #684008]: aabb walls don't move after apply a force

 

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

Hi everyone,

I recently installed yade-2019-08-28.git-430b5a3 and found the script that worked with the old yade (apt install yade) is not working with the updated version. Specifically, a force is applied on an aabb wall, but the wall position does not change and the velocity shows to be zero. I have attached my script below, would anyone be able to help me have a look? Thank you.

# !/usr/bin/python
# -*- coding: utf-8 -*-

from yade import utils
from yade import pack
from yade import plot
from yade import qt
from yade import export

# input parameter
Young = 57e8 # 100Gpa
FrictAng = atan(0.5)
Density = 2650
Poisson = 0.28
Cohesion = 38e6 # pa
TensileStr = 38e6 # pa

#define rock and wall
rock = JCFpmMat(young=Young,frictionAngle=FrictAng,density=Density,poisson=Poisson,tensileStrength=TensileStr,cohesion=Cohesion)
wall = JCFpmMat(young=2.06e11,frictionAngle=radians(30),density=7800,poisson=0.3,tensileStrength=0,cohesion=0)

for Mat in (rock,wall):
 O.materials.append(Mat)

# regularOrth packing of the rock
rock_pred = pack.inAlignedBox((0,0,0),(.02,.03,.02))
assembly = pack.regularOrtho(rock_pred,radius=0.0002,gap=0,material=rock)
r_assembly=O.bodies.append(assembly)

# aabbWalls
wall = O.bodies.append(utils.aabbWalls(material=wall,thickness=0.000,color=(1,1,1)))


# set velocity for bottom/upper wall
bottom_wall = O.bodies[wall[2]]
#bottom_wall.state.blockedDOFs = 'zXY'
bottom_wall.state.mass = 1

upper_wall = O.bodies[wall[3]]
#upper_wall.state.blockedDOFs = 'zXY'
upper_wall.state.mass = 1

O.forces.setPermF(upper_wall.id, (0,-10000,0)) 
O.forces.setPermF(bottom_wall.id, (0,10000,0))


def addPlot():
 print (str(upper_wall.state.pos[1]))
 print ('wall velocity'+str(upper_wall.state.vel))
 O.forces.setPermF(upper_wall.id, (0,-10000,0))

###########################
# ENGINES
###########################

O.engines=[
 ForceResetter(),
 # enlarge interaction radius between spheres 
 InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.25,label='bo1s'),Bo1_Box_Aabb()]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=1.25,label='ig2s'),Ig2_Box_Sphere_ScGeom()],
  [Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1)],
  [Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(recordCracks=True,label='lawFunctor')]
 ),
 # VTKRecorder(fileName='post/uniCom-',recorders=['all'],iterPeriod=50),
 GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=5,timestepSafetyCoefficient=0.8,defaultDt=PWaveTimeStep()),
 NewtonIntegrator(damping=0.3,gravity=(0,0,0)),
 #call addPlot() every 20 steps
 PyRunner(command='addPlot()', realPeriod=20)
]
O.trackEnergy=True
O.step()

bo1s.aabbEnlargeFactor=1
ig2s.interactionDetectionFactor=1

#set an optimal timestep
O.dt = utils.PWaveTimeStep()
O.usesTimeStepper = True


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