Skip to content

About

Three-stage water pre-treatment column for a Mars habitat: bioremediated regolith, pyrolysis biochar, and live sensor telemetry. Bench-built and measured

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Regolith Water Loop Logo

Regolith Water Loop

Three-stage water pre-treatment column: bioremediated regolith, pyrolysis biochar, and a gravity feed. Bench-built and tested.

Leonardo Salas · rwl.leonardosalas.dev


rwl on PyPI Sponsor Regolith Water Loop on GitHub Sponsors

Built and documented in the open by one person. Sponsorship keeps it that way.


Caution

This is not a drinking water system. This column is a pre-treatment stage. It is meant to reduce turbidity and suspended solids. It does not remove bacteria, viruses or parasites, and it does not make water safe to drink. Water leaving this column still requires proper disinfection.


What this is

A habitat has to detoxify its own soil, handle the waste it produces every day, and recycle water. Solved separately those are three problems. Solved together they are one machine, where the furnace that processes waste also keeps the bioreactor warm and fed, and both of them produce the material the filter is made of.

This repository holds the design, the bench build, and the code that measures whether it works.

docs/system.md The three stages and how they depend on each other
docs/mars.md Mars conditions, sizing for six crew and habitat requirements
docs/method.md How turbidity is measured from photographs
docs/protocol.md Greywater recipe, grading, calibration and run procedure
docs/build.md Build log with photographs and measured volumes
docs/results.md First runs and what they show
docs/print/target-sheet.pdf Printable checker target and white card for the rig
docs/drawings/ Bench drawings RWL-001 and RWL-002, system schematics RWL-003 and RWL-004
docs/references.md Every source, checked against the claim it supports
GLOSSARY.md Terms used throughout

Stage 2, the filtration column, is the stage built and tested on the bench; see docs/results.md. Stages 1 and 3 are supported by published work. Perchlorate salts are strong oxidisers and are not handled in this project.


Install

pipx install rwl   # or: pip install rwl

Published as rwl on PyPI. Run rwl with no arguments, or rwl info, for a summary of every command.

Measuring turbidity

Removal is measured from photographs rather than an electronic probe: a phone camera is available and free, a nephelometer is not. A printed target behind the sample loses contrast as suspended solids rise, and a white card in frame cancels exposure differences between shots.

Results are relative to the influent, never reported in NTU.

rwl target --out target-sheet.pdf   # print this at 100%, next to the sample
rwl roi photos/cal0.jpg --setup setup.json   # check the regions before measuring

rwl measure photos/cal*.jpg --setup setup.json --out readings.csv
rwl calibrate --readings readings.csv --levels levels.csv --out calibration.json
rwl measure photos/influent.jpg photos/charge*.jpg --setup setup.json --out run.csv
rwl report --readings run.csv --calibration calibration.json \
    --before influent --after charge1 charge2 charge3

report flags any result outside the calibrated range instead of extrapolating it. The timed drain of a charge doubles as a falling-head test: rwl permeability --seconds 45 --outlet-drop 0.30 gives the bed's hydraulic conductivity on Earth and at 0.37 g.

Read docs/method.md before shooting a session. The rig has to stay fixed or the series is void.

Sizing

rwl size --crew 6 --base early --explain
rwl cartridge --crew 6

size covers greywater, filter area under Mars gravity, retort heat, char output and perchlorate, chloride and oxygen stoichiometry for a crew. cartridge splits one filter cartridge into what Mars supplies and what Earth does. --explain prints the formula and source behind every number, --json the raw values; each constant is also cited directly in src/rwl/sizing.py.

Development

pip install -e '.[dev]'
pytest

Documentation site

A static site under site/, English at the root and Spanish under /es/. Besides the documentation it has three tools that run entirely in the browser:

  • Sizing simulator: the rwl size model, live, from the same constants
  • Measure in the browser: the photographic method from photos or a live camera, with files interchangeable with the CLI
  • 3D model: the habitat layout of RWL-004 and the column of RWL-001
pnpm install --dir site
pnpm --dir site dev # development
pnpm --dir site build # static export into site/out/

Building the PDF

The whole technical document is assembled from these Markdown files and the SVG drawings with doc-engine-cli. doc-engine.md is the manifest.

pipx install doc-engine-cli
doc-engine build doc-engine.md

Docker

docker compose up site # site on http://localhost:8080
docker compose run --rm rwl --help

Share this project

Share the link directly or scan the code: rwl.leonardosalas.dev

QR code linking to the project

Support

If this is useful to you, sponsorship on GitHub funds the parts, the materials and the time that go into documenting it properly.


License

Licensing is split by what you are using:

  • Source code — MIT. Use, modify and build on it freely.
  • Documentation, guides and media — CC BY 4.0. Share and adapt with credit.

About

Three-stage water pre-treatment column for a Mars habitat: bioremediated regolith, pyrolysis biochar, and live sensor telemetry. Bench-built and measured

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages