/Users/huttone/Devel/sedflux-new/sedflux/trunk/ew/inflow/inflow.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 #ifndef INFLOW_IS_INCLUDED
00022 # define INFLOW_IS_INCLUDED
00023 
00024 
00025 /*
00026 // Old defaults.
00027 #define INFLOW_DEFAULT_SUA                      (400.)
00028 #define INFLOW_DEFAULT_SUB                      (2.0)
00029 #define INFLOW_DEFAULT_EA                (0.00153)
00030 #define INFLOW_DEFAULT_EB                (0.00204)
00031 #define INFLOW_DEFAULT_CD                (0.004)
00032 #define INFLOW_DEFAULT_TAN_PHI           (0.36397023426620)
00033 #define INFLOW_DEFAULT_MU                (1.3e-6)
00034 #define INFLOW_DEFAULT_DENSITY_SEA_WATER (1028.)
00035 #define INFLOW_DEFAULT_CHANNEL_WIDTH     (100.0)
00036 #define INFLOW_DEFAULT_CHANNEL_LENGTH    (30000.0)
00037 */
00038 #include <stdio.h>
00039 #include <glib.h>
00040 #include <sed/sed_sedflux.h>
00041 
00042 #include <sed/datadir_path.h>
00043 #if !defined( DATADIR )
00044 # define DATADIR "/usr/local/share"
00045 #endif
00046 #define INFLOW_TEST_PARAM_FILE DATADIR "/ew/inflow_param.kvf"
00047 #define INFLOW_TEST_BATHY_FILE DATADIR "/ew/inflow_bathy.csv"
00048 #define INFLOW_TEST_FLOOD_FILE DATADIR "/ew/inflow_flood.kvf"
00049 
00050 typedef enum
00051 {
00052    INFLOW_ERROR_BAD_PARAMETER
00053 }
00054 Inflow_error;
00055 
00056 #define INFLOW_ERROR inflow_error_quark()
00057 
00058 typedef struct
00059 {
00060    double x;            //< Position to query
00061    double dx;           //< Grid spacing
00062    double erode_depth;  //< Burial depth to query
00063    double *phe;         //< Fraction of each grain size
00064 }
00065 Inflow_phe_query_st;
00066 
00067 typedef void (*Inflow_query_func) ( Inflow_phe_query_st* data , gpointer user_data );
00068 
00069 typedef struct
00070 {
00071    double e_a;
00072    double e_b;
00073    double sua;
00074    double sub;
00075    double c_drag;
00076    double tan_phi;
00077    double mu_water;
00078    double rho_river_water;
00079    double rho_sea_water;
00080    double channel_width;
00081    double channel_len;
00082    double dep_start;
00083 
00084    Inflow_query_func get_phe;
00085    gpointer          get_phe_data;
00086 }
00087 Inflow_const_st;
00088 
00089 gboolean inflow( double day       , double x[]        , double slopeX[]  ,
00090                  double wX[]      , int nNodes        , double dx        , 
00091                  double xDep      , double riverWidth , double u0        ,
00092                  double h0        , double dc         , double *gzF      ,
00093                  double *grainDia , double *lambda    , double *rhoSed   ,
00094                  double *rhoGrain , int nGrains       , double rho0      ,
00095                  double rhoF0     , Inflow_const_st* c, double **deposit ,
00096                  double** eroded  , FILE *fpout );
00097 Sed_hydro inflow_flood_from_cell( Sed_cell c , double area );
00098 gboolean  sed_inflow( Sed_cube         p       ,
00099                       Sed_hydro        f       ,
00100                       gint             i_start ,
00101                       double           dx      ,
00102                       Inflow_const_st* c );
00103 
00104 #endif /* inflow.h is included */

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