Metadata-Version: 2.4
Name: skarstrom
Version: 0.8.0
Summary: Pressure and temperature swing adsorption (PSA/VSA/TSA) cycle simulator
Keywords: adsorption,PSA,VSA,TSA,simulation,chemical engineering,gas separation
Author: Sam Affleck
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
License-File: THIRD_PARTY_NOTICES.md
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: C++
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Topic :: Scientific/Engineering :: Physics
Project-URL: Homepage, https://github.com/samaffleck/skarstrom
Project-URL: Documentation, https://samaffleck.github.io/skarstrom/
Project-URL: Source, https://github.com/samaffleck/skarstrom
Project-URL: Issues, https://github.com/samaffleck/skarstrom/issues
Project-URL: Changelog, https://github.com/samaffleck/skarstrom/blob/main/CHANGELOG.md
Requires-Python: >=3.10
Requires-Dist: numpy>=1.21
Requires-Dist: pint>=0.20
Provides-Extra: pandas
Requires-Dist: pandas>=1.3; extra == "pandas"
Provides-Extra: plot
Requires-Dist: matplotlib>=3.5; extra == "plot"
Provides-Extra: test
Requires-Dist: pytest>=7; extra == "test"
Provides-Extra: examples
Requires-Dist: pandas>=1.3; extra == "examples"
Requires-Dist: matplotlib>=3.5; extra == "examples"
Requires-Dist: scipy>=1.7; extra == "examples"
Requires-Dist: pymoo>=0.6; extra == "examples"
Requires-Dist: jupyter; extra == "examples"
Description-Content-Type: text/markdown

# skarstrom

Python interface to [Skarstrom](https://github.com/samaffleck/skarstrom), an
open-source simulator for pressure, vacuum and temperature swing adsorption
(PSA / VSA / TSA) cycles. The package wraps the C++ engine: load a deck (a
JSON simulation file), change parameters, run it to cyclic steady state and
read KPIs, time series and axial profiles as NumPy arrays.

```python
import skarstrom

sim = skarstrom.examples.Perez2019_A.load()          # or skarstrom.Simulation("deck.json")
sim.cycle.number_of_cycles = 10
sim.steps["Feed"].time = "2 min"                     # bare numbers are SI; strings carry units
result = sim.run()
print(result.status, result.message)
for k in sim.kpis(cycle=-1):
    print(k.component, k.purity, k.recovery)
y = sim.series("mole_fraction", "CarbonDioxide", location="top")   # y.time, y.values
```

Command line:

```bash
skarstrom examples                                     # the bundled decks
skarstrom examples run "Ward2022_Q100ccm" --json   # run one, JSON summary
skarstrom run deck.json --cycles 20 --set "step[Feed].time=120" --csv out/
skarstrom params deck.json                             # settable parameters
```

The package bundles every example deck of the repository (`skarstrom.examples`)
and the curated adsorbent library (`skarstrom.adsorbent_library()`), and it
exposes the engine's isotherm evaluation and fitter
(`skarstrom.evaluate_isotherm`, `skarstrom.fit_isotherm`).

- Documentation: <https://samaffleck.github.io/skarstrom/>
- Source and issues: <https://github.com/samaffleck/skarstrom>

Skarstrom is licensed under the Apache License 2.0 (see `LICENSE` and
`NOTICE`, installed in `skarstrom/licenses/`). The wheels also contain the
third-party components listed in `skarstrom/licenses/THIRD_PARTY_NOTICES.md`.
