LHEEA / meshmagick

A command line tool and a python package to manipulate hydrodynamics meshes
GNU General Public License v3.0
48 stars 27 forks source link

mistake in the cog calculation with shell inertia #10

Closed ahmedmetin closed 5 years ago

ahmedmetin commented 5 years ago

The center of gravity calculation with the shell inertia option gives different value compared to the one calculated with a commercial 3D software, such as Onshape. For example, when I use 0.023 shell thickness on Onsape, I obtain a value of -2.31 zG.

Screenshot 2019-06-25 at 14 50 38

but with meshmagick the value is -0.013.

Screenshot 2019-06-25 at 14 47 28

Decreasing the value of the thickness in meshmagick, gives unreasonable values for the center of gravity as can you see in the screenshot below. The maximum height of the object is around 20meters. So a value of 295m for zG is unreasonable.

Screenshot 2019-06-25 at 14 53 10
frongere commented 5 years ago

Hi,

Thank you for pointing out this bug. We worked on it and it should be fixed now, at least for the tests we did. Maybe could you test last version 1.0.5 of meshmagick against your case again ?

Regards, François.

ahmedmetin commented 5 years ago

Hello,  Sorry for my late reply. Unfortunately, it still shows wrong result. I am attaching the stl file of the shape. I use thickness of 0.023 and density of 7850. I expect the center of gravity to be 2.31m below the Oxy plane. But it shows me that it is 0.013m below the Oxy plane. Best regards,Ahmed On Friday, August 2, 2019, 4:21:59 PM GMT+2, François Rongère notifications@github.com wrote:

Hi,

Thank you for pointing out this bug. We worked on it and it should be fixed now, at least for the tests we did. Maybe could you test last version 1.0.5 of meshmagick against your case again ?

Regards, François.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

frongere commented 5 years ago

Hi Ahmed,

We are going to look at it. I cannot see the STL file you are talking about. Could you post it here so that we can use it for testing ?

Regards, François.

ahmedmetin commented 5 years ago

Hello again,  I already attached it in the email. I am attaching it again. 

Best regards,Ahmed On Wednesday, September 18, 2019, 3:14:23 PM GMT+2, François Rongère notifications@github.com wrote:

Hi Ahmed,

We are going to look at it. I cannot see the STL file you are talking about. Could you post it here so that we can use it for testing ?

Regards, François.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

ahmedmetin commented 5 years ago

I see now why you cannot see the stl file. I uploaded a zip file from Github directly. See if you can open it now.

InfinityWEC_11m.stl.zip

frongere commented 5 years ago

Ok thank you ! Best

frongere commented 5 years ago

ShellInertia

Ahmed, As you can see, we have tested the shell inertia feature on your file and we find a zg = -2.298 which is quite close to the result obtained using Onshape. Modifying the thickness does not impact this position (only mass and inertia of course).

The command used to generate this screenshot was : meshmagick InfinityWEC_11m.stl -si --rho-medium 7850 --thickness 0.023

Are you certain to use the very last version of meshmagick ? I advice you to checkout the master branch for the very last commit that fix the bug you mentioned.

François.

ahmedmetin commented 5 years ago

Thank you so much for your help. I have downlaoded meshmagick with anaconda. I just did conda update meshmagick. Maybe I need to clone the project.

frongere commented 5 years ago

Oh yes, sorry for that, the Anaconda package has not been updated for a while and is not synchronized properly with the repository... I should have configured a CI in order to automatically package and upload meshmagick to anaconda cloud. Maybe after merging the work of Matthieu on Python 3 updating...

ahmedmetin commented 5 years ago

It is okey. I can clone it. Thanks again. Very useful toolbox by the way. :)