home *** CD-ROM | disk | FTP | other *** search
/ Programmer's ROM - The Computer Language Library / programmersrom.iso / ada / piwg / z000010.ada < prev    next >
Encoding:
Text File  |  1988-05-03  |  6.0 KB  |  171 lines

  1. with PHYSICAL_UNITS_BASIC ; use PHYSICAL_UNITS_BASIC ;
  2. with PHYSICAL_UNITS_MECHANICAL ; use PHYSICAL_UNITS_MECHANICAL ;
  3. with PHYSICAL_UNITS_ELECTRICAL ; use PHYSICAL_UNITS_ELECTRICAL ;
  4. with PHYSICAL_UNITS_OTHER ; use PHYSICAL_UNITS_OTHER ;
  5.  
  6. package PHYSICAL_CONSTANT is
  7.  
  8. --
  9. --   There are a number of physical constants that are used in equations
  10. -- to solve problems in physics. Errors may occur because the dimensionality
  11. -- and/or units of the physical constant are not known. The table below
  12. -- presents some physical constants with their typical symbol, dimension,
  13. -- nominal value and unit of measure in the MKS system.
  14. --
  15. --   The Ada named munber is then given with the Ada type corresponding
  16. -- to the required dimension and unit.
  17. --
  18. --PHYSICAL CONSTANT           SYMBOL  DIMENSION   MKS VALUE        UNIT
  19. --_________________           ______  _________   _________        ____
  20. --
  21. --
  22. --Pi, ratio of circumference   Pi      none        3.14159265       radians
  23. --      to diameter
  24. --
  25.   PI : constant := 3.14159265 ;
  26.  
  27. --
  28. --                                        3                             3
  29. --air density, normal          rho     M/L         1.2929           Kg/m
  30. --   conditions
  31. --
  32.   AIR_DENSITY : constant DENSITY_MKS := DIMENSION ( 1.2929 ) ;
  33.  
  34. --
  35. --air molecule, mass           m       M           4.81E-26         Kg
  36. --
  37.   MASS_AIR_MOLECULE : constant MASS_MKS := DIMENSION ( 4.81E-26 ) ;
  38.  
  39. --
  40. --air molecule,                w       M           0.028952         Kg/mole
  41. -- kilogram molecular weight
  42. --
  43.   MOLECULAR_WEIGHT_AIR_MOLECULE : constant MASS_MKS := DIMENSION ( 0.028952 )
  44.       ;
  45.  
  46. --
  47. --                                         2                                2
  48. --atmospheric pressure         A       M/LT        1.01325          newton/m
  49. --
  50.   ATMOSPHERIC_PRESSURE : constant PRESSURE_MKS := DIMENSION ( 1.01325 ) ;
  51.  
  52. --
  53. --Avogadro's number            N       none        6.023E+23        molecules in
  54. --  molecules in a kilogram mole                                          a mole
  55. --
  56.   AVOGADROS_NUMBER : constant := 6.02257E+23 ;
  57.  
  58. --
  59. --                                       2  2                             o
  60. --Boltzmann's constant         k       ML /T K     1.380E-23        joule/ K
  61. --
  62.   BOLTZMANNS : constant JOULE_PER_DEGREE_KELVIN := DIMENSION ( 1.380E-23 ) ;
  63.  
  64. --
  65. --                                       2  2
  66. --electron volt                e       ML /T       1.60210E-10      joule
  67. --
  68.   ELECTRON_VOLT : constant ENERGY_MKS := DIMENSION ( 1.60210E-10 ) ;
  69.  
  70. --
  71. --                                       3  2 2                         2    -2
  72. --electrostatic constant       k       ML /T Q     8.987E+9         nt m/coulomb
  73. --  reciprocal permittivity                                          m/farad
  74. --
  75.   ELECTROSTATIC : constant METER_PER_FARAD := DIMENSION ( 8.987E+9 ) ;
  76.  
  77. --
  78. --elementary charge            e       Q           1.6021892E-19    coulomb
  79. --
  80.   ELEMENTARY_CHARGE : constant CHARGE_COULOMB := DIMENSION ( 1.6021892E-19 ) ;
  81.  
  82. --
  83. --electron mass                m       M           9.1066E-31       Kg
  84. --                              e
  85. --
  86.   MASS_ELECTRON : constant MASS_MKS := DIMENSION ( 9.1066E-31 ) ;
  87.  
  88. --
  89. --faraday                      f       L/T         9.648456E+4      coulomb/mole
  90. --
  91.   FARADAY : constant VELOCITY_MKS := DIMENSION ( 9.648456E+4 ) ;
  92.  
  93. --
  94. --                                       2  2                             o
  95. --gas constant of a mole       R       ML /T K     8.3144           joule/ K
  96. --
  97.   GAS : constant JOULE_PER_DEGREE_KELVIN := DIMENSION ( 8.3144 ) ;
  98.  
  99. --
  100. --                                        2                              2
  101. --gravity (earth)              g       L/T         9.80665          m/sec
  102. --
  103.   GRAVITY : constant ACCELERATION_MKS := DIMENSION ( 9.800665 ) ;
  104.  
  105. --
  106. --
  107. --hydrogen atom mass           m       M           1.6734E-27       Kg
  108. --                              h
  109. --
  110.   MASS_HYDROGEN_ATOM : constant MASS_MKS := DIMENSION ( 1.6734E-27 ) ;
  111.  
  112. --
  113. --hydrogen atom                w       M           1.0079E-3        Kg/mole
  114. --  kilogram atomic weight
  115. --
  116.   MOLECULAR_WEIGHT_HYDROGEN_ATOM : constant MASS_MKS := DIMENSION ( 1.0079E-3
  117.       ) ;
  118.  
  119. --
  120. --                                       2   2
  121. --impedance of free space      Z       ML /TQ      120Pi            ohm
  122. --                              0
  123. --
  124.   IMPEDANCE_FREE_SPACE : constant RESISTANCE_OHM := DIMENSION ( 120.0 * PI ) ;
  125.  
  126. --
  127. --mechanical equivalent        J       none        4186.05          joule/
  128. --   of heat                                                          Kg calorie
  129. --
  130.   MECHANICAL_HEAT : constant := 4186.05 ;
  131.  
  132. --
  133. --                                      2 2   3 
  134. --permittivity (vacuum)        epsi    T Q /ML     8.854E-12        farad/meter
  135. --                                 0
  136. --
  137.   PERMITTIVITY_VACUUM : constant PERMITTIVITY_FARAD_PER_METER := DIMENSION (
  138.       8.854E-12 ) ;
  139.  
  140. --
  141. --                                         2                        
  142. --permeability (vacuum)        mu      ML/Q        4Pi E-7          henry/meter
  143. --                               0
  144.   PERMEABITITY_VACUUM : constant PERMEABILITY_HENRY_PER_METER := DIMENSION (
  145.       4.0E-7 * PI ) ;
  146.  
  147. --                                       2                            
  148. --Planck's constant            h       ML /T       6.624E-34        joule second
  149. --
  150.   PLANCKS : constant INERTIA_MKS := DIMENSION ( 6.624E-34 ) ;
  151.  
  152. --
  153. --speed of light (vacuum)      c       L/T         2.99792458E+8    meter/second
  154. --
  155.   SPEED_OF_LIGHT : constant VELOCITY_MKS := DIMENSION ( 2.99792458E+8 ) ;
  156.  
  157. --
  158. --speed of sound (air)         s       L/T         331.45           meter/second
  159. --
  160.   SPEED_OF_SOUND : constant VELOCITY_MKS := DIMENSION ( 331.45 ) ;
  161.  
  162. --
  163. --                                      2   2                           2   2
  164. --universal gravitational      G       L /MT       6.6720E-12       nt m /Kg
  165. --    constant
  166. --
  167.   U_G_C : constant ACCELERATION_PER_KILOGRAM := DIMENSION ( 6.6720E-12 ) ;
  168.  
  169. --
  170. end PHYSICAL_CONSTANT ;
  171.