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

  1. with PHYSICAL_REAL ; use PHYSICAL_REAL ;
  2.  
  3. package PHYSICAL_UNITS_MECHANICAL is
  4.  
  5. -- This package specification defines Ada types for physical
  6. -- quantities generally in the mechanical context.
  7. --
  8. -- This package is the logical continuation of PHYSICAL_UNITS_BASIC
  9. --
  10. --
  11. --                                 DERIVED MECHANICAL UNITS
  12. --
  13. --
  14. --                                    2                              2
  15. --area                       A       L           square meter       m
  16. --
  17.   type AREA_MKS is new REAL ;
  18.   subtype AREA_SQUARE_METER is AREA_MKS ;
  19.   subtype AREA_SQUARE_METERS is AREA_MKS ;
  20.   type AREA_ENGLISH is new REAL ;
  21.   subtype AREA_SQUARE_FEET is AREA_ENGLISH ;
  22.   subtype AREA_SQUARE_FOOT is AREA_ENGLISH ;
  23.   type AREA_SQUARE_CENTIMETER is new REAL ;
  24.   type AREA_SQUARE_KILOMETER is new REAL ;
  25.   type AREA_SQUARE_INCH is new REAL ;
  26.   type AREA_SQUARE_YARD is new REAL ;
  27.   type AREA_SQUARE_MILE is new REAL ;
  28.   type AREA_ACRE is new REAL ;
  29.   type AREA_CIRCULAR_MIL is new REAL ;
  30.   type AREA_HECTARE is new REAL ;
  31.   type AREA_TOWNSHIP is new REAL ;
  32.  
  33. --
  34. --                                    3                              3
  35. --volume                     V       L           stere              m
  36. --
  37.   type VOLUME_MKS is new REAL ;
  38.   subtype VOLUME_STERE is VOLUME_MKS ;
  39.   subtype VOLUME_CUBIC_METER is VOLUME_MKS ;
  40.   type VOLUME_ENGLISH is new REAL ;
  41.   subtype VOLUME_CUBIC_FEET is VOLUME_ENGLISH ;
  42.   type VOLUME_MILLILITER is new REAL ;
  43.   type VOLUME_LITER is new REAL ;
  44.   type VOLUME_KILOLITER is new REAL ;
  45.   type VOLUME_CUBIC_CENTIMETER is new REAL ;
  46.   type VOLUME_CUBIC_INCH is new REAL ;
  47.   type VOLUME_CUBIC_YARD is new REAL ;
  48.   type VOLUME_CUBIC_MILE is new REAL ;
  49.   type VOLUME_TEASPOON is new REAL ;
  50.   type VOLUME_TABLESPOON is new REAL ;
  51.   type VOLUME_OUNCE_FLUID is new REAL ;
  52.   type VOLUME_JIGGER is new REAL ;
  53.   type VOLUME_CUP is new REAL ;
  54.   type VOLUME_PINT_LIQUID is new REAL ;
  55.   type VOLUME_QUART_LIQUID is new REAL ;
  56.   type VOLUME_GALLON is new REAL ;
  57.   type VOLUME_KEG is new REAL ;
  58.   type VOLUME_BARREL is new REAL ;
  59.   type VOLUME_PINT_DRY is new REAL ;
  60.   type VOLUME_QUART_DRY is new REAL ;
  61.   type VOLUME_PECK is new REAL ;
  62.   type VOLUME_BUSHEL is new REAL ;
  63.   type VOLUME_CORD is new REAL ;
  64.  
  65. --
  66. --velocity                   v       L/T         meter per second   m/sec
  67. --
  68.   type VELOCITY_MKS is new REAL ;
  69.   subtype VELOCITY_METER_PER_SECOND is VELOCITY_MKS ;
  70.   type VELOCITY_ENGLISH is new REAL ;
  71.   subtype VELOCITY_FEET_PER_SECOND is VELOCITY_ENGLISH ;
  72.   type VELOCITY_CENTIMETER_PER_SECOND is new REAL ;
  73.   type VELOCITY_KILOMETER_PER_HOUR is new REAL ;
  74.   type VELOCITY_INCHES_PER_SECOND is new REAL ;
  75.   type VELOCITY_MILE_PER_HOUR is new REAL ;
  76.   type VELOCITY_MILES_PER_SECOND is new REAL ;
  77.   type VELOCITY_INCHES_PER_MINUTE is new REAL ;
  78.   type VELOCITY_FEET_PER_MINUTE is new REAL ;
  79.   type VELOCITY_MILES_PER_HOUR is new REAL ;
  80.   type VELOCITY_KNOTS is new REAL ;
  81.   type VELOCITY_FURLONG_PER_FORTNIGHT is new REAL ;
  82.  
  83. --
  84. --angular velocity           omega   1/T         radians per second 1/sec
  85. --
  86.   type ANGULAR_VELOCITY is new REAL ;
  87.   subtype ANGULAR_VELOCITY_RADIANS_PER_SECOND is ANGULAR_VELOCITY ;
  88.   type ANGULAR_VELOCITY_DEGREES_PER_SECOND is new REAL ;
  89.   type ANGULAR_VELOCITY_REVOLUTIONS_PER_MINUTE is new REAL ;
  90.   type ANGULAR_VELOCITY_REVOLUTIONS_PER_SECOND is new REAL ;
  91.  
  92. --
  93. --                                      2                                2
  94. --acceleration               a       L/T         meter per second   m/sec
  95. --                                               squared
  96. --
  97.   type ACCELERATION_MKS is new REAL ;
  98.   subtype ACCELERATION_METER_PER_SECOND_SQUARED is ACCELERATION_MKS ;
  99.   type ACCELERATION_ENGLISH is new REAL ;
  100.   subtype ACCELERATION_FEET_PER_SECOND_SQUARED is ACCELERATION_ENGLISH ;
  101.  
  102. --
  103. --                                      2                                2
  104. --angular acceleration       alpha   1/T         radians per        1/sec
  105. --                                               square second
  106. --
  107.   type ANGULAR_ACCELERATION is new REAL ;
  108.   subtype ANGULAR_ACCELERATION_RADIANS_PER_SECOND_SQUARED is 
  109.                  ANGULAR_ACCELERATION ;
  110.   type ANGULAR_ACCELERATION_REVOLUTIONS_PER_MINUTE_SQUARED is new REAL ;
  111.  
  112. --
  113. --                                       2                                  2
  114. --force                      F       ML/T        newton             Kg m/sec
  115. --
  116.   type FORCE_MKS is new REAL ;
  117.   subtype FORCE_NEWTON is FORCE_MKS ;
  118.   subtype FORCE_KILOGRAM_METER_PER_SECOND_SQUARED is FORCE_MKS ;
  119.   type FORCE_DYNE is new REAL ;
  120.   type FORCE_ENGLISH is new REAL ;
  121.   subtype FORCE_POUNDAL is FORCE_ENGLISH ;
  122.   subtype FORCE_POUND_FOOT_PER_PER_SECOND_SQUARED is FORCE_ENGLISH ;
  123.  
  124. --
  125. --                                     2  2                             2    2
  126. --energy                     E       ML /T       joule              Kg m /sec
  127. --work                       W         "           "                   "
  128. --heat                       Q         "           "                   "
  129. --torque (moment)            T         "         newton meter          "
  130. --
  131.   type ENERGY_MKS is new REAL ;
  132.   subtype WORK_MKS is ENERGY_MKS ;
  133.   subtype HEAT_MKS is ENERGY_MKS ;
  134.   subtype TORQUE_MKS is ENERGY_MKS ;
  135.   subtype ENERGY_JOULE is ENERGY_MKS ;
  136.   subtype ENERGY_NEWTON_METER is ENERGY_MKS ;
  137.   subtype ENERGY_KILOGRAM_METER_SQUARED_PER_SECOND_SQUARED is ENERGY_MKS ;
  138.   type ENERGY_ERG is new REAL ;
  139.   type ENERGY_GRAM_CALORIE is new REAL ;
  140.   type ENERGY_KILOGRAM_CALORIE is new REAL ;
  141.   type ENERGY_ENGLISH is new REAL ;
  142.   subtype ENERGY_B_T_U is ENERGY_ENGLISH ;
  143.   type ENERGY_FOOT_POUND is new REAL ;
  144.   type ENERGY_KILOWATT_HOUR is new REAL ;
  145.   type ENERGY_HORSEPOWER_HOUR is new REAL ;
  146.  
  147. --
  148. --                                     2  3                        
  149. --power                      P       ML /T       watt               joule/sec
  150. --
  151.   type POWER_MKS is new REAL ;
  152.   subtype POWER_WATT is POWER_MKS ;
  153.   subtype POWER_JOULE_PER_SECOND is POWER_MKS ;
  154.   subtype POWER_VOLT_AMPERE is POWER_MKS ;
  155.   type POWER_KILOGRAM_CALORIE_PER_SECOND is new REAL ;
  156.   type POWER_KILOGRAN_CALORIE_PER_MINUTE is new REAL ;
  157.   type POWER_HORSEPOWER_MECHANICAL is new REAL ;
  158.   type POWER_HORSEPOWER_ELECTRICAL is new REAL ;
  159.   type POWER_HORSEPOWER_METRIC is new REAL ;
  160.   type POWER_HORSEPOWER_BOILER is new REAL ;
  161.   type POWER_B_T_U_PER_MINUTE is new REAL ;
  162.   type POWER_B_T_U_PER_HOUR is new REAL ;
  163.   type POWER_FOOT_POUND_PER_MINUTE is new REAL ;
  164.   type POWER_FOOT_POUND_PER_SECOND is new REAL ;
  165.  
  166. --
  167. --                                      3                               3
  168. --density                    D       M/L         kilogram per       Kg/m
  169. --                                               cubic meter
  170. --
  171.   type DENSITY_MKS is new REAL ;
  172.   subtype DENSITY_KILOGRAM_PER_CUBIC_METER is DENSITY_MKS ;
  173.   type DENSITY_ENGLISH is new REAL ;
  174.   subtype DENSITY_POUND_PER_CUBIC_FOOT is DENSITY_ENGLISH ;
  175.  
  176. --
  177. --                                    3                              3
  178. --flow rate                  f       L /T        cubic meter per    m /sec
  179. --                                               second
  180. --
  181.   type FLOW_RATE_MKS is new REAL ;
  182.   subtype FLOW_RATE_CUBIC_METER_PER_SECOND is FLOW_RATE_MKS ;
  183.   type FLOW_RATE_ENGLISH is new REAL ;
  184.   subtype FLOW_RATE_CUBIC_FEET_PER_SECOND is FLOW_RATE_ENGLISH ;
  185.   type FLOW_RATE_GALLON_PER_MINUTE is new REAL ;
  186.   type FLOW_RATE_CUBIC_FEET_PER_MINUTE is new REAL ;
  187.  
  188. --
  189. --                                       2                                  2
  190. --pressure                   P       M/LT        pascal             Kg/m sec
  191. -- stress                                        newton per
  192. -- energy density                                square meter
  193. --
  194.   type PRESSURE_MKS is new REAL ;
  195.   subtype PRESSURE_PASCAL is PRESSURE_MKS ;
  196.   subtype PRESSURE_NEWTON_PER_SQUARE_METER is PRESSURE_MKS ;
  197.   subtype PRESSURE_FORCE_PER_AREA_MKS is PRESSURE_MKS ;
  198.   subtype PRESSURE_JOULE_PER_CUBIC_METER is PRESSURE_MKS ;
  199.   subtype PRESSURE_ENERGY_DENSITY_MKS is PRESSURE_MKS ;
  200.   type PRESSURE_ENGLISH is new REAL ;
  201.   subtype PRESSURE_POUND_PER_SQUARE_FOOT is PRESSURE_ENGLISH ;
  202.   type PRESSURE_TON_PER_SQUARE_FOOT is new REAL ;
  203.   type PRESSURE_ATMOSPHERE_STANDARD is new REAL ;
  204.   type PRESSURE_FEET_OF_WATER is new REAL ;
  205.   type PRESSURE_INCHES_OF_MERCURY is new REAL ;
  206.   type PRESSURE_MILLIMETER_OF_MERCURY is new REAL ;
  207.   type PRESSURE_BAR is new REAL ;
  208.   type PRESSURE_MILLIBAR is new REAL ;
  209.   type PRESSURE_TORR is new REAL ;
  210.  
  211. --
  212. --momentum                   p       ML/T        newton second       Kg m/sec
  213. --
  214.   type MOMENTUM_MKS is new REAL ;
  215.   subtype MOMENTUM_NEWTON_SECOND is MOMENTUM_MKS ;
  216.   subtype MOMENTUM_KILOGRAM_METER_PER_SECOND is MOMENTUM_MKS ;
  217.  
  218. --
  219. --                                     2                                2
  220. --inertia                    I       ML /T       joule second       Kg m /sec
  221. --
  222.   type INERTIA_MKS is new REAL ;
  223.   subtype INERTIA_JOULE_SECOND is INERTIA_MKS ;
  224.   subtype INERTIA_KILOGRAM_METER_SQUARED_PER_SECOND is INERTIA_MKS ;
  225.  
  226. --
  227. --                                     2                                2
  228. --moment of inertia          M       ML          kilogram           Kg m 
  229. --                                               meter squared
  230. --
  231.   type MOMENT_OF_INERTIA_MKS is new REAL ;
  232.   subtype MOMENT_OF_INERTIA_KILOGRAM_METER_SQUARED is MOMENT_OF_INERTIA_MKS ;
  233.  
  234. --
  235. --                                    2                                2
  236. --kinematic viscosity        v       M /T        kilogram squared    Kg /sec 
  237. --                                               per second
  238. --
  239.   type KINEMATIC_VISCOSITY_MKS is new REAL ;
  240.   subtype KINEMATIC_VISCOSITY_KILOGRAM_SQUARED_PER_SECOND is 
  241.           KINEMATIC_VISCOSITY_MKS ;
  242. --
  243. --dynamic viscosity          d       M/LT        newton second       Kg/m sec 
  244. --                                               per square meter
  245. --
  246.   type DYNAMIC_VISCOSITY_MKS is new REAL ;
  247.   subtype DYNAMIC_VISCOSITY_NEWTON_PER_SQUARE_METER is DYNAMIC_VISCOSITY_MKS ;
  248.   subtype DYNAMIC_VISCOSITY_KILOGRAM_PER_METER_SECOND is DYNAMIC_VISCOSITY_MKS ;
  249. --
  250. --
  251. --luminous flux              phi     C           lumen (4Pi candle   cd sr 
  252. --                                               for point source)
  253. --
  254.   type LUMINOUS_FLUX_LUMEN is new REAL ;
  255.  
  256. --
  257. --                                      2                                   2
  258. --illumination               E       C/L         lumen per           cd sr/m
  259. --                                               square meter
  260. --
  261.   type ILLUMINATION_MKS is new REAL ;
  262.   subtype ILLUMINATION_LUMEN_PER_SQUARE_METER is ILLUMINATION_MKS ;
  263.  
  264. --
  265. --                                      2                                 2
  266. --luminance                  l       C/L         lux                  cd/m
  267. --                                               square meter
  268. --
  269.   type LUMINANCE_MKS is new REAL ;
  270.   subtype LUMINANCE_LUX is LUMINANCE_MKS ;
  271.   subtype LUMINANCE_CANDLE_PER_SQUARE_METER is LUMINANCE_MKS ;
  272.  
  273. --
  274. --
  275. --                                     2  2                             2 
  276. --entropy                    S       ML /T K     joule per degree   Kg m /
  277. --                                                                      2 o
  278. --                                                                   sec   K
  279. --
  280.   type ENTROPY_MKS is new REAL ;
  281.   subtype SPECIFIC_HEAT_MKS is ENTROPY_MKS ;
  282.   subtype SPECIFIC_HEAT_JOULE_PER_DEGREE_KELVIN is ENTROPY_MKS ;
  283.   type SPECIFIC_HEAT_B_T_U_PER_POUND_DEGREE_FARENHEIT is new REAL ;
  284.  
  285. --
  286. end PHYSICAL_UNITS_MECHANICAL ;
  287.