---
title: "iemisc: Air Stripping By Packed Column Examples"
author: "Irucka Embry, E.I.T. (EcoC²S)"
date: "`r Sys.Date()`"
lang: en-us
urlcolor: blue
output:
  rmarkdown::pdf_document:
    highlight: kate
    toc: true
    latex_engine: xelatex
vignette: >
  %\VignetteIndexEntry{iemisc Air Stripping By Packed Column Examples}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

\bigskip

# Replicate the R code

Note: If you wish to replicate the R code below, then you will need to copy and paste the following commands in R first (to make sure you have all the packages and their dependencies):  

```{r eval = FALSE}
install.packages(c("install.load", "iemisc", "pander"))
# install the packages and their dependencies
```

\bigskip
\bigskip

# Example 1 ["Appendix D Example Air Stripping By Packed Column" from Design (page D-1 - D-18)]

```{r, warning = FALSE, message = FALSE, tidy = TRUE}
install.load::load_package("iemisc", "pander")

panderOptions("table.continues", "")
panderOptions("table.caption.prefix", "")

# values to match the Reference document
T = 20; pTe = 1; contam1 = c("Benzene", "Toluene", "Trichloroethylene"); Cai = c(750, 1000, 750); Cae = c(10, 100, 100); contam2 = c("Benzene", "Toluene", "Trichloroethylene"); cas = c("71-43-2", "108-88-3", "79-01-6"); Ha = c(309.2, 353.1, 506.1); Q = 440; loading = 45; ns = 2; DL = c(8.91 * 10 ^ -10, NA_real_, NA_real_); DG = c(9.37 * 10 ^ -6, NA_real_, NA_real_); dP = 0.0508; at = 157; Sc = 0.033; cf = 15; R = 3.5; dP_units = "inch"; at_units = "ft^2/ft^3"; Sc_units = "kg/s^2"; contaminants_table = 1; removal_requirements_table = 1; critical_contaminant_table = 1

air1 <- air_stripper(T = T, pTe = pTe, contam1 = contam1, Cai = Cai, Cae = Cae, contam2 = contam2, cas = cas, Ha = Ha, Q = Q, loading = loading, ns = ns, DL = DL, DG = DG, dP = dP, at = at, Sc = Sc, cf = cf, R = R, T_units = "SI", dP_units = "inch", at_units = "ft^2/ft^3", Sc_units = "kg/s^2", contaminants_table = 1, removal_requirements_table = 1, critical_contaminant_table = 1)



# Changes to reflect the manufacturer's values
T = 20; pTe = 1; contam1 = c("Benzene", "Toluene", "Trichloroethylene"); Cai = c(750, 1000, 750); Cae = c(10, 100, 100); contam2 = c("Benzene", "Toluene", "Trichloroethylene"); cas = c("71-43-2", "108-88-3", "79-01-6"); Ha = c(309.2, 353.1, 506.1); Q = 440; loading = 45; ns = 2; DL = c(8.91 * 10 ^ -10, NA_real_, NA_real_); DG = c(9.37 * 10 ^ -6, NA_real_, NA_real_); dP = 2; at = 48; Sc = 0.033; cf = 16; R = 3.5; T_units = "SI"; dP_units = "inch"; at_units = "ft^2/ft^3"; Sc_units = "kg/s^2"; contaminants_table = 1; removal_requirements_table = 1; critical_contaminant_table = 1

air2 <- air_stripper(T = T, pTe = pTe, contam1 = contam1, Cai = Cai, Cae = Cae, contam2 = contam2, cas = cas, Ha = Ha, Q = Q, loading = loading, ns = ns, DL = DL, DG = DG, dP = dP, at = at, Sc = Sc, cf = cf, R = R,  T_units = "SI", dP_units = "inch", at_units = "ft^2/ft^3", Sc_units = "kg/s^2", contaminants_table = 1, removal_requirements_table = 1, critical_contaminant_table = 1)
```

\bigskip

## Example 1: Table 1. Contaminants Table {Reference document}

```{r, warning = FALSE, message = FALSE, tidy = TRUE}
pander(air1[[1]], missing = "")
```

\bigskip

## Example 1: Table 2. Removal Requirements Table {Reference document}

```{r, warning = FALSE, message = FALSE, tidy = TRUE}
pander(air1[[2]], missing = "")
```

\bigskip

## Example 1: Table 3. Critical Contaminant Table {Reference document}

```{r, warning = FALSE, message = FALSE, tidy = TRUE}
pander(air1[[3]], missing = "")
```

\bigskip

## Example 1: Table 4. Air Stripper Design Table {Reference document}

```{r, warning = FALSE, message = FALSE, tidy = TRUE}
pander(air1[[4]])
```

\bigskip
\bigskip

## Example 1: Table 1. Contaminants Table {Manufacturer's values}

```{r, warning = FALSE, message = FALSE, tidy = TRUE}
pander(air2[[1]], missing = "")
```

\bigskip

## Example 1: Table 2. Removal Requirements Table {Manufacturer's values}

