Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong computation of the moments of inertia #28

Closed
drossberg opened this issue Apr 19, 2022 · 2 comments
Closed

Wrong computation of the moments of inertia #28

drossberg opened this issue Apr 19, 2022 · 2 comments

Comments

@drossberg
Copy link
Member

cubes.zip contains two files with cubes with 1m side length (plus density data). One cube is centered at the origin, the other 10 m away.

The output for gqa -g 1 centered_cube.g all.g contains

MATRIX For the Moments and Products of Inertia For all.g:
   166080893923271.375 -84081549.121 -84081549.121    0.000
   -84081549.121 166080893923270.375 -84081549.121    0.000
   -84081549.121 -84081549.121 166080893923271.688    0.000
      0.000    0.000    0.000    0.000

The output for gqa -g 1 eccentered_cube.g all.g contains

MATRIX For the Moments and Products of Inertia For all.g:
   166080893923270.250 9185826187.530 9185826187.576    0.000
   9185826187.530 -42984348272864.000 -84081549.121    0.000
   9185826187.576 -84081549.121 -42984348303264.000    0.000
      0.000    0.000    0.000    0.000

The moments of inertia should however never be negative.

BTW, gqa without the -g option seems to never run infinitely.

@drossberg
Copy link
Member Author

A pull request is on the way.

@drossberg
Copy link
Member Author

After applying the #44 I get:

MATRIX For the Moments and Products of Inertia For all.g:
   166667384642965.500 27777777.778 27777777.778    0.000
   27777777.778 166667384642965.500 27777777.778    0.000
   27777777.778 27777777.778 166667384642965.062    0.000
      0.000    0.000    0.000    0.000

and

MATRIX For the Moments and Products of Inertia For all.g:
   166667384642965.312 27777777.777 27777777.735    0.000
   27777777.777 166667384950112.000 27777777.778    0.000
   27777777.735 27777777.778 166667384919456.000    0.000
      0.000    0.000    0.000    0.000

Looks better, I would say.

brlcad added a commit that referenced this issue Nov 22, 2022
zhuodannychen added a commit to zhuodannychen/brlcad that referenced this issue May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant