```!Blending gases based on the Wobbe index. When you turn on your gas stove (or gas turbine if you are in industry) each morning and you set the knob to "5", you would like to get the same amount of heat from the burner from one day to the next, even though the composition of the "natural" gas feeding your appliance may vary from day to day. If the Wobbe index of the gas remains constant from day to day then the heat output of your appliance will remain the same from day to day. The Wobbe index is a measure of the heat content of the gas that flows through an orifice of constant size under constant pressure per unit of time. Based on elementary physics, Goffredo Wobbe in 1927 deduced that said heat content is a) proportional to the heat content of a cubic foot (or meter) of gas at standard temperature and pressure (STP), and b) inversely proportional to the square root of the density (or specific gravity) of the gas. I.e., at STP, lighter gas flows through the orifice faster than heavier gas; ! Keywords: Wobbe index, Blending, Gas blending; SETS: gas: btupcf, spg, avail, x; ENDSETSDATA: ! The gases of interest, their heat content in (upper) BTU per cubic foot, and specific gravity relative to air, cubic feet available per unit time; gas, btupcf, spg, avail= hydrogen 325 0.07 10 helium 0 0.138 45 methane 1012 0.55 120 ethane 1773 1.04 235 propane 2522 1.52 827 butane 3225 2.01 395 natgas 1025 0.65 690 co2 0 1.52 150 nitrogen 0 0.97 80 ; ! We want the Wobbe index in this interval; WOBL = 1500; WOBU = 1600; ENDDATA ! Availability limits; @FOR( gas(i): x(i) <= avail(i); ); ! batch size; blendtot = @SUM( gas(i): x(i)); ! Total heat content; heattot = @SUM( gas(i): btupcf(i)*x(i)); ! Total weight in spg; spgtot = @SUM( gas(i): spg(i)*x(i)); ! spg per cf at STP; spgcf = spgtot/blendtot; ! heat content per cf at STP; heatcf = heattot/blendtot; ! Wobbe index; wobbei = heatcf/(spgcf^0.5); ! bounds on the Wobbe index; wobbei >= WOBL; wobbei <= WOBU; ! A plausible objective is to maximize the energy content; MAX = heattot; ```