How to apply force and record force on an STL-imported(Facet) rough surface?
Hallo Everyone,
I have imported two STL files to simulate two parallel, rough plates with a particle packing in between. I want to control the top plate to apply consolidation pressure and a shearing process, while also recording the force on it.What would be a good way to do this?
Regards,
Song
Operating environment:Ubuntu 20.04-Yade 2022.01a
STL made by SOLIDWORKS 2023
Apologize for my misplaced previous post.
from yade import pack
from yade import plot
import random as rdm
import numpy as np
from yade import ymport
# sample size
scale = 100.
length = 2*1e-3*6.*scale
width = 2*1e-3*3.*scale
height = 1.*1e-3*scale
hscale = 4
mn,mx=Vector3(-length/2.,0.,-width/2),Vector3(length/2.,height*hscale,width/2)
nw = 4
#particle size
fineNum = 3000
fineSize = 0.2/2.*1e-3*scale
relFuz = 0.4
seed = 3
rdm.seed(seed)
#Boundary condition
sigma0 = 50e3
plateArea = length*width
targetF = sigma0*plateArea
relStressTol = 5e-3
stabilityThreshold = 5e-3
maxVel = 1.*height
stiffnessWall = 0.
#material parameters
youngFine = 5.e6
friction0 = 30
grav = -10 *5.
friction1 = 15
cohesion = 1.e6
alpha = 1.
eta = 0.05
O.materials.append(CohFrictMat(young=youngFine, poisson=0.7, frictionAngle=radians(friction0), density=2300, isCohesive=True, momentRotationLaw=True, alphaKr=alpha, alphaKtw=alpha, etaRoll=eta, etaTwist=eta, normalCohesion=cohesion, shearCohesion=cohesion, label='fine'))
O.materials.append(CohFrictMat(young=youngFine, poisson=0.7, frictionAngle=radians(friction1), density=2300, isCohesive=True, momentRotationLaw=True, alphaKr=alpha, alphaKtw=alpha, etaRoll=eta, etaTwist=eta, normalCohesion=cohesion, shearCohesion=cohesion, label='walls'))
w0 = box((-length/2.,height*hscale/2.,0), (0,height*hscale/2.,width/2.), wire=True, material=O.materials['walls'])
w1 = box((length/2.,height*hscale/2.,0), (0,height*hscale/2.,width/2.), wire=True, material=O.materials['walls'])
w2 = box((0,height*hscale/2.,-width/2.), (length/2.,height*hscale/2.,0), wire=True, material=O.materials['walls'])
w3 = box((0,height*hscale/2.,width/2.), (length/2.,height*hscale/2.,0), wire=True, material=O.materials['walls'])
O.bodies.append([w0, w1, w2, w3])
w0.state.blockedDOFs = 'xyzXYZ'
w1.state.blockedDOFs = 'xyzXYZ'
w2.state.blockedDOFs = 'xyzXYZ'
w3.state.blockedDOFs = 'xyzXYZ'
#import stl files
b0 = O.bodies.append(ymport.stl('bot_plate.STL', wire = False, material='walls'))
b1 = O.bodies.append(ymport.stl('top_plate.STL', wire = False, material='walls'))
sp = pack.SpherePack()
sp.makeCloud(minCorner=mn, maxCorner=mx, rMean=fineSize, rRelFuzz=relFuz, distributeMass=True, num=fineNum, periodic=False, seed=seed)
sp.toSimulation(material=O.materials['fine'],color=(0,0,1))
# for p in O.bodies:
# if not isinstance(p.shape,Sphere): continue
# p.state.blockedDOFs = 'XYz'
yade.qt.Controller()#, yade.qt.View()
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Box_Aabb(),Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom6D(), Ig2_Box_Sphere_ScGeom6D(),Ig2_Facet_Sphere_ScGeom6D()],
[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(
setCohesionOnNewContacts=True,
label="cohesiveIp")],
[Law2_ScGeom6D_CohFrictPhys_CohesionMoment(
useIncrementalForm=True,
always_use_moment_law=True,
label='cohesiveLaw')]
),
GlobalStiffnessTimeStepper(active=1, timeStepUpdateInterval=100, timestepSafetyCoefficient=0.8),
NewtonIntegrator(gravity=(0,grav,0),damping=.7,label='newton'),
#consolidation pressure
TranslationEngine(ids=b1, dead=True, translationAxis=[0, -1, 0], velocity=1,label='consolidation'),
# RadialForceEngine(ids = b0, dead= False, axisDir = [0,0,0], axisPt =[0,0,0], fNorm = 1000 , label = "consolidation")
]
Edited by Song Zhai