00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef INFLOW_LOCAL_IS_INCLUDED
00022 # define INFLOW_LOCAL_IS_INCLUDED
00023
00024 #define TURBIDITY_CURRENT_DEFAULT_EA (0.00153)
00025 #define TURBIDITY_CURRENT_DEFAULT_EB (0.00204)
00026 #define TURBIDITY_CURRENT_DEFAULT_SUA (400.)
00027 #define TURBIDITY_CURRENT_DEFAULT_SUB (2.0)
00028 #define TURBIDITY_CURRENT_DEFAULT_CD (0.004)
00029 #define TURBIDITY_CURRENT_DEFAULT_TAN_PHI (0.36397023426620)
00030 #define TURBIDITY_CURRENT_DEFAULT_MU (1.3e-6)
00031 #define TURBIDITY_CURRENT_DEFAULT_DENSITY_SEA_WATER (1028.)
00032 #define TURBIDITY_CURRENT_DEFAULT_CHANNEL_WIDTH (100.0)
00033 #define TURBIDITY_CURRENT_DEFAULT_CHANNEL_LENGTH (30000.0)
00034
00035 #include <glib.h>
00036 #include <sed/sed_sedflux.h>
00037 #include "inflow.h"
00038
00039 typedef struct
00040 {
00041 double* x;
00042 double* depth;
00043 double* width;
00044 double* slope;
00045 gint len;
00046 }
00047 Inflow_bathy_st;
00048
00049 typedef struct
00050 {
00051 double duration;
00052 double width;
00053 double depth;
00054 double velocity;
00055 double q;
00056 double* fraction;
00057 double rho_flow;
00058 gint n_grains;
00059 }
00060 Inflow_flood_st;
00061
00062 typedef struct
00063 {
00064 double* size_equiv;
00065 double* lambda;
00066 double* bulk_density;
00067 double* grain_density;
00068 gint n_grains;
00069 }
00070 Inflow_sediment_st;
00071
00072 #define INFLOW_DEFAULT_BASIN_LEN (50.)
00073 #define INFLOW_DEFAULT_DX (10.)
00074 #define INFLOW_DEFAULT_RHO_SEA_WATER (1028.)
00075
00076 #define INFLOW_DEFAULT_LAMBDA { 25. , 16.8 , 9. , 3.2 , 2.4 }
00077 #define INFLOW_DEFAULT_SIZE_EQUIV { 202. , 105. , 69. , 25. , 10. }
00078 #define INFLOW_DEFAULT_SIZE_COMP { 150. , 50. , 25. , 5. , 1. }
00079 #define INFLOW_DEFAULT_GRAIN_FRACTION { 0. , .1 , .2 , .3 , .4 }
00080 #define INFLOW_DEFAULT_FLOW_FRACTION { 1. , 1. , 1. , 1. , 1. }
00081 #define INFLOW_DEFAULT_BULK_DENSITY { 1850. , 1600. , 1400. , 1300. , 1200. }
00082 #define INFLOW_DEFAULT_GRAIN_DENSITY { 2650. , 2650. , 2650. , 2650. , 2650. }
00083 #define INFLOW_DEFAULT_DEP_START (2.)
00084 #define INFLOW_DEFAULT_SIZE_BOTTOM (64.)
00085 #define INFLOW_DEFAULT_BULK_DENSITY_BOTTOM (1600.)
00086 #define INFLOW_DEFAULT_BOTTOM_FRACTION { .2 , .2 , .2 , .2 , .2 }
00087 #define INFLOW_DEFAULT_N_GRAINS (5)
00088
00089 #define INFLOW_DEFAULT_SUA (30.)
00090 #define INFLOW_DEFAULT_SUB (.2)
00091 #define INFLOW_DEFAULT_EA (0.00153)
00092 #define INFLOW_DEFAULT_EB (0.00204)
00093 #define INFLOW_DEFAULT_CD (0.004)
00094 #define INFLOW_DEFAULT_FRICTION_ANGLE (20.)
00095 #define INFLOW_DEFAULT_MU_WATER (1.3)
00096
00097 #define INFLOW_DEFAULT_FLOOD_FILE "flood.kvf"
00098
00099 typedef struct
00100 {
00101 double basin_len;
00102 double dx;
00103 double rho_sea_water;
00104 double rho_river_water;
00105 double* lambda;
00106 double* size_equiv;
00107 double* size_comp;
00108 double* grain_fraction;
00109 double* flow_fraction;
00110 double* bulk_density;
00111 double* grain_density;
00112 double dep_start;
00113 double size_bottom;
00114 double rho_bottom;
00115 double* bottom_fraction;
00116 double sua;
00117 double sub;
00118 double e_a;
00119 double e_b;
00120 double c_drag;
00121 double tan_phi;
00122 double mu_water;
00123 char* flood_file;
00124 gint n_grains;
00125
00126 double channel_width;
00127 double channel_len;
00128 }
00129 Inflow_param_st;
00130
00131 typedef struct
00132 {
00133 double* phe_bottom;
00134 int n_grains;
00135 }
00136 Inflow_bottom_st;
00137
00138 gboolean inflow_wrapper( Inflow_bathy_st* b ,
00139 Inflow_flood_st* f ,
00140 Inflow_sediment_st* s ,
00141 Inflow_const_st* c ,
00142 double** deposition ,
00143 double** erosion );
00144
00145 Inflow_param_st* inflow_scan_parameter_file( const gchar* file , GError** error );
00146 Inflow_param_st* inflow_check_params ( Inflow_param_st* p , GError** error );
00147 Inflow_bathy_st* inflow_scan_bathy_file ( const gchar* file , Inflow_param_st* p , GError** error );
00148 Inflow_flood_st** inflow_scan_flood_file ( const gchar* file , Inflow_param_st* p , GError** error );
00149 Inflow_flood_st* inflow_set_flood_data ( Sed_hydro h , double rho_river_water );
00150 Inflow_flood_st* inflow_destroy_flood_data ( Inflow_flood_st* f );
00151 Inflow_sediment_st* inflow_set_sediment_data ( Inflow_param_st* p );
00152 Inflow_const_st* inflow_set_constant_data ( Inflow_param_st* p );
00153 Inflow_bathy_st* inflow_set_bathy_data ( double** bathy , gint len , double dx , double basin_len );
00154 Inflow_bathy_st* inflow_destroy_bathy_data ( Inflow_bathy_st* b );
00155 Inflow_bathy_st* inflow_update_bathy_data ( Inflow_bathy_st* b , double** deposition , double** erosion , gint n_grains );
00156 gint inflow_write_output ( const gchar* file ,
00157 Inflow_bathy_st* b ,
00158 double** deposit ,
00159 gssize n_grains );
00160
00161 void inflow_get_phe( Inflow_phe_query_st* query_data , Inflow_bottom_st* bed_data );
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190 #endif