Question about FEM and DEM coupling
I change the code of the example1-yade.py file in [1] to the following code:
from libyade import yade
from yade import polyhedra_utils
from yade import ymport
from yade import *
widthl = .3
widthr = .3
widthc = .3
height = .3
thick = .5
deep = -.2
sizeMin = 40e-3
sizeMax = 60e-3
frictionAngle = .5
young = 1e8 # stiffness
dt = 1e-3 # time step
nGravityDeposition = 250 # how long to run initial gravity deposition
nCycles = 3 # how many jumps to run afterwards
nStepsBetweenCycles = 200 # number of time steps between jumps
dspl = 20e-3
width = widthl+
matS = O.materials.
mat = PolyhedraMat(
O.materials.
O.engines = [
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
NewtonIntegrat
]
# box
p000 = Vector3(0,0,0)
p100 = Vector3(widthl,0,0)
p200 = Vector3(
p300 = Vector3(
pxs = (p000,p100,
p001,p101,p201,p301 = [p+Vector3(
p010,p110,p210,p310 = [p+Vector3(
p011,p111,p211,p311 = [p+Vector3(
p00b,p10b,p20b,p30b = [p+Vector3(
p01b,p11b,p21b,p31b = [p+Vector3(
def rect(vs,**kw):
v1,v2,v3,v4 = vs
return [
facet(
facet(
]
movables = rect((p100,
rects = (
(p000,
(p200,
(p000,
(p300,
(p000,
(p100,
(p200,
(p010,
(p110,
(p210,
(p100,
(p110,
(p100,
(p200,
)
rects = movables + sum((rect(r) for r in rects),[])
O.bodies.
O.bodies.
And I run the example1.sh it shows:
Traceback (most recent call last):
File "example1.py", line 90, in <module>
dem = YADE_API(demName)
File "/home/
execfile(
File "example1-yade.py", line 56, in <module>
p000 = vector(0,0,0)
NameError: name 'vector' is not defined
and also :
Traceback (most recent call last):
File "example1.py", line 90, in <module>
dem = YADE_API(demName)
File "/home/
execfile(
File "example1-yade.py", line 72, in <module>
movables = rect((p100,
File "example1-yade.py", line 69, in rect
facet(
NameError: global name 'facet' is not defined
What errors here?
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: