Moment of inertia

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
Brutha
Posts: 221
Joined: Mon May 04, 2015 1:50 pm

Moment of inertia

Post by Brutha »

Hi All,

Have bought myself a cheapo rowing machine, but the computer that comes with it is exceedingly crap (can't even measure strokes accurately!), so thought I'd have a bit of fun building a new one with a raspberry pi!

I'll be adding a new sensor on the flywheel (it only measure the cord being pulled at the minute), and using the maths in the link below to calculate the power, and from there to distance and calories etc etc. Now it's not going to be a concept2, but it'll be fun anyway! A pic of the flywheel is shown below, I've roughly measured it inside the machine.

http://eodg.atm.ox.ac.uk/user/dudhia/ro ... meter.html

I need to calculate the moment of inertia for the flywheel, this is the main number I need.

Following the links for moment of inertia on Wiki, I get a mass of about 22kg for a cylinder of 150mm radius, and 40mm height, and if I use the App.ActiveDocument.Pad.Shape.Volume in Python it matches what I get from the wiki volume calculation for a cylinder. For my flywheel, using App.ActiveDocument.Pad.Shape.Volume ends up giving me a mass of about 7.5 kg when multiplied by the density of iron, which seems pretty plausible.

The moment of inertia about the Z axis for that cylinder should be 0.250333884 kg m^2 if I've done my maths right. Now the issue: I can use App.ActiveDocument.Pad.Shape.MatrixOfInertia on the cylinder shape in Freecad, and the results are:

Code: Select all

Matrix ((1.62813e+10,3.23442e-09,2.08616e-07,0),(3.23442e-09,1.62813e+10,1.00576e-08,0),(2.08616e-07,1.00576e-08,3.18086e+10,0),(0,0,0,1))
My maths is not good enough (any more!) to understand how to get from that matrix of inertia to the z-axis moment of inertia that I need (I would check against the cylinder first). There is some info in the link below:

http://www2.eng.cam.ac.uk/~hemh1/gyrosc ... ertia.html

I appreciate this is not technically a Freecad help issue, but maybe someone knows some clever way to get the figure directly?

Thanks!

Brutha

Flywheel.png
Flywheel.png (245.68 KiB) Viewed 2538 times
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: Moment of inertia

Post by Syres »

Took a little digging out but this seems to be what you're looking for https://forum.freecadweb.org/viewtopic. ... 09#p104153 I just tried it on a cone on the Z axis and the line of Python worked using:

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15959 (Git)
Build type: Release
Branch: master
Hash: 397418078a6f61e8c39cedfe1160adc2abd73510
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)
Brutha
Posts: 221
Joined: Mon May 04, 2015 1:50 pm

Re: Moment of inertia

Post by Brutha »

Took a little digging out but this seems to be what you're looking for https://forum.freecadweb.org/viewtopic. ... 09#p104153 I just tried it on a cone on the Z axis and the line of Python worked using:
Perfect, thank you very much!

Code: Select all

App.ActiveDocument.ActiveObject.Shape.copy().getMomentOfInertia(App.Vector(0,0,0),App.Vector(0,0,1))
... gives me the exact answer that I get from the Wiki equations for a cylinder, and then what seems to be a plausible answer for my flywheel!

In fact, having looked at that link, the third figure in the bottom row is the moment of inertia along the Z axis (it does say this in help, which I could have seen if I'd looked a bit more carefully!). But in the matrix it has far less precision, so you can't see if the end result is really the same as the equation version.

Cheers

Brutha
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Moment of inertia

Post by openBrain »

As a sidenote, just notice that it is quite easy to measure the value of the moment of inertia of objects as flywheels. ;)
If you're able to easily get it unmounted, it could be a good exercise/confirmation.
Brutha
Posts: 221
Joined: Mon May 04, 2015 1:50 pm

Re: Moment of inertia

Post by Brutha »

openBrain wrote: Tue Feb 26, 2019 3:33 pm As a sidenote, just notice that it is quite easy to measure the value of the moment of inertia of objects as flywheels. ;)
If you're able to easily get it unmounted, it could be a good exercise/confirmation.
Thanks - that's quite an interesting thought - but in fact I think it would be a real pain to take it all apart, I don't think it's intended to be user maintainable!
Post Reply