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.
Mucus
The ionic charges of mucin are mainly provided by acidic amino acids including aspartic acid (pKa=3.9) and glutamic acid (pKa=4.2). The charges of acidic amino acids will change with environmental pH value due to acid dissociation and association. Aspartic acid, for example, has a negative side chain when the pH value is above 3.9, while a neutrally charged side chain will be introduced as pH value drops below 3.9. Thus, the number of negative charges in mucus is influenced by the pH value of surrounding environment. That is, the polyelectrolyte effect of mucus is largely affected by the pH value of solution due to the charge variation of acidic amino acid residues on the mucin backbone. For instance, the charged residue on mucin is protonated at a normal pH value of the stomach, approximately pH 2. In this case, there is scarcely polyelectrolyte effect, thereby causing compact mucus with little swelling capacity. However, a kind of bacteria, "Helicobacter pylori", is prone to producing base to elevate the pH value in stomach, leading to the deprotonation of aspartic acids and glutamic acids, i.e., from neutral to negative-charged. The negative charges in the mucus greatly increase, thus inducing the polyelectrolyte effect and the swelling of the mucus. This swelling effect increases the pore size of the mucus and decreases mucus' viscosity, which allows bacteria to penetrate and migrate into the mucus and cause disease.