#include <glib.h>
#include <sed/sed_sedflux.h>
#include "inflow.h"
Go to the source code of this file.
#define INFLOW_DEFAULT_BASIN_LEN (50.) |
Definition at line 72 of file inflow_local.h.
#define INFLOW_DEFAULT_BOTTOM_FRACTION { .2 , .2 , .2 , .2 , .2 } |
Definition at line 86 of file inflow_local.h.
#define INFLOW_DEFAULT_BULK_DENSITY { 1850. , 1600. , 1400. , 1300. , 1200. } |
Definition at line 81 of file inflow_local.h.
#define INFLOW_DEFAULT_BULK_DENSITY_BOTTOM (1600.) |
Definition at line 85 of file inflow_local.h.
#define INFLOW_DEFAULT_CD (0.004) |
Definition at line 93 of file inflow_local.h.
#define INFLOW_DEFAULT_DEP_START (2.) |
Definition at line 83 of file inflow_local.h.
#define INFLOW_DEFAULT_DX (10.) |
Definition at line 73 of file inflow_local.h.
#define INFLOW_DEFAULT_EA (0.00153) |
Definition at line 91 of file inflow_local.h.
#define INFLOW_DEFAULT_EB (0.00204) |
Definition at line 92 of file inflow_local.h.
#define INFLOW_DEFAULT_FLOOD_FILE "flood.kvf" |
Definition at line 97 of file inflow_local.h.
#define INFLOW_DEFAULT_FLOW_FRACTION { 1. , 1. , 1. , 1. , 1. } |
Definition at line 80 of file inflow_local.h.
#define INFLOW_DEFAULT_FRICTION_ANGLE (20.) |
Definition at line 94 of file inflow_local.h.
#define INFLOW_DEFAULT_GRAIN_DENSITY { 2650. , 2650. , 2650. , 2650. , 2650. } |
Definition at line 82 of file inflow_local.h.
#define INFLOW_DEFAULT_GRAIN_FRACTION { 0. , .1 , .2 , .3 , .4 } |
Definition at line 79 of file inflow_local.h.
#define INFLOW_DEFAULT_LAMBDA { 25. , 16.8 , 9. , 3.2 , 2.4 } |
Definition at line 76 of file inflow_local.h.
#define INFLOW_DEFAULT_MU_WATER (1.3) |
Definition at line 95 of file inflow_local.h.
#define INFLOW_DEFAULT_N_GRAINS (5) |
Definition at line 87 of file inflow_local.h.
#define INFLOW_DEFAULT_RHO_SEA_WATER (1028.) |
Definition at line 74 of file inflow_local.h.
#define INFLOW_DEFAULT_SIZE_BOTTOM (64.) |
Definition at line 84 of file inflow_local.h.
#define INFLOW_DEFAULT_SIZE_COMP { 150. , 50. , 25. , 5. , 1. } |
Definition at line 78 of file inflow_local.h.
#define INFLOW_DEFAULT_SIZE_EQUIV { 202. , 105. , 69. , 25. , 10. } |
Definition at line 77 of file inflow_local.h.
#define INFLOW_DEFAULT_SUA (30.) |
Definition at line 89 of file inflow_local.h.
#define INFLOW_DEFAULT_SUB (.2) |
Definition at line 90 of file inflow_local.h.
#define TURBIDITY_CURRENT_DEFAULT_CD (0.004) |
Definition at line 28 of file inflow_local.h.
#define TURBIDITY_CURRENT_DEFAULT_CHANNEL_LENGTH (30000.0) |
Definition at line 33 of file inflow_local.h.
#define TURBIDITY_CURRENT_DEFAULT_CHANNEL_WIDTH (100.0) |
Definition at line 32 of file inflow_local.h.
#define TURBIDITY_CURRENT_DEFAULT_DENSITY_SEA_WATER (1028.) |
Definition at line 31 of file inflow_local.h.
#define TURBIDITY_CURRENT_DEFAULT_EA (0.00153) |
Definition at line 24 of file inflow_local.h.
#define TURBIDITY_CURRENT_DEFAULT_EB (0.00204) |
Definition at line 25 of file inflow_local.h.
#define TURBIDITY_CURRENT_DEFAULT_MU (1.3e-6) |
Definition at line 30 of file inflow_local.h.
#define TURBIDITY_CURRENT_DEFAULT_SUA (400.) |
Definition at line 26 of file inflow_local.h.
#define TURBIDITY_CURRENT_DEFAULT_SUB (2.0) |
Definition at line 27 of file inflow_local.h.
#define TURBIDITY_CURRENT_DEFAULT_TAN_PHI (0.36397023426620) |
Definition at line 29 of file inflow_local.h.
Inflow_param_st* inflow_check_params | ( | Inflow_param_st * | p, | |
GError ** | error | |||
) |
Definition at line 109 of file inflow_io.c.
References Inflow_param_st::basin_len, Inflow_param_st::bottom_fraction, Inflow_param_st::bulk_density, Inflow_param_st::c_drag, Inflow_param_st::dep_start, Inflow_param_st::dx, Inflow_param_st::e_a, Inflow_param_st::e_b, eh_check_to_s(), eh_dbl_array_cmp_ge(), eh_dbl_array_each_ge(), eh_dbl_array_each_le(), eh_require, eh_return_val_if_fail, eh_set_error_strv(), Inflow_param_st::flow_fraction, Inflow_param_st::grain_density, INFLOW_ERROR, INFLOW_ERROR_BAD_PARAMETER, Inflow_param_st::lambda, Inflow_param_st::mu_water, Inflow_param_st::n_grains, Inflow_param_st::rho_bottom, Inflow_param_st::rho_river_water, Inflow_param_st::rho_sea_water, Inflow_param_st::size_bottom, Inflow_param_st::size_comp, Inflow_param_st::size_equiv, Inflow_param_st::sua, Inflow_param_st::sub, and Inflow_param_st::tan_phi.
Referenced by inflow_scan_parameter_file().
Inflow_bathy_st* inflow_destroy_bathy_data | ( | Inflow_bathy_st * | b | ) |
Definition at line 264 of file inflow_io.c.
References Inflow_bathy_st::depth, eh_free, Inflow_bathy_st::slope, Inflow_bathy_st::width, and Inflow_bathy_st::x.
Referenced by sed_inflow().
Inflow_flood_st* inflow_destroy_flood_data | ( | Inflow_flood_st * | f | ) |
Definition at line 338 of file inflow_io.c.
References eh_free, and Inflow_flood_st::fraction.
Referenced by sed_inflow().
void inflow_get_phe | ( | Inflow_phe_query_st * | query_data, | |
Inflow_bottom_st * | bed_data | |||
) |
Inflow_bathy_st* inflow_scan_bathy_file | ( | const gchar * | file, | |
Inflow_param_st * | p, | |||
GError ** | error | |||
) |
Definition at line 170 of file inflow_io.c.
References Inflow_param_st::basin_len, Inflow_param_st::dx, eh_dlm_read_swap(), eh_free_2, eh_require, eh_return_val_if_fail, inflow_set_bathy_data(), and INFLOW_TEST_BATHY_FILE.
Referenced by main().
Inflow_flood_st** inflow_scan_flood_file | ( | const gchar * | file, | |
Inflow_param_st * | p, | |||
GError ** | error | |||
) |
Definition at line 278 of file inflow_io.c.
References eh_free, eh_new0, eh_return_val_if_fail, inflow_set_flood_data(), INFLOW_TEST_FLOOD_FILE, Inflow_param_st::rho_river_water, sed_hydro_destroy(), and sed_hydro_scan().
Referenced by main().
Inflow_param_st* inflow_scan_parameter_file | ( | const gchar * | file, | |
GError ** | error | |||
) |
Definition at line 65 of file inflow_io.c.
References Inflow_param_st::basin_len, Inflow_param_st::dep_start, eh_dbl_array_mult(), eh_free, eh_key_file_scan_from_template(), eh_new, eh_return_val_if_fail, inflow_check_params(), INFLOW_TEST_PARAM_FILE, Inflow_param_st::lambda, Inflow_param_st::mu_water, Inflow_param_st::n_grains, S_DAYS_PER_SECOND, Inflow_param_st::size_comp, Inflow_param_st::size_equiv, and Inflow_param_st::tan_phi.
Referenced by main().
Inflow_bathy_st* inflow_set_bathy_data | ( | double ** | bathy, | |
gint | len, | |||
double | dx, | |||
double | basin_len | |||
) |
Definition at line 230 of file inflow_io.c.
References Inflow_bathy_st::depth, eh_new, eh_require, eh_uniform_array(), interpolate(), Inflow_bathy_st::len, Inflow_bathy_st::slope, Inflow_bathy_st::width, and Inflow_bathy_st::x.
Referenced by inflow_scan_bathy_file(), and inflow_set_bathy_data_from_cube().
Inflow_const_st* inflow_set_constant_data | ( | Inflow_param_st * | p | ) |
Definition at line 372 of file inflow_io.c.
References Inflow_param_st::bottom_fraction, Inflow_param_st::c_drag, Inflow_const_st::c_drag, Inflow_param_st::channel_len, Inflow_const_st::channel_len, Inflow_param_st::channel_width, Inflow_const_st::channel_width, Inflow_param_st::dep_start, Inflow_const_st::dep_start, Inflow_param_st::e_a, Inflow_const_st::e_a, Inflow_param_st::e_b, Inflow_const_st::e_b, eh_new, Inflow_const_st::get_phe, Inflow_const_st::get_phe_data, inflow_get_phe(), Inflow_param_st::mu_water, Inflow_const_st::mu_water, Inflow_param_st::n_grains, Inflow_bottom_st::n_grains, Inflow_bottom_st::phe_bottom, Inflow_param_st::rho_river_water, Inflow_const_st::rho_river_water, Inflow_param_st::rho_sea_water, Inflow_const_st::rho_sea_water, Inflow_param_st::sua, Inflow_const_st::sua, Inflow_param_st::sub, Inflow_const_st::sub, Inflow_param_st::tan_phi, and Inflow_const_st::tan_phi.
Referenced by main().
Inflow_flood_st* inflow_set_flood_data | ( | Sed_hydro | h, | |
double | rho_river_water | |||
) |
Definition at line 317 of file inflow_io.c.
References Inflow_flood_st::depth, Inflow_flood_st::duration, eh_new, Inflow_flood_st::fraction, Inflow_flood_st::n_grains, Inflow_flood_st::q, Inflow_flood_st::rho_flow, sed_hydro_depth(), sed_hydro_duration_in_seconds(), sed_hydro_flow_density(), sed_hydro_fraction(), sed_hydro_size(), sed_hydro_velocity(), sed_hydro_water_flux(), sed_hydro_width(), Inflow_flood_st::velocity, and Inflow_flood_st::width.
Referenced by inflow_scan_flood_file(), and sed_inflow().
Inflow_sediment_st* inflow_set_sediment_data | ( | Inflow_param_st * | p | ) |
Definition at line 349 of file inflow_io.c.
References Inflow_param_st::bulk_density, Inflow_sediment_st::bulk_density, eh_dbl_array_dup(), eh_new, Inflow_param_st::flow_fraction, Inflow_param_st::grain_density, Inflow_sediment_st::grain_density, Inflow_param_st::lambda, Inflow_sediment_st::lambda, Inflow_sediment_st::n_grains, Inflow_param_st::n_grains, Inflow_param_st::size_equiv, and Inflow_sediment_st::size_equiv.
Referenced by main().
Inflow_bathy_st* inflow_update_bathy_data | ( | Inflow_bathy_st * | b, | |
double ** | deposition, | |||
double ** | erosion, | |||
gint | n_grains | |||
) |
Definition at line 205 of file inflow_io.c.
References Inflow_bathy_st::depth, Inflow_bathy_st::len, Inflow_bathy_st::slope, and Inflow_bathy_st::x.
Referenced by inflow_run_flood().
gboolean inflow_wrapper | ( | Inflow_bathy_st * | b, | |
Inflow_flood_st * | f, | |||
Inflow_sediment_st * | s, | |||
Inflow_const_st * | c, | |||
double ** | deposition, | |||
double ** | erosion | |||
) |
Definition at line 45 of file inflow_io.c.
References Inflow_sediment_st::bulk_density, Inflow_const_st::dep_start, Inflow_flood_st::depth, Inflow_flood_st::duration, Inflow_flood_st::fraction, Inflow_sediment_st::grain_density, inflow(), Inflow_sediment_st::lambda, Inflow_bathy_st::len, Inflow_sediment_st::n_grains, Inflow_flood_st::q, Inflow_flood_st::rho_flow, Inflow_const_st::rho_river_water, Inflow_sediment_st::size_equiv, Inflow_bathy_st::slope, Inflow_flood_st::velocity, Inflow_flood_st::width, Inflow_bathy_st::width, and Inflow_bathy_st::x.
Referenced by inflow_run_flood(), and sed_inflow().
gint inflow_write_output | ( | const gchar * | file, | |
Inflow_bathy_st * | b, | |||
double ** | deposit, | |||
gssize | n_grains | |||
) |
Definition at line 400 of file inflow_io.c.
References Inflow_bathy_st::depth, eh_open_file(), Inflow_bathy_st::len, Inflow_bathy_st::width, and Inflow_bathy_st::x.
Referenced by main().