gridnode interaction with sphere cannot display the grid
I have learned examples in the folder of trunk/examples/
scene where a moving mesh plane hits a sphere then the mesh plane deforms at the interaction spot and the the sphere gets momentum to move.
So i combine the codes from the examples above. But when i run it, i can not see the mesh in the views, only the sphere(qt. View). Here is the code,
from yade import qt, plot, geom
from yade.gridpfacet import *
import numpy as np
from pprint import pprint
### materials definition###
O.materials.
### engines####
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ip2_
[Law2_
),
NewtonInteg
PyRunner(
# PyRunner(
# PyRunner(
]
### Parameters of a square grid ###
zl = 0.1 #z [m]
yl = 0.1 #y [m]
nzl = 10 #number of nodes for the length [#]
nyl = 10 #number of nodes for the width [#]
rssp = 2e-3
rscl = 2e-3
color=[
bblen = yl/(nyl-1)
nodesIds=[]
#Create all nodes first :
for i in np.linspace(0, yl, nyl):
for j in np.linspace(0, zl, nzl):
nodesIds.
#Create connection between the nodes
for i in range(0,
for j in range(i+
dist=
if(dist<
O.bodies.
### the sphere ###
spx, spy, spz = 20e-3, 50e-3, 10e-3
rsp = 10e-3
idsp=O.
### the top edge of the grid node, set a veloicty, make the mesh move ###
mknodeids = []
for each in nodesIds:
ez = O.bodies[
if ez > zl-0.5*bblen:
def main():
for each in mknodeids:
qt.Controller()
qt.View()
O.dt=1e-05
O.run()
I find that if i remove the Ig2_Sphere_
Then my question is that:
1. How can i adapt my code to realise my intention.
2. In fact, i want to simulate a deformable wiper sweeping particles. If the particle is too large, the wiper will deform to go over it. Does the gird module in yade works?
Thanks a lot.
Xuesong Gao
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 gaoxuesong for more information if necessary.