Filterpack predicate definition issue
Hello Yade programmers and users,
I encountered a problem in my recent simulation script which has been troubling me, and it’d be much appreciated if I can get some advice.
Here are the steps I’m trying to accomplish:
1. Make a loose pack of particles following defined PSD.
2. Use compression engine to generate a denser pack.
3. At defined iteration #, turn off compression engine.
4. Filter pack with pack.filterpack into desired shape.
5. Continue with further steps (gravity deposition, geometry rotation, etc).
Problem:
My error came from step 4, in the "gravityDeposit
Error:
-------
NameError Traceback (most recent call last)
/usr/bin/yade in <module>()
----> 1 pred
NameError: name 'pred' is not defined
-------
Here is my script using yade 2018.02b:
-------
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
import matplotlib; matplotlib.
import pylab
from yade import pack, plot, qt
from yade import export
### DEFINING VARIABLES AND MATERIALS ###
#geometry definition
Ri,Rs,Ro=
H=3.5
p=H/2
k=0.01
Hs=H*k
hs=Hs/2
Rx=2*Ro
Hx=2*H
c1=geom.
c2=geom.
c3=geom.
nRead=readParam
num_spheres=5000,
compFricDegree = 30,
unknownOk=True
)
from yade.params import table
num_spheres=
compFricDegree = table.compFricD
damp=0.2
young=5e6 # contact stiffness
mn,mx=Vector3(
## create materials for spheres and plates
O.materials.
O.materials.
## create walls around the packing
walls=aabbWalls
wallIds=
## use a SpherePack object to generate a psd loose particles packing
global sp
sp=pack.
sp.makeCloud(
sp.toSimulation
### DEFINING ENGINES ###
triax=TriaxialS
thickness = 0,
stressMask = 7,
internalCompac
label='controller'
)
newton=
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
PyRunner(
GlobalStiffnes
triax,
newton
]
#Display spheres with 2 colors for seeing rotations better
Gl1_Sphere.
if nRead==0: yade.qt.
### APPLYING CONFINING PRESSURE ###
triax.goal1=
def stop():
if O.iter<100:return
checker.
def gravityDepositi
pred=
assembly=
assembly.
#...connect to next steps in simulation
-------
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: