yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #25100
[Question #695851]: VTKRecorder: Aborted (core dumped) due to "intr" in VTKRecorder
New question #695851 on Yade:
https://answers.launchpad.net/yade/+question/695851
Hi all,
I found that the terminal shows me "python3.5: /build/vtk6-YpT4yb/vtk6-6.2.0+dfsg1/IO/XML/vtkXMLOffsetsManager.h:142: void OffsetsManagerGroup::Allocate(int, int): Assertion `numElements > 0' failed. Aborted (core dumped)" when I put the base recorder "intr" in my VTKRecorder engine. The VTKRecorder works fine when there is no "intr" in my recorders. I can't figure out why. I've checked the previous question [1], but I don't think it's the same issue.
Cheers,
Chien-Cheng
[1] https://answers.launchpad.net/yade/+question/690820
My yade version and MWE are provided below.
Yade version : 2020-06-23.git-f03a37c
Linux version: Ubuntu 16.04.6 LTS
| library | cmake | C++ |
| ------------- | -------------------- | ------------------- |
| boost | 105800 | 1.58.0 |
| cgal | | 4.7 |
| clp | 1.15.10 | 1.15.10 |
| cmake | 3.5.1 | |
| coinutils | 2.9.15 | 2.9.15 |
| compiler | /usr/bin/c++ 5.4.0 | gcc 5.4.0 |
| eigen | 3.2.92 | 3.2.92 |
| freeglut | 2.8.1 | |
| gl | | 20171010 |
| ipython | 2.4.1 | |
| metis | | 5.1.0 |
| mpi | | ompi:1.10.2 |
| mpi4py | 1.3.1 | |
| openblas | | OpenBLAS 0.2.18 |
| python | 3.5.2 | 3.5.2 |
| qglviewer | | 2.6.3 |
| qt | | 5.5.1 |
| sphinx | 1.3.6-final-0 | |
| sqlite | | 3.11.0 |
| suitesparse | 4.4.6 | 4.4.6 |
| vtk | 6.2.0 | 6.2.0 |
### MWE
readParamsFromTable(
a=5,
b=5,
c=5,
SN=5.e6,
coeff=0.1,
RATE_NS1=0.1,
RATE_NS2=100, #original 0.1
RATE_shear=1,
TSSC=0.8,
shearStrain=0.5,
Ystep=10,
OUT='frictionlessWall_Hertz_uniform_test'
)
from yade.params.table import *
from yade import pack,plot,export
import numpy as np
import math
sp1=pack.SpherePack()
sp2=pack.SpherePack()
sp3=pack.SpherePack()
O.periodic=True
# dimensions of sample (fixed by particle size such as L/D~15)
RADIUS1=0.25 # determine packing size
RADIUS2=0.125 # determine particle size
length=a*(2*RADIUS1)
height=b*(2*RADIUS1)
width=c*(2*RADIUS1)
thickness=RADIUS1
### Guassian distribution
psdSizes1=[.000456,.000500,.000544]
psdSizes2=[.000228,.000250,.000272]
psdCumm=[0,0.5,1]
### PSD2.6
#psdSizes=[.0000625,.00006251,.000125,.00012501,.00025,.00025001,.0005,.00050001]
#psdCumm=[0,.835770529,.835770529,.973753281,.973753281,.996250469,.996250469,1]
# friction angles
wallFRIC=0
boundaryFRIC=0.5 # during compaction (controls porosity)
spFRIC=0.5
# boundary conditions
PI=1.e5
SN=SN # normal stress
RATE_NS1=RATE_NS1 # velocity of top plate during compaction
RATE_NS2=RATE_NS2 # velocity of top plate during shear
RATE_shear=RATE_shear # shear velocity
roll_stiff=0
roll_fric=0
# simulation control
DAMPSHEAR=0.
ITER=2e5
OUT=OUT
##### microproperties
O.cell.hSize=Matrix3(length,0,0,0,3*height,0,0,0,width)
O.materials.append(FrictMat(density=2500,young=5.5e10,poisson=0.25,frictionAngle=wallFRIC,label='boxMat'))
O.materials.append(FrictMat(density=2500,young=5.5e10,poisson=0.25,frictionAngle=boundaryFRIC,label='boundaryMat'))
O.materials.append(FrictMat(density=2500,young=5.5e10,poisson=0.25,frictionAngle=spFRIC,label='sphereMat'))
upBox = utils.box(center=(length/2,2*height+thickness,1.5*width),orientation=Quaternion(1,0,0,0),extents=(2*length,thickness/2,width),fixed=1,wire=False,color=(1,0,0),material='boxMat')
lowBox = utils.box(center=(length/2,height-thickness,1.5*width),orientation=Quaternion(1,0,0,0),extents=(2*length,thickness/2,width),fixed=1,wire=False,color=(1,0,0),material='boxMat')
O.bodies.append([upBox,lowBox])
sp1.makeCloud((0,height+1*RADIUS1,width),(length,2*height-1*RADIUS1,2*width), rMean=RADIUS2, periodic=True, seed =1)
sp2.makeCloud((0,height+0.1*thickness,width),(length,height+0.1*thickness-1e-10,2*width), rMean=RADIUS2, periodic=True, seed =1)
sp3.makeCloud((0,2*height-0.1*RADIUS1,width),(length,2*height-0.1*RADIUS1-1e-10,2*width), rMean=RADIUS2, periodic=True, seed =1)
sphere_id = O.bodies.append([utils.sphere(s[0],s[1],color=(0,0,1),material='sphereMat') for s in sp1])
bottomLayer_id = O.bodies.append([utils.sphere(s[0],s[1],color=(1,0,1),material='boundaryMat') for s in sp2])
topLayer_id = O.bodies.append([utils.sphere(s[0],s[1],color=(1,0,1),material='boundaryMat') for s in sp3])
effCellVol=(O.bodies[0].state.pos[1]-O.bodies[1].state.pos[1])*O.cell.hSize[0,0]*O.cell.hSize[2,2]
volRatio=(O.cell.hSize[0,0]*O.cell.hSize[1,1]*O.cell.hSize[2,2])/effCellVol
O.engines=[
ForceResetter()
,InsertionSortCollider([Bo1_Box_Aabb(),Bo1_Sphere_Aabb()],verletDist=-0.1,allowBiggerThanPeriod=True)
,InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom6D()],
[Ip2_FrictMat_FrictMat_MindlinPhys(krot=roll_stiff,eta=roll_fric)],
[Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True)]
)
,GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=1,timestepSafetyCoefficient=TSSC,defaultDt=-1)
,VTKRecorder(fileName='3d-vtk-',recorders=['spheres','facets','boxes','intr'],iterPeriod=1000,label='recVTK',dead=True)
,PyRunner(command='fixVelocity(RATE_shear)',iterPeriod=1,label='fixVel',dead=True)
,PeriTriaxController(dynCell=True,mass=10,maxUnbalanced=1e-3,relStressTol=1e-4,stressMask=7,goal=(-PI/volRatio,-PI/volRatio,-PI/volRatio),globUpdate=1,maxStrainRate=(10,10,10),doneHook='triaxDone()',label='triax')
,NewtonIntegrator(gravity=(0,0,0),damping=0.3,label='newton')
]
def triaxDone():
global phase
volRatio=(O.cell.hSize[0,0]*O.cell.hSize[1,1]*O.cell.hSize[2,2])/((O.bodies[0].state.pos[1]-O.bodies[1].state.pos[1])*O.cell.hSize[0,0]*O.cell.hSize[2,2])
h=O.bodies[0].state.pos[1]-O.bodies[1].state.pos[1]
vol=h*O.cell.hSize[0,0]*O.cell.hSize[2,2]
contactStress=getStress(vol)
vol_s=Rmean=Rmax=nbSph=0
Rmin=1e6
x_ref=O.bodies[0].state.pos[0]
for o in O.bodies:
if isinstance(o.shape,Sphere):
nbSph+=1
Rmean+=o.shape.radius
if o.shape.radius>Rmax: Rmax=o.shape.radius
if o.shape.radius<Rmin: Rmin=o.shape.radius
vol_s += 4.*pi/3.*(o.shape.radius)**3
Rmean=Rmean/nbSph
n = 1-vol_s/vol
print ('DONE! iter=',O.iter,'| sample generated: nb spheres',nbSph,', Rmean=',Rmean,', Rratio=',Rmax/Rmin,', porosity=',n,'wall_refPos=',x_ref)
print ('Changing contact properties now')
tt=TriaxialCompressionEngine()
triax.dead=True
O.pause()
O.run(10000000000,1)
stage=0
stiff=fnPlaten=currentSN=0.
def servo():
global stage,stiff,fnPlaten,currentSN,TSSC
if stage==0:
currentSN=O.forces.f(0)[1]/(O.cell.hSize[0,0]*O.cell.hSize[2,2])
unbF=unbalancedForce()
#print ('SN=',SN,'| current SN = ',currentSN,' | unbF=',unbF )
boundaryVel=copysign(min(RATE_NS1,abs(0.5*(currentSN-SN))),currentSN-SN)
#print ('boundaryVel=',boundaryVel)
O.bodies[0].state.vel[1]=boundaryVel
if ( (abs(currentSN-SN)/SN)<0.001 and unbF<0.001 ):
stage+=1
fnPlaten=O.forces.f(0)[1]
print ('Normal stress =',currentSN,' | unbF=',unbF)
## the following computes the stiffness of the plate (used for stress control of the top plate)
for i in O.interactions.withBody(O.bodies[0].id):
stiff+=i.phys.kn
print ('DONE! iter=',O.iter)
O.pause()
if stage==1:
fnDesired=SN*(O.cell.hSize[0,0]*O.cell.hSize[2,2])
boundaryVel=copysign(min(RATE_NS2,abs(0.333*(O.forces.f(0)[1]-fnDesired)/stiff/O.dt/TSSC)),O.forces.f(0)[1]-fnDesired)
O.bodies[0].state.vel[1]=boundaryVel
O.engines = O.engines[:5]+[PyRunner(command='servo()',iterPeriod=1,label='servo')]+O.engines[5:]
O.run(10000000000,1)
################################################################ Start shearing
#### fixed bottom bottomLayer_id
for i in bottomLayer_id:
O.bodies[i].state.blockedDOFs='xyzXYZ'
O.bodies[i].state.dynamics = False
O.bodies[i].state.vel = Vector3(0,0,0)
recVTK.dead=False
newton.damping=DAMPSHEAR
fixVel.dead = False
initial_particle_pos = O.bodies[topLayer_id[0]].state.pos[0] ### The initial position of one of the topBoundaryLayer particles
def fixVelocity(RATE_shear):
O.bodies[0].state.vel[0] = RATE_shear
for i in topLayer_id:
O.bodies[i].state.vel[0] = RATE_shear
slip = O.bodies[topLayer_id[0]].state.pos[0] - initial_particle_pos
h=O.bodies[0].state.pos[1]-O.bodies[1].state.pos[1]
ss = slip/h
if ss > shearStrain:
O.pause()
O.run(1000000000,1)
--
You received this question notification because your team yade-users is
an answer contact for Yade.