yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #13042
Re: [Question #295666]: dense sample/triaxial test
Question #295666 on Yade changed:
https://answers.launchpad.net/yade/+question/295666
Status: Answered => Open
Seti is still having a problem:
Thanks Bruno,
Based on below input to triaxial test example( box size and grain size). My purpose to create dense sample ( initial void ratio 0.8 , porosity 0.44)
However the void ratio is more than 2!!!!!! ( porosity 0.67) , I am not sure how I can control it
P.S. :Is there any conflict with the number of spheres , size of spheres and size of box?
How I can modify the code to reach to dense sample?
Sorry for long script, I have to copy the tutorial here to make you
sure, I did not do big changes!
###########33
# -*- coding: utf-8 -*-
from yade import pack
############################################
### DEFINING VARIABLES AND MATERIALS ###
############################################
# Batch execution
nRead=utils.readParamsFromTable(
num_spheres=60,# number of spheres len(O.bodies) to verify: 10006 = 10000 particles + 6 walls is correct
compFricDegree = 22, # contact friction during the confining phase (1)
unknownOk=True,
isoForce=100000, # stress for the isotropic compression phase (1)
conStress=100000 # confinement stress, for the deviatoric loading session (2)
)
from yade.params import table
num_spheres=table.num_spheres # number of spheres called from table
targetPorosity = 0.44 #the porosity we want for the packing (3 specimens: (Ei,n) = (1,0.382), (2,0.387), (3,0.409) )
compFricDegree = table.compFricDegree # initial contact friction during the confining phase (will be decreased during the REFD compaction process)
finalFricDegree = 22 # contact friction during the deviatoric loading
rate=.01 # loading rate (strain rate)
damp=0.5 # damping coefficient
stabilityThreshold=0.001 # initial value: 0.001
key='_triax_drain-.01,0,anglefinal85,firstangle85_100,100,1000,100e10,unbala.01, damp0.5without cohision' # simulation's name here
young=800e6 # contact stiffness k_n/Ds
mn,mx=Vector3(-0.008,-0.008,-0.008),Vector3(0.008,0.008,0.00) # corners of the initial packing
thick = 0.001
## create materials for spheres and plates
O.materials.append(FrictMat(young=young,poisson=0.3,frictionAngle=radians(compFricDegree),density=2600,label='spheres'))
O.materials.append(FrictMat(young=young,poisson=0.3,frictionAngle=10,density=0,label='walls'))
## create walls around the packing
walls=utils.aabbWalls([mn,mx],thickness=thick,oversizeFactor=1.5,material='walls')
wallIds=O.bodies.append(walls)
## use a SpherePack object to generate a random loose particles packing
sp=pack.SpherePack()
sp.makeCloud(mn,mx,0.002,0,num_spheres,False,0.95,seed=1)
sp.toSimulation(material='spheres')
############################
### DEFINING ENGINES ###
############################
triax=TriaxialStressController(
maxMultiplier=1.001, # spheres growing factor (fast growth), validated only when internalCompaction = True
finalMaxMultiplier=1.00001, # spheres growing factor (slow growth), validated only when internalCompaction = True
thickness = thick,
## switch stress/strain control using a bitmask. What is a bitmask, huh?!
## Say x=1 if stress is controlled on x, else x=0. Same for for y and z, which are 1 or 0.
## Then an integer uniquely defining the combination of all these tests is: mask = x*1 + y*2 + z*4
## to put it differently, the mask is the integer whose binary representation is xyz, i.e.
## "100" (1) means "x", "110" (3) means "x and y", "111" (7) means "x and y and z", etc.
stressMask = 7,
#the value of confining stress for the intitial (growth) phase
goal1=table.isoForce,
goal2=table.isoForce,
goal3=table.isoForce,
max_vel=0.5, # validated only when internalCompaction = False m/s
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)
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()]
),
## We will use the global stiffness of each body to determine an optimal timestep (see https://yade-dem.org/w/images/1/1b/Chareyre&Villard2005_licensed.pdf)
GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=25,timestepSafetyCoefficient=0.8),
triax,
TriaxialStateRecorder(iterPeriod=50,file='WallStresses'+key),
newton
]
O.save('initial'+key+'.xml')
#Display spheres with 2 colors for seeing rotations better
#Gl1_Sphere.stripes=0
#if nRead==0: yade.qt.Controller(), yade.qt.View()
print 'Number of elements: ', len(O.bodies)
print 'Box Volume: ', triax.boxVolume
print 'Wang,100kpa,22degree,old,'
#######################################
### 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
print 'void ratio=',triax.porosity/(1-triax.porosity), 'porosity=', triax.porosity
print 'mean stress of engine', triax.meanStress
if unb<stabilityThreshold and abs(meanS-table.isoForce)/table.isoForce<0.1: #0.001
# if abs(triax.porosity-targetPorosity)<0.001:
break
O.save('confinedState'+key+'.xml')
print "### Isotropic state saved ###"
print 'current porosity=',triax.porosity
print 'current void ratio=',triax.porosity/(1-triax.porosity)
print 'Wang,100kpa,22degree,old,'
###################################################
### REACHING A SPECIFIED POROSITY PRECISELY ###
###################################################
## We will reach a prescribed value of porosity with the REFD algorithm
## (see http://dx.doi.org/10.2516/ogst/2012032 and
## http://www.geosyntheticssociety.org/Resources/Archive/GI/src/V9I2/GI-V9-N2-Paper1.pdf)
#import sys #this is only for the flush() below
while triax.porosity>targetPorosity:
# # we decrease friction value and apply it to all the bodies and contacts
compFricDegree = 0.95*compFricDegree
setContactFriction(radians(compFricDegree))
print "\r Friction: ",compFricDegree," porosity:",triax.porosity,
sys.stdout.flush()
# # while we run steps, triax will tend to grow particles as the packing
# # keeps shrinking as a consequence of decreasing friction. Consequently
# # porosity will decrease
O.run(500,1)
O.save('compactedState'+key+'.xml')
print "### Compacted state saved ###"
print 'current porosity=',triax.porosity
print 'current void ratio=',triax.porosity/(1-triax.porosity)
print 'step that starts the deviatoric loading ', O.iter
print 'Wang,100kpa,22degree,old,'
##############################
### DEVIATORIC LOADING ###
##############################
#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)
#setContactFriction(radians(finalFricDegree))
setContactFriction(radians(22))
#set stress control on x and z, we will impose strain rate on y (5)
triax.stressMask = 5
#now goal2 is the target strain rate
triax.goal2=-rate
#we assign constant stress to the other directions
triax.goal1=table.conStress
triax.goal3=table.conStress
##we can change damping here. What is the effect in your opinion?
newton.damping=0.1
##Save temporary state in live memory. This state will be reloaded from the interface with the "reload" button.
O.saveTmp()
while triax.strain[1] < 0:
O.run(50); O.wait()
--
You received this question notification because your team yade-users is
an answer contact for Yade.