Numerical membrane reactor simulation