Use of ServoPIDController for simulating cylindrical triaxial test
Hi! I am trying to model a cylindrical triaxial test based on Pfacet and ServoPIDController. I would like to model a triaxial compression test with confining pressure equal to 50kPa. The bottom and top loading plates are created using the 'facet' element. The top one is assumed to move slowly in the vertical direction while the bottom one is fixed. The cylindrical walls are generated using 'Pfacet' elements. Referring to [1], I wrote the current MWE but encountered with some problems. They are summarized as follows:
1) When implementing the MWE, the top plate is supposed to move, but actually does not. And the cylindrical walls are going to be destroyed. What causes this to happen and how to solve this?
2) I would like to apply confining pressure on cylindrical walls. How to achieve this?
3) For the ServoPIDController, do 'TranslationEng
Many thanks.
The MWE is presented below:
from __future__ import print_function
from yade import pack, ymport, qt
import gts, os.path, locale, plot, random
import numpy as np
from yade.gridpfacet import *
import math
locale.setlocale(
) #gts is locale-dependend. If, for example, german locale is used, gts.read()-function does not import floats normally
#######
### 1 ###
### DEFINING VARIABLES AND MATERIALS ###
#######
# The following lines are used parameter definitions
readParamsFromT
# material parameters
young_w = 5e9, # Young's modulus of plates and walls
young_g = 1.8e6, # Young's modulus of grains [1]
den_w = 7874, # density of plates and walls
den_g = 980, # density of grains
poi_w = 0.3, # possion's ratio of plates and walls
poi_g = 0.25, # possion's ratio of grains
friAngle_w = 0.5,#radians(15), # friction angle of plates and walls
friAngle_g = 0.5,#radians(29), # friction angle of grains
# Parameters of cylindrical walls
x_cyl = 0.0547, # x-coordinate of center of cylindrical walls
y_cyl = 0.0535, # y-coordinate of center of cylindrical walls
z_cyl = 0, # z-coordinate of center of cylindrical walls
r_cyl = 0.0358, # radius of the cylinder
h_cyl = 0.14, # height of the cylinder
)
from yade.params.table import *
# create materials for spheres and walls
wallMat = O.materials.
sphereMat = O.materials.
#######
### 2 ###
### IMPORTING GRAINS AND CREATING CLUMPS ###
#######
# spheres
pred = pack.inCylinder
sp = SpherePack()
sp = pack.randomDens
spheres = sp.toSimulation
# assign unique color for each sphere
currentSphereId = O.bodies[0].id
color = randomColor()
for b in O.bodies:
if b.id != currentSphereId
color = randomColor()
if isinstance(
# create top and bottom plates
h_cyl = max([b.state.pos[2] + b.shape.radius for b in O.bodies if isinstance(b.shape, Sphere)])
top_plate = O.bodies.
bottom_plate = O.bodies.
# Define engine
O.engines = [
ForceResetter(),
InsertionSort
Bo1_
sortThenCo
InteractionLoop(
[
Ig2_
Ig2_
Ig2_
Ig2_
],
[
Ip2_
],
[
Law2_
Law2_
Law2_
]
),
Translatio
NewtonIntegra
]
## Generate flexible membrane
O.materials.
O.materials.append( FrictMat( young=1e7,
nodesIds=[]
cylIds=[]
pfacets=[]
width=2*r_cyl #diameter of cylinder
height=h_cyl #height of cylinder
nw=40 # no of nodes along perimeter
nh=25 # no of nodes along height
rNode=width/100 #radius of grid node
color1=
color2=[0,0,0]
color3=
color4=
rCyl2 = 0.5*width / cos(pi/float(nw))
vCenter = Vector3(x_cyl, y_cyl, 0)
for r in range(nw):
for h in range(nh):
v1 = Vector3(
v2 = Vector3(
v3 = Vector3(
v4 = Vector3(
V1=
V2=
V3=
V4=
# append node ids to seperate matrix for later use
nodesIds.
nodesIds.
nodesIds.
nodesIds.
#create grid connection
cylIds.
cylIds.
cylIds.
cylIds.
cylIds.
#create Pfacets
pfacets.
pfacets.
from yade import qt
qt.View()
r = qt.Renderer()
r.bgColor = 1, 1, 1
def addPlotData():
fMove = Vector3(0, 0, 0)
for i in top_plate:
fMove += O.forces.f(i)
plot.addData(
def switchTranslati
print("Switch from TranslationEngine engine to ServoPIDControl
translat.dead = True
combEngine.dead = False
plot.plots = {'z': ('pMove', 'pFest')}
plot.plot()
O.run()
[1] https:/
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Ruidong LI
- Solved:
- Last query:
- Last reply: