Order of defining object and engine is causing problems
Hello all,
I am new to yade. I have tried the basic tutorial scripts and in them the objects are defined first followed by the engines. In an advanced script (cylinderconnec
Now I tried writing a script for a ball interacting with a beam made of cylinders. I defined the objects (cylinders and sphere) first and then the engines. When I ran the code, the beam sort of fell apart. I modified the code by defining the cylinder after the engines. It fixed the problem. I want to know what is causing this or if we are required to define the bodies after the engines.
I am using Ubuntu 20.04
Please find the bare minimum script that showed this issue.
#######
from yade.gridpfacet import *
#### params
young = 1e6
poiss = 3
dens = 1e3
sp_r = 0.05
fr_a = radians(10)
## cylinder
no_cyl = 5
dl_cyl = 0.1
#### materials
O.materials.append(
FrictMat(
young = young,
poisson = poiss,
density = dens,
frictionAngle = fr_a,
label = 'cyl_ext_mat'
)
)
O.materials.append(
CohFrictMat(
young = young,
poisson = poiss,
density = dens,
frictionAngle= fr_a,
normalCohesion = 1e40,
shearCohesion = 1e40,
momentRotationLaw = True,
label = 'cyl_int_mat'
)
)
#### cylinder
nodesIds=[]
cylIds=[]
verts = []
for i in range(no_cyl):
verts.append([0.1 + dl_cyl*i, 0.5, 0.8])
cylinderConnection( # Defining the beam here is causing the issue
verts,
nodesIds = nodesIds,
cylIds = cylIds,
radius = 0.03,
color = [1,0,0],
extMaterial = 'cyl_ext_mat',
intMaterial = 'cyl_int_mat'
)
O.bodies[
####
O.engines = [
ForceResetter(),
InsertionSortC
Bo1_GridConne
]),
InteractionLoop(
[
Ig2_
Ig2_
],
[
Ip2_
Ip2_
],
[
Law2_
Law2_
Law2_
Law2_
]
),
GlobalStiffnes
NewtonIntegrat
]
# if I define the beam here, it fixes everything
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: