Contact laws and Input stiffness directly rather than young parameter
Hello everyone,
I am using Ubuntu 18.04, and Yade 2019-08-
I developed the Triaxial test code based on [1] and working on that. I want to directly input Kn and Kt (like most of the papers) instead of using the "young" parameter. To do so, as the "FrictMat" has not Kn and Kt, I tried to define material and contact law based on "ViscElMat". To do so and as I do not want to model visco materials, I set cn = cs = 0 as follows:
O.materials.
O.materials.
and for the contact law in Engine, I made the following changes:
newton=
O.engines=[
ForceResetter(),
InsertionSortC
Interaction
[Ig2_Sphere_
),
GlobalStiffnes
triax,
PyRunner(
TriaxialStateR
newton
]
In this case, I get no error, the run speed is fast enough, but, the result is different than the "FrictMat" case while the specimen is the same. To be more specific, I get a dense behavior (Peak in the stress-strain curve) by using "FrictMat" however, when I use the "ViscElMat" I get a loose soil behavior (just gradually hardening) and never use "young" in my code. I am wondering why that happens?
[1] https:/
Thank you for your help.
Minimal version of my code:
#######
#### TRIAXIAL PROBLEM, Y IS THE VERTICAL AXIS, X IS THE RIGHT AXIS, Z IS THE FRONT AXIS #####
#######
import numpy as np
import time
import datetime, os
import shutil
start_time=
from datetime import datetime
import math
from yade import qt, export, utils
from yade import pack
import yade.timing;
O.timingEnabled
#######
######### DEFINING VARIABLES ########
nRead=readParam
num_spheres=20000,
compFricDegree = 29,
key='_triax_',
unknownOk=True
)
from yade.params import table
num_spheres=
key=table.key
targetPorosity = 0.4
compFricDegree = table.compFricD
finalFricDegree = 30
IP=100 # iteration period to record data and stuff
ORN=1000 # O.Run Number of iterations
damp=0.2
thick=0.01
stabilityThresh
PCPC=0.0001 # Precision of Confining Pressure Convergence
Kn=10e7
Kt=10e7
Ls=1
mn,mx=Vector3(
volume = (mx[0]-
cvs=1-targetPor
mean_rad = pow(0.24*
strainRate=-0.02
target_strain=0.25
sigmaIso=-1e4
particleDensity
#######
################# DEFINING MATERIALS #################
O.materials.
O.materials.
#######
################# DEFINING PACKING #################
walls=aabbWalls
wallIds=
sp=pack.
clumps=False
sp.makeCloud(
O.bodies.
#######
################# DEFINING TRIAXIAL TEST #################
triax=TriaxialS
maxMultiplier=
finalMaxMultip
thickness = thick,
stressMask = 7,
internalCompac
)
#######
################# DEFINING FUNCTIONS #################
from yade import plot
def history():
plot.addData(
e11 = -triax.strain[0],
e22 = -triax.strain[1],
e33 = -triax.strain[2],
ev = -triax.
s11 = -triax.
s22 = -triax.
s33 = -triax.
i = O.iter,
t = O.time, # virtual (yade) time --- time of simulation
fab = utils.fabricTen
#######
################# DEFINING ENGINES #################
newton=
O.engines=[
ForceResetter(),
InsertionSortC
Interaction
[Ig2_Sphere_
),
GlobalStiffnes
triax,
PyRunner(
TriaxialStateR
newton
]
Gl1_Sphere.
yade.qt.
#######
################# APPLYING CONFINING PRESSURE #################
triax.goal1 = sigmaIso
triax.goal2 = sigmaIso
triax.goal3 = sigmaIso
while 1:
O.run(ORN,True)
unb = unbalancedForce()
meanS=
ConfStressR
if unb<stabilityTh
break
e22Check=
#######
################# REACHING TARGET POROSITY ##################
import sys
while triax.porosity>
compFricDegree = 0.95*compFricDegree
setContactFric
sys.stdout.flush()
O.run(ORN,True)
#######
################# DEVIATORIC LOADING #################
triax.internalC
setContactFrict
triax.wall_
triax.wall_
triax.wall_
triax.wall_
triax.wall_
triax.wall_
triax.stressCon
triax.stressCon
triax.stressCon
triax.strainRat
triax.stressMask = 5
triax.goal1 = sigmaIso
triax.goal2 = strainRate
triax.goal3 = sigmaIso
newton.damping=0.1
while 1:
O.run(ORN,True)
unb=
axialS=
eps2=
eps2cal=
if abs(eps2-
break
#######
########### END ###########
O.realtime
print ('Analysis has been taken for',O.realtime, 'seconds or', O.realtime/60, 'minutes')
print('Real time of run:',(time.time() - start_time), 'seconds or',(time.time() - start_time)/60, 'minutes')
yade.timing.stats()
#######
################# RECORD Macro DATA and Plot #################
from matplotlib import pyplot as plt
e22 = plot.data["e22"]
ev = plot.data["ev"]
s22 = plot.data["s22"]
s11 = plot.data["s11"]
s33 = plot.data["s33"]
i = plot.data["i"]
t = plot.data["t"]
fig1, ax1=plt.
fig2, ax2=plt.
fig3, ax3=plt.
fig4, ax4=plt.
ax1.plot(
ax1.legend()
ax1.set_
ax1.set_
ax1.grid(True)
fig1.tight_layout()
fig1.savefig(
ax2.plot(
ax2.legend()
ax2.set_
ax2.set_
ax2.grid(True)
fig2.tight_layout()
fig2.savefig(
ax3.plot(
ax3.legend()
ax3.set_
ax3.set_
ax3.grid(True)
fig3.tight_layout()
fig3.savefig(
ax4.plot(
ax4.plot(
ax4.legend()
ax4.set_
ax4.set_
ax4.grid(True)
fig4.tight_layout()
fig4.savefig(
plt.show()
O.pause()
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- ehsan benabbas
- Solved:
- Last query:
- Last reply: