Submarine Diffusion


Defines

#define SKIN_DEPTH_PERCENT   (1.)
#define DIFFUSION_OPT_FILL   (1<<0)
#define DIFFUSION_OPT_LAND   (1<<1)
#define DIFFUSION_OPT_WATER   (1<<2)

Functions

Sed_celldiffuse_sediment (Sed_cube prof, double k_max, double skin_depth, double dt, int options)
void get_diffusion_components (Eh_dbl_grid slope_dir, Eh_dbl_grid k_long, Eh_dbl_grid k_cross, Eh_dbl_grid k_x, Eh_dbl_grid k_y)
Eh_dbl_grid diffuse_grid (Eh_dbl_grid g, double **k_x, double **k_y, double dt, double dx, double dy)
Sed_celldiffuse_sediment_2 (Sed_cube prof, double k_long_max, double k_cross_max, double skin_depth, double dt, int options)

Define Documentation

#define DIFFUSION_OPT_FILL   (1<<0)

Definition at line 44 of file diffusion.c.

Referenced by diffuse_profile(), diffuse_sediment(), and diffuse_sediment_2().

#define DIFFUSION_OPT_LAND   (1<<1)

Definition at line 45 of file diffusion.c.

Referenced by diffuse_profile(), diffuse_sediment(), and diffuse_sediment_2().

#define DIFFUSION_OPT_WATER   (1<<2)

Definition at line 46 of file diffusion.c.

Referenced by main(), run_diffusion(), and test_2d().

#define SKIN_DEPTH_PERCENT   (1.)

Definition at line 42 of file diffusion.c.

Referenced by diffuse_sediment(), and diffuse_sediment_2().


Function Documentation

Eh_dbl_grid diffuse_grid ( Eh_dbl_grid  g,
double **  k_x,
double **  k_y,
double  dt,
double  dx,
double  dy 
)

Solve the diffusion equation on a grid

Parameters:
g A Eh_dbl_grid
k_x Diffusion coefficients in the x-direction
k_y Diffusion coefficients in the y-direction
dt Time step
dx Grid spacing in the x-direction
dy Grid spacing in the y-direction
Returns:
The input Eh_dbl_grid g that has been diffused

Definition at line 1106 of file diffusion.c.

References eh_dbl_grid_data(), eh_dbl_grid_set_val(), eh_grid_data(), eh_grid_destroy(), eh_grid_n_x(), eh_grid_n_y(), eh_grid_new, and eh_grid_set_data().

Referenced by diffuse_sediment_2().

Sed_cell* diffuse_sediment ( Sed_cube  prof,
double  k_max,
double  skin_depth,
double  dt,
int  options 
)

1D-diffusion of seafloor elevations.

Diffuse sediment using the diffusion equation:

\[ { \partial u \over \partial t } = {\partial q(x) \over \partial x} \]

where,

\[ q(x) = k(x,D,H){ \partial u(x) \over \partial x } \]

where, $ u $ is bathymetric elevation, $ t $ is time, $ q $ is sediment flux, $ x $ is position, $ k $ is the diffusion coefficient, $ D $ is grain size, and $ H $ is wave height.

the diffusion coefficient ($ k $) will also fall off exponentially with depth. for each sediment column of the profile, we calculate the maximum amount of sediment that can be moved from that cell using the above diffusion equation. this amount is then adjusted for grain type. every grain type is given an alpha value between zero and one that characterizes its ability to be moved. zero indicates that it is difficult to move, one that it is easy to move.

Parameters:
prof A Sed_cube to diffuse.
k_max The maximum value for the diffusion coefficent
skin_depth The depth at which $ k $ reached 1% of it's maximum
dt The time step of the diffusion
options Options that control the method of diffusion
Returns:
A Sed_cell array of sediment that was lost

Definition at line 81 of file diffusion.c.

