Bioreactor code to solve material balances for X,S,P and V