model a direct shear test
Hi all,
I am trying to create a simulation in order to model a direct shear test with constant normal stress.
I have already prepared a script with two boxes one on the other, a upper plate and a packing.
At this stage I use the TranslationEngine to move the upper plate in order to apply the constant normal stress and in order to translate one of the boxes.
How would you do that? Has anyone tryed to do some similar simulation?
I haven't found a specific engine for it.
Thanks in advance,
Regards,
Anna
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- anna effeindzourou
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Hi Anna,
Just modify the example of the simple shear test ( in the Example folder of YADE). All required engines are already there.
The example of direct shear test can be included in the example part of YADE. You can write it totally in Python or generate one C++ engine and one simpler python script.
Viet
Revision history for this message
|
#2 |
Hi Viet,
Thanks for your answer.
The problem is that the engine used in the simple shear test, if I have well understood, includes a rotation of the side walls and I am interested in an horizontal displacement. I am interested in the same kind of work as the one of Luc Scholtès describes in the paper Modelling progressive failure in fractured rock masses using a 3D discrete element method.
Anna
Revision history for this message
|
#3 |
Hi,
I think, you do not need to use a C++ to solve this task.
You need to define to boxes (or set of facets) and use 2 TranslationEngines to
move them. You can also control their movement using engine labels and PyRunner.
=======
...
TranslationEngi
label="Upper"),
TranslationEngi
label="Bottom"),
PyRunner(
...
def ControlPlates()
if (...):
Upper.velocity = Upper.velocity - 1.0
Bottom.velocity = Bottom.velocity - 1.0
=======
Cheers,
Anton
Revision history for this message
|
#4 |
Hello Anna,
sorry for the late reply. I saw your email but could not find time to answer it.
Revision history for this message
|
#5 |
Euh... Me again. I was looking for a way to attach files to my answer...
I have a python script that should help you. It performs a direct shear test as you describe with, first, the application of the normal load and, second, the shearing phase.
The problem is that, I am not very happy with this script as the control of the normal load during shearing is not "general". I wanted to improve it so as to do something more "general" like the triaxial engine for example but did not have the time. Currently, I have to adjust a variable that I have called servoCoeff depending on the parameters of the simulation (normal load, strength of the matrial, etc...).
Anyway, maybe we can discuss this by email so that I can send you the script (unless I can do it through launchpad?).
Cheers
Luc
Revision history for this message
|
#6 |
Dear Anna,
Please allow me a question back. How did you have this idea of using translation engine? You are not alone. Actually it seems 99% of the users will jump on TranslationEngine as soon as they want to move an object, so we endlessly repeat that it is not needed. There is something to improve in the documentation or example scripts apparently, but I fail to identify what is misleading so many users.
Revision history for this message
|
#7 |
Hi all,
@ Anton: I did it in a similar way but was not really sure.
@Luc: Of course, we can discuss this by email.
@Bruno: I don't know for me it was logical to use the TranslationEngine in order to translate the boxes. Could please tell me how you will do it without the translationEngine? Maybe just by changing directly the values of the velocity of the boxes?
cheers,
Anna
Revision history for this message
|
#8 |
>Maybe just by changing directly the values of the velocity of the boxes?
Exactly. It is more direct (hence more predictable) and shorter to type.
How did you know a TranslationEngine exists in Yade? Reading the whole documentation?
Revision history for this message
|
#9 |
Hello Anna,
I performed similar simulations, but with a simple shear box. I wrote
an engine to apply this constant normal stress path :
https:/
There is an example of "my" simulations in
/examples/
Our boxes are different (and I'm at the moment quite far from Yade),
but maybe this could help you..
Jerome
Revision history for this message
|
#10 |
Hi guys,
Thank you for your help.
cheers,
Anna
Revision history for this message
|
#11 |
Hi Anna,
I could not fin an email adress where to send you my script and some explanations, so here is my code below. I guess you can copy-paste it directly as a python script. Be careful, some things are maybe deprecated for last versions of YADE. TranslationEngine is used but, as told by Bruno, it is not mandatory and could/should be replaced by a condition on the boxes velocity. I am not exactly happy with the way the simulation is servo-controlled as is, but it works if the loading parameters are well adjusted (this is where I should take some time to generalize the simulation like it is done for the triaxial test or "Jerome's engine"). Be sure to adapt it to the interaction law you are using in the definition of the "InteractionLoop" (I use here a modified version of one of the currently available law).
Briefly, here is the process:
- packing is imported from a predefined text file.
- a first box is appended at the top of the sample.
- normal loading is performed until the predefined value is reached.
- once equilibrium is reached, top and bottom half boxes of a "Casagrande box" are created
- the bottom box is then displaced at constant velocity
Do not hesitate if you have any questions.
Cheers
Luc
# -*- coding: utf-8 -*-
O=Omega()
from yade import ymport, utils, plot
################## parameters definition
PACKING='X1Y1Z1_5k'
DAMPING=0.5
dtCOEFF=0.5
normalSTRESS=5e5
normalVEL=
shearVEL=
intR=1.263 #1.263 for X1Y1Z1_5k
DENS=3000
YOUNG=50e9
FRICT=18
ALPHA=0.3
TENS=45e5
COH=45e6
iterMAX=400000
Output=
#######
### material definition
def sphereMat(): return CFpmMat(
def wallMat(): return CFpmMat(
## copy spheres from the packing into the scene
O.bodies.
## preprocessing to get dimensions
dim=utils.
xinf=dim[0][0]
xsup=dim[1][0]
X=xsup-xinf
yinf=dim[0][1]
ysup=dim[1][1]
Y=ysup-yinf
zinf=dim[0][2]
zsup=dim[1][2]
Z=zsup-zinf
## initial surface
S0=X*Z
## spheres factory
R=0
Rmax=0
numSpheres=0.
for o in O.bodies:
if isinstance(
o.shape.
numSpheres+=1
R+=o.
if o.shape.
Rmax=
Rmean=R/numSpheres
#######
thickness=Y/100
oversizeFactor=1.3
### loading platens
O.bodies.
bottomPlate=
O.bodies.
topPlate=
#######
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
GlobalStiffnes
TranslationEng
PyRunner(
NewtonIntegrat
PyRunner(
]
#######
shearing=False
sigmaN=0
tau=0
Fs1=0
Fs2=0
Xdispl=0
px0=0
Ydispl=0
py0=topPlate.
prevTranslation=0
n=0
def servoController():
global px0, py0, sigmaN, n, Fn1, Fn2, shearing, butee, piston1, piston2
Fn1=
Fn2=
sigmaN=
#print yTranslation.
if shearing==False:
if yTranslation.
yTranslation.
if sigmaN>
yTranslation.
if shearing==False and abs((normalSTRE
yTranslat
n+=1
if n>1000 and abs((sigmaN-
print 'stress on joint plane = ', utils.forcesOnP
### add top box
O.bodies.
butee=O.bodies[-1]
O.bodies.
O.bodies.
O.bodies.
### add bottom box
O.bodies.
piston1=
O.bodies.
piston2=
O.bodies.
O.bodies.
### add engine and initialisation
O.engines=
px0=piston1.
py0=topPlate.
shearing=True
print 'shearing! || iteration=', O.iter
if shearing==True:
#
yTranslat
if O.engines[
O.engines[
def dataCollector():
global Xdispl, Ydispl, tau, Fs1, Fs2
if shearing:
Fs1=
Fs2=
Xdispl=
tau=
Ydispl=
numberOfCoh
for i in O.interactions:
if i.phys.isCohesive:
numberOfCohesi
yade.
plot.
# defines window plot
plot.plots=
################# graphical intervace
from yade import qt
qt.Controller()
qt.View()
v=qt.Renderer()
v.dispScale=(1,1,1) # displacements are scaled for visualization purpose
################# to manage interaction detection factor during the first timestep
O.step();
################# initializes the interaction detection factor to its default value (new contacts will be created between strictly contacting particles only)
ss2d3dg.
aabb.aabbEnlarg
################# simulation starts here
O.run(iterMAX)
Revision history for this message
|
#12 |
Hi Luc Scholtès,
Something is wrong when it go to the sentence O.bodies.
can you give me some hints how to build the PackingSpheres , I want to test it. thank you!
Revision history for this message
|
#13 |
Hello,
Nothing is "wrong" with the code, it is simply looking for a packing whose name is defined by PACKING at the beginning of the script and finished by ".spheres". They are a lot of different ways to generate a packing (see: https:/
Cheers
Luc