```{r, warning = FALSE, message = FALSE, tidy = TRUE}
pander(air2[[2]], missing = "")
```

\bigskip

## Example 1: Table 3. Critical Contaminant Table {Manufacturer's values}

```{r, warning = FALSE, message = FALSE, tidy = TRUE}
pander(air2[[3]], missing = "")
```

\bigskip

## Example 1: Table 4. Air Stripper Design Table {Manufacturer's values}

```{r, warning = FALSE, message = FALSE, tidy = TRUE}
pander(air2[[4]])
```

\bigskip
\bigskip

# Example 2 (Spring 2011 Hazardous Waste Management Air Stripper Group Project)

\bigskip
\bigskip

```{r, warning = FALSE, message = FALSE, tidy = TRUE}

install.load::load_package("iemisc")

air3 <- air_stripper(T = 20, pTe = 1, contam1 = "Ammonia", Cai = 333, Cae = 2.8, contam2 = "Ammonia", cas = "7664-41-7", Ha = 0.75, Q = 150, loading = 45, ns = 2, DL = 8.91 * 10 ^ -10, DG = 9.37 * 10 ^ -6, dP = 145, at = 65, Sc = 0.033, cf = 76 *6, R = 1.5,  T_units = "SI", dP_units = "mm", at_units = "m^2/m^3", Sc_units = "kg/s^2", contaminants_table = 1, removal_requirements_table = 1, critical_contaminant_table = 1)


air4 <- air_stripper(T = 25, pTe = 1, contam1 = "Ammonia", Cai = 700, Cae = 2.8, contam2 = "Ammonia", cas = "7664-41-7", Ha = 0.75, Q = 440, loading = 45, ns = 3, DL = 2.1E-09, DG = 9.8E-06, dP = 6.35, at = 940, Sc = 0.061, cf = 1600, R = 1.5,  T_units = "SI", dP_units = "mm", at_units = "m^2/m^3", Sc_units = "kg/s^2", contaminants_table = 1, removal_requirements_table = 1, critical_contaminant_table = 1)
```

\bigskip

## Example 2: Table 1. Contaminants Table {Original Design}

```{r, warning = FALSE, message = FALSE, tidy = TRUE}
pander(air3[[1]])
```

\bigskip

## Example 2: Table 2. Removal Requirements Table {Original Design}

```{r, warning = FALSE, message = FALSE, tidy = TRUE}
pander(air3[[2]], missing = "")
```

\bigskip

## Example 2: Table 3. Critical Contaminant Table {Original Design}

```{r, warning = FALSE, message = FALSE, tidy = TRUE}
pander(air3[[3]])
```

\bigskip

## Example 2: Table 4. Air Stripper Design Table {Original Design}

```{r, warning = FALSE, message = FALSE, tidy = TRUE}
pander(air3[[4]])
```

\bigskip
\bigskip

## Example 2: Table 1. Contaminants Table {Modified Design}

```{r, warning = FALSE, message = FALSE, tidy = TRUE}
pander(air4[[1]])
```

\bigskip

## Example 2: Table 2. Removal Requirements Table {Modified Design}

```{r, warning = FALSE, message = FALSE, tidy = TRUE}
pander(air4[[2]], missing = "")
```

\bigskip

## Example 2: Table 3. Critical Contaminant Table {Modified Design}

```{r, warning = FALSE, message = FALSE, tidy = TRUE}
pander(air4[[3]])
```

\bigskip

## Example 2: Table 4. Air Stripper Design Table {Modified Design}

```{r, warning = FALSE, message = FALSE, tidy = TRUE}
pander(air4[[4]])
```

\bigskip
\bigskip

## Works Cited

Design Guide No. 1110-1-3: Air Stripping Engineering and Design Appendix D: Example Air Stripping By Packed Column, Department Of The Army U.S. Army Corps of Engineers, 31 October 2001, pages D-1 - D-18, http://www.publications.usace.army.mil/Portals/76/Publications/EngineerDesignGuides/DG_1110-1-3.pdf?ver=2013-08-16-101222-003.  

\bigskip
\bigskip

# EcoC²S Links

EcoC²S Home -- https://www.ecoccs.com/  
About EcoC²S -- https://www.ecoccs.com/about_ecoc2s.html  
Services -- https://www.ecoccs.com/services.html  
Products -- https://www.questionuniverse.com/products.html  
EcoC²S Media -- https://www.ecoccs.com/media.html  
EcoC²S Resources -- https://www.ecoccs.com/resources.html  
R Trainings and Resources provided by EcoC²S (Irucka Embry, E.I.T.) -- https://www.ecoccs.com/rtraining.html  

\bigskip
\bigskip

# Copyright and License

All R code written by Irucka Embry is distributed under the GPL-3 (or later) license, see the [GNU General Public License {GPL} page](https://www.gnu.org/licenses/gpl-3.0.html).  

All written content originally created by Irucka Embry is copyrighted under the Creative Commons Attribution-ShareAlike 4.0 International License. All other written content retains the copyright of the original author(s).  

This work is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/).  
