← Back to team overview

yade-users team mailing list archive

Re: [Question #682676]: Wall position doesn't change after applying force

 

Question #682676 on Yade changed:
https://answers.launchpad.net/yade/+question/682676

    Status: Needs information => Open

Anqi H gave more information on the question:
Hi Jan,

This is the script I used. The positions of the rock particles were
imported from a text file.

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


# rock parameters
Young = 57e8 
FrictAng = 0.5
Density = 2650
Poisson = 0.28
Cohesion = 38e6 # pa
TensileStr = 38e6 # pa

#proppant properties
FrictAng_p = 0.9
Density_p = 2650
Young_p = 100e6
TensileStr_p=3000
Cohesion_p=3000


#define rock and wall
# JCPpm used for cohesive frictional material
rock = JCFpmMat(type=1,young=Young,frictionAngle=FrictAng,density=Density,poisson=Poisson,tensileStrength=TensileStr,cohesion=Cohesion,label='rock')
wall = JCFpmMat(type=0,young=2e11,frictionAngle=FrictAng,density=Density,poisson=Poisson,tensileStrength=0,cohesion=0)
proppant = JCFpmMat(type=2,young=Young_p,frictionAngle=FrictAng_p,density=Density_p,tensileStrength=TensileStr_p,cohesion=Cohesion_p)


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

rock_assembly =
O.bodies.append(ymport.textExt('rock.txt','x_y_z_r',shift=Vector3(0,0,0),scale=1,material=rock,color=(0.00,0.00,0.70)))


#add walls
wall = O.bodies.append(utils.aabbWalls(material=wall,thickness=0.000,color=(1,1,1)))
# delete other walls only save walls in y axis
O.bodies.erase(wall[0])
O.bodies.erase(wall[1])
O.bodies.erase(wall[4])
O.bodies.erase(wall[5])

bottom_wall = O.bodies[wall[2]]
bottom_wall.state.blockedDOFs = 'xzXYZ'
bottom_wall.state.mass = 1

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

#set force
app_stress = range(2,26,2)
last_aper = 0.005599
index = 0
force = app_stress[index]*1e6*0.02*0.02
last_diff = 0.1
O.forces.setPermF(upper_wall.id, (0,-force,0))
O.forces.setPermF(bottom_wall.id, (0,-force,0))


#add proppant pack
pro_pred = pack.inCylinder((0.01,0.0126004,0.01),(0.01,0.0181994,0.01),radius=0.005)
sp=pack.randomDensePack(pro_pred, radius=0.000223,rRelFuzz=.33,returnSpherePack=True,spheresInCell=5000, material=proppant)
sp.toSimulation(color=(1.00,0.67,0.50))


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

O.engines=[
 ForceResetter(),
 # enlarge interaction radius between spheres 
 InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.2,label="bo1s"),Bo1_Box_Aabb()]), 
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=1.2,label="ig2s"),Ig2_Box_Sphere_ScGeom()], #,Ig2_Wall_Sphere_ScGeom()
  [Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1)],
  [Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(recordCracks=True,label='lawFunctor')]
 ),
 GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.5),
 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


def addPlot():
 global force,last_diff,index,last_iter
 stress=force/(.02*.02)
 if O.iter-last_iter)>2500 and (O.iter-last_iter)<2800:
    if index==(len(app_stress)-1):
       O.pause()
       for b in rock_assembly:
	   O.bodies.erase(b)
    else:
       index+=1
       force = app_stress[index]*1e6*0.02*0.02
       O.forces.setPermF(upper_wall.id, (0,-force,0))
       O.forces.setPermF(bottom_wall.id, (0,-force,0))
       last_iter=O.iter
 upper_pos = upper_wall.state.pos[1]
 numCohesive = 0
 for i in O.interactions:
    if i.phys.isCohesive:
	numCohesive+=1
 print "numCohesive "+str(numCohesive)

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