fit_drainage_tail: Fit the viscous flow equation

Description Usage Arguments Value Examples

View source: R/fit_models.R

Description

Fits the viscous flow equation to the drainage curve of an irrigation experiment on a soil column, calculates the arrival time of the drainage front \mjeqnT_DTD.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
fit_drainage_tail(
  drainage_data,
  stationary_time,
  D,
  TE,
  TD_interval = NULL,
  qS = NULL,
  fit_qS = TRUE,
  delta_t = 30,
  my_weights = 1
)

Arguments

drainage_data

tibble or data.frame. Drainage data from a column experiment. The first column must contain the time, the second the drainage data.

stationary_time

numeric vector of length 2. The time interval where the flow is assumed to be stationary. Typically one would select the shortly before the irrigation is switched off, i.e. 0.9 * end_of_irrigation until end_or_irrigation.

D

numeric. Diameter of the soil column in m.

TE

numeric. End of irrigation

TD_interval

numeric vector of length 2. The time interval where the arrival time of the drainage front \mjeqnT_DTD is expected (initial guess for the optimization routine). Default is NULL and is internally replaced by TD_interval = c(0.9 * TE, 1.1 * TE)

qS

numeric. Stationary flow rate in m/s. Default is NULL and fit_qS = TRUE to fit \mjeqnq_SqS, cf. fit_stationary_flow_rate.

fit_qS

logical. Should \mjeqnq_SqS be optimized. Default is TRUE.

delta_t

numeric. The time interval in the drainage_data.

my_weights

numeric or NULL. Weights for the optimization routine. Experimental, at the moment set to 1.

Value

list. q_ms: drainage in m/s ind: time from which on the fit was done qS: stationary flow rate in m/s TD: arrival time of the drainage front TW: arrival time of the wetting front TE: end of irrigation (unchanged) viscous_flow_tail: theoretical drainage according to the viscous flow used for the optimization

Examples

1
2
3
4
data(drainage)
my_TD <- fit_drainage_tail(drainage_data = drainage, stationary_time = c(0.9 * 64410 , 64410),
TE = 64410, TD_interval = c(0.9 * 64410, 1.1 * 64410), qS = NULL, fit_qS = TRUE,
delta_t = 30, my_weights = NULL)

ChrisBogner/ViscousFlow documentation built on June 13, 2021, 7:47 a.m.