# AGU posters 2018: SedEdu and Density Stratification

I’m presenting two posters at AGU this year!

I’m really excited to be sharing a project I’ve been working on which integrates research and teaching. I am giving a poster Friday morning titled: “SedEdu: developing and testing a suite of computer-based interactive educational activities for introductory sedimentology and stratigraphy courses”. The poster will explain my SedEdu project and particularly emphasize the rivers2stratigraphy moduleHere is the abstract. Below is the poster, click the image to view a pdf.

I’m also looking forward to sharing an update on my ongoing research on the sediment transport in the Yellow River, China. This poster will be on Friday afternoon, and is titled: “Suspended-sediment induced stratification inferred from concentration and velocity profile measurements in the flooding lower Yellow River, China”. Here is the abstract.

If you’re going to be at AGU, let’s chat!

# Matlab speed comparison of switch-case and if-then statements and hard-code

I frequently use the extremely methodical approach in scientific programming of “just trying things”. This means that I create a lot of different ways to try to do something to find the best way to do that thing. Sometimes this means getting a realistic result, a stable result, or a fast computation.

All functional programming languages offer if-then statements, whereby sections of code are evaluated on True evaluations of a statement. An if-then statement can be extended with an elseif to provide further evaluations to compare with for True. Using this framework, different “cases” or “methods” of doing a single thing can be quickly tested by switching between them in a script. The purpose of all is to make the code more readable and maintainable, by not having to comment/uncomment blocks of code to make a change in the calculation method.

For example, two methods x = 'test1' | 'test2' could be executed by a function, depending on the definition of x:

if strcmp(x, 'test1')
y = 1;
elseif strcmp(x, 'test2')
y = 2;
end

A similar functionality can be obtained with a switch-case statement:

switch x
case 'test1'
y = 1;
case 'test2'
y = 2;
end

But which is faster?? I suppose I always knew switch-case statements were slower than if-then statements, but I wanted to know how much of a difference it could make. I also often have >4 of these case statements as optional methods, and I wanted to know if the number of cases (or really how “deep” down the list they were) made a difference in speed.

I designed a simple experiment in Matlab to test this out. I looped through a simple set of statements 1 million times, and timed each scenario. You can find the source code here.

It turns out that switch-cases are about ~30% slower than if-then statements. Both are more than an order of magnitude slower than.

Most importantly though, the time increases linearly with each “layer” to the if-then or case-switch statement. To me, this stressed the importance of 1) having few cases that aren’t simply hard-coded in, or 2) at least sort the cases in order of likelihood of being used during program execution.

# Density stratification in fine-grained rivers

2017 was the year of my first talk at the fall meeting of the American Geophysical Union. It was pretty exciting and I was extremely nervous. In the end, it went okay, and I was able to present my work to a broad range of scientists. I presented my ongoing research based on field survey of the Yellow River, China during flood.

I hypothesized that the river would exhibit a density stratification in the flow. Density stratification occurs in a river because the entrainment of sediment into the flow affects the properties of the flow in bulk. I’ll explain with the help of a few graphics below. The below image is a profile of an open channel flow (thick black line is the channel bed) and the top of the graphic is the water surface.

a. the velocity profile of a steady and uniform open channel flow is well described by the logarithmic “law-of-the-wall” or log-law. This log-law takes the form of which predicts time-averaged velocity (u bar) as a function of the shear velocity (u*) and the log of the height above the bed (z). z0 is a reference height very near the bed, and κ is a constant. The equation, evaluated over the flow depth is shown on the left side of figure a. The implication of higher velocities near the surface means that momentum (ρ=mv) of the flow is higher near the flow surface than the bed. This condition is unstable, so momentum is redistributed from the surface to the bed through mass transfer. When the flowing mass of high momentum fluid reaches the bed, it dissipates, forming turbulent eddies that shed off the channel bed and move up into the water column.

b. the turbulent eddies coming off the channel bed cause sediment to be entrained into the flow and brought up from the bed towards the surface. The vertical distribution of sediment through the water column depends on the size of particles and the entraining velocity and can be estimated by the exponential Rouse equation.which predicts time-averaged concentration (c bar) as a function of the time-averaged near-bed concentration (cb bar) as a function of the height (z) above the bed (b) to the flow depth (H) and the Rouse number (ZR) which balances the settling velocity of particles (ws), to the entraining shear velocity (u*). The Rouse equation and log-law work well only in dilute suspensions, that is, flows in which the concentration of sediment is small enough to have no feedback on the flow.

c. In flows where the sediment concentrations are significant enough near the bed to have a feed back on the system a density stratification develops. In short, the high concentration of sediment prevents momentum redistribution from the surface fully reaching the bed, which has the net effect of reducing sediment suspension and enhancing flow velocities near the surface.

Because sediment transport (qs is width averaged transport) is the product of the velocity and concentration profiles integrated over the flow depth:this density stratification could significantly alter total sediment transport rates in fine-grain rivers from existing predictions. My ongoing research in this field is trying to resolve precisely what conditions lead to the development of a density stratification in the river.

