本文介绍了计算二维惯性张量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究如何找到2D形状的惯性.这种形状的轮廓与多个点啮合,每个点的x和y坐标是已知的.

I'm researching how to find the inertia for a 2D shape. The contour of this shape is meshed with several points, the x and y coordinate of each point is already known.

我知道IxxIyyIxy的表达,但是身体没有质量.我该如何进行?

I know the expression of Ixx, Iyy and Ixy but the body has no mass. How do I proceed?

推荐答案

对于任何形状,都需要将其拆分为三角形并分别处理每个三角形.然后最后使用以下规则组合结果

For whatever shape you have, you need to split it into triangles and handle each triangle separately. Then in the end combined the results using the following rules

总体

% Combined total area of all triangles
total_area = SUM( area(i), i=1:n )
total_mass = SUM( mass(i), i=1:n )
% Combined centroid (center of mass) coordinates
combined_centroid_x = SUM( mass(i)*centroid_x(i), i=1:n)/total_mass
combined_centroid_y = SUM( mass(i)*centroid_y(i), i=1:n)/total_mass
% Each distance to triangle (squared)
centroid_distance_sq(i) = centroid_x(i)*centroid_x(i)+centroid_y(i)*centroid_y(i)
% Combined mass moment of inertia
combined_mmoi = SUM(mmoi(i)+mass(i)*centroid_distance_sq(i), i=1:n)

现在每个三角形.

考虑具有矢量坐标的三个角顶点,分别是点 A B C

Consider the three corner vertices with vector coordinates, points A, B and C

a=[ax,ay]
b=[bx,by]
c=[cx,cy]

以及以下点与叉积(标量)组合

and the following dot and cross product (scalar) combinations

a·a = ax*ax+ay*ay
b·b = bx*bx+by*by
c·c = cx*cx+cy*cy
a·b = ax*bx+ay*by
b·c = bx*cx+by*cy
c·a = cx*ax+cy*ay
a×b = ax*by-ay*bx
b×c = bx*cy-by*cx
c×a = cx*ay-cy*ax

三角形的性质为(厚度t(i)和质量密度rho)

The properties of the triangle are (with t(i) the thickness and rho the mass density)

area(i) = 1/2*ABS( a×b + b×c + c×a )
mass(i) = rho*t(i)*area(i)
centroid_x(i) = 1/3*(ax + bx + cx)
centroid_y(i) = 1/3*(ay + by + cy)
mmoi(i) = 1/6*mass(i)*( a·a + b·b + c·c + a·b + b·c + c·a )

按组件来说,都是

area(i) = 1/2*ABS( ax*(by-cy)+ay*(cx-bx)+bx*cy-by*cx)
mmoi(i) = mass(i)/6*(ax^2+ax*(bx+cx)+bx^2+bx*cx+cx^2+ay^2+ay*(by+cy)+by^2+by*cy+cy^2)

附录

这里有一点理论.使用

Area = 1/2 * || (b-a) × (c-b) ||

其中×是向量叉积,|| .. ||是向量范数(长度函数).

where × is a vector cross product, and || .. || is vector norm (length function).

三角形由两个变量ts参数化,使得双积分A = INT(INT(1,dx),dy)给出了总面积

The triangle is parametrized by two variables t and s such that the double integral A = INT(INT(1,dx),dy) gives the total area

% position r(s,t) = [x,y]
[x,y] = [ax,ay] + t*[bx-ax, by-zy] + t*s*[cx-bx,cy-by]

% gradient directions along s and t
(dr/dt) = [bx-ax,by-ay] + s*[cx-bx,cy-by]
(dr/ds) = t*[cx-bx,cy-by]

% Integration area element
dA = || (dr/ds)×(dr/dt) || = (2*A*t)*ds*dt
%
%   where A = 1/2*||(b-a)×(c-b)||

% Check that the integral returns the area
Area = INT( INT( 2*A*t,s=0..1), t=0..1) = 2*A*(1/2) = A

% Mass moment of inertia components

         /  /  /  | y^2+z^2  -x*y    -x*z   |
I = 2*m*|  |  | t*|  -x*y   x^2+z^2  -y*z   | dz ds dt
        /  /  /   |  -x*z    -y*z   x^2+y^2 |

% where [x,y] are defined from the parametrization

这篇关于计算二维惯性张量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 02:54