← Back to team overview

yade-users team mailing list archive

Re: [Question #697479]: Spheres swelling

 

Question #697479 on Yade changed:
https://answers.launchpad.net/yade/+question/697479

    Status: Open => Answered

Jan Stránský proposed the following answer:
> 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

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