This material is based upon work supported by the National Science Foundation Graduate Research Fellowship under Grant No.1450681. Any opinion, findings, and conclusions or recommendations expressed in this material are those of the authors(s) and do not necessarily reflect the views of the National Science Foundation.

# Hurricane Harvey update

The Greater Houston Metro just got pounded by one of the largest storms (in terms of rainfall) on record: Hurricane Harvey. There was widespread flooding across all parts of the metro, but my home and Rice university were largely spared. The skies are clear today, after ~5 days of nearly continuous rainfall. However, the cleanup effort for this disaster will last years and cost billions of dollars. Nonetheless, I am certain that Houston will come back stronger and better than ever. This ordeal has made me even more proud to be a Houstonian.

At my house, we had a small leak in an interior bathroom, but because we received so much rain over the duration of the event, the roof became saturated and the sheetrock partially collapsed. No one was hurt, thankfully, and repairs are already underway.

I am currently working on an NSF RAPID grant, which I compiled the following figure for. This figure shows total rainfall during the Harvey event with the City of Houston (CoH) labeled. The precipitation data were collected from the National Weather Service and then summed to produce the total rainfall numbers for the below plot. I am proposing some work on the Brazos River (BR) so this feature is also labeled.

# Outreach module — Flooding risk in low-lying landscapes

I have put together an outreach module that describes some of the risks of flooding in low-lying landscapes. The module runs in Matlab, either within a licensed environment, or with the Matlab Runtime Environment (which is available to anyone).

Accompanying the GUI is a worksheet that steps through all the aspects of the GUI and attempts to demonstrate the principles of flooding in deltas without detailing the math or physics behind the model. My hope is that it will be helpful to High School educators in their course work.

So far, I have only written a worksheet targeted at 9-12th graders, but plan to write two more (one for younger students, and one for more advanced undergraduate/graduate students) worksheets in the near future.

Below is a demonstration of the GUI. The full information for the module (including the source code) is on my GitHub here. The project website is here.

This material is based upon work supported by the National Science Foundation (NSF) Graduate Research Fellowship under Grant No.145068 and NSF EAR-1427177. Any opinion, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

# China field work 2017

I’m heading off tomorrow for my third summer field campaign in China. That also means that I’ve completed three years of my PhD.

I always seem to act a bit introspective around this time of the year, reevaluating decisions, remembering achievements, and reliving failures. This year hasn’t been especially easy for me; I’ve lost two important people in my life, and I’ve struggled to get my research moving at a pace that I feel is fast enough. Nonetheless, I’ve done a lot of good things this year too; I will be an author on (at least) two papers coming out this year, I won a service award for my department, and I am starting a new series of symposia at Rice that I’m especially excited about.

Our field campaign marks another journey halfway around the world to collect data on one of the most exceptional rivers in the world. My research goals for this year are to collect water column data during a flood. My analysis of the last two years’ data suggests that at high discharges, the concentrations of sediment become sufficiently high to dampen turbulence in the flow and introduce “density stratification”. I’m hoping to constrain the development of the density stratification in the lower Yellow River during this field campaign.

I’ll be working with some of the best people on our field campaign. Our campaign will be led by myself, Brandee Carlson, my advisor Jeff Nittrouer, and Hongbo Ma, and we will be helped (immensely) by Tian Dong, Chenliang Wu, Eric Barefoot, Dan Parsons, and Austin Chadwick.

Cheers for another year! Wish us luck!

Brandee Carlson and me towards the end of our 2016 field campaign

# The exceptional sediment load of fine-grained dispersal systems: Example of the Yellow River, China — Ma et al., 2017

We’ve just published an exciting new paper in Science Advances which assess the transport of sediment in fine-grain river systems. The research is driven by Postdoctoral Researcher Hongbo Ma, who is the first author on the publication. I led the field survey and processed the Multibeam data of the Yellow River channel bed that you see in a few of the figures in the paper.

Hongbo has identified a physical explanation for why fine-grain rivers are able to move so much sediment. In short, it has to do with the organization of the channel bed, whereby dunes are wiped out at high Froude number flows with a small grain size on the bed. This reduces the form drag in the river and allows for more skin friction on sediment to bring into suspension. Hongbo continues to make strides in identifying a “phase transition” in sediment transporting systems that helps to explain the observations made in the Yellow River.

Yellow River at Hukou Waterfall. The river here is a bedrock-alluvial river, but this image provides a good demonstration of the comparatively massive volume of sediment transported by the Yellow River

You can get the paper here, or uploaded to my site as a pdf here.
There is a full article about the research with loads more information, including a video interview, from the Rice press department here. And an article from the National Science Foundation (funding organization) here. A Scientific American video explaining some of the research is available here.

# Vibracore extraction tripod engineering drawings — Vibracore system

For our research in China, I was charged with building a Vibracore system. The Vibracore works by utilizing a concrete vibrator to rapidly vibrate an upright thin-walled aluminium pipe into the sand/dirt/mud below. A tripod is then set up over the in-ground pipe to pull it up from the ground. The pipe (now called a core I suppose…) is then cut open with a saw and analyzed/sampled.

