Segmentation fault (core dumped) O.bodies.append
Hi,
I'm trying to build up a simulation for direct shear test. However, whenever I try to run the script, an error comes out "segmentation fault (core dumped)". I noticed that other researchers had asked similar question in Launchpad, but I still can't find a solution to my problem here. If this script of mine is working properly, the sequence of simulation should be as follow:
create periodic box > generate spheres > delete periodic box > create shear box > move bottom shear box
I hope to get some advice on how to solve this problem of mine.
Thank you and regards,
Nicholas Ng
***My script is as follow:
=======
# create shear box with shear gap
# from direct_
from yade import pack,qt,plot
O=Omega()
# =======
O.materials.
# add material for side walls
O.materials.
# add material for top and bottom walls
O.materials.
# =======
# =======
# size of the periodic shear box
p_L_x, p_L_y, p_L_z = 0.03, 0.01, 0.01
# size of the shear box
# L_y is half the height of shear box
L_x, L_y, L_z = 0.03, 0.01/2, 0.01
gap=0.00065
half_gap=gap/2
# =======
# =======
sp=pack.
min_corner = Vector3(0,0,0)
max_corner = Vector3(
psd_sizes = [0.000075,
psd_sizes_10 = [0.00075,
radius_mean = 0.002/2
psd_cumm = [0,0.22,
r_relFuzz = 0.2
# =======
# ==============add velocity parameter=
direction_left = Vector3(-1,0,0)
velocity = 0.005
# =======
##=====
# lower part, left wall
left_low_center, left_low_extents = (0, L_y/2-half_gap, L_z/2), (0, L_y/2, L_z/2)
# lower part, right wall
right_low_center, right_low_extents = (L_x, L_y/2-half_gap, L_z/2), (0, L_y/2, L_z/2)
# bottom wall
bot_center, bot_extents = (L_x/2, -half_gap, L_z/2), (L_x/2, 0, L_z/2)
# lower part, behind wall
behind_low_center, behind_low_extents = (L_x/2, L_y/2-half_gap, 0), (L_x/2, L_y/2, 0)
# lower part, front wall
front_low_center, front_low_extents = (L_x/2, L_y/2-half_gap, L_z), (L_x/2, L_y/2, 0)
# upper part, left wall
left_upper_center, left_upper_extents = (0, 3*L_y/2+half_gap, L_z/2), (0, L_y/2, L_z/2)
# upper part, right wall
right_upper_center, right_upper_extents = (L_x, 3*L_y/2+half_gap, L_z/2), (0,L_y/2, L_z/2)
# top wall
top_center, top_extents = (L_x/2, 2*L_y+half_gap, L_z/2), (L_x/2, 0, L_z/2)
# upper part, behind wall
behind_
# upper part, front wall
front_upper_center, front_upper_extents = (L_x/2, 3*L_y/2+
## generate two additional panels at the middle height of the sample to avoid
# particles from falling out during shearing, the two panels will be expanded
# following shearing process.
# left panel
# left_panel_center, left_panel_extents = (0, L_y, L_z/2), (0, 0, L_z/2)
# right panel
# right_panel_center, right_panel_extents = (L_x, L_y , L_z/2), (0, 0, L_z/2)
left_panel_center, left_panel_extents = (-L_x/4, L_y+half_gap, L_z/2), (L_x/4, 0, L_z/2)
right_panel_center, right_panel_extents = (5*L_x/4, L_y-half_gap, L_z/2), (L_x/4, 0, L_z/2)
# =======
# =======
O.periodic=True
O.cell.
0 ,p_L_y*2, 0,
0, 0, p_L_z)
# =======
#======
sp=pack.
# sp.makeCloud(
sp.makeCloud(
# sp.toSimulation()
O.bodies.
# =======
# =======
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
#PeriTriaxCont
#using cell inertia
NewtonIntegrat
# PyRunner(
# qt.SnapshotEngi
# generate top wall after iter 50,000
PyRunner(
]
O.dt=1e-
# O.run();
# qt.View()
# =======
# =======
def deletePeriodicB
O.periodic=False
print(
checker.
# =======
# =======
def generateShearBox():
global leftBox_low
leftBox_low = utils.box(center = left_low_center, extents = left_low_extents, fixed = True, wire = True, material = O.materials[1])
rightBox_low = utils.box(center = right_low_center, extents = right_low_extents, fixed = True, wire = True, material=
botBox = utils.box(center = bot_center, extents=
behindBox_low = utils.box(center = behind_low_center, extents = behind_low_extents, fixed = True, wire = True, material=
frontBox_low = utils.box(center = front_low_center, extents = front_low_extents, fixed = True, wire = True, material=
leftBox_upper = utils.box(center = left_upper_center, extents = left_upper_extents, fixed = True, wire = True, material=
rightBox_upper = utils.box(center = right_upper_center, extents = right_upper_extents , fixed=True, wire = True, material=
topBox = utils.box(
behindBox_upper = utils.box( center = behind_
frontBox_upper = utils.box( center = front_upper_center, extents = front_upper_
leftPanel = utils.box( center = left_panel_center, extents = left_panel_extents, fixed=True,
rightPanel = utils.box( center = right_panel_center, extents = right_panel_
# add to O.bodies
leftBox_low_id = O.bodies.
rightBox_low_id = O.bodies.
botBox_id = O.bodies.
behindBox_low_id = O.bodies.
frontBox_low_id = O.bodies.
leftBox_upper_id = O.bodies.
rightBox_upper_id = O.bodies.
topBox_id = O.bodies.
behindBox_upper_id = O.bodies.
frontBox_upper_id = O.bodies.
leftPanel_id = O.bodies.
rightPanel_id = O.bodies.
print(
checker.
# =======
def shearing():
# O.engines=
O.bodies[
O.bodies[
O.bodies[
O.bodies[
O.bodies[
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 Nicholas Ng for more information if necessary.