The present invention relates to (a) methods for selectively reducing subterranean water permeability, (b) subterranean formations containing compositions for selectively reducing subterranean water permeability, (c) enhanced oil recovery techniques, and (d) foamed gels having selective permeability to hydrocarbon fluids. 
During the life cycle of a hydrocarbon producing well, e.g., a well for extracting oil or natural gas from the earth, the producing well commonly also yields water.  In these instances, the amount of water produced from the well tends to increase over time, with a concomitant reduction in hydrocarbon production.  Frequently, the production of water becomes so profuse that remedial measures have to be taken to decrease the water/hydrocarbon production ratio or, as a last resort, the well is closed in because it has completely stopped producing hydrocarbons or the production of hydrocarbons has become uneconomical. 
Some of the remedial measures used to enhance the recovery of hydrocarbons from these wells entail injecting polymers into portions of the subterranean formation to plug off water producing zones within the formation.  Unfortunately, not all of these remedial measures are successful and, in some cases, the injected polymer actually further impairs the recovery of hydrocarbons from the treated well.  Even in cases where the polymer treatment does initially reduce the water/hydrocarbon production ratio, very commonly this ratio generally increases over time until the well again requires a remedial treatment. 
In addition, many enhanced oil recovery projects (e.g., miscible floods (such as carbon dioxide and hydrocarbon (e.g., propane, butane, and pentane enhanced natural gas) miscible floods), steam floods, fire floods (also known as in situ combustion), and immiscible floods (such as nitrogen, flue gas, and carbon dioxide immiscible floods)) inject a gas through an injection well in an attempt to increase the recovery of oil from producing wells.  Because gases tend to override and/or flow through the most gas-permeable zones of the subterranean formation, various formation zones remain virtually untouched by the injected gas.  Although attempts have been made to employ polymers in a few of these enhanced oil recovery techniques to divert the injected fluid to other parts of the subterranean formation, these injected polymers, while being effective for blocking the flow of fluids through the more permeable portion of the formation, also substantially prevent the passage of any gas or liquid through the blocked zones.  Accordingly, the use of polymers to block the more permeable zones of a subterranean formation makes it very difficult or virtually impossible for the enhanced oil recovery technique to recover any additional residual oil remaining in the blocked zones of the formation.