powerLaw: Example shape functions

View source: R/customProbFunctions.R

powerLawR Documentation

Example shape functions

Description

Transient storage zone statistics are calucated based on an assumed shape of the hydrologic residence time distribution (RTD) of the hyporheic zone, which is the probablity density function (PDF) that a water molecule will exit the hyporheic zone at time tau. powerLaw and exponent are examples of functions that describe a basic shape for the RTD.

Usage

powerLaw(tau, tau_n, alpha)

exponent(tau, tau_n, sigma)

Arguments

tau

A numeric vector of residence times.

tau_n

A numeric vector (usually but not necessarily lenth == 1) representing the maximum tau of the hyporehic zone.

alpha

The exponent of the power law; this value is negated within the powerLaw function.

sigma

The hydrologic exchange rate for the exponent function; this value is negated within the exponent function.

Details

Given an appropriate "shape function," HydroGeom can calculate transient storage zone statistics for any assumed shape of the RTD. Shape functions must have the signature function(tau, tau_n, ...) and typically return zero when tau == tau_n.

You can generate hyporheic TSZ statistics based on a RTD with a shape corresponding to a custom function that you provide. If you write a shape function like foo = function(tau, tau_n, chi, omega), where chi and omega are parameters that influence the shape of the curve described by your function (e.g., analagous to the way alpha serves as an exponent that controls the specific shape of a power law curve in the powerLaw function), you can then use TSZStats with shape = "foo" to generate TSZ statistics using a custom shape for the RTD of the hyporheic zone. Implemented this way, results of TSZStats are derived using numerical integration (see numericalSolution). Solutions for integration of a custom function can also be provide (see fullSolution and powerLawPDF).

Technically speaking, tau_n serves as the upper limit of tau used to calculate the normalizing constant of the PDF, which is defined as the inverse of the definite integral of the shape function from some lower limit (tau_0) to tau_n. Pragmatically, tau_n represents the maximum residence time of interest, which should approximate the maximum subsurface residence time of hyporheic water. Water that stays in the subsurface longer than tau_n is assumed to enter the true groundwater system.

All paramerters for these fuctions correspond to the defintions found in Poole et al. (In Press) "The Hydrolgic Geometry of Hyporheic Zones in Expansive Coarse-Grained Alluvial Aquifers."

Value

Shape functions (including custom shape functions you write) must recycle values of tau and tau_n. Effectively, since the tau_n is typically length == 1, shape functions usually return a vector of numeric values equal in length to the tau vector passed to the function. Both powerLaw and exponent conform to these requirements. The powerLaw function returns tau^(-alpha) - tau_n^(-alpha). The exponent function returns exp(-sigma*tau) - exp(-sigma * tau_n). Implementation of these functions can be viewed by typing print(powerLaw) or print(exponent) into the console.

See Also

checkShapeFunction


FluvialLandscapeLab/hydrogeom documentation built on May 13, 2022, 10 p.m.