Tell me about the batch method
Tell me about the " batch method "
I would like to create a batch method Periodic triaxial test, but it is not calculated accurately.
Could you please modify the program?
#######
#batch text
rMean
.05
.10
.15
#######
#######
#Periodic triaxial test
readParamsFromT
# make rMean, rRelFuzz, maxLoad accessible directly as variables later
from yade.params.table import *
sigmaIso = -200e3
#import matplotlib
#matplotlib.
# generate loose packing
from yade import pack, plot
O.periodic = True
sp = pack.SpherePack()
if 1:
## uniform distribution
sp.makeCloud((0, 0, 0), (0.25, 0.25, 0.2), rMean=rMean, rRelFuzz=.2, periodic=True)
else:
## create packing from clumps
# configuration of one clump
c1 = pack.SpherePack
# make cloud using the configuration c1 (there could c2, c3, ...; selection between them would be random)
sp.makeClumpCl
# setup periodic boundary, insert the packing
sp.toSimulation()
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 = .5 * PWaveTimeStep()
def addPlotData():
plot.addData(
i=O.iter,
# save all available energy data
**O.energy
)
# enable energy tracking in the code
O.trackEnergy = True
# define what to plot
plot.plots = {
'i': ('unbalanced',),
'i ': ('sxx', 'syy', 'szz'),
' i': ('exx', 'eyy', 'ezz'),
# energy plot
' i ': (O.energy.keys, None, 'Etot'),
}
# show the plot
plot.plot()
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 = (sigmaIso, sigmaIso, -.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():
plot.saveDataT
waitIfBatch()
O.pause()
#######
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask 内山康太郎 for more information if necessary.