A general mathematical modelling technique for bioprocesses in engineering applications