...
Our aim is to solve a problem that involves calculating the center of gravity (center of mass) of a 2D object. To do this, we need to develop a calculating module that can interact with GiD.
The problem: calculate the center of mass.
The center of mass (XCM,YCM) of a two-dimensional body is defined as
...
...
where ρ(x,y) is the density of the material at point (x,y) and S is the surface of the body; mi are concentrated masses applied on the point (xi,yi).
Each of the N elements is treated as concentrated weight whose mass is defined as the product of the (surface) density and the area of the element.
...