← Back to team overview

yade-users team mailing list archive

[Question #693459]: Python 3 - randomDensePack

 

New question #693459 on Yade:
https://answers.launchpad.net/yade/+question/693459

Hi all,

This is a really silly question but I am banging my head in the wall :(

After an update in Yade, I am now migrating my codes to Python 3. So far so good.

When I use the function randomDensePack with pack.gtsSurface, it works fine. It is possible to see that the pack is dense due to Triaxial test.

However, when I use randomDensePack with pack.inSphere the pack I get is not dense

It seems to be a simple solution, perhaps due to changes in Python 3 (my guess).

=================================================================================

#Forca normal lei de contato coesao e atrito
from yade import plot
from yade import pack
from yade import utils
from yade import bodiesHandling
import math
import random


O.materials.append(JCFpmMat(type=1,young=70e9,poisson=0.3,frictionAngle=radians(30),density=2500,tensileStrength=10.7e5,cohesion=10.7e5,jointNormalStiffness=1e5,jointShearStiffness=1e5,jointCohesion=10.7e5,jointFrictionAngle=radians(30),jointDilationAngle=0.0,label='spheres'))

O.materials.append(JCFpmMat(type=1,young=70e8,poisson=0.3,frictionAngle=radians(10),density=2000,tensileStrength=0,cohesion=0,jointNormalStiffness=0,jointShearStiffness=0,jointCohesion=0,jointFrictionAngle=radians(0),jointDilationAngle=0.0,label='plates'))

##################################Radius by Class##########################################
size=1
if size==1:
	rag=0.00238
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
rad=0.0003
r=rag
# Spheres
ag=O.bodies.append(
	pack.randomDensePack(
		(pack.inSphere((0,0,r),r)),radius=rad,color=(0,1,0),rRelFuzz=0,material='spheres')
)

if size==1:
	n = 0 #number of spheres to exclude randomically
if size==2:
	n = 96 #number of spheres to exclude randomically
if size==3:
	n = 620 #number of spheres to exclude randomically
if size==4:
	n = 1905 #number of spheres to exclude randomically
######################################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)],#xSectionWeibullShapeParameter=4
		[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(smoothJoint=False, Key="Wei", recordCracks=True)]
	),

  GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=500,timestepSafetyCoefficient=0.5),
  NewtonIntegrator(damping=0.1,gravity=[0,0,-9.81]),

]

from yade import qt
qt.View()
qt.Controller()


-- 
You received this question notification because your team yade-users is
an answer contact for Yade.