biaxial (undrained test) in 2D model

Asked by jessica sjah

Dear yade user,

Could anyone please help me to see my code whether is it correct or not to make a biaxial undrained test in 2D (without periodic condition)?

I'm using "ThreeDTriaxialEngine", so I can use "strainRate1=-strainRate2" to avoid the volume change (Please correct me if my idea is wrong).

Is there anyone have an experience in doing the triaxial/biaxial undrained test? What is the best way to model it?

Thank you for your help and your sharing.

Here is my code:

# -*- coding: utf-8 -*-
from yade import pack,log, plot
from utils import *

############################################
### DEFINING VARIABLES AND MATERIALS ###
############################################

num_spheres = 500 # number of spheres
compFricDegree = 30 # contact friction during the confining phase
finalFricDegree = 30 # contact friction during the deviatoric loading
rate = 0.01 # loading rate (strain rate)
damp = 0.1 # damping coefficient
stabilityThreshold = 0.001 # unbalancedForce
key = '_biax_undrained_' # simulation's name
young = 5e6 # contact stiffness
mn,mx=Vector3(0,0,0),Vector3(1,1,1) # corners of the initial packing
thick = 0.01 # thickness of the plates

## create materials for spheres and plates
O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=radians(compFricDegree),density=2600,label='spheres'))
O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=0,density=0,label='walls'))

## create walls around the packing
walls=utils.aabbWalls([mn,mx],thickness=thick,material='walls')
wallIds=O.bodies.append(walls)

## generate a random loose particles packing
sp=pack.SpherePack()
sp.makeCloud(Vector3(0,0,0.5),Vector3(1,1,0.5) ,-1,0.3333,num_spheres,False, 0.95)

O.bodies.append([utils.sphere(center,rad,material='spheres') for center,rad in sp])

# Blocked certain degress of freedom to make 2D-Model in plane-XY
for k in O.bodies:
 if isinstance(k.shape, Sphere): k.state.blockedDOFs='zXY'

# initial timestep
O.dt=.5*utils.PWaveTimeStep()
O.usesTimeStepper=True

############################
### DEFINING ENGINES ###
############################

triax=ThreeDTriaxialEngine(
 ## ThreeDTriaxialEngine will be used to control stress and strain. It controls particles size and plates positions.
 maxMultiplier=1.005, # spheres growing factor (fast growth)
 finalMaxMultiplier=1.002, # spheres growing factor (slow growth)
 thickness = thick,
 stressControl_1 = False, #switch stress/strain control
 stressControl_2 = False,
 ## The stress used for (isotropic) internal compaction
 sigma_iso = 10000,
 ## Independant stress values for anisotropic loadings
 sigma1=10000,
 sigma2=10000,
 internalCompaction=True, # If true the confining pressure is generated by growing particles
 Key=key, # passed to the engine so that the output file will have the correct name
)

newton=NewtonIntegrator(damping=damp)
unb=unbalancedForce()

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
 ),
 GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8, defaultDt=4*utils.PWaveTimeStep()),
 triax,
 TriaxialStateRecorder(iterPeriod=100,file='WallStresses'+key),
 newton,
        PyRunner(command='addPlotData()',iterPeriod=100)
]

#####################################################
### Exemple of how to record and plot data ###
#####################################################

def addPlotData():
   plot.addData(unbalanced=unb,i=O.iter,
      s_right=triax.stress(triax.wall_right_id)[0],s_top=triax.stress(triax.wall_top_id)[1],s_front=triax.stress(triax.wall_front_id)[2],
      s_left=triax.stress(triax.wall_left_id)[0],s_bot=triax.stress(triax.wall_bottom_id)[1],s_back=triax.stress(triax.wall_back_id)[2],
      exx=triax.strain[0],eyy=triax.strain[1],ezz=triax.strain[2],axial_strain=triax.strain[1],
      dev_stress=triax.stress(triax.wall_top_id)[1]-triax.stress(triax.wall_right_id)[0],
      conf_stress=triax.stress(triax.wall_right_id)[0],
      vol_strain= triax.strain[0]+triax.strain[1]
   )

# define what to plot
plot.plots={'i':('unbalanced'),'i ':('s_right','s_top','s_front','s_left','s_bot','s_back'),' i':('exx','eyy','ezz'),
   ' axial_strain':('dev_stress', 'conf_stress'),' axial_strain ':('vol_strain'),
}
# show the plot
plot.plot()

#Display spheres with 2 colors for seeing rotations better
Gl1_Sphere.stripes=1
yade.qt.Controller(), yade.qt.View()

#######################################
### APPLYING CONFINING PRESSURE ###
#######################################

while 1:
  O.run(1000, True)
  #the global unbalanced force on dynamic bodies, thus excluding boundaries, which are not at equilibrium
  unb=unbalancedForce()
  #average stress
  #note: triax.stress(k) returns a stress vector, so we need to keep only the normal component
  meanS=(triax.stress(triax.wall_right_id)[0]+triax.stress(triax.wall_top_id)[1]+triax.stress(triax.wall_front_id)[2])/3
  print 'unbalanced force:',unb,' mean stress: ',meanS
  if unb<stabilityThreshold and abs(meanS-triax.sigma_iso)/triax.sigma_iso<0.001:
    break

