Re: [Yade-users] [Question #706540]: Trouble in generating sphere packing

2023-05-09 Thread Huan
Question #706540 on Yade changed:
https://answers.launchpad.net/yade/+question/706540

Status: Answered => Solved

Huan confirmed that the question is solved:
Thanks Karol Brzezinski, that solved my question.

-- 
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 #706540]: Trouble in generating sphere packing

2023-05-09 Thread Karol Brzezinski
Question #706540 on Yade changed:
https://answers.launchpad.net/yade/+question/706540

Status: Open => Answered

Karol Brzezinski proposed the following answer:
Hi Huan,

For each radius, I prescribed some 'spread', so the radii of particles
fall between given sieve sizes (rRelFuzz1 = (0.019-0.0125)/4/rMean1).

If you want to have all the particles in a given size to have equal
radius, set rRelFuzz = 0 everywhere.  In such a case, your colouring
method should work.

As Jan said, please open a new topic for the new question.

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


Re: [Yade-users] [Question #706540]: Trouble in generating sphere packing

2023-05-09 Thread Jan Stránský
Question #706540 on Yade changed:
https://answers.launchpad.net/yade/+question/706540

Jan Stránský posted a new comment:
Hello,

> Also, I would like to use oedometric test on the simulation. My
question is how would I know the load that I should use?

plese open a new question for a new question ([1], point 5)

Cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

-- 
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 #706540]: Trouble in generating sphere packing

2023-05-09 Thread Huan
Question #706540 on Yade changed:
https://answers.launchpad.net/yade/+question/706540

Status: Open => Solved

Huan confirmed that the question is solved:
Thanks Karol Brzezinski, that solved my question.

-- 
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 #706540]: Trouble in generating sphere packing

2023-05-09 Thread Huan
Question #706540 on Yade changed:
https://answers.launchpad.net/yade/+question/706540

Status: Solved => Open

Huan is still having a problem:

Thanks Karol, that solve my problem.

# set color for sphere
for body in O.bodies:
   if not isinstance(body.shape, Sphere):
   continue
   if body.shape.radius == rMean1: #SP1
   body.shape.color = (0,0,1) #blue
   if body.shape.radius == rMean2: #SP1
   body.shape.color = (1,0,0) #red
   if body.shape.radius == rMean3: #SP2
   body.shape.color = (0,1,0) #green
   if body.shape.radius == rMean4: #SP3
   body.shape.color = (1,1,1) #white
I try this to create color for the spheres, but it doesn't seems to work. Any 
idea?

Also, I would like to use oedometric test on the simulation. My question
is how would I know the load that I should use?

-- 
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 #706540]: Trouble in generating sphere packing

2023-05-09 Thread Huan
Question #706540 on Yade changed:
https://answers.launchpad.net/yade/+question/706540

Huan posted a new comment:
Thanks Karol, that solve my problem.

# set color for sphere
for body in O.bodies:
   if not isinstance(body.shape, Sphere): 
   continue
   if body.shape.radius == rMean1: #SP1
   body.shape.color = (0,0,1) #blue
   if body.shape.radius == rMean2: #SP1
   body.shape.color = (1,0,0) #red
   if body.shape.radius == rMean3: #SP2
   body.shape.color = (0,1,0) #green
   if body.shape.radius == rMean4: #SP3
   body.shape.color = (1,1,1) #white
I try this to create color for the spheres, but it doesn't seems to work. Any 
idea?

Also, I would like to use oedometric test on the simulation. My question
is how would I know the load that I should use?

-- 
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 #706540]: Trouble in generating sphere packing

2023-05-09 Thread Huan
Question #706540 on Yade changed:
https://answers.launchpad.net/yade/+question/706540

Status: Answered => Open

Huan is still having a problem:
Thanks Karol, that solve my problem.

# set color for sphere
for body in O.bodies:
   if not isinstance(body.shape, Sphere): 
   continue
   if body.shape.radius == rMean1: #SP1
   body.shape.color = (0,0,1) #blue
   if body.shape.radius == rMean2: #SP1
   body.shape.color = (1,0,0) #red
   if body.shape.radius == rMean3: #SP2
   body.shape.color = (0,1,0) #green
   if body.shape.radius == rMean4: #SP3
   body.shape.color = (1,1,1) #white
I try this to create color for the spheres, but it doesn't seems to work. Any 
idea?

Also, I would like to use oedometric test on the simulation. My question
is how would I know the load that I should use?

-- 
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 #706540]: Trouble in generating sphere packing

2023-05-08 Thread Karol Brzezinski
Question #706540 on Yade changed:
https://answers.launchpad.net/yade/+question/706540

Status: Open => Answered

Karol Brzezinski proposed the following answer:
Hi Huan,

The good news is that you can cal makeCloud() multiple times with
different radii and new spheres are added to the SpherePack.

Cheers,
Karol

import random
import math
from yade import geom, pack, utils, plot, ymport

# Define material properties
youngModulus = 1e7
poissonRatio = 0.25
density = 2000

# Create material
material = O.materials.append(FrictMat(young=youngModulus, 
poisson=poissonRatio, density=density))

# Define cylinder with funnel parameters
center = (0, 0, 0)
diameter = 0.102
height = 0.064

# create cylindrical body with radius 0.102 m and height 0.064 m
cylinder = geom.facetCylinder(center=center, radius=diameter/2, height=height, 
segmentsNumber=80, wallMask=6)

# assign material to each body in the cylinder
for body in cylinder:
body.bodyMat = material

# add cylinder to simulation
O.bodies.append(cylinder)

# Define cylinder with funnel parameters
center1 = (0,0,height/2)
dBunker = 0.2
dOutput = 0.102
hBunker = 0
hOutput = 0.08
hPipe = 0

# create funnel as a bunker with diameter 0.102 m, height 0.064 m
funnel = geom.facetBunker(center=center1, dBunker=dBunker, dOutput=dOutput, 
hBunker=hBunker,hOutput=hOutput, hPipe=hPipe, segmentsNumber=80, wallMask=4)

# assign material to each body in the funnel
for body in funnel:
body.bodyMat = material

# add funnel to simulation
O.bodies.append(funnel)

## new part
rMean1 = (0.0125+0.019)/4
rRelFuzz1 = (0.019-0.0125)/4/rMean1 
num1 = 28

# (other sizes) 

rMean4 = (0.00475+0.00236)/4
rRelFuzz4 = (0.00475-0.00236)/4/rMean4 
num4 = 18997


sp = pack.SpherePack()
## just call makeCloud() multiple times before sending to simulation
sp.makeCloud((-dBunker/3,-dBunker/3,2*height),(dBunker/3,dBunker/3,10*height), 
rMean = rMean1, rRelFuzz = rRelFuzz1, num = num1)
#(...)
sp.makeCloud((-dBunker/3,-dBunker/3,2*height),(dBunker/3,dBunker/3,10*height), 
rMean = rMean4, rRelFuzz = rRelFuzz4, num = num4)
sp.toSimulation()

-- 
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 #706540]: Trouble in generating sphere packing

2023-05-08 Thread Huan
Question #706540 on Yade changed:
https://answers.launchpad.net/yade/+question/706540

Description changed to:
Hello,

I'm trying to create a random sphere packing that consists of roughly 21,182 
particles for Marshall hot mix design simulation.
I am trying to generate:
28 particles of aggregates size (0.0125<=x<0.019)
86 particles of aggregates size (0.0095<=x<0.0125)
2,071 particles of aggregates size (0.000475<=x<0.0095)
18,997 particles of aggregates size (0.00236<=x<0.00475)
I want to create it randomly to the following code, but I was only able to 
generate it in layer per layer by using makeCloud.

import random
import math
from yade import geom, pack, utils, plot, ymport

# Define material properties
youngModulus = 1e7
poissonRatio = 0.25
density = 2000

# Create material
material = O.materials.append(FrictMat(young=youngModulus, 
poisson=poissonRatio, density=density))

# Define cylinder with funnel parameters
center = (0, 0, 0)
diameter = 0.102
height = 0.064

# create cylindrical body with radius 0.102 m and height 0.064 m
cylinder = geom.facetCylinder(center=center, radius=diameter/2, height=height, 
segmentsNumber=80, wallMask=6)

# assign material to each body in the cylinder
for body in cylinder:
body.bodyMat = material

# add cylinder to simulation
O.bodies.append(cylinder)

# Define cylinder with funnel parameters
center1 = (0,0,height/2)
dBunker = 0.2
dOutput = 0.102
hBunker = 0
hOutput = 0.08
hPipe = 0

# create funnel as a bunker with diameter 0.102 m, height 0.064 m
funnel = geom.facetBunker(center=center1, dBunker=dBunker, dOutput=dOutput, 
hBunker=hBunker,hOutput=hOutput, hPipe=hPipe, segmentsNumber=80, wallMask=4)

# assign material to each body in the funnel
for body in funnel:
body.bodyMat = material

# add funnel to simulation
O.bodies.append(funnel)

Thank you,
Huan

-- 
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 #706540]: Trouble in generating sphere packing

2023-05-08 Thread Huan
New question #706540 on Yade:
https://answers.launchpad.net/yade/+question/706540

Hello,

I'm trying to create a random sphere packing that consists of roughly 21,182 
particles for Marshall hot mix design simulation.
I am trying to generate:
28 particles of aggregates size (0.0125<=x<0.019)
86 particles of aggregates size (0.0095<=x<0.0125)
2,071 particles of aggregates size (0.000475<=x<0.0095)
18,997 particles of aggregates size (0.00236<=x<0.00475)
I want to create it randomly, but I was only able to generate it in layer per 
layer by using makeCloud.

Thank you,
Huan

-- 
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