Gastric acid
The highest concentration that gastric acid reaches in the stomach is 160 mM in the canaliculi. This is about 3 million times that of arterial blood, but almost exactly isotonic with other bodily fluids. The lowest pH of the secreted acid is 0.8, but the acid is diluted in the stomach lumen to a pH between 1 and 3.
Indometacin
Besides, indometacin has logarithmic acid dissociation constant pKa of 3 to 4.5. Since the physiologic body pH is well above the pKa range of indometacin, most of the indometacin molecules will be disscociated into ionised form, leaving very little unionised form of indometacin to cross a cell membrane. If the pH gradient across a cell membrane is high, most of the indometacin molecules will be trapped in one side of the membrane with higher pH. This phenomenon is called "ion trapping". The phenomenon of ion trapping is particularly prominent in the stomach as pH at the stomach mucosa layer is extremely acidic, while the parietal cells are more alkaline. Therefore, indometacin are trapped inside the parietal cells in ionised form, damaging the stomach cells, causing stomach irritation. This stomach irritation can reduce if the stomach acid pH is reduced.