Spheres swelling

Asked by Mithushan Soundaranathan

Hi,

I want simulate the swelling of the particles by using Eq. 9 from this paper https://www.sciencedirect.com/science/article/pii/S0032591017304722#!.

How can I do it, is there any in-built function in Yade. Can I use the TriaxialStressController and maxmultiplier.

Best,
Mithu

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

please provide what is the problem (changing size of particles, computing dri from eq.9, ...).

In general, you can arbitrarily modify b.shape.radius, b.state.mass, b.state.inertia to match your needs.

There used to be a function to scale a sphere including mass (might not be what you want), but I don't remember its name cannot find it at the moment.

Cheers
Jan

Revision history for this message
Mithushan Soundaranathan (mithushan93) said :
#2

Hi Jan,

I want to change radius (dri) over time of the spheres.

b.shape.radius=dri at different time point.

Best,
Mithu

Revision history for this message
Mithushan Soundaranathan (mithushan93) said :
#3

The scale method, can we use different scale or does it need to be constant?

Revision history for this message
Jan Stránský (honzik) said :
#4

> I want to change radius (dri) over time of the spheres.
> b.shape.radius=dri at different time point.

Instant replay:
please provide what is the problem.

> The scale method, can we use different scale or does it need to be constant?

Please provide some context

Cheers
Jan

Revision history for this message
Robert Caulk (rcaulk) said :
#5

As Jan says, we really need to know what your problem is before we can give you any real advice. In general, you could do it like this from the yade input script:

def fradius(t):
   return *insert your function here(t)*

for b in O.bodies:
   if isinstance(shape, Sphere): b.shape.radius = fradius(O.time)

But if you need it to be a function of saturation, you could look at PartialSatClayEngine [1]. In that engine, the swelling of particles is an exponential function that depends on saturation level.

Another example of particle "swelling" is in ThermalEngine where it thermally expands particles according to their temperature [2].

[1] https://www.yade-dem.org/doc/yade.wrapper.html#yade.wrapper.PartialSatClayEngine
[2] https://www.yade-dem.org/doc/yade.wrapper.html#yade.wrapper.ThermalEngine

Revision history for this message
Robert Caulk (rcaulk) said :
#6

edit: the for loop on the body container would need to be put into a PyRunner FYI.

https://www.yade-dem.org/doc/tutorial-data-mining.html?highlight=pyrunner#pyrunner

Revision history for this message
Mithushan Soundaranathan (mithushan93) said :
#7

Hi Both,

Thank you very much, the problem is that I do not how implement the swelling model in Yade and different option I have to implement it.

I am thinking of something similar to:

def fradius(t):
   return *insert your function here(t)*

for b in O.bodies:
   if isinstance(shape, Sphere): b.shape.radius = fradius(O.time)

would be great.

Best,
Mithu

Revision history for this message
Jan Stránský (honzik) said :
#8

> I do not how implement the swelling model in Yade and different option I have to implement it.

you can:
- use python and PyRunner and update particles regularly
- implement new Engine in C++
- ...

I would start with python, something like Robert's suggestion
###
O.engines = [
    ...
    PyRunner(command="swell()",iterPeriod=1), # or iterPeriod=someOtherNumber, or virtPeriod instead of iterPeriod
]

def swell():
    for b in O.bodies:
        # test if body is sphere?
        swell1(b)
def swell1(body):
    rCurrent = body.state.radius
    rNew = ... # eq. (9) using rCurrent
    body.state.radius = rNew
    # mass and inertia does change or not?
###

Cheers
Jan

Revision history for this message
Mithushan Soundaranathan (mithushan93) said :
#9

Thanks Jan Stránský, that solved my question.

Revision history for this message
Mithushan Soundaranathan (mithushan93) said :
#10

Hi Jan,

How do I update the mass and inertia for each iteration?

Best,
Mithu

Revision history for this message
Jan Stránský (honzik) said :
#11

body.state.mass = value
body.state.inertia = (x,y,z) # 3 principal values

> each iteration?

set iterPeriod to 1

Cheers
Jan

Can you help with this problem?

Provide an answer of your own, or ask Mithushan Soundaranathan for more information if necessary.

To post a message you must log in.