using instantaneous generation of gas