dimetric view of assembled tripod

This system is nothing we invented, although I’m not sure of its origin. I based the design for our tripod on an apparatus that our colleague John Anderson has in his collection of field equipment. Our only substantial modification to the design was to make the legs of our system separable so that instead of a solid 10′ pipes of aluminium, we have two 5′ pipes, joined by a coupler. This is quite useful for us, since we send our system to China each year, and it makes it much easier to handle for shipping.

I recently made some engineering drawings of our system for a colleague and figured I would share them here in case they may be helpful to others. You can find the plans as a .pdf file here, or explore the system in three dimensions in the software they were designed in (OnShape CAD) at this link.

example drawing: head assembly top plate

Rice crew Vibracoring the Yellow River delta

In the future, I hope that my colleague Brandee Carlson (who leads the research using the Vibracore) and I can write a bit of an updated guide to the system based on our experiences using the system in the field, but for now I’ll just leave you with a few references for the system design below.

Land-based Vibracoring and Vibracore analysis: Tips, Tricks, and Traps. Occasional Paper 58. Thompson, T. A., Miller, C. S., Doss, P. K., Thompson, L. D. P., and Baedke. 1991.

Collection and analysis techniques for paleoecological studies in coastal-deltaic settings — Robert A. Gastaldo

# Building a simple delta numerical model: Part VI

This will be the final piece of the model that we need to get to have a working code for delta growth: the time routine. We will define a few more terms in order to set up the model to be able to loop through all the time steps and update the evolving delta.

```T = 500; % yrs timestep = 0.1; % timestep, fraction of years t = T/timestep; % number of timesteps dtsec = 31557600 * timestep; % seconds in a timestep```

T is the total time the model will be run for (in years), timestep is the fraction of year that will be simulated with each timestep, expressed in seconds as dtsec, and t is the number of timesteps to loop through. Now we simply take our block of code that we’ve built up to calculate all the propertyies of the delta (slope, sediment transport, deposition, etc.) and surround it with a for statement:

```for i = 1:t [S] = get_slope(eta, nx, dx); % bed slope at each node [H] = get_backwater_fixed(eta, S, H0, Cf, qw, nx, dx); % flow depth U = Qw ./ (H .* B0); % velocity [qs] = get_transport(U, Cf, d50, Beta); qsu = qs(1); % fixed equilibrium at upstream [dqsdx] = get_dqsdx(qs, qsu, nx, dx, au); [eta] = update_eta(eta, dqsdx, phi, If, dtsec); end```

To explain in words the above block, now, we are going to go through every timestep i and calculate the slope of the bed (eta) everywhere in the model domain, then we use this slope (and other defined parameters) to determine the flow depth and velocity through the entire delta. The velocity is used to calculate sediment transport, and the change in sediment transport over space produces a change in the channel bed elevation over time (i.e., the Exner equation). Finally, we return to the top of the loop to calculate a new slope based on our new bed.

That’s it! Our delta model is now complete and we can outfit it with all sorts of bells and whistles to test hypotheses about delta evolution in the natural (or experimental) world. A powerful tool indeed!

Below is a simple movie output from this model that shows the results of our hard work! The complete code for the delta model can be found here.

Note that there is a small instability that grows at the front of the sediment wedge, this isn’t a huge problem depending on what you want to do with your model, but you can tweak dx and dt to make things run “smoother” (see the CFL number for more information).

This material is based upon work supported by the National Science Foundation (NSF) Graduate Research Fellowship under Grant No.145068 and NSF EAR-1427177. Any opinion, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

# Building a simple delta numerical model: Part V

Now we need to add a routine to update the channel bed, based upon the calculated change in sediment transport over space from the previous step. We’ll use the calculation from the last Part of the tutorial (get_dqsdx) in order to update the channel bed (η) at the end of each timestep. Define the following parameters

```phi = 0.6; % bed porosity If = 0.2; % intermittency factor ```

where If is an intermittency factor representing the fraction of the year that the river is experiencing significant morphodynamic activity. We are basically assuming that the only major change to the river occurs when the river is in flood. One year is the temporal resolution for the model, which we’ll define in the next Part.

```function [eta] = update_eta(eta, dqsdx, phi, If, dtsec) eta0 = eta; eta = eta0 - ((1/(1-phi)) .* dqsdx .* (If * dtsec)); end```

This module works simply by multiplying our vector for change in sediment transport capacity over space to the Exner equation (reproduced below) to evaluate the change in bed elevation over time (i.e., at the next timestep).

There isn’t really anything exciting to show at this stage, as we’ve only calculated the change in the bed for a given dqsdx vector, which represents only a single timestep. In the next Part, we’ll add a time routine to the model, completing the setup required for the simple delta model.

This material is based upon work supported by the National Science Foundation (NSF) Graduate Research Fellowship under Grant No.145068 and NSF EAR-1427177. Any opinion, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.