Title: | Langmuir Semi-Empirical Coagulation Model |
---|---|
Description: | Implements the Edwards (1997) <doi:10.1002/j.1551-8833.1997.tb08229.x> Langmuir-based semi-empirical coagulation model, which predicts the concentration of organic carbon remaining in water after treatment with an Al- or Fe-based coagulant. Data and methods are provided to optimise empirical coefficients. |
Authors: | Dewey Dunnington [aut, cre] , Benjamin Trueman [aut] , William Raseman [aut] , Marc Edwards [ctb], Tai Tseng [ctb] |
Maintainer: | Dewey Dunnington <[email protected]> |
License: | GPL-3 |
Version: | 0.1.1.9000 |
Built: | 2024-11-06 03:10:51 UTC |
Source: | https://github.com/paleolimbot/edwards97 |
The Edwards (1997) model is a Langmuir-based semiempirical model designed to predict OC removal during alum coagulation. The model is on a non-linear function derived from physical relationships, primarily the process of Langmuir sorptive removal (Tipping 1981, Jekyl 1986).
coagulate(data, coefs) coagulate_base(DOC, dose, pH, UV254, K1, K2, x1, x2, x3, b, root = -1)
coagulate(data, coefs) coagulate_base(DOC, dose, pH, UV254, K1, K2, x1, x2, x3, b, root = -1)
data |
A data frame containing columns |
coefs |
The output of |
DOC |
The initial DOC concentration (mg/L). |
dose |
The coagulant metal concentration (Al3+ or Fe3+) in mmol/L. |
pH |
The pH of coagulation. |
UV254 |
The absorbance of UV254 (1/cm). With |
K1 , K2
|
Empirical fitting coefficients relating to SUVA. |
x1 , x2 , x3
|
Empirical fitting coefficients relating to pH. |
b |
The Langmuir term. |
root |
The solution to the equation presented in Edwards (1997) is
a quadratic with two roots. |
A vector of predicted organic carbon concentrations (in mg/L) following coagulation.
Edwards, M. 1997. Predicting DOC removal during enhanced coagulation. Journal - American Water Works Association, 89: 78–89. https://doi.org/10.1002/j.1551-8833.1997.tb08229.x
Jekel, M.R. 1986. Interactions of humic acids and aluminum salts in the flocculation process. Water Research, 20: 1535-1542. https://doi.org/10.1016/0043-1354(86)90118-1
Tipping, E. 1981. The adsorption of aquatic humic substances by iron oxides. Geochimica et Cosmochimica Acta, 45: 191-199. https://doi.org/10.1016/0016-7037(81)90162-9
alum_jar_tests <- edwards_data("Al") alum_jar_tests$DOC_final_model <- coagulate(alum_jar_tests, edwards_coefs("Al")) plot(DOC_final_model ~ DOC_final, data = alum_jar_tests)
alum_jar_tests <- edwards_data("Al") alum_jar_tests$DOC_final_model <- coagulate(alum_jar_tests, edwards_coefs("Al")) plot(DOC_final_model ~ DOC_final, data = alum_jar_tests)
Calculate the dose of diminishing return
dose_of_diminishing_returns( dose, DOC_final, molar_mass = 297, threshold = 0.3/10 ) dose_for_criterion(dose, DOC_final, criterion)
dose_of_diminishing_returns( dose, DOC_final, molar_mass = 297, threshold = 0.3/10 ) dose_for_criterion(dose, DOC_final, criterion)
dose |
The coagulant metal concentration (Al3+ or Fe3+) in mmol/L. |
DOC_final |
The final DOC concentration, probably modeled using |
molar_mass |
The moalr mass of the coagulant, in grams per mol Al or Fe. |
threshold |
The point of diminishing return threshold, in mg/L DOC per mg/L dose. Often this is taken to be 0.3 mg/L DOC per 10 mg/L dose (Brantby 2016). |
criterion |
A desired final DOC concentration in mg/L |
The dose (in mmol/L) of diminishing returns.
Bratby, J. 2016. Coagulation and Flocculation in Water and Wastewater Treatment. IWA Publishing. https://books.google.ca/books?id=PabQDAAAQBAJ
dose_curve <- coagulate_grid(fit_edwards("Low DOC"), DOC = 4, UV254 = 0.2, pH = 5.5) dose_of_diminishing_returns(dose_curve$dose, dose_curve$DOC_final) dose_for_criterion(dose_curve$dose, dose_curve$DOC_final, criterion = 3)
dose_curve <- coagulate_grid(fit_edwards("Low DOC"), DOC = 4, UV254 = 0.2, pH = 5.5) dose_of_diminishing_returns(dose_curve$dose, dose_curve$DOC_final) dose_for_criterion(dose_curve$dose, dose_curve$DOC_final, criterion = 3)
These are coefficients intended for general use. Use
fit_edwards_optim()
to optimise these coefficients
for a specific source water.
edwards_coefs(type) edwards_data(type) fit_edwards(type)
edwards_coefs(type) edwards_data(type) fit_edwards(type)
type |
One of "Low DOC", "Fe", "Al", "General-Fe", "General-Al", or "empty". |
A named vector of empirical coefficients to be used in
coagulate()
.
Edwards, M. 1997. Predicting DOC removal during enhanced coagulation. Journal - American Water Works Association, 89: 78–89. https://doi.org/10.1002/j.1551-8833.1997.tb08229.x
edwards_coefs("Low DOC")
edwards_coefs("Low DOC")
Example Jar Tests
edwards_jar_tests
edwards_jar_tests
An object of class tbl_df
(inherits from tbl
, data.frame
) with 1372 rows and 7 columns.
Marc Edwards and Tai Tseng
Edwards, M. 1997. Predicting DOC removal during enhanced coagulation. Journal - American Water Works Association, 89: 78–89. https://doi.org/10.1002/j.1551-8833.1997.tb08229.x
The coefficients calculated by Edwards (1997) and returned by
edwards_coefs()
were designed to produce reasonable results
for several general cases, however each source water will have
a set of empirical coefficients that produce more accurate
predictions than the general case. This function calculates
the optimal coefficients given a test set of known initial
values (DOC)
fit_edwards_optim( data, initial_coefs = edwards_coefs("Al"), optim_params = list() ) fit_edwards_coefs(coefs, data = edwards_data("empty")) ## S3 method for class 'edwards_fit_optim' coef(object, ...) ## S3 method for class 'edwards_fit_coefs' coef(object, ...) ## S3 method for class 'edwards_fit_base' predict(object, newdata = NULL, ...) coagulate_grid( object, DOC, UV254, dose = seq(0.01, 2, length.out = 50), pH = seq(5, 8, length.out = 50) ) ## S3 method for class 'edwards_fit_base' fitted(object, ...) ## S3 method for class 'edwards_fit_base' residuals(object, ...) ## S3 method for class 'edwards_fit_base' tidy(x, ...) ## S3 method for class 'edwards_fit_base' glance(x, ...) ## S3 method for class 'edwards_fit_base' print(x, ...) ## S3 method for class 'edwards_fit_base' plot(x, ...)
fit_edwards_optim( data, initial_coefs = edwards_coefs("Al"), optim_params = list() ) fit_edwards_coefs(coefs, data = edwards_data("empty")) ## S3 method for class 'edwards_fit_optim' coef(object, ...) ## S3 method for class 'edwards_fit_coefs' coef(object, ...) ## S3 method for class 'edwards_fit_base' predict(object, newdata = NULL, ...) coagulate_grid( object, DOC, UV254, dose = seq(0.01, 2, length.out = 50), pH = seq(5, 8, length.out = 50) ) ## S3 method for class 'edwards_fit_base' fitted(object, ...) ## S3 method for class 'edwards_fit_base' residuals(object, ...) ## S3 method for class 'edwards_fit_base' tidy(x, ...) ## S3 method for class 'edwards_fit_base' glance(x, ...) ## S3 method for class 'edwards_fit_base' print(x, ...) ## S3 method for class 'edwards_fit_base' plot(x, ...)
data |
A data frame with columns
|
optim_params |
Additional arguments to be passed to |
coefs , initial_coefs
|
A set of initial coefficients from which to
start the optimisation. Most usefully one of the coefficient
sets returned by |
object , x
|
A fit objected created with |
... |
Not used. |
newdata |
A data frame with columns
|
DOC |
The initial DOC concentration (mg/L). |
UV254 |
The absorbance of UV254 (1/cm). With |
dose |
The coagulant metal concentration (Al3+ or Fe3+) in mmol/L. |
pH |
The pH of coagulation. |
An S3 of type "edwards_fit_optim" with components:
References to inputs.
The fit object returned by stats::optim()
.