Learn R Programming

tidywater (version 0.7.0)

solvecost_solids: Determine solids disposal cost

Description

This function takes coagulant doses in mg/L as chemical, removed turbidity, and cost ($/lb) to determine disposal cost.

Usage

solvecost_solids(
  alum = 0,
  ferricchloride = 0,
  ferricsulfate = 0,
  flow,
  turb,
  b = 1.5,
  cost,
  time = "day"
)

Value

A numeric value for disposal costs, $/time.

Arguments

alum

Hydrated aluminum sulfate Al2(SO4)3*14H2O + 6HCO3 -> 2Al(OH)3(am) +3SO4 + 14H2O + 6CO2

ferricchloride

Ferric Chloride FeCl3 + 3HCO3 -> Fe(OH)3(am) + 3Cl + 3CO2

ferricsulfate

Amount of ferric sulfate added in mg/L: Fe2(SO4)3*8.8H2O + 6HCO3 -> 2Fe(OH)3(am) + 3SO4 + 8.8H2O + 6CO2

flow

Plant flow in MGD

turb

Turbidity removed in NTU

b

Correlation factor from turbidity to suspended solids. Defaults to 1.5.

cost

Disposal cost in $/lb

time

Desired output units, one of c("day", "month", "year"). Defaults to "day".

Examples

Run this code
alum_solidscost <- solvecost_solids(alum = 50, flow = 10, turb = 2, cost = 0.05)

library(dplyr)
cost_data <- tibble(
  alum = seq(10, 50, 10),
  flow = 10
) %>%
  mutate(costs = solvecost_solids(alum = alum, flow = flow, turb = 2, cost = 0.05))

Run the code above in your browser using DataLab