Class: PhysicsPlus::Constants

Inherits:
Object
  • Object
show all
Defined in:
lib/physics_plus/constants.rb

Overview

This module contains physical constants

Constant Summary collapse

Speed_light_vacuum =

Returns:

  • (Integer)
C = 299792458
Gravitational_constant =

Returns:

  • (Float)
G = (6.674484 * ( 10 ** (11 * -1.0 ) ))
Planck_constant =

Returns:

  • (Float)
(6.62607015 * ( 10 ** (34 * -1.0 ) ))
Reduced_Planck_constant =

Returns:

  • (Float)
(1.0545718 * ( 10 ** (34 * -1.0 ) ))
Elementary_charge =

Returns:

  • (Float)
(1.602176634 * ( 10 ** (19 * -1.0 ) ))
Boltzmanns_constant =

Returns:

  • (Float)
(1.380649 * ( 10 ** (23 * -1.0 ) ))
Planck_mass =

Returns:

  • (Float)
(2.176434 * ( 10 ** (8 * -1.0 ) ))
Planck_length =

Returns:

  • (Float)
(1.616255 * ( 10 ** (35 * -1.0 ) ))
Planck_time =

Returns:

  • (Float)
(5.391247 * ( 10 ** (44 * -1.0 ) ))
Planck_temperature =

Returns:

  • (Float)
(1.416784 * ( 10 ** (32 * 1.0 ) ))
Fine_structure_constant =

Returns:

  • (Float)
(7.2973525693 * ( 10 ** (3 * -1.0 ) ))
Electrical_constant =

Returns:

  • (Float)
(8.8541878128 * ( 10 ** (12 * -1.0 ) ))
Atomic_mass_unit =

Returns:

  • (Float)
(1.66053906660 * ( 10 ** (27 * -1.0 ) ))
Avogadros_constant =

Returns:

  • (Float)
(6.02214076 * ( 10 ** (23 * 1.0 ) ))
Electron_volt =

Returns:

  • (Float)
(1.602176634 * ( 10 ** (19 * -1.0 ) ))
Calorie =

Returns:

  • (Float)
4.1868
Liter_atmosphere =

Returns:

  • (Integer)
(101325)
Magnetic_constant =

Returns:

  • (Float)
(1.25663706212 * ( 10 ** (6 * -1.0 ) ))
Vacuum_impedance =

Returns:

  • (Float)
376.73
Coulombs_constant =

Returns:

  • (Float)
(8.98755 * ( 10 ** (9 * 1.0 ) ))
Electron_mass =

Returns:

  • (Float)
(9.1093837015 * ( 10 ** (31 * -1.0 ) ))
Proton_mass =

Returns:

  • (Float)
(1.67262192369 * ( 10 ** (27 * -1.0 ) ))
Neutron_mass =

Returns:

  • (Float)
(1.67492749804 * ( 10 ** (27 * -1.0 ) ))

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.List_different_systems_quantitiesString

Returns List Constants linking different systems of units and conversion factors.

Returns:

  • (String)

    List Constants linking different systems of units and conversion factors



60
61
62
63
64
65
66
67
68
69
70
# File 'lib/physics_plus/constants.rb', line 60

def self.List_different_systems_quantities
  constants = <<~CONSTANTS
    Fine_structure_constant => 0.0072973525693                (Fine structure constant)
    Electrical_constant => 8.854187812799999e-12              (Electrical constant)
    Atomic_mass_unit => 4.1868                                (Atomic mass unit)
    Avogadros_constant => 6.02214076e+23                      (Avogadro's constant)
    Electron_volt => 1.6021766340000001e-19                   (Electron volt)
    Calorie => 4.1868                                         (Calorie)
    Liter_atmosphere => 101325                                (Liter * atmosphere)
  CONSTANTS
end

.List_electromagnetic_constantsString

Returns List electromagnetic constants.

Returns:

  • (String)

    List electromagnetic constants



94
95
96
97
98
99
100
101
# File 'lib/physics_plus/constants.rb', line 94

def self.List_electromagnetic_constants
  constants = <<~CONSTANTS
    Magnetic_constant => 1.25663706212e-06                    (Magnetic constant)
    Vacuum_impedance => 376.73                                (Vacuum impedance)
    Electrical_constant => 8.854187812799999e-12              (Electrical constant)
    Coulombs_constant => 8987550000.0                         (Coulombs constant)
  CONSTANTS
end

.List_fundamental_constantsString

Returns List fundamental constants.

Returns:

  • (String)

    List fundamental constants



7
8
9
10
11
12
13
14
15
16
# File 'lib/physics_plus/constants.rb', line 7

def self.List_fundamental_constants
  constants = <<~CONSTANTS  
    Speed_light_vacuum => 299792458                           (Speed of light)
    Gravitational_constant => 6.674484e-11                    (Gravitational constant)
    Planck_constant => 6.62607015e-34                         (Constant Plank)
    Reduced_Planck_constant => 1.0545717999999998e-34         (Dirac constant)
    Elementary_charge => 1.6021766340000001e-19               (Elementary charge)
    Boltzmanns_constant => 1.380649e-23                       (Boltzmann's constant)
  CONSTANTS
end

.List_planck_quantitiesString

Returns List of planck quantities.

Returns:

  • (String)

    List of planck quantities



38
39
40
41
42
43
44
45
# File 'lib/physics_plus/constants.rb', line 38

def self.List_planck_quantities
  constants = <<~CONSTANTS
    Planck_mass => 2.176434e-08                               (Planck mass)
    Planck_length => 1.616255e-35                             (Planck length)
    Planck_time => 5.391246999999999e-44                      (Planck time)
    Planck_temperature => 1.4167840000000002e+32              (Planck temperature)
  CONSTANTS
end

Instance Method Details

#Some_other_physical_constantsString

Returns Some other physical constants.

Returns:

  • (String)

    Some other physical constants



113
114
115
116
117
118
119
# File 'lib/physics_plus/constants.rb', line 113

def Some_other_physical_constants
  constants = <<~CONSTANTS
    Electron_mass => 9.1093837015e-31                         (Electron mass)
    Proton_mass => 1.67262192369e-27                          (Proton mass)
    Neutron_mass => 1.67492749804e-27                         (Neutron_mass)
  CONSTANTS
end