Why reverse the airflow?
In a one-way forced-aeration pile, air repeatedly enters from the same side. That can produce vertical differences in temperature, oxygen availability and moisture. This project explores a two-way configuration in which the airflow direction is periodically reversed so the calculation order through the pile also reverses.
The kinetic framework is based on the forced-aeration composting model reported by Bari & Koenig (2012), with the computational project designed as an extension for alternating airflow.
Computational structure
The pile is represented as six vertical layers. At each simulation hour, the code determines the active airflow direction, sets the layer calculation order, processes each layer using information passed along the airflow path, updates state variables, stores outputs and repeats for the full simulation.
Initialize
Define mass, layer count, time step, temperature, moisture, solids, airflow and environmental/kinetic parameters.
Set airflow order
Switch programmatically between Layer 1→6 and Layer 6→1 using the user-defined reversal cycle.
Update coupled states
Calculate layer-wise heat, moisture, oxygen and degradation responses for each hour.
Compare outcomes
Store time-series outputs and compare the two-way scenario with the previously established one-way implementation.
Simulated variables
Key comparison from the implemented scenario
Under the example conditions documented in the repository, the two-way simulation produced a lower final compost mass and lower final water content than the one-way model. The layer-wise behavior was also reported as comparable between opposite layers, consistent with the intended alternating-flow logic.
| Parameter | One-way aeration | Two-way aeration |
|---|---|---|
| Initial mass | 750 kg | 750 kg |
| Final compost mass | 357.9 kg | 332.2 kg |
| Final total solids | 240.5 kg | 236.9 kg |
| Final volatile solids | 80.6 kg | 76.6 kg |
| Final water content | 117.4 kg | 95.3 kg |
Scope & limitations
This is a mathematical/computational model, not a substitute for full-scale compost-pile measurements. Its value is in reproducing and extending a published kinetic framework, testing airflow-reversal logic, and understanding how coupled state variables respond in a layered system. Model validation against dedicated two-way experimental data would be an important next step.