home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 2 / goldfish_vol2_cd1.bin / files / misc / sci / accrete / src / const.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-09  |  4.2 KB  |  105 lines

  1. #ifdef AMIGA
  2. #include <limits.h>
  3. #endif
  4.  
  5.  
  6. #ifndef RAND_MAX
  7. # ifdef AMIGA
  8. #  define RAND_MAX        (INT_MAX)
  9. # else
  10. #  define    RAND_MAX    (32767)
  11. # endif
  12. #endif
  13.  
  14. #ifdef AMIGA
  15. #ifndef PI
  16. #define PI                      (3.1415926536)
  17. #endif /* PI */
  18. #endif /* AMIGA */
  19.  
  20. #define TRUE                    (1)
  21. #define FALSE                   (0)
  22. #define ECCENTRICITY_COEFF      (0.077)        /* Dole's was 0.077         */
  23. #define    PROTOPLANET_MASS    (1.0E-15)    /* Units of solar masses    */
  24. #define SOLAR_MASS_IN_GRAMS    (1.989E33)    /* Units of grams           */
  25. #define EARTH_MASS_IN_GRAMS    (5.977E27)    /* Units of grams           */
  26. #define EARTH_RADIUS        (6.378E6)    /* Units of cm              */
  27. #define EARTH_RADIUS_IN_KM    (6378.0)    /* Units of km              */
  28. #define EARTH_ACCELERATION    (981.0)        /* Units of cm/sec2         */
  29. #define EARTH_AXIAL_TILT    (23.4)        /* Units of degrees         */
  30. #define EARTH_EXOSPHERE_TEMP    (1273.0)    /* Units of degrees Kelvin  */
  31. #define EARTH_MASSES_PER_SOLAR_MASS    (332775.64)
  32. #define EARTH_EFFECTIVE_TEMP    (255.0)        /* Units of degrees Kelvin  */
  33. #define EARTH_ALBEDO        (0.39)
  34. #define    CLOUD_COVERAGE_FACTOR    (1.839E-8)    /* Km2/kg                   */
  35. #define EARTH_WATER_MASS_PER_AREA    (3.83E15)/* grams per square km     */
  36. #define    EARTH_SURF_PRES_IN_MILLIBARS     (1000.0)
  37. #define EARTH_CONVECTION_FACTOR    (0.43)        /* from Hart, eq.20         */
  38. #define FREEZING_POINT_OF_WATER    (273.0)        /* Units of degrees Kelvin  */
  39. #define DAYS_IN_A_YEAR        (365.256)    /* Earth days per Earth year*/
  40. /*         gas_retention_threshold = 6.0;*/    /* ratio of esc vel to RMS vel */
  41. #define GAS_RETENTION_THRESHOLD    (5.0)        /* ratio of esc vel to RMS vel */
  42. #define GAS_GIANT_ALBEDO    (0.5)        /* albedo of a gas giant    */
  43. #define CLOUD_ALBEDO        (0.52)
  44. #define AIRLESS_ROCKY_ALBEDO    (0.07)
  45. #define ROCKY_ALBEDO        (0.15)
  46. #define WATER_ALBEDO        (0.04)
  47. #define AIRLESS_ICE_ALBEDO    (0.5)
  48. #define ICE_ALBEDO        (0.7)
  49. #define SECONDS_PER_HOUR    (3600.0)
  50. #define CM_PER_AU        (1.495978707E13)/* number of cm in an AU    */
  51. #define CM_PER_KM        (1.0E5)        /* number of cm in a km     */
  52. #define CM_PER_METER        (100.0)
  53. #define MILLIBARS_PER_BAR    (1000.0)
  54. #define KELVIN_CELCIUS_DIFFERENCE    (273.0)
  55. #define GRAV_CONSTANT        (6.672E-8)    /* units of dyne cm2/gram2  */
  56. #define GREENHOUSE_EFFECT_CONST    (0.93)        /* affects inner radius..   */
  57. #define MOLAR_GAS_CONST        (8314.41)    /* units: g*m2/(sec2*K*mol) */
  58. #define K            (50.0)        /* K = gas/dust ratio       */
  59. #define B            (1.2E-5)    /* Used in Crit_mass calc   */
  60. #define DUST_DENSITY_COEFF    (2.0E-3)    /* A in Dole's paper        */
  61. #define    ALPHA            (5.0)        /* Used in density calcs    */
  62. #define    N            (3.0)        /* Used in density calcs    */
  63. #define J            (1.46E-19)    /* Used in day-length calcs (cm2/sec2 g) */
  64. #define INCREDIBLY_LARGE_NUMBER    (9.9999E37)
  65.  
  66.  
  67. /*  Now for a few molecular weights (used for RMS velocity calcs):     */
  68. /*  This table is from Dole's book "Habitable Planets for Man", p. 38  */
  69.  
  70. #define ATOMIC_HYDROGEN        (1.0)    /* H   */
  71. #define MOLECULAR_HYDROGEN    (2.0)    /* H2  */
  72. #define HELIUM            (4.0)    /* He  */
  73. #define ATOMIC_NITROGEN        (14.0)    /* N   */
  74. #define ATOMIC_OXYGEN        (16.0)    /* O   */
  75. #define METHANE            (16.0)    /* CH4 */
  76. #define AMMONIA            (17.0)    /* NH3 */
  77. #define WATER_VAPOR        (18.0)    /* H2O */
  78. #define NEON            (20.2)    /* Ne  */
  79. #define MOLECULAR_NITROGEN    (28.0)    /* N2  */
  80. #define CARBON_MONOXIDE        (28.0)    /* CO  */
  81. #define NITRIC_OXIDE        (30.0)    /* NO  */
  82. #define MOLECULAR_OXYGEN    (32.0)    /* O2  */
  83. #define HYDROGEN_SULPHIDE    (34.1)    /* H2S */
  84. #define ARGON            (39.9)    /* Ar  */
  85. #define CARBON_DIOXIDE        (44.0)    /* CO2 */
  86. #define NITROUS_OXIDE        (44.0)    /* N2O */
  87. #define NITROGEN_DIOXIDE    (46.0)    /* NO2 */
  88. #define OZONE            (48.0)    /* O3  */
  89. #define SULPHUR_DIOXIDE        (64.1)    /* SO2 */
  90. #define SULPHUR_TRIOXIDE    (80.1)    /* SO3 */
  91. #define KRYPTON            (83.8)    /* Kr  */
  92. #define XENON            (131.3)    /* Xe  */
  93.  
  94. /*  The following defines are used in the kothari_radius function in    */
  95. /*  file enviro.c.                            */
  96. #define    A1_20            (6.485E12)    /* All units are in cgs system.  */
  97. #define A2_20            (4.0032E-8)    /*   ie: cm, g, dynes, etc.      */
  98. #define BETA_20            (5.71E12)
  99.  
  100.  
  101. /*   The following defines are used in determining the fraction of a planet  */
  102. /*  covered with clouds in function cloud_fraction in file enviro.c.         */
  103. #define    Q1_36            (1.258E19)    /* grams    */
  104. #define Q2_36            (0.0698)    /* 1/Kelvin */
  105.