The Anaerobic Digestion Model 1 is the quasi-industry standard for modelling anaerobic digestion, and it has seen several new implementations in recent years. It is assumed that these implementations would give the same results; however, a thorough comparison of these implementations has never been reported. This paper considers four different implementations of ADM1: one in Julia, one in Java, and two in Python. The Julia code is a de novo implementation of the ODE formulation of ADM1 that is reported here for the first time. The existing Java and Python codes implement the more common DAE formulation. Therefore, this paper also examines how DAE implementations compare to ODE implementations in terms of computational speed as well as solutions returned. As expected, the ODE and DAE forms both return comparable solutions. However, contrary to popular belief, the Julia ODE implementation is faster than the DAE implementations, namely by one to three orders of magnitude of compute time, depending on the simulation scenario and the reference implementation used for comparison.
The ultimate objective of this research is to concentrate nutrients—nitrogen (N), phosphorus (P), and potassium (K)—and produce process water from a chemically pretreated liquid digestate using an FO-RO hybrid process. However, in this manuscript, we assessed the suitability of (NH4)2SO4 and NaCl as draw solutes in a series of FO experiments employing a commercial CTA membrane and DI water as the feed solution. We also examined the regeneration of (NH4)2SO4 in a series of RO experiments at various feed concentrations and pressures using a commercial polyamide (PA) thin-film composite (TFC) membrane, ACM4. Additionally, the RO experiments enabled the experimental determination of the osmotic pressure of (NH4)2SO4 at various feed concentrations, which is crucial for designing the FO part of the hybrid process. The CTA membrane exhibited a significantly greater selectivity for (NH4)2SO4 than for NaCl at any osmotic pressure. The RO experiments demonstrated the possibility of reconcentrating (NH4)2SO4 to 0.5 mol/L, with a corresponding water flux of 60 L h−1 m−2 at 40 bars. The experimentally determined osmotic pressures were lower than those predicted by van’t Hoff’s equation but were consistent with those reported in the literature using an indirect hygrometric method.