# README 
This readme is related to supplementary materials that accompany the journal article:
Dols, W. Stuart, Jialei Shen, Brian J. Polidoro, David M. Lorenzetti, Russell Mills, William T. S. Cole & Michael D. Sohn. “Development and Application of CONTAM APIs.” *Building Simulation*, ahead of print, January 30, 2026. https://doi.org/10.1007/s12273-025-1376-x.

Two of the example cases presented in the aforementioned journal article are provided as supplementary materials to the article. They are the *Custom Control Algorithm* and *Enhanced IAQ Transport Model*. These cases utilize the *contamxpy* Python package as presented below. These demonstration cases can be used as starting points to developing one's own use-cases for the ContamX API, *contamx-lib*.

## Custom Control Algorithm
Files needed:
- Pistochini-UseApi-OccMed.prj 
- pistochini.py
- dcv_pi_control.py  

Create virtual environment and use pip to install the *contamxpy* module from **PyPI**.

```
python -m pip install contamxpy  
```

Run the example:
```
python -m pistochini Pistochini-UseApi-OccMed.prj
```

The results can be viewed by opening the PRJ file with *ContamW*.

## Enhanced IAQ Transport Model
Files needed:
- 3-Room-OffAt14days.prj
- 3-hcho_32ugm3_14days.ctm
- MOF-SorptionControl.py
- material_adsorption.py

Create virtual environment and use pip to install the *contamxpy*, *matplotlib*, *numpy*, *pandas*, and *scipi* modules from **PyPI**.

```
python -m pip install contamxpy matplotlib numpy pandas scipi
```

Run the example:
```
python -m MOF-SorptionControl 3-Room-OffAt14days.prj > out.txt
```

The results of mass concentration in the air can be viewed by opening the PRJ file with *ContamW*, and the following files results will be generated:
- *out.txt*
- *3-Room-OffAt14days.log*
- *mat_Cm_dist.txt*

See *3-Room-14day.xlsx* for example results
