yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #22226
Re: [Question #688837]: calculate the mass of the particles
Question #688837 on Yade changed:
https://answers.launchpad.net/yade/+question/688837
Status: Open => Answered
Jan Stránský proposed the following answer:
> but now I don't know where I can check the mass of the particles or if
it is necessary to include some other function to be able to visualize
this value.
run your simulation until a point when it is considered finished. Stop it. Call
masses()
in yade interactive terminal. The returned value are the masses in the two cylinders. You can print it or do whatever you want:
##
mass1,mass2 = masses()
print(mass1,mass2)
totalMass = mass1 + mass2
...
##
> In the previous answer, you mentioned some supporting documents. You
could attach them to me to consult them. They would be helpful to
understand some functions that I need
sure, just forgot to add it last time, see below
> for which there is not much information on the web.
I don't understand this..
"for b in O.bodies:" is surely documented as well as that b.state.mass is the mass of the body and b.state.pos its center.
Definitely you can easily find information on the web how to do a sum or how to check if a point is inside a cylinder..
Of course Yade documentation does not describe exactly your scenario.
BUT, Yade is open source and you are free (and welcome actually) to add such example or improve the documentation (or its part) if you find it not good! :-)
cheers
Jan
[1] https://yade-dem.org/doc/tutorial.html
[2] https://yade-dem.org/doc/user.html
--
You received this question notification because your team yade-users is
an answer contact for Yade.