Class: Pulo::MomentOfInertia
- Inherits:
-
Object
- Object
- Pulo::MomentOfInertia
- Defined in:
- lib/pulo/machine/mechanics/moments_of_inertia.rb
Class Method Summary collapse
- .cone(mass, radius, height) ⇒ Object
-
.cuboid(mass, width, height) ⇒ Object
cuboid or plate of arbitrary depth (in direction of axis of rotation).
- .cylinder(mass, radius, height) ⇒ Object
-
.cylindrical_shell(mass, radius) ⇒ Object
cylindrical shell on its axis.
-
.disc(mass, radius) ⇒ Object
disc.
-
.hoop(mass, radius) ⇒ Object
hoop.
- .point_mass(mass, distance) ⇒ Object
-
.rod(mass, length) ⇒ Object
rod around its mid point.
-
.rod_end(mass, length) ⇒ Object
rod around its mid point.
- .sphere(mass, radius) ⇒ Object
- .spherical_shell(mass, radius) ⇒ Object
- .thick_spherical_shell(mass, inner_radius, outer_radius) ⇒ Object
- .tube(mass, inner_radius, outer_radius) ⇒ Object
Class Method Details
.cone(mass, radius, height) ⇒ Object
52 53 54 |
# File 'lib/pulo/machine/mechanics/moments_of_inertia.rb', line 52 def self.cone(mass, radius, height) (radius**2+4*height**2)*(3*mass/20) end |
.cuboid(mass, width, height) ⇒ Object
cuboid or plate of arbitrary depth (in direction of axis of rotation)
57 58 59 |
# File 'lib/pulo/machine/mechanics/moments_of_inertia.rb', line 57 def self.cuboid(mass, width, height) (height**2+width**2)*(mass/12) end |
.cylinder(mass, radius, height) ⇒ Object
32 33 34 |
# File 'lib/pulo/machine/mechanics/moments_of_inertia.rb', line 32 def self.cylinder(mass, radius, height) (3*radius**2+height**2)*mass/12.0 end |
.cylindrical_shell(mass, radius) ⇒ Object
cylindrical shell on its axis
28 29 30 |
# File 'lib/pulo/machine/mechanics/moments_of_inertia.rb', line 28 def self.cylindrical_shell(mass, radius) (mass*radius**2) end |
.disc(mass, radius) ⇒ Object
disc
23 24 25 |
# File 'lib/pulo/machine/mechanics/moments_of_inertia.rb', line 23 def self.disc(mass, radius) (mass*radius**2)/4.0 end |
.hoop(mass, radius) ⇒ Object
hoop
18 19 20 |
# File 'lib/pulo/machine/mechanics/moments_of_inertia.rb', line 18 def self.hoop(mass, radius) (mass*radius**2)/2.0 end |
.point_mass(mass, distance) ⇒ Object
3 4 5 |
# File 'lib/pulo/machine/mechanics/moments_of_inertia.rb', line 3 def self.point_mass(mass, distance) mass*distance**2 end |
.rod(mass, length) ⇒ Object
rod around its mid point
8 9 10 |
# File 'lib/pulo/machine/mechanics/moments_of_inertia.rb', line 8 def self.rod(mass, length) (mass*distance**2)/12.0 end |
.rod_end(mass, length) ⇒ Object
rod around its mid point
13 14 15 |
# File 'lib/pulo/machine/mechanics/moments_of_inertia.rb', line 13 def self.rod_end(mass, length) (mass*length**2)/3.0 end |
.sphere(mass, radius) ⇒ Object
44 45 46 |
# File 'lib/pulo/machine/mechanics/moments_of_inertia.rb', line 44 def self.sphere(mass, radius) (2*mass*radius**2)/5.0 end |
.spherical_shell(mass, radius) ⇒ Object
40 41 42 |
# File 'lib/pulo/machine/mechanics/moments_of_inertia.rb', line 40 def self.spherical_shell(mass, radius) (2*mass*radius**2)/3.0 end |
.thick_spherical_shell(mass, inner_radius, outer_radius) ⇒ Object
48 49 50 |
# File 'lib/pulo/machine/mechanics/moments_of_inertia.rb', line 48 def self.thick_spherical_shell(mass, inner_radius,outer_radius) ((outer_radius**5-inner_radius**5)/(outer_radius**3-inner_radius**3))*(2*mass/5) end |
.tube(mass, inner_radius, outer_radius) ⇒ Object
36 37 38 |
# File 'lib/pulo/machine/mechanics/moments_of_inertia.rb', line 36 def self.tube(mass, inner_radius,outer_radius) (inner_radius**2+outer_radius**2)*mass/2.0 end |