Title: | Tephra Transport Modeling |
Version: | 0.1 |
Author: | Jake Anderson |
Maintainer: | Jake Anderson <ajakef@gmail.com> |
Description: | Models and displays tephra transport through custom (windy, turbulent, heterogeneous) atmosphere over custom topography. Includes a Lagrangian (particle-tracking) tephra transport model and a function to save snapshots of model as png files. |
Depends: | R (≥ 3.0.0) |
Suggests: | rNOMADS |
License: | GPL-2 | GPL-3 [expanded from: GPL] |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 6.1.0 |
NeedsCompilation: | no |
Packaged: | 2018-10-11 19:41:04 UTC; jake |
Repository: | CRAN |
Date/Publication: | 2018-10-19 12:20:02 UTC |
Tephra Transport Snapshots
Description
Generates png files showing map view and cross-section view of tephra motion and final position on ground
Usage
BlastAnim3d(L, tframe = 0.1, dir = ".", TOPO = NULL, az = 0,
xlim = NULL, ylim = NULL, zlim = NULL, units = "m",
plotMapView = TRUE, plotCrossSection = TRUE)
Arguments
L |
output of BlastSim3d |
tframe |
time interval between frames [s] |
dir |
directory where png files should be saved |
TOPO |
DEM: list containing vectors x and y and matrix z with dimensions (length(x), length(y)) |
az |
azimuth of section line (degrees clockwise from North) |
xlim |
easting limits for map view |
ylim |
northing limits for map view |
zlim |
elevation limits for section view |
units |
units of length (string) |
plotMapView |
logical: should the map view panel be plotted? |
plotCrossSection |
logical: should the cross-section panel be plotted? |
Examples
## Not run:
## BlastSim3d(v = 40, th_i = 2* 1:40, th_a = 90, dt = 0.01)
## BlastAnim3d(L, tframe = 0.1, az = 90)
## ImageMagick shell command: animate -delay 10 * # animate with 0.1-s frame rate
Explosive Tephra Dispersion Model
Description
Models the transport of particles ejected at the same velocity and different angles using tephra3d.
Usage
BlastSim3d(v, th_i = 2 * 1:40, th_a = 0, dt = 0.01, ...)
Arguments
v |
initial velocity [m/s] |
th_i |
initial inclination angles to test [degrees] |
th_a |
initial azimuth angles to test [degrees clockwise from north] |
dt |
model time interval [s] |
... |
parameters to pass to Tephra3d |
Examples
BlastSim3d(v = 10, th_i = 2* 1:40, th_a = 0, dt = 0.01)
Tephra Lagrangian Transport Model
Description
This function models the transport of a single particle through a spatially variable, windy, turbulent atmosphere with gravity. It allows 4D-varying atmospheric wind and density. Currently, only Rayleigh drag (low Re) is permitted.
Usage
Tephra3d(vx0, vy0, vz0, x0 = 0, y0 = 0, z0 = 0, t0 = 0,
rho_r = 2000, r = 1, dt = 0.01, Cd = 0.6, verbose = FALSE,
rho_a = NULL, zt = NULL, wx = 0, wy = 0, wz = 0, mindist = 0,
TOPO = NULL, Kh = 0, Kz = 0, eddy_timescale = 60, g = 9.80665)
Arguments
vx0 |
initial x component of velocity [m/s] |
vy0 |
initial y component of velocity [m/s] |
vz0 |
initial z component of velocity [m/s] |
x0 |
initial easting [m] |
y0 |
initial northing [m] |
z0 |
initial elevation [m] |
t0 |
initial time [s] |
rho_r |
density of tephra particle [kg/m^3] |
r |
rock radius [m] |
dt |
model time interval [s] |
Cd |
drag coefficient [unitless] |
verbose |
logical: print runtime info to screen? |
rho_a |
scalar or function(x,y,z,t) or function(z) giving atmospheric density [kg/m^3]. If NULL, use a variable-density isothermal atmosphere (T = 0 deg C) |
zt |
function(x,y) giving topographic height [m] |
wx |
scalar or function(x,y,z,t) or function(z) giving component of wind to the east [m/s] |
wy |
scalar or function(x,y,z,t) or function(z) giving component of wind to the north [m/s] |
wz |
scalar or function(x,y,z,t) or function(z) giving upward component of wind [m/s] |
mindist |
minimum distance a particle must travel before simulation can stop. This is to prevent early model ends due to spurious collision with crater. |
TOPO |
DEM: list containing vectors x and y and matrix z with dimensions (length(x), length(y)) |
Kh |
horizontal eddy diffusivity [m^2/s] |
Kz |
vertical eddy diffusivity (often neglected) [m^2/s] |
eddy_timescale |
1/e decay time of turbulent eddies [s] |
g |
gravitational acceleration [m/s^2] |
Examples
Tephra3d(vx0 = 40, vy0 = 0, vz0 = 40, z0 = 0)
Topography Interpolation
Description
Interpolates elevation at point (x, y) given Digital Elevation Model (DEM).
Usage
TopoInterp(x, y, TOPO = NULL, N = 10)
Arguments
x |
Easting of point to interpolate [same units as TOPO$x, TOPO$y] |
y |
Northing of point to interpolate [same units as TOPO$x, TOPO$y] |
TOPO |
DEM: list containing vectors x and y and matrix z with dimensions (length(x), length(y)) |
N |
Smoothing parameter, must be positive. Larger N means less smoothing. |
Examples
data(VILL)
contour(VILL, xlim = c(-500, 500), ylim = c(-500, 500))
TopoInterp(0, 0, VILL) # interpolate elevation at point (0, 0)
Villarrica DEM
Description
Digital Elevation Model (DEM) of Villarrica Volcano, Chile.
Format
List with following elements:
- x
Easting from vent (m)
- y
Northing from vent (m)
- z
Elevation above sea level (m)
- lat
Latitude (degrees)
- lon
Longitude (degrees)
Examples
data(VILL)
contour(VILL)
N-Dimensional Meshgrid Make a list in which all combinations of inputs occur.
Description
N-Dimensional Meshgrid Make a list in which all combinations of inputs occur.
Usage
meshgridn(L)
Arguments
L |
list containing any number of vectors |
Examples
meshgridn(list(1:2, 5:6, 7:9))