O.save('confinedState'+key+'.yade.gz')
print "### Isotropic state saved ###"

##############################
### DEVIATORIC LOADING ###
### UNDRAINED TEST ###
##############################
#We move to deviatoric loading, let us turn internal compaction off to keep particles sizes constant
triax.internalCompaction=False

# Change contact friction (remember that decreasing it would generate instantaneous instabilities)
triax.setContactProperties(finalFricDegree)

#set independant stress control on each axis
triax.stressControl_1=triax.stressControl_2=False
triax.strainRate1=-0.1
triax.strainRate2=0.1

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#1

Hi Jessica,
Very often , users describe problems without providing example scripts.
In this question, we have a script but no problem. ;)

Did you inspect the results? This is the only way to be sure that everything is correct.

Revision history for this message
jessica sjah (jessica-sjah) said :
#2

Hi Bruno,

I'll come back again if I found the strange results.

Thank you for your reply :-).

Revision history for this message
Jan Stránský (honzik) said :
#3

Hi Jessica,

concerning "strainRate1=strainRate2" to avoid the volume change. Did you
mean "strainRate1 = -strainRate2"? In this case I would say the volume (at
least for small strains) would remain constant, while in the case
of "strainRate1=strainRate2" it would definitely not.

If I understood this wrong, sorry for spamming
Jan

2012/12/7 jessica sjah <email address hidden>

> Question #216096 on Yade changed:
> https://answers.launchpad.net/yade/+question/216096
>
> jessica sjah posted a new comment:
> Hi Bruno,
>
> I'll come back again if I found the strange results.
>
> Thank you for your reply :-).
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
jessica sjah (jessica-sjah) said :
#4

Hi Jan,

Yes, you are right. I incorrectly gave this condition yesterday.
I have corrected it in my script. Thank you for your correction and your notice :-).

Regards,
jessica

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#5

Jan, I agree on the sign, but I beg to disagree on the "large strain"
part of your message.
The volume is definitely constant here when rate1 = -rate2, whatever the
deformation.
The same applies for PeriTriaxController (in case you would be wondering
;) ).

Revision history for this message
jessica sjah (jessica-sjah) said :
#6

After I run my script, I think that I'll get the volume deformation (=exx+eyy) which is stable and nearly zero.
But what I have => the volume deformation increases during the simulation.
It means that eyy > exx?

p.s. Did you also find this case for your undrained biaxial test, bruno?

Thank you for your reply :-)

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#7

>It means that eyy > exx?

What are the values of eyy and exx?

Revision history for this message
jessica sjah (jessica-sjah) said :
#8

Actually I modified my script to do biaxial undrained test with cohesive contact law.

eyy and exx are the strains for direction y and x.
By applying strain rate= 0.0001, I have these values:

iteration= 102600; exx= -0.0031432326606094857; eyy= 0.0031432327614449342

iteration= 102700; exx= -0.0031464977236552198; eyy= 0.003146497824596957

iteration= 102800; exx= -0.0031497627867002652; eyy= 0.0031497628877490795

iteration= 102900; exx= -0.0031530278497457014; eyy= 0.0031530279509010464

Is it normal to have a little difference between the value of exx and eyy?

Revision history for this message
jessica sjah (jessica-sjah) said :
#9

I show my graphs in this link:

http://i.imgur.com/mKBFo.png

vol_strain= exx+eyy+ezz
what do you think?

thank you.

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#10

vol_strain= exx+eyy+ezz = 1e-13 ...

You must be a very cautious person to worry about that. This is of the order of numerical precision, call it zero. :)

Revision history for this message
jessica sjah (jessica-sjah) said :
#11

Thank you, bruno :-)...

Revision history for this message
Seungcheol Yeom (scyeom79) said :
#12

Hello

I am also trynig to make 2D packing and consolidate it for my research.
Thus, I am trying to run your script to see how it works but sigma_iso is not defined.
Are you successfully able to run your script?
Thanks for your help.

Seungcheol

Revision history for this message
Luc Sibille (luc-sibille) said :
#13

Hi,
ThreeDTriaxialEngine derives from TriaxialStressController and this latter engine has been modernized I think since the last use of this script. Hence, amongst others I imagine the variable sigma_iso has been removed during this modernisation. Consequently, the script you are using should be updated to take into account this change.

Besides, I think that ThreeDTriaxialEngine is now more or less useless because today TriaxialStressController can do what ThreeDTriaxialEngine was doing. Consequently you should use TriaxialStressController with the help of this exemple for instance
 /examples/triax-tutorial/script-session1.py (in Yade trunk).

Finally, I think that when you want to do 2D simulations with Yade which is actually 3D, you need to do some adjustments (not done apparently in the script you want to use). For instance you need to re-compute the mass of the particles as cylinders with a length equal to unity (and not as a sphere).

Luc

Revision history for this message
Seungcheol Yeom (scyeom79) said :
#14

Thanks for the response Luc!
It helps me a lot!

Seungcheol

Can you help with this problem?

Provide an answer of your own, or ask jessica sjah for more information if necessary.

To post a message you must log in.