This is a only small part of my Master's thesis. It only works for square 2-d domain with area unit of 1. The other files are being refined to be uploaded onto github
A publication using this code can be found here
https://www.mdpi.com/2305-7084/3/3/75
Tran Duc VN, Chan PK. Using the Cahn–Hilliard Theory in Metastable Binary Solutions. ChemEngineering. 2019 Sep;3(3):75.