The American Chemical Society’s Reactions series, considers the chemistry that goes to make a perfect grilled cheese sandwich.
Cheese making is an incredibly complex chemical process, and at a certain point, you may have learned the hard way that some cheeses simply don’t make the grill grade.
The Consumerist summarises the problem
It comes down to how casein proteins clump together into spheres called micelles, which are held together by calcium and are full of fat. The surface of a micelle is negatively charged, so usually the little balls would bounce away from each other.
But when lactic acid gets involved, the micelles smack into each other and create chains that trap water and turn into runny, melted cheese.
The ACS says the ideal pH level for a cheese used to make grilled cheese is perfectly balanced between 5.3 to 5.5 – lower and cheese will release all its oil when heated, leaving curdled, clumpy clusters.