  We maximize the production of biogas in a gradostat at steady state. The
physical decision variables are the water, substrate, and biomass entering each
tank and the flows through the interconnecting pipes. Our main technical focus
is the nonconvex constraint describing microbial growth. We formulate a
relaxation and prove that it is exact when the gradostat is outflow connected,
its system matrix is irreducible, and the growth rate satisfies a simple
condition. The relaxation has second-order cone representations for the Monod
and Contois growth rates. We extend the steady state models to the case of
multiple time periods by replacing the derivatives with numerical
approximations instead of setting them to zero. The resulting optimizations are
second-order cone programs, which can be solved at large scales using standard
industrial software.
