yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #23373
[Question #691502]: Problems with psdSizes and psdCumm in makeCloud function
New question #691502 on Yade:
https://answers.launchpad.net/yade/+question/691502
Dear all,
I used the makeCloud function to generate spheres according to psdSizes and psdCumm, and replaced some of the spheres with polyhedra.
The psd parameters I used are: psdSizes=[0.01,0.015,0.025],psdCumm=(0,0.5,1), according to my understanding, the distribution of the small balls is:
size ratio (%)
0-0.01 0
0.01-0.015 50
0.015-0.025 50
But I found that the size of all the generated balls is below 0.015. What is the reason?In addition, there are the following warnings when generating the sphere: The size distribution has been scaled down, how to solve this?
Below is my MWS.
Thanks in advance.
Jie
################################
from yade import polyhedra_utils,pack,plot,utils,export,qt
import numpy as np
import math
import random
#Material
m = FrictMat(young=7.2e7,poisson=.2,density=2.5e3)
n = PolyhedraMat(young=7.2e7,poisson=.2,density=2.5e3)
O.materials.append((m,n))
#Dimensions
meanSize = 0.05
wallThickness = 0.5*meanSize
distanceToCentre = 0.05
lengthOfBase =0.25
heightOfBase = 0.6
#-------------------------------------------
#Make Cloud
sp=pack.SpherePack()
mn,mx=Vector3(-0.5*(lengthOfBase-wallThickness),0.5*meanSize,-0.5*(lengthOfBase-wallThickness)),Vector3(0.5*(lengthOfBase-wallThickness),1*heightOfBase,0.5*(lengthOfBase-wallThickness))
sp.makeCloud(mn,mx,psdSizes=[0.01,0.015,0.025],psdCumm=(0,0.5,1),num=1000)
for center,radius in sp:
if radius<0.015:
t = sphere(center,radius,material=m)
O.bodies.append(t)
if radius >0.015 and radius < 0.025:
t=polyhedra_utils.polyhedra(material=n,size=(0.01,0.01,0.01),seed=1)
t.state.pos = center # sets polyhedron position according to sphere position
O.bodies.append(t)
#count numbers
countSPs=0
for b in O.bodies:
if isinstance(b.shape,Sphere):
countSPs=countSPs+1
print("number of PotentialBlocks = ", countSPs)
countPol=0
for b in O.bodies:
if isinstance(b.shape,Polyhedra):
countPol=countPol+1
print("number of Polyhedra = ", countPol)
from yade import qt
v=qt.View()
v.sceneRadius=10.0
v.ortho=True # I activate orthotropic projection, to make visual comparisons easier
O.saveTmp()
--
You received this question notification because your team yade-users is
an answer contact for Yade.