Grid connections error/bug?
Why, in my code, do half of the nodes/grid connections just disappear once the fixed BC is turned of?
I notice the same thing with CohesiveCylinde
In the for loop:
for i in linspace(0,L,nL):
nodesIds.append( O.bodies.append(
gridNode(
If you change the axis as such:
for i in linspace(0,L,nL):
nodesIds.append( O.bodies.append(
gridNode(
or:
for i in linspace(0,L,nL):
nodesIds.append( O.bodies.append(
gridNode(
All middle nodes and the grid connection disappear once you hit play. Is this a bug?
My Complete Code:
from yade import qt
from yade.gridpfacet import *
import numpy as np
qt.View()
### Engines need to be defined first since the function gridConnection creates the interaction
O.engines=[
ForceResetter(),
InsertionSortC
Bo1_Sphere_
Bo1_GridConne
]),
InteractionLoop(
# Geometric interactions
[
],
[
# Interaction phusics
],
# Interaction law
[
]
),
NewtonIntegrat
PyRunner(
]
O.dt=5e-07
O.materials.
blen = 0.21230 ## Length of Ball pit
bhei = .025 ## Height of Ball pit
#rCyl = (0.00635+
rCyl = 0.0026 ## Grass was about 1.2 [mm] wide
nL = 4 ## No exact Number here, just trial and error
L = bhei ## Height of spheres
### Grass Creation
### Create all nodes first :
nodesIds=[]
idxc = -1
x_gap = 0.009 ## Between lumps is roughly 9 [mm]
z_gap = 0.01905 ## Between lines of backing is .75 inch apart
range_x = int(math.
range_z = int(math.
cen_z = -(range_z/2)*z_gap ## Allows the "box" of grass to be center in Z
#sys.exit()
for ii in range(0,range_z):
cen_x = -(range_x/2)*x_gap # Allows the "box" of grass to be center in X
for jj in range(0,range_x):
for y in np.linspace(
nodesIds.
idxc += 1
d = idxc*nL ## Start of grass fiber
cen_x += x_gap
#### Now create connection between the nodes
for k,j in zip(nodesIds[
O.
cen_z += z_gap
for kk in range(0,
O.bodies[
def main():
print "Turning on Grass"
for kk in range(0,
O.bodies[
for kk in range(0,
O.bodies[
[*]
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Justin for more information if necessary.