yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #27312
Re: [Question #700976]: Some questions about YADE
Question #700976 on Yade changed:
https://answers.launchpad.net/yade/+question/700976
Status: Open => Answered
Jan Stránský proposed the following answer:
Hello,
> I am learning YADE now
welcome :-)
> 1. What's the 'inertia' mean, and what's it for. Why is it a vector?
Do you mean inertia in general or body.state.inertia?
Inertia is used as a mass counterpart for rotational motion, see [1].
Normally for rotational motion, inertia is inertia tensor. In calculations represented e.g. as inertia matrix.
In the frame of principal directions of inertia, the inertia matrix is diagonal ("(constant) inertia matrix; diagonal, since in local, principal coordinates" in [1]), so only 3 components are needed to be stored.
The implementation choice was to use a vector.
Vie rotation matrix, the diagonal "local" inertia matrix can be represented w.r.t. other frames/coordinate systems, e.g. global coordinate system.
> 2. What's the difference between 'sys.exit(0)' and 'O.pause'?
sys.exit is Python standard function [2], typically exiting entire Python session.
Normally you cannot do anything else in Yade after it.
O.pause is Yade function [3,4], pausing a running simulation.
Afterwards, in Yade you can do whatever you want - typically export
results, check some conditions, continue simulation, ...
> 3. What's the difference between 'O.dt=Utils.PWaveTimeStep' and
'O.dt=PWaveTimeStep', 'unbalancedForce' and 'Utils.unbalancedForce'?
What's 'Utils'?
be careful for the case of letters U/u. Typically, "Utils" is nothing in
Yade, but "utils" is.
For convenience, Yade import some modules by default, something like
from yade.utils import *
so you can use all utils stuff conveniently "out of the box".
(I cannot find this in docs, but I remember it was mentioned somewhere).
You can always use explicit "namespace" utils.whatever in the case of name clashes, e.g.:
###
f1 = unbalancedForce() # yade's utils.unbalancedForce
#
def unbalancedForce(): # some user defined function
return 3.14
f2 = unbalancedForce() # user defined function
f3 = utils.unbalancedForce() # yade's utils.unbalancedForce
###
Cheers
Jan
[1] https://yade-dem.org/doc/formulation.html#orientation-aspherical
[2] https://docs.python.org/3/library/sys.html#sys.exit
[3] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Omega.pause
[4] https://yade-dem.org/doc/user.html#stop-conditions
--
You received this question notification because your team yade-users is
an answer contact for Yade.