/Users/huttone/Devel/sedflux-new/sedflux/trunk/ew/sed/sed_const.h

Go to the documentation of this file.
00001 //---
00002 //
00003 // This file is part of sedflux.
00004 //
00005 // sedflux is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation; either version 2 of the License, or
00008 // (at your option) any later version.
00009 //
00010 // sedflux is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with sedflux; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 //
00019 //---
00020 
00021 #if !defined( SED_CONST_H )
00022 # define SED_CONST_H
00023 
00024 #define PROGRAM_NAME "sedflux"
00025 #define SED_MAJOR_VERSION_S "2"
00026 #define SED_MINOR_VERSION_S "0"
00027 #define SED_MICRO_VERSION_S "33"
00028 #define SED_VERSION_S SED_MAJOR_VERSION_S"."SED_MINOR_VERSION_S"."SED_MICRO_VERSION_S
00029 
00030 #define S_MAJOR_VERSION (2)
00031 #define S_MINOR_VERSION (0)
00032 #define S_MICRO_VERSION (33)
00033 
00034 #define S_CHECK_VERSION(major,minor,micro)    \
00035     (S_MAJOR_VERSION > (major) || \
00036      (S_MAJOR_VERSION == (major) && S_MINOR_VERSION > (minor)) || \
00037      (S_MAJOR_VERSION == (major) && S_MINOR_VERSION == (minor) && \
00038       S_MICRO_VERSION >= (micro)))
00039 
00040 #define S_MPS_PER_KNOT      (.51444)
00041 #define S_SECONDS_PER_HOUR  (3600.)
00042 #define S_SECONDS_PER_DAY   (86400.)
00043 #define S_DAYS_PER_SECOND   (1.157407407407407e-5)
00044 #define S_SECONDS_PER_YEAR  (31536000.)
00045 #define S_DAYS_PER_YEAR     (365.)
00046 #define S_YEARS_PER_DAY     (0.00273972602740)
00047 #define S_RADS_PER_DEGREE   (0.0174532925199433)
00048 #define S_DEGREES_PER_RAD   (57.2957795130823)
00049 
00050 #define S_GRAVITY           (9.81)          // Acceleration due to gravity (m/s/s)
00051 #define S_RHO_SEA_WATER     (1030.)         // Density of sea water (kg/m^3)
00052 #define S_RHO_FRESH_WATER   (1000.)         // Density of fresh water (kg/m^3)
00053 #define S_RHO_WATER         S_RHO_SEA_WATER
00054 #define S_ETA_WATER         (0.0014e-3)     // Kinematic viscosity of clear water (m^2/s)
00055 #define S_MU_WATER          (0.0014)        // Dynamic viscosity of water (kg/m/s)
00056 #define S_SALINITY_SEA      (35)            // Salinity of the ocean (psu)
00057 #define S_GAMMA_WATER       (10000.)        // Unit weight of water (N/m^3)
00058 #define S_GAMMA_GRAIN       (26500.)        // Unit weight of closely compacted sediment (N/m^3)
00059 #define S_VELOCITY_IN_WATER (1500.)         // Speed of sound in water (m/s)
00060 #define S_VELOCITY_IN_ROCK  (5230.)         // Speed of sound in rock (m/s)
00061 #define S_RHO_QUARTZ        (2650.)         // Density of quartz (kg/m^3)
00062 #define S_RHO_GRAIN         (S_RHO_QUARTZ)  // Maximum sediment density (kg/m^3)
00063 #define S_RHO_MANTLE        (3300.)         // Density of the mantle (kg/m^3)
00064 
00065 typedef enum
00066 {
00067    UNITS_MKS,
00068    UNITS_CGS,
00069    UNITS_IMPERIAL
00070 }
00071 Sed_units;
00072 
00073 typedef struct
00074 {
00075    double gravity;
00076    double rho_sea_h2o;
00077    double rho_h2o;
00078    double eta_h2o;
00079    double mu_h2o;
00080    double salinity;
00081    double rho_quartz;
00082    double rho_mantle;
00083 }
00084 Sed_constants;
00085 
00086 #define SED_INIT_CONSTANTS { S_GRAVITY , S_RHO_SEA_WATER , S_RHO_FRESH_WATER , S_MU_WATER , S_ETA_WATER , S_SALINITY_SEA , S_RHO_MANTLE }
00087 
00088 #define years_to_secs( a ) ( (a)*S_SECONDS_PER_YEAR )
00089 #define secs_to_years( a ) ( (a)/S_SECONDS_PER_YEAR )
00090 
00091 #ifndef FRAC
00092 # define FRAC(a) ( (a) - (int)(a) )
00093 #endif
00094 #ifndef SWAP
00095 # define SWAP(a,b,a_type) { a_type temp=(a); (a)=(b); (b)=temp; }
00096 #endif
00097 
00098 #ifndef S_ADDBINS
00099 # define S_ADDBINS (512)
00100 #endif
00101 
00102 // Define the facies.
00103 #define S_FACIES_NOTHING     (0)
00104 #define S_FACIES_BEDLOAD     (1<<0)
00105 #define S_FACIES_PLUME       (1<<1)
00106 #define S_FACIES_DEBRIS_FLOW (1<<2)
00107 #define S_FACIES_TURBIDITE   (1<<3)
00108 #define S_FACIES_DIFFUSED    (1<<4)
00109 #define S_FACIES_RIVER       (1<<5)
00110 #define S_FACIES_WAVE        (1<<6)
00111 #define S_FACIES_ALONG_SHORE (1<<7)
00112 
00113 #define S_NORTH_EDGE ( 1<<0 )
00114 #define S_WEST_EDGE  ( 1<<1 )
00115 #define S_SOUTH_EDGE ( 1<<2 )
00116 #define S_EAST_EDGE  ( 1<<3 )
00117 
00118 #define DEFAULT_SEDIMENT_FILE { \
00119 "--- 'Grain 1 (bedload)' ---                                                 ",\
00120 "grain size (microns):       200                                             ",\
00121 "grain density (kg/m^3):     2625                                            ",\
00122 "saturated density (kg/m^3): 1850                                            ",\
00123 "minimum void ratio (-):     .30                                             ",\
00124 "plastic index (-):          .1                                              ",\
00125 "diffusion coefficient (-):  .25                                             ",\
00126 "removal rate (1/day):       50                                              ",\
00127 "consolidation coefficient (m^2/yr): 100000                                  ",\
00128 "compaction coefficient (-): 0.0000000368                                    ",\
00129 "--- 'Grain 2' ---                                                           ",\
00130 "grain size (microns):       100                                             ",\
00131 "grain density (kg/m^3):     2600                                            ",\
00132 "saturated density (kg/m^3): 1800                                            ",\
00133 "minimum void ratio (-):     .2                                              ",\
00134 "plastic index (-):          .2                                              ",\
00135 "diffusion coefficient (-):  .25                                             ",\
00136 "removal rate (1/day):       16.8                                            ",\
00137 "consolidation coefficient (m^2/yr): 10000                                   ",\
00138 "compaction coefficient (-): 0.00000005                                      ",\
00139 "--- 'Grain 3' ---                                                           ",\
00140 "grain size (microns):       40                                              ",\
00141 "grain density (kg/m^3):     2550                                            ",\
00142 "saturated density (kg/m^3): 1750                                            ",\
00143 "minimum void ratio (-):     .15                                             ",\
00144 "plastic index (-):          .3                                              ",\
00145 "diffusion coefficient (-):  .5                                              ",\
00146 "removal rate (1/day):       9                                               ",\
00147 "consolidation coefficient (m^2/yr): 1000                                    ",\
00148 "compaction coefficient (-): 0.00000007                                      ",\
00149 "--- 'Grain 4' ---                                                           ",\
00150 "grain size (microns):       10                                              ",\
00151 "grain density (kg/m^3):     2500                                            ",\
00152 "saturated density (kg/m^3): 1700                                            ",\
00153 "minimum void ratio (-):     .1                                              ",\
00154 "plastic index (-):          .4                                              ",\
00155 "diffusion coefficient (-):  .75                                             ",\
00156 "removal rate (1/day):       3.2                                             ",\
00157 "consolidation coefficient (m^2/yr): 100                                     ",\
00158 "compaction coefficient (-): 0.00000008                                      ",\
00159 "--- 'Grain 5' ---                                                           ",\
00160 "grain size (microns):       1                                               ",\
00161 "grain density (kg/m^3):     2450                                            ",\
00162 "saturated density (kg/m^3): 1650                                            ",\
00163 "minimum void ratio (-):     .05                                             ",\
00164 "plastic index (-):          .5                                              ",\
00165 "diffusion coefficient (-):  1.                                              ",\
00166 "removal rate (1/day):       2.4                                             ",\
00167 "consolidation coefficient (m^2/yr): 10                                      ",\
00168 "compaction coefficient (-): 0.000000368                                     ",\
00169 NULL }
00170 
00171 #define DEFAULT_HYDRO_INLINE_FILE { \
00172 "Number of grain sizes:                    5                                 ",\
00173 "Event duration:                           .25y                              ",\
00174 "Bedload (kg/s):                           100.0                             ",\
00175 "Suspended load concentrations (kg/m^3):   1.0,      1.0,      1.0,      1.0 ",\
00176 "Velocity (m/s):                           1                                 ",\
00177 "Width (m):                                100.0                             ",\
00178 "Depth (m):                                2.0                               ",\
00179 NULL }
00180 
00181 
00182 #endif
00183 

Generated on Fri Jan 4 18:04:15 2008 for sedflux by  doxygen 1.5.2