The error of generating particles and importing .mesh file
Hi all,
I'm simulating the collision of a rigid body (.mesh file and FrictMat) with a brittle material (sphere and CohFrictMa).
Below is my script :
from yade import pack
from numpy import genfromtxt
from yade import utils
from yade import export
from yade import ymport
from yade import wrapper
import csv
import numpy as np
import gts, os.path, locale
global h
global waterlevel
waterlevel=0
rho_water=1000
rho_ice=880
gravity=9.85
#matice
matice = O.materials.
Matice=
#matsteel
matsteel=
Matsteel=
#sphere
coordinates=
pack_ice=
PACK_ICE=
#ship
ship=ymport.
SHIP=O.
#add ebgines
O.engines=[
ForceRese
Insertion
Interacti
),
DragEngin
NewtonInt
Translati
#
]
#buoyancy force
def applyBuoyancy():
for b in pack_ice:
if h >= rad:
elif h >= 0 and h < rad:
elif h >=-rad and h<0:
O.engines=
O.dt = .5e-2 * PWaveTimeStep()
O.run(10000,True)
O.saveTmp()
#######
.mesh file :
MeshVersionFor
Dimension
3
Vertices
6472
-1972.
-1817.
-1726.
-1662.
-1485.
-1353.
-1276.
-1200.
-
......
#############.csv file
0,0,0
0,0.1,0
0,0.2,0
0,0.3,0
0,0.4,0
0,0.5,0
0,0.6,0
0,0.7,0
0,0.8,0
0,0.9,0
0,1,0
......
#######
Case one : when I run this script, the .mesh file is imported successfully, but the particles are not generated, and no error message.
Case two : if I remove the .mesh related commands, the particles can be generated.
Please let me know if full file is required or if you find other errors in the script.
Thanks in advance for your help
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- xuanshenyu
- Solved:
- Last query:
- Last reply: