A general model for single-sludge wastewater treatment systems