Some questions related to the Triaxial code by Bruno Chareyre
Hi everyone,
I am using Ubuntu 18.04, and Yade 2019-08-
I use the Triaxial code by Bruno Chareyre [1] to understand how it works.
[1] https:/
My goal is to code a Triaxial test with 20000 particles in different sizes (sand) under different strain and stress paths and get all inter-particle forces, branch vectors, contact normals, and fabric tensor. (with the properties defined in the code)
This is the code I am running. My questions are at the end of this message.
#######
#######
######### TRIAXIAL PROBLEM, Y IS THE VERTICAL AXIS, X IS THE RIGHT AXIS, Z IS THE FRONT AXIS #########
#######
import datetime
aa = datetime.
print ('************** START **************')
import numpy as np
import math
from yade import pack, plot, qt, export, utils
from datetime import datetime
#######
######### DEFINING VARIABLES #########
print ('============ DEFINING VARIABLES ============')
nRead=readParam
num_spheres=20000,
compFricDegree = 30,
key='_
unknownOk=True
)
from yade.params import table
num_spheres=
key=table.key
targetPorosity = 0.35
compFricDegree = table.compFricD
finalFricDegree = 30
rate=-0.02
damp=0.2
stabilityThresh
young=5e6
poisson=0.3
mn,mx=Vector3(
sigmaIso=-50e3
#######
######### DEFINING MATERIALS #########
print ('============ DEFINING MATERIALS ============')
O.materials.
O.materials.
#######
######### DEFINING PACKING #########
print ('============ DEFINING PACKING ============')
frictionlesswal
wallIds=
sp=pack.
clumps=False
if clumps:
volume = (mx[0]-
mean_rad = pow(0.09*
c1=
sp.
sp.
O.bodies.
else:
volume = (mx[0]-
sp.
O.bodies.
#######
######### DEFINING TRIAXIAL TEST #########
print ('============ DEFINING TRIAXIAL TEST ============')
triax=TriaxialS
maxMultiplier=
finalMaxMultip
thickness = 0,
stressMask = 7,
internalCompac
)
newton=
#######
######### DEFINING ENGINES #########
print ('============ DEFINING ENGINES ============')
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
GlobalStiffnes
triax,
TriaxialStateR
newton
]
Gl1_Sphere.
if nRead==0: yade.qt.
print ('Number of elements: ', len(O.bodies))
print ('Box Volume: ', triax.boxVolume)
print ('Box Volume calculated: ', volume)
#######
######### APPLYING CONFINING PRESSURE #########
print ('============ APPLYING CONFINING PRESSURE ============')
triax.stressmask=7
triax.goal1=
triax.goal2=
triax.goal3=
while 1:
O.run(1000, True)
unb=
meanS=
print ('unbalanced force:',unb,' mean stress engine: ',triax.
print ('porosity=
print ('void ratio='
print ('~~~~~~~~~~~~~ Phase_01: Converging to Isotropic Compression, 50kPa ~~~~~~~~~~~~~')
if unb<stabilityTh
break
O.save(
print ('#####
e22Check=
#######
######### DEVIATORIC LOADING #########
print ('============ APPLYING DEVIATORIC LOADING ============')
triax.internalC
setContactFrict
triax.stressMask = 5
triax.goal1=
triax.goal2=rate
triax.goal3=
newton.damping=0.1
unb=unbalancedF
axialS=
print ('step=', O.iter, 'unbalanced force:',unb,' sigma2: ',axialS, 'q=', axialS-sigmaIso)
print ('axial deformation (%)', (triax.
print ('~~~~~~~~~~~~~ Phase_02: Converging to Deviatoric Compression, Strain Rate ~~~~~~~~~~~~~')
O.save('final.xml')
print ('#####
#######
######### DEFINING FUNCTIONS #########
print ('============ DEFINING FUNCTIONS ============')
def history():
plot.addData(
ev=-
s11=
s22=
s33=
i=O.iter)
#######
######### RECORD AND PLOT DATA #########
print ('============ RECORD AND PLOT DATA ============')
O.run(5000,True)
plot.plots=
plot.labels=
plot.plot()
plot.saveDataTx
plot.saveGnuplo
print ('************** END **************')
bb = datetime.
cc = bb - aa
print( int(cc.
print(elapsed_time)
#######
Question:
1- When the simulation is finished? When I run the code, It takes some minutes to show the ************** END ************** message on the screen, while the Play button has not been chosed in the Yade window yet. If I press the Play button, it takes some hours and then I get run errors.
2- In the code we have defined the strain rate for the deviatoric part, what's the criterion to finish the test? does it work with damping? I have read about it but it's not clear for me yet.
3- I want to get the time of running but I get the error for it. I have used datetime function for it as it is in the code.
4- I don't get the conventional graph of triaxial test. the graph window shows up but it is just a point.
5- If I get the simple triaxial test correctly, how can I get the fabric tensor, inter-particle forces, branch vectors, and contact normals as the raw data?
Thank you.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jan Stránský
- Solved:
- Last query:
- Last reply: