Segmentation fault on pfacet gridconnection contact
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Yade |
New
|
Undecided
|
Unassigned |
Bug Description
I seem to get a Segmentation fault (core dumped) when using GridConnection, PFacet, and randomDensePack. And I am not sure why. I have attached an image and "working" example.
Thanks in advance,
Justin
Edit: I could not seem to upload an picture or example code. Thus code below:
from yade.gridpfacet import *
import numpy as np
from yade import utils
from yade import ymport
import sys,time,
from yade import qt
qt.View()
#print(
#quit()
########### ParallelEngine, -j4
boxCenter = (0,0,.025)
## double check that /2 would create correct length, I.e., import based_70 to see if they match... they should
boxDem = (.2123/
boxDem = (.07,.07,.025) ###
blen = boxDem[0]*2 ## Length of Ball pit
bhei = .025 ## Height of Ball pit
# Spheres information
sphereRadius = .004 # [m]
nu = .48
#G = 300000 # [Pa]
den_rub = 89724 # [kg/m^3]
yng_rub = 3000000 # [Pa]
fric_rub = radians(38) # [degrees]
O.materials.
O.materials.
## Stud informtion
#studStartZ = (.01+.022+.01905)
studStartZ = (.01+bhei+.01905)
transVel = 0.000222*2
rotVel = 0.00872665*2
### pack auto fills, i.e., I no longer pick the amount of spheres
pred = pack.inAlignedB
sp = pack.randomDens
sp.toSimulation
## Time step set to 20% of Rayleigh Wave
O.dt=.2*
print(O.dt)
### Steps needed to run sim
sphereFalls = 1000 ### Steps spheres need to fall and level out and turn on studs
startRot = sphereFalls+
## Rotation steps
deg_to_rad_length = (60*pi/180); # [rad]
num_sec_roto = deg_to_
num_of_steps_roto = num_sec_roto/O.dt;
endSim = startRot + math.floor(
O.engines=[
###Reset all forces stored in Scene::forces (O.forces in python). Typically, this is the first engine to be run at every step. In addition, reset those energies that should be reset, if energy tracing is enabled.
## Resets forces and moments that act on bodies
ForceResetter(),
## Using bounding boxes find possible body collisions.
InsertionSort
Bo1_Facet_Aabb(),
Bo1_PFacet_
Bo1_Sphere_
Bo1_GridConne
Bo1_PFacet_
]),
InteractionLoop([
Ig2_
Ig2_
Ig2_
Ig2_
Ig2_
Ig2_
Ig2_
Ig2_
Ig2_
Ig2_
],
[
# Ip2_CohFrictMat
Ip2_
## Currently grass does not interact with facet, probably should not matter, since the spheres will be holding them up.
Ip2_
],
[
Law2_
Law2_
Law2_
Law2_
]),
NewtonIntegrat
]
## Grass Information
#O.materials.
O.materials.
#rCyl = 0.0006 ## Radius, Grass was about 1.2 [mm] wide
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]
y_gap = 0.01905 ## Between lines of backing is .75 inch apart
range_x = int(math.
range_y = int(math.
cen_y = -(range_y/2)*y_gap ## Allows the "box" of grass to be center in Z
color=[
steel_r = (1/4*0.00635)/2 ### Converting 1/4 steel to m, to a sphere radius
box = []
box.append(
box.append(
box.append(
box.append(
O.bodies.append( gridConnection(
O.bodies.append( gridConnection(
O.bodies.append( gridConnection(
O.bodies.append( gridConnection(
O.bodies.append( gridConnection(
O.bodies.append( pfacet(
O.bodies.append( pfacet(
O.stopAtIter=endSim ### Stop sim at endSim steps
#O.run()
I am getting this error:
Traceback (most recent call last): bin/yade- trunk", line 337, in runScript script, globals( )) python3/ dist-packages/ past/builtins/ misc.py" , line 82, in execfile ePack(pred, radius= sphereRadius, memoizeDb= 'tmp/single_ grass.sqlite' , returnSpherePac k=True) anton/dem/ yade/inst/ lib/x86_ 64-linux- gnu/yade- trunk/py/ yade/pack. py", line 559, in randomDensePack king(memoizeDb, sp,radius, rRelFuzz, wantPeri, fullDim) anton/dem/ yade/inst/ lib/x86_ 64-linux- gnu/yade- trunk/py/ yade/pack. py", line 400, in _memoizePacking sqlite3. connect( memoizeDb) OperationalErro r: unable to open database file
File "./../inst/
execfile(
File "/usr/lib/
exec_(code, myglobals, mylocals)
File "2.py", line 41, in <module>
sp = pack.randomDens
File "/home/
_memoizePac
File "/home/
conn=
sqlite3.
[[ ^L clears screen, ^U kills line. F12 controller, F11 3D view (press "h" in 3D view for help), F10 both, F9 generator, F8 plot. ]]