how to define friction at the boundaries in triaxial test
hi ,
please how can one define the friction at the top and bottom of the specimen in a Triaxial test simulation of a granular material.
the center ,extension and the wall mask of my model are as below.
O.bodies.
O.bodies.
thanks in advance.
best regards
stephen
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
|
#1 |
Hi stephen,
Welcome to yade community.
In yade you have to define materials (e.g. one material for particles and one for boundaries):
### properties:
density = 2650
shear_modulus = 2e5
poisson_ratio = 0.15
young_modulus = 2*shear_
### define materials:
SphereMat = FrictMat(
BoundaryMat = FrictMat(
O.materials.
O.materials.
Then you can use the materials in the generation process:
O.bodies.
O.bodies.
Hope it helps,
Christian
Revision history for this message
|
#2 |
hi Jakob,
thanks for your prompt response and great contribution.
however, i made some changes and try to run my script again, but the result i was geting is not what i was expected. here is the detailed copy of the script for your suggestions and corrections.
thanks in advanced.
#file=open(
#file.close()
#stra=open(
#stra.write(
#stra.close()
devi=open(
#devi.write(
devi.close()
strain=
#strain.
strain.close()
sigma11=
#strain.
sigma11.close()
shear11=
#strain.
shear11.close()
epsellion=
#epsellion.close()
file=open(
file1=open(
file.close()
file1.close()
hop=open(
#strain.
hop.close()
from yade import pack, plot
young=1e6 #young modulus of the spheres [Pa] (1e6 kPa=1e9 Pa)
pr=0.25 #poisson's ratios of the spheres
fa=28.6 #friction angle of the spheres [rad] 0.2 radian=11.46 degree, 0.5 radian= 28.6 degree, 0.4 rad=22.9 degreee, 0.8 rad=45.8 degree
fb=28.6 #friction at the boundaries in degree
number=1500
##create materials for spheres and plates
idSand=
BoundaryMat = FrictMat(
O.materials.
O.bodies.
O.bodies.
O.bodies.
O.bodies.
psdSizes,
mincorner,
sp=pack.
sp.makeCloud(
#sp.makeCloud(
Gl1_Sphere.
sp.toSimulation
unb=utils.
O.engines=[
ForceResetter(),
InsertionSor
InteractionLoop(
[
[
[
),
GravityEngin
NewtonIntegr
PyRunner(
]
O.dt=0.
#### D E P O S I T I O N ####
print '### Deposion is Started ###'
def checkUnbalanced():
print 'iteration number:
if O.iter<25000: return
# the rest will be run only if unbalanced is < .1 (stabilized packing)
if utils.unbalance
if utils.unbalance
checker.
print "Depostion is Completed and the Top Part of the Membran is Added!"
def erasingwalls():
print "### Additional Walls are Erased! ###"
O.bodies.
O.bodies.
O.bodies.
O.bodies.
O.bodies.
O.bodies.
O.bodies.
O.bodies.
checker.
print "loading is starting!"
aim=100000 #PASCAL!!
vel=0.03 #applyied velocity
#0.003 calisii
#### C O N F I N I N G P R E S S U R E ####
def load():
O.materials[
O.engines=
print ('CONFINING PRESSURE')
print 'stress at the top :',(abs(
print 'stress at the front:'
print 'stress at the back:',
print 'stress at the right:'
print 'stress at the left:',
if (abs((O.
O.
O.
if (abs((O.
O.
O.
if (abs((O.
O.
O.
if (abs((O.
O.
O.
if (abs((O.
O.
O.
if (abs((O.
O.
O.
if (abs((O.
O.
O.
if (abs((O.
O.
O.
if (abs((O.
O.
O.
if (abs((O.
O.
O.
if (abs((O.
print "loading is stopped"
uzun=
print uzun
hip=
hip.
hip.close()
checker.
print "### Axial Loading is Starting ###"
#### A X I A L L O A D I N G ####
def axial():
O.materials[
#O.engines=
O.engines=
print 'stress at the top :',(abs(
print 'stress at the front:'
print 'stress at the back:',
print 'stress at the right:'
print 'stress at the left:',
if (abs(O.
O.
O.
if (abs(O.
O.
O.
if (abs(O.
O.
O.
O.
O.
if (abs(O.
O.
O.
if (abs(O.
O.
O.
O.
O.
if (abs(O.
O.
O.
if (abs(O.
O.
O.
O.
O.
if (abs(O.
O.
O.
if (abs(O.
O.
O.
O.
O.
if (abs(O.
print "### Triaxial Test is Completed ###"
print "### ENDE GUT ALLES GUT ###"
print "### Thank you JAMAL ###"
checker.
def writingDatas():
x=(abs(
y=(abs(
file=
file1=
file.
file1.
#+"\n")
file.close()
file1.close()
for b in O.bodies: b.shape.
# rot() gives rotation vector between reference and current position
def writingLength():
leng=
uzunluk=
first=
leng.close()
if (abs(O.
s=(
E=(
shr=
sig=
y=(
devi=
devi.
devi.close()
strain=
strain.
strain.close()
epsellion=
epsellion.
epsellion.
sigma11=
sigma11.
sigma11.close()
shear11=
shear11.
shear11.close()
print ("strain:",s," ","epsellion:",E," ","deviatoric:",y)
def strain():
# length=
#numbers=
#for i in range(0,
#"stra" defined as the file of strains calculated for each iteration.the calculation starts with the end of axial loading.
# stra=open(
#strain=
#stra.
#stra.close()
#print ("### calculation of the strain completed ###")
print ("_____
O.pause() #this stops yade!
O.run()
Revision history for this message
|
#3 |
in your script i see some inconsistencies, that can lead to unexpected results:
##### 1. problem:
idSand=
#frictionAngle=fa !!!
##### 2. problem:
O.bodies.
#this is ok
O.bodies.
#missing material = BoundaryMat !!!
O.bodies.
#missing material = BoundaryMat !!!
O.bodies.
#missing material = BoundaryMat
##### 3.problem:
sp=pack.
sp.makeCloud(
sp.toSimulation()
you did not set material for spheres. but i do not know how to do this with sp.toSimulation()
i prefer to use:
O.bodies.
#instead of sp.toSimulation()
regards,
christian
Revision history for this message
|
#4 |
hi christian,
thanks for your observation,
i have made the necessary corrections and get the best output that correspond to exertly what i was expecting.
how ever, i have some additional development during the simulation. an error named " FATAL /build/
Body #37 has velocity==NaN! "
occured and this automatically terminates the simulation.
do you know anything that could be the cause of this problem and how to fix it?.
i have checked the similar post here but the problem still persist.
about setting the material for sphere, i used this command to do that
O.materials[
thanks for your great assistance....am greatful
best regards
stephen
you may also wish to go through the recent script shown below
#file=open(
#file.close()
#stra=open(
#stra.write(
#stra.close()
devi=open(
#devi.write(
devi.close()
strain=
#strain.
strain.close()
sigma11=
#strain.
sigma11.close()
shear11=
#strain.
shear11.close()
epsellion=
#epsellion.close()
file=open(
file1=open(
file.close()
file1.close()
hop=open(
#strain.
hop.close()
from yade import pack, plot
young_modulus=1e6 #young modulus of the spheres [Pa] (1e6 kPa=1e9 Pa)
poison_ratio=0.25 #poisson's ratios of the spheres
fa=0.5 #friction angle of the spheres [rad] 0.2 radian=11.46 degree, 0.5 radian= 28.6 degree, 0.4 rad=22.9 degreee, 0.8 rad=45.8 degree
fb=0.5 #friction at the boundaries in
number=1400
##create materials for spheres and plates
idSand=
#SphereMat = FrictMat(
BoundaryMat = FrictMat(
O.materials.
O.bodies.
O.bodies.
O.bodies.
psdSizes,
mincorner,
sp=pack.
sp.makeCloud(
#sp.makeCloud(
Gl1_Sphere.
sp.toSimulation
unb=utils.
O.engines=[
ForceResetter(),
InsertionSor
InteractionLoop(
[
[
[
),
GravityEngin
NewtonIntegr
PyRunner(
]
O.dt=0.
#### D E P O S I T I O N ####
print '### Deposion is Started ###'
def checkUnbalanced():
print 'iteration number:
if O.iter<150000: return
# the rest will be run only if unbalanced is < .1 (stabilized packing)
if utils.unbalance
if utils.unbalance
checker.
print "Depostion is Completed and the Top Part of the Membran is Added!"
def erasingwalls():
print "### Additional Walls are Erased! ###"
O.bodies.
O.bodies.
O.bodies.
O.bodies.
O.bodies.
O.bodies.
O.bodies.
O.bodies.
checker.
print "loading is starting!"
aim=100000 #PASCAL!!
vel=0.003 #applyied velocity
#0.003 calisii
#### C O N F I N I N G P R E S S U R E ####
def load():
O.materials[
O.engines=
print ('CONFINING PRESSURE')
print 'stress at the top :',(abs(
print 'stress at the front:'
print 'stress at the back:',
print 'stress at the right:'
print 'stress at the left:',
if (abs((O.
O.
O.
if (abs((O.
O.
O.
if (abs((O.
O.
O.
if (abs((O.
O.
O.
if (abs((O.
O.
O.
if (abs((O.
O.
O.
if (abs((O.
O.
O.
if (abs((O.
O.
O.
if (abs((O.
O.
O.
if (abs((O.
O.
O.
if (abs((O.
print "loading is stopped"
uzun=
print uzun
hip=
hip.
hip.close()
checker.
print "### Axial Loading is Starting ###"
#### A X I A L L O A D I N G ####
def axial():
O.materials[
#O.engines=
O.engines=
print 'stress at the top :',(abs(
print 'stress at the front:'
print 'stress at the back:',
print 'stress at the right:'
print 'stress at the left:',
if (abs(O.
O.
O.
if (abs(O.
O.
O.
if (abs(O.
O.
O.
O.
O.
if (abs(O.
O.
O.
if (abs(O.
O.
O.
O.
O.
if (abs(O.
O.
O.
if (abs(O.
O.
O.
O.
O.
if (abs(O.
O.
O.
if (abs(O.
O.
O.
O.
O.
if (abs(O.
print "### Triaxial Test is Completed ###"
print "### ENDE GUT ALLES GUT ###"
print "### Thank you JAMAL ###"
checker.
def writingDatas():
x=(abs(
y=(abs(
file=
file1=
file.
file1.
#+"\n")
file.close()
file1.close()
for b in O.bodies: b.shape.
# rot() gives rotation vector between reference and current position
def writingLength():
leng=
uzunluk=
first=
leng.close()
if (abs(O.
s=(
E=(
shr=
sig=
y=(
devi=
devi.
devi.close()
strain=
strain.
strain.close()
epsellion=
epsellion.
epsellion.
sigma11=
sigma11.
sigma11.close()
shear11=
shear11.
shear11.close()
print ("strain:",s," ","epsellion:",E," ","deviatoric:",y)
def strain():
# length=
#numbers=
#for i in range(0,
#"stra" defined as the file of strains calculated for each iteration.the calculation starts with the end of axial loading.
# stra=open(
#strain=
#stra.
#stra.close()
#print ("### calculation of the strain completed ###")
print ("_____
O.pause() #this stops yade!
O.run()
Revision history for this message
|
#5 |
Hello Stephen,
- It seems to me that maybe, these "material" are not perfectly clear to you (otherwise, please excuse my answer). You can define in your Yade-simulation (this "O" of O. ...) a list of different "materials" defined by their type, and the values of the corresponding parameters
But this list is useless until you do not affect one material of the list to one "body" (=element) of your simulation. So when you type O.materials[
Are you sure it is the material that you affected to your spheres ? Note that you still use sp.toSimulation() (cf Christian's remark)
- Second, I fear problems with this "idSand" that is both a label of a material, and the return value of O.bodies.append() function, see your line :
idSand=
I'm not yet enough python/yade - aware to be sure there is a problem, but I'm not sure that your line
O.
does what you want ??
Revision history for this message
|
#6 |
Hi,
> how ever, i have some additional development during the simulation. an error named
> " FATAL /build/
> Body #37 has velocity==NaN! "
> occured and this automatically terminates the simulation.
>
> do you know anything that could be the cause of this problem and how to fix it?.
1.) follow statements/remarks of jduriez and do something like:
idSand=
Then you can do:
sandLabel.young=1e6
or
O.materials[
which is doing the same ...
But changing the property of a material will not change material properties of existing bodies.
Do you want to change material properties during the run?
2.) If your simulation is dynamical, time step could be too high. Decrease it either directly with a fixed O.dt= ...? or decrease timestepSafetyC
Additionally I want to say, that GravityEngine is deprecated. You can set it directly in the NewtonIntegrator
NewtonIntegrato
and remove this line:
GravityEngine(
Next time please send a short example script, that shows the problem. It is quite time consuming investigating a 1000-line script including 950 irrelevant lines.
Regards,
Christian
Can you help with this problem?
Provide an answer of your own, or ask stephen for more information if necessary.