Re: [Yade-users] [Question #705075]: replace by clump

2023-03-17 Thread Launchpad Janitor
Question #705075 on Yade changed:
https://answers.launchpad.net/yade/+question/705075

Status: Open => Expired

Launchpad Janitor expired the question:
This question was expired because it remained in the 'Open' state
without activity for the last 15 days.

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #705075]: replace by clump

2023-03-01 Thread Fereshteh Salehi
Question #705075 on Yade changed:
https://answers.launchpad.net/yade/+question/705075

Status: Answered => Open

Fereshteh Salehi is still having a problem:
thank you for your reply 
I want to replace a trash instead of the big spheres,is there an instruction 
that will get me to my goal .
How do I do this?

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #705075]: replace by clump

2023-02-16 Thread Karol Brzezinski
Question #705075 on Yade changed:
https://answers.launchpad.net/yade/+question/705075

Status: Open => Answered

Karol Brzezinski proposed the following answer:
Hi,

The size of the clump is adjusted to balance the mass (~volume for the same 
material) of the replaced sphere. Every figure with the same mass would stick 
out of the sphere. You have a relatively flat shape, hence its dimensions need 
to be much larger than the sphere.
For sphere with diameter D:
Vs = pi*D^3/2
For a prism (more or less similar to your clump, with edges equal to A, 4A/9, 
and A/9:
Vp = 4*A^3/81

So if Vp=Va
A/D = (81*pi/8)^(1/3) 


So the clumps should be more than three times longer than spheres.

Cheers,
Karol

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #705075]: replace by clump

2023-02-16 Thread Fereshteh Salehi
New question #705075 on Yade:
https://answers.launchpad.net/yade/+question/705075

Hello everybody I have two series of small and big particles in this code. when 
I replaced rectangular cube clumps with big particles, length of Clumps become 
larger than the diameter of primary spheres  .what's the reason?
Where did I go wrong?
from yade import pack
young=5e6 # contact stiffness
mn,mx=Vector3(0,0,0),Vector3(.6,.6,.6)
compFricDegree =30
O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=radians(compFricDegree),density=2600,label='spheres'))
#O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=0,density=0,label='walls'))
O.materials.append(CohFrictMat(young=1e6,poisson=0.1,density=1400,label='trash',frictionAngle=radians(compFricDegree),
isCohesive=True,
normalCohesion=5000,
shearCohesion=5000,
))


## create walls around the packing
walls=aabbWalls([mn,mx],thickness=0,material='spheres')
wallIds=O.bodies.append(walls)

## use a SpherePack object to generate a random loose particles packing
sp=pack.SpherePack()
spSmall = pack.SpherePack()
spBig = pack.SpherePack()

sp.makeCloud((0,0,0),(.6,.6,.6),psdSizes=[.008,.012,.078,.08,.081],psdCumm=[0,.995,.995,.999,1],distributeMass=False,seed=1)

for ss in sp: #split SpherePack into two other packs based on the particle size
  r = ss[1]
  if r > .078/2:# please note that you feed diameters nor radii in psdSizes, 
that is why I divide it by 2
spBig.add(ss[0],ss[1])

  else:
spSmall.add(ss[0],ss[1])
# add only the spheres that you want to replace and replace them with clump1
spSmall.toSimulation(material='spheres')
relRadList1 = [0.2882557656,0.406619778,0.3688555312,0.26]
relPosList1 = 
[[0,-0.187117,-0.09206748],[0,0.00806748,-0.0344172],[0,0.190184,0],[0.12,0,-0.18]]

#peanut:
relRadList2 = [0.29,0.27,0.3,0.28]
relPosList2 = [[0,-0.14,0.08],[0,-0.12,-0.2],[0,0.06,0.18],[0,0.07,-0.15]]

#stick:
relRadList3 = [0.21,0.23,0.23,0.31,0.23,0.29,0.22]
relPosList3 = 
[[0,-0.26,0.07],[0,-0.09,-0.12],[0,-0.08,0.16],[0,0.02,0],[0,0.1,-0.27],[0,0.16,0.15],[0,0.22,-0.11]]


templates= []
templates.append(clumpTemplate(relRadii=relRadList1,relPositions=relPosList1))
templates.append(clumpTemplate(relRadii=relRadList2,relPositions=relPosList2))
templates.append(clumpTemplate(relRadii=relRadList3,relPositions=relPosList3))


 show how to use replaceByClumps():



O.bodies.replaceByClumps(templates,[0.2,0.3,0.5],discretization = 20)

for b in O.bodies:
if b.isClumpMember: b.shape.color=(1,1,1)


product trash#
a=[0,.006,.012,.018,.024]
b=[0,.006,.012,.018,.024,.03,.036,.042,.048,.054]
c=[0,.006]
d=[]
e=[.005]
g=e*100
for i in a:
for j in b:
for k in c:
d.append((i,j,k))

#add the remaining spheres stored in the other sphere pack
spBig.toSimulation(material='trash')
ct2 = clumpTemplate(g,d)
aa=O.bodies.replaceByClumps( [ct2] , [1], discretization = 20 )
for ii in aa:
  xx=ii[1]
  for jj in xx:
O.bodies[jj].shape.color=(1,1,0)

O.dt = 0
O.step()
for i in O.interactions:
i.phys.unp = i.geom.penetrationDepth

Thank you for your reply.


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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp