PeriTriaxController not initiating next stage
Hello,
I'm trying to do a uniaxial compression of a periodic box with a 3x3x3 grid of particles.
I'm implementing periodic boundary conditions for level-set particles. I had some unexpected results (level set spheres gave a much lower density). Now I want to do a unit test by comparing a very simple simulation using analytical spheres and level-set spheres.
Whenever I run the simulation (see code below), the pressure increases to the target pressure properly. However, hereafter the simulation keeps iterating but does not initiate the decompression stage defined by compactionFinis
Would any of you happen to know why the next stage is not initiated by PeriTriaxContro
With kind regards,
Danny
#######
# encoding: utf-8
from __future__ import print_function
sigmaIso = -1e6
ydim = 1.0
xdim = 1.0
zdim = 1.0
r = 1.0/3.0/2.0
#import matplotlib
#matplotlib.
# generate loose packing
from yade import pack, qt, plot
O.periodic = True
O.bodies.append(
[
# In xy-plane
# Repeat in z-direction
# Repeat in z-direction
]
)
O.cell.hSize = Matrix3(xdim, 0.0, 0.0, 0.0, ydim, 0.0, 0.0, 0.0, zdim)
O.engines = [
# specify target values and whether they are strains or stresses
# type of servo-control
# wait until the unbalanced force goes below this value
# call this function when goal is reached and the packing is stable
),
]
O.dt = .25 * PWaveTimeStep()
def compactionFinis
# set the current cell configuration to be the reference one
O.cell.trsf = Matrix3.Identity
# change control type: keep constant confinement in x,y, 20% compression in z
triax.goal = (0, 0, .2)
triax.stressMask = 3
# allow faster deformation along x,y to better maintain stresses
triax.
# next time, call triaxFinished instead of compactionFinished
triax.doneHook = 'triaxFinished()'
# do not wait for stabilization before calling triaxFinished
triax.
def triaxFinished():
print('Finished')
O.pause()
totalMass = 0
for b in O.bodies:
def addPlotData():
plot.addData(
i=O.iter,
)
# ez=abs(
print("The total mass is", totalMass)
print("The number of particles is",len(O.bodies))
#print("The volume is", O.cell.volume)
# define what to plot
plot.plots = {
'i': ('unbalanced'),
'compDens': ('sz'),
}
# show the plot
plot.plot()
O.run()
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: