Niche: Environmental research
Simulation model for a biochar water filter
- Task
- A research project needed a model to design filters for rice field irrigation and to support a grant application
- What was built
- Model in Julia calibrated on lab water tests, scenarios and a sensitivity analysis, field plan for the next pilot
- Result
- The team knows which design changes matter and which data to collect next
What it was
A team in Bali builds low-tech filters from rock, biochar and plants for water that feeds rice fields. They had one pair of lab tests, before and after the filter, and needed a model for the design and for a grant application.
What was built
A dynamic model in Julia with a Python mirror. It separates particles from dissolved organics, and includes adsorption on biochar, a biofilm that matures over weeks and organics released by fresh biochar. 400 simulation runs showed which inputs matter most.
How it works
The model reproduces the lab result, compares design options and shows how long water has to stay in the biochar stage. A one page field plan lists what to measure at the next site, in order of importance.
Result
The team saw that contact time and the biofilm drive the result, not the amount of biochar, and got a clear list of data for the next pilot. The code is public on GitHub.