R: Calculates Advective Velocities of the Pore Water and Solid...
setup.compaction.1D
R Documentation
Calculates Advective Velocities of the Pore Water and Solid Phase
in a Water Saturated Sediment assuming Steady State Compaction
Description
This function calculates the advective velocities of the pore water and
the solid phase in a sediment based on the assumption of steady state
compaction.
The velocities of the pore water (u) and the solid phase (v)
are calculated in the middle (mid) of the grid cells and the
interfaces (int).
One needs to specify the porosity at the interface (por.0), the
porosity at infinite depth (por.inf), the porosity profile
(por.grid) encoded as a 1D grid property
(see setup.prop.1D, as well as the advective
velocity of the solid phase at one particular depth (either at the sediment
water interface (v.0) or at infinite depth (v.inf)).
advective velocity of the solid phase at the sediment-water
interface (also referred to as the sedimentation velocity); if NULL
then v.inf must not be NULL [L/T]
v.inf
advective velocity of the solid phase at infinite depth
(also referred to as the burial velocity); if NULL then
v.0 must not be NULL [L/T]
por.0
porosity at the sediment-water interface
por.inf
porosity at infinite depth
por.grid
porosity profile specified as a 1D grid property
(see setup.prop.1D for details on the structure of this list)
Value
A list containing:
u
list with pore water advective velocities at the middle of the
grid cells (mid) and at the grid cell interfaces (int).
v
list with solid phase advective velocities at the middle of the
grid cells (mid) and at the grid cell interfaces (int).
Author(s)
Filip Meysman <filip.meysman@nioz.nl>,
Karline Soetaert <karline.soetaert@nioz.nl>
References
Meysman, F. J. R., Boudreau, B. P., Middelburg, J. J. (2005) Modeling Reactive Transport in Sediments Subject to Bioturbation and Compaction. Geochimica Et Cosmochimica Acta 69, 3601-3617
Examples
# setup of the 1D grid
L <-10
grid <- setup.grid.1D(x.up = 0, L = L, N = 20)
# attaching an exponential porosity profile to the 1D grid
# this uses the "p.exp" profile function
por.grid <- setup.prop.1D(func = p.exp, grid = grid,
y.0 = 0.9, y.inf = 0.5, x.att = 3)
# calculate the advective velocities
dummy <- setup.compaction.1D(v.0 = 1, por.0 = 0.9, por.inf = 0.5,
por.grid = por.grid)
u.grid <- dummy$u
v.grid <- dummy$v
# plotting the results
par(mfrow = c(2, 1), cex.main = 1.2, cex.lab = 1.2)
plot(por.grid$int, grid$x.int, pch = 19, ylim = c(L,0), xlim = c(0,1),
xlab = "", ylab = "depth [cm]", main = expression("porosity"),
axes = FALSE)
abline(h = 0)
axis(pos = 0, side = 2)
axis(pos = 0, side = 3)
plot(u.grid$int, grid$x.int, type = "l", lwd = 2, col = "blue",
ylim = c(L, 0), xlim = c(0, max(u.grid$int,v.grid$int)),
xlab = "", ylab = "depth [cm]",
main = "advective velocity [cm yr-1]", axes = FALSE)
abline(h = 0)
axis(pos = 0, side = 2)
axis(pos = 0, side = 3)
lines(v.grid$int, grid$x.int, lwd = 2, col = "red")
legend(x = "bottomright", legend = c("pore water","solid phase"),
col = c("blue", "red"), lwd = 2)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(ReacTran)
Loading required package: rootSolve
Loading required package: deSolve
Attaching package: 'deSolve'
The following object is masked from 'package:graphics':
matplot
Loading required package: shape
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ReacTran/setup.compaction.1D.Rd_%03d_medium.png", width=480, height=480)
> ### Name: setup.compaction.1D
> ### Title: Calculates Advective Velocities of the Pore Water and Solid
> ### Phase in a Water Saturated Sediment assuming Steady State Compaction
> ### Aliases: setup.compaction.1D
> ### Keywords: utilities
>
> ### ** Examples
>
>
> # setup of the 1D grid
>
> L <-10
> grid <- setup.grid.1D(x.up = 0, L = L, N = 20)
>
> # attaching an exponential porosity profile to the 1D grid
> # this uses the "p.exp" profile function
>
> por.grid <- setup.prop.1D(func = p.exp, grid = grid,
+ y.0 = 0.9, y.inf = 0.5, x.att = 3)
>
> # calculate the advective velocities
>
> dummy <- setup.compaction.1D(v.0 = 1, por.0 = 0.9, por.inf = 0.5,
+ por.grid = por.grid)
> u.grid <- dummy$u
> v.grid <- dummy$v
>
> # plotting the results
>
> par(mfrow = c(2, 1), cex.main = 1.2, cex.lab = 1.2)
>
> plot(por.grid$int, grid$x.int, pch = 19, ylim = c(L,0), xlim = c(0,1),
+ xlab = "", ylab = "depth [cm]", main = expression("porosity"),
+ axes = FALSE)
> abline(h = 0)
> axis(pos = 0, side = 2)
> axis(pos = 0, side = 3)
>
> plot(u.grid$int, grid$x.int, type = "l", lwd = 2, col = "blue",
+ ylim = c(L, 0), xlim = c(0, max(u.grid$int,v.grid$int)),
+ xlab = "", ylab = "depth [cm]",
+ main = "advective velocity [cm yr-1]", axes = FALSE)
> abline(h = 0)
> axis(pos = 0, side = 2)
> axis(pos = 0, side = 3)
>
> lines(v.grid$int, grid$x.int, lwd = 2, col = "red")
>
> legend(x = "bottomright", legend = c("pore water","solid phase"),
+ col = c("blue", "red"), lwd = 2)
>
>
>
>
>
>
> dev.off()
null device
1
>