Computation of optimal gas inflow

Summary
Computation of optimal gas inflow