References DIFFUSION_OPT_FILL, DIFFUSION_OPT_LAND, eh_free, eh_new, eh_new0, eh_require, S_FACIES_DIFFUSED, S_FACIES_RIVER, sed_cell_add(), sed_cell_clear(), sed_cell_copy(), sed_cell_destroy(), sed_cell_move_fraction(), sed_cell_new(), sed_cell_resize(), sed_cell_set_age(), sed_cell_set_facies(), sed_cell_set_fraction(), sed_column_add_cell(), sed_column_separate_top(), sed_cube_age_in_years(), sed_cube_col(), sed_cube_find_all_river_mouths(), sed_cube_find_column_above(), sed_cube_is_1d(), sed_cube_n_y(), sed_cube_sea_level(), sed_cube_top_height(), sed_cube_water_depth(), sed_cube_y_res(), sed_cube_y_slope(), sed_sediment_env_n_types(), sed_sediment_property(), sed_type_diff_coef(), and SKIN_DEPTH_PERCENT.

Referenced by diffuse_profile(), main(), and run_diffusion().

Sed_cell* diffuse_sediment_2 ( Sed_cube  prof,
double  k_long_max,
double  k_cross_max,
double  skin_depth,
double  dt,
int  options 
)

2D-diffusion of seafloor elevations.

Diffuse sediment using the 2D-diffusion equation:

\[ { \partial u \over \partial t } = {\partial q_x(x,y) \over \partial x} + {\partial q_y(x,y) \over \partial y} \]

where,

\[ q_x(x,y) = k_x(x,y,D,H){ \partial u(x,y) \over \partial x } \]

and

\[ q_y(x,y) = k_y(x,y,D,H){ \partial u(x,y) \over \partial y } \]

where, $ u $ is bathymetric elevation, $ t $ is time, $ q $ is sediment flux, $ x $ and $ y $ are position, $ k $ is the diffusion coefficient, $ D $ is grain size, and $ H $ is wave height.

the diffusion coefficient ($ k $) will also fall off exponentially with depth. for each sediment column of the profile, we calculate the maximum amount of sediment that can be moved from that cell using the above diffusion equation. this amount is then adjusted for grain type. every grain type is given an alpha value between zero and one that characterizes its ability to be moved. zero indicates that it is difficult to move, one that it is easy to move.

Parameters:
prof A Sed_cube to diffuse.
k_long_max The maximum long-shore diffusion coefficent
k_cross_max The maximum cross-shore diffusion coefficent
skin_depth The depth at which $ k $ reached 1% of it's maximum
dt The time step of the diffusion
options Options that control the method of diffusion
Returns:
A Sed_cell array of sediment that was lost

Definition at line 425 of file diffusion.c.

References diffuse_grid(), DIFFUSION_OPT_FILL, DIFFUSION_OPT_LAND, eh_clamp, eh_dbl_grid_data(), eh_dbl_grid_set_val(), eh_dbl_grid_val(), eh_free, eh_grid_destroy(), eh_grid_n_x(), eh_grid_n_y(), eh_grid_new, eh_max, eh_new, eh_require_not_reached, get_diffusion_components(), S_FACIES_DIFFUSED, S_FACIES_RIVER, sed_cell_add(), sed_cell_clear(), sed_cell_copy(), sed_cell_destroy(), sed_cell_grid_data(), sed_cell_grid_free(), sed_cell_grid_init(), sed_cell_grid_new(), sed_cell_move_fraction(), sed_cell_new(), sed_cell_resize(), sed_cell_set_facies(), sed_cell_set_fraction(), sed_cell_size(), sed_column_add_cell(), sed_column_separate_top(), sed_column_top(), sed_cube_col_ij(), sed_cube_is_in_domain(), sed_cube_n_x(), sed_cube_n_y(), sed_cube_slope_dir_grid(), sed_cube_water_depth(), sed_cube_water_depth_grid(), sed_cube_x_res(), sed_cube_x_slope_grid(), sed_cube_y_res(), sed_cube_y_slope_grid(), sed_sediment_env_n_types(), sed_sediment_property(), sed_type_diff_coef(), and SKIN_DEPTH_PERCENT.

Referenced by run_diffusion(), and test_2d().

void get_diffusion_components ( Eh_dbl_grid  slope_dir,
Eh_dbl_grid  k_long,
Eh_dbl_grid  k_cross,
Eh_dbl_grid  k_x,
Eh_dbl_grid  k_y 
)

Definition at line 1061 of file diffusion.c.

References eh_dbl_grid_set_val(), eh_dbl_grid_val(), eh_grid_is_compatible(), eh_grid_n_x(), eh_grid_n_y(), and eh_require.

Referenced by diffuse_sediment_2().


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