These attributes can be computed by GenCase or be custom-defined in the code. In order to specify the values correctly, I would need to know more about their definitions.

The attribute

- Q1: Is this the 'centre of mass'? I presume so, this is just about matching terminologies.
- Q2: Which reference system should the coordinates be given in? The global one (the domain, as from inside
**definition**) or the local one (the object, as from inside a**setmkbound**for example)? - Q3: Reformulation of Q2. Say that I draw an object after rotating the global reference system (
**rotate x=...**), and do not revert to the original system (no**matrixreset**) before moving on to the**floatings**specifications. Will the coordinates of "center" live in the original or in the modified reference system? - Q4: Linked to Q1. Does the code takes into account eccentricity when the centre of mass is not the centroid of the figure?

- Q5: With respect to which axes are these moments of inertia?
- Q6: Is the code informed about the principal moments of inertia of objects with a predefined shape such as
**drawbox**,**drawsphere**? - Q7: Similar to Q3. If the object I drew is no longer aligned with the global reference system, which axes are considered for the moments of inertia?

Thanks in advance for dealing with this.

It looks like you're new here. If you want to get involved, click one of these buttons!

## Comments

Q1: Is this the 'centre of mass'? I presume so, this is just about matching terminologies.YES

Q2: Which reference system should the coordinates be given in? The global one (the domain, as from inside definition) or the local one (the object, as from inside a setmkbound for example)?Global ones of course, however this is easy to test to get a faster response

Q3: Reformulation of Q2. Say that I draw an object after rotating the global reference system (rotate x=...), and do not revert to the original system (no matrixreset) before moving on to the floatings specifications. Will the coordinates of "center" live in the original or in the modified reference system?Response in https://dual.sphysics.org/vanilla/discussion/1631/centre-of-mass-of-eccentric-objects-rotated-with-rotateaxis#latest

Q4: Linked to Q1. Does the code takes into account eccentricity when the centre of mass is not the centroid of the figure?Not sure, let us check...

The attribute inertia is defined as 'momentum of inertia of the rigid object'. There is a slip of the pen since it should be 'moment of inertia'.Yes, we have to correct this. Thanks

Q5: With respect to which axes are these moments of inertia?X-axis, Y-axis and Z-axis

Q6: Is the code informed about the principal moments of inertia of objects with a predefined shape such as drawbox, drawsphere?No need, since we use the general formulation to compute any figure, so that you can check that results for a box, for example, will converge to theoretical value with accuracy.

Q7: Similar to Q3. If the object I drew is no longer aligned with the global reference system, which axes are considered for the moments of inertia?X-axis, Y-axis and Z-axis

Re

Q2, you have been fast enough to make it worth waiting :-)Re

Q5andQ7, thegivensfor one object I have are themoments of inertia with respect to the principal axes of inertia, which always have the centre of mass as origin.Do I then understand it well that the correct procedure to

inputthis object istheselatter moments as an attributes within ' floating'a) you can allow GenCase to compute the value according to the moment of inertia of a set of points with mass

b) you can define the values you know in the XML

however, after this time=0, the code will compute the rotations using that moment of inertia, not sure what you mean with "DualSPHysics calculate the moments of inertia wrt the global axes at each time step"?

From Q5/Q7 I understood that we impose the conservation of angular momentum with respect to the lattice/global axes at each time step. Logical.

If the moments of inertia are referred to the

principal axes of inertia, these are properties/attributes of the object and need not to be recomputed at each time step. However, as time goes by, the solver would need to convert these object attributes into the moments with respect of theglobal axes, based on the motion and rotation of the object, again to enforce the conservation of angular momentum around those global axes.If the moments of inertia are given relative to the global reference axes, and the object roams and rotates, the moments of inertia change at each time step. This because the distribution of masses with respect to those global axes has changed. And the code should take care of this. Now I understand that is the way DSPH works.

This was my (perhaps confused/confusing) thinking behind "DualSPHysics calculate the moments of inertia wrt the global axes at each time step". But this topic comes closer to the other companion post https://dual.sphysics.org/vanilla/discussion/1631/centre-of-mass-of-eccentric-objects-rotated-with-rotateaxis , so I will continue it there.