gas flow and pressure balancing in modeling