'JCFpmState' object has no attribute 'tensBreak'
I use the code by Luc. But there is an error. How to solve? AttributeError: 'JCFpmState' object has no attribute 'tensBreak'
from yade import ymport, utils , plot
#---------------- DEFINITION OF SIMULATION'S PARAMETERS
#### packing (previously constructed)
PACKING=
#### Boundary Conditions
confinement=-1e6
strainRate=-0.02
#### name of output files
OUT=PACKING+
#### Simulation Control
saveData=10 # data record interval
iterMax=50000 # maximum number of iterations
saveVTK=iterMax/5 # Vtk files record interval
#### Material microproperties -> Lac du Bonnet granite (cf. A DEM model for soft and hard rock, Scholtes & Donze, JMPS 2013)
intR=1.5 # allows near neighbour interaction and defines coordination number K=13 (needs to be adjusted for every packing -> preprocessing needed)
DENS=4000 # could be adapted to match material density: dens_DEM=
YOUNG=68e9
FRICT=10
ALPHA=0.4
TENS=8e6
COH=160e6
#### material definition
def sphereMat(): return JCFpmMat(
def wallMat(): return JCFpmMat(
#### preprocessing to get dimensions
O.bodies.
dim=utils.
xinf=dim[0][0]
xsup=dim[1][0]
X=xsup-xinf
yinf=dim[0][1]
ysup=dim[1][1]
Y=ysup-yinf
zinf=dim[0][2]
zsup=dim[1][2]
Z=zsup-zinf
R=0
Rmax=0
numSpheres=0.
for o in O.bodies:
if isinstance(
numSpheres+=1
R+=o.
Rmean=R/numSpheres
#### IMPORTANT LINE HERE
O.reset() # all previous lines were for getting dimensions of the packing to create walls at the right positions (below) because walls have to be genrated after spheres for FlowEngine
#### now we construct the scene with right dimensions (because walls have to be imported before spheres for certain engines)
### walls
mn,mx=Vector3(
walls=utils.
wallIds=
### packing
O.bodies.
#---------------- ENGINES ARE DEFINED HERE
#### triaxial Engine
triax=TriaxialS
internalCompac
)
#### simulation is defined here (DEM loop, interaction law, servo control, recording, etc...)
O.engines=[
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
triax,
]
#### custom recording functions
tensCks=shearCks=0
e10=e20=e30=0
def recorder():
global tensCks,
tensCks=0
shearCks=0
for o in O.bodies:
if isinstance(
yade.
plot.
# if you want to plot during simulation
plot.plots=
plot.plot()
#---------------- SIMULATION STARTS HERE
#### manage interaction detection factor during the first timestep and then set default interaction range (intRadius=1)
#O.step()
### initializes the interaction detection factor
SSgeom.
Saabb.aabbEnlar
#### APPLYING ISOTROPIC LOADING
triax.stressMask=7
triax.goal1=
triax.goal2=
triax.goal3=
triax.max_vel=0.001
#while 1:
#if confinement==0:
#O.
#break
#O.run(100,True)
#unb=
#meanS=
#print ('unbalanced force:',unb,' mean stress: ',meanS)
#if unb<0.005 and abs(meanS-
#O.
#e10=
#e20=
#e30=
#break
#### APPLYING DEVIATORIC LOADING ALONG Y AXIS
#triax.stressMask=5
#triax.
#triax.
#triax.
#triax.max_vel=1
#O.run(iterMax)
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Luc Scholtès
- Solved:
- Last query:
- Last reply: