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(PLUME_TYPES_H) 00022 # define PLUME_TYPES_H 00023 00024 typedef struct 00025 { 00026 double *x; // i's 00027 double *y; // j's 00028 double ***z; // (n,i,j) 00029 int imax, jmax, nmax; 00030 double total_mass; 00031 } grid_type_3d; 00032 00033 typedef struct 00034 { 00035 double *x; // i's 00036 double **z; // (n,i) 00037 int xmax; 00038 } grid_type_2d; 00039 00040 typedef struct 00041 { 00042 double Cw; // ocean sediment concentration (kg/m^3) [0:min(Cs)] 00043 double vo; // alongshore current magnitude (m/s) [-3:3] 00044 double vdirection; // alongshore current direction (degN) [0:360] 00045 double cc; // Coastal Current width = cc*inertial length scale [0.1:1] 00046 double So; // Conservative Tracer Property, River concentration 00047 double Sw; // Conservative Tracer Property, Ocean concentration 00048 } 00049 Plume_ocean; 00050 00051 typedef struct 00052 { 00053 double *Cs; // River Concentration (kg/m^3) [0.001:100] 00054 double Q; // discharge (m^3/s) [1:1e6] 00055 double u0; // velocity (m/s) [0.01:10] 00056 double rdirection; // river mouth direction (degN) [0:360] 00057 double b0; // river mouth width (m) [1.0:1e5] 00058 double d0; // river depth (m) [calculated] 00059 double rma; // River mouth angle (degrees), + is in plus y dir. 00060 } 00061 Plume_river; 00062 00063 typedef struct 00064 { 00065 double lambda; // removal rate coefficient, input (1/day) [0.1:40] 00066 // immediately convert to (1/s) 00067 double rho; // density of sediment (kg/m^3) [1100:2600] 00068 double grainsize; // used by SEDFLUX3D 00069 double diff_coef; // used by SEDFLUX3D 00070 } 00071 Plume_sediment; 00072 00073 // user defined variables for the 2DSEDFLUX plume. 00074 typedef struct 00075 { 00076 double current_velocity; 00077 double ocean_concentration; 00078 double plume_width; 00079 int ndx; 00080 int ndy; 00081 } 00082 Plume_inputs; 00083 00084 typedef struct 00085 { 00086 int fjrd; 00087 int kwf; 00088 int strt; 00089 int o1; 00090 int o2; 00091 int o3; 00092 } 00093 Plume_options; 00094 00095 // the various grids used for the plume. 00096 typedef struct 00097 { 00098 double ***ccnc; 00099 double ***ncnc; 00100 double ***deps; 00101 double ***dist; 00102 double **ualb; 00103 double **pcent; 00104 double **sln; 00105 double *xval; 00106 double *yval; 00107 int lc; 00108 int lpc; 00109 int lx; 00110 int ly; 00111 int lz; 00112 int zx; 00113 int zy; 00114 double ymax; 00115 double ymin; 00116 double xmax; 00117 double xmin; 00118 double dy; 00119 double dx; 00120 double max_len; 00121 int y_len; 00122 int x_len; 00123 int ndy; 00124 int ndx; 00125 } 00126 Plume_grid; 00127 00128 typedef struct 00129 { 00130 double Qsr; 00131 double Qsw[4]; 00132 double Tsr; 00133 double Tsd[2]; 00134 double merr; 00135 } 00136 Plume_mass_bal; 00137 00138 typedef struct 00139 { 00140 Plume_river* river; 00141 Plume_sediment* sed; 00142 Plume_ocean* ocean; 00143 int n_grains; 00144 int lat; 00145 } 00146 Plume_enviro; 00147 00148 typedef Plume_grid Plume_data; 00149 00150 #endif 00151