How to close the function doneHook in PeriTriaxController
I don't want to call any Python command again when the sample is isotropic compacted, so I set doneHook=
The code of mine is shown below:
##______________ First section, generate sample_________
from __future__ import print_function
from yade import pack, qt, plot
from math import *
nRead=readParam
## model parameters
## material parameters
young=2e8,
poisson=.2,
alphaKtw=0,
etaTwist=0,
## fluid parameters
## control parameters
damp=0,
## output specifications
)
from yade.params.table import *
O.periodic=True
O.cell.
# create materials for spheres
#shear strength is the sum of friction and adhesion, so the momentRotationL
O.materials.
# generate particles packing
sp=pack.
sp.makeCloud(
sp.toSimulation
O.engines=[
# specify target values and whether they are strains or stresses
# type of servo-control, the strain rate isn't determined, it shloud check the unbalanced force
# wait until the unbalanced force goes below this value
),
]
import sys
def compactionFinis
#check the current porosity
# if the current porosity is lager than target Porosity and comFricDegree is lager than 10,
# then we decrease friction value and apply it to all the bodies and contacts,
# else we decrease rolling friction value.
if porosity>
# we decrease friction value and apply it to all the bodies and contacts
# python syntax, make each step printout
# Run again to the target confining pressure
O.run()
elif porosity>
# we decrease rolling fiction value and apply it to all the bodies and contacts
for b in O.bodies:
for i in O.interactions:
O.run()
else:
# after sample preparation, save the state
# next time, don't call any python command
O.run()
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: