yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #26014
Re: [Question #698313]: Segmentation Fault - PFV2
Question #698313 on Yade changed:
https://answers.launchpad.net/yade/+question/698313
Luis Barbosa gave more information on the question:
Here is the aggregate:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#Forca normal lei de contato coesao e atrito
from yade import plot
from yade import pack
from yade import utils
from yade import bodiesHandling
from yade import export
#from add import addBodyToAggreg
import math
import random
# Spheres
#O.materials.append(JCFpmMat(type=1,young=20e7,poisson=0.3,frictionAngle=radians(30),density=1600,tensileStrength=100e7,cohesion=100e7,jointNormalStiffness=1e5,jointShearStiffness=1e5,jointCohesion=100e7,jointFrictionAngle=radians(30),jointDilationAngle=0.0,label='spheres'))
O.materials.append(JCFpmMat(type=1,young=70e6,poisson=0.3,frictionAngle=radians(30),density=2000,tensileStrength=100e6,cohesion=100e6,jointNormalStiffness=0,jointShearStiffness=0,jointCohesion=100e6,jointFrictionAngle=radians(0),jointDilationAngle=0.0,label='spheres'))
#particledensity=1600
O.materials.append(JCFpmMat(type=1,young=20e7,poisson=0.3,frictionAngle=radians(10),density=1000,tensileStrength=0,cohesion=0,jointNormalStiffness=0,jointShearStiffness=0,jointCohesion=0,jointFrictionAngle=radians(0),jointDilationAngle=0.0,label='plates'))
#O.materials.append(CohFrictMat(young=200e9,poisson=0.3,density=900,frictionAngle=radians(80),isCohesive=True,normalCohesion=1e30,shearCohesion=1e30,momentRotationLaw=True,etaRoll=0.1,label='spheres'))
##################################Radius by Class##########################################
size=3
if size==1:
rag=0.05 #aumento de 12.61 x 0.00238
if size==2:
rag=0.075
if size==3:
rag=0.0004
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
rad,gap= 0.000065,0#0.003783,0
r=rag
print ("diametro agregado", rag*2)
# Spheres
ag=O.bodies.append(
# pack.regularHexa(
pack.randomDensePack(
(pack.inSphere((0,0,r),r)),radius=rad,color=(0,1,0),rRelFuzz=0,material='spheres') # head
# pred1=pack.inAlignedBox((0,0,0),(0.010,0.010,0.010))
# pack.randomDensePack((pack.inAlignedBox((0,0,0),(0.010,0.010,0.010))),radius=0.0009,material='spheres')
)
alfa = random.uniform(0,pi/2)
x = random.randint(0,1)
y = random.randint(0,1)
z = random.randint(0,1)
#print x,y,z
ori = Quaternion(Vector3(x,y,z),(alfa))
#AGREGADO MANIPULADO++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
agr=O.bodies.append(bodiesHandling.spheresModify(ag,mask=-1,shift=(0.0,0.0,0.0),scale=1.0,orientation=ori,copy=True))
a = len(agr)
print ("numero de particulas", a)
######################################Planes#################################################
#p1=O.bodies.append(utils.geom.facetBox((0,0,0),(0.07,-0.07,0),wallMask=1,material='plates'))
#p2=O.bodies.append(utils.geom.facetBox((0,0,r),(0.07,-0.07,r),wallMask=32,material='plates'))# os r's se somam
########################################Interactions#########################################
#SIMULACAO 1
if size==1:
n = 0#60 #number of spheres to exclude randomically
if size==2:
n = 0 #number of spheres to exclude randomically
if size==3:
n = 0 #number of spheres to exclude randomically
#SELECIONA PARTICULAS++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
rem=random.sample(agr,n)
#print rem
#REMOVE PARTICULAS SELECIONADAS++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
for i in rem:
O.bodies.erase(i)
#REMOVE AGREGADO BASE+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
for b in ag:
O.bodies.erase(b)
#STATUS DO AGREGADO++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
nrp=a-n
#print "total de particulas", a
#print "numero de esferas removidas", n
#print "raio do agregado em m", r
######################################Planes#################################################
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
[Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1)],
[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(smoothJoint=False, Key="Wei", recordCracks=True)]
),
# TranslationEngine(ids=p2,translationAxis=[0,0,-1],velocity=0.01),
GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=500,timestepSafetyCoefficient=0.5),
NewtonIntegrator(damping=0.1,gravity=[0,0,-9.81]),
# VTKRecorder(iterPeriod=100,recorders=['all'],fileName='/tmp/weibull')
# ForceRecorder(ids=p2,file='forca.txt',iterPeriod=500),
# PyRunner(command='AutoData()',iterPeriod=100,initRun=True),
# PyRunner(command='Data()',iterPeriod=100,initRun=True),
# PyRunner(command='addBodyToAggreg()',iterPeriod=100,initRun=True),
# PyRunner(command='aggregs()',iterPeriod=100,initRun=True),
]
##################
from yade import qt
qt.View()
qt.Controller()
#print "### agg1 state saved ###"
export.textExp("aggcoating.txt", 'x_y_z_r')
--
You received this question notification because your team yade-users is
an answer contact for Yade.