This will be easy to do for silicates (see the equations 21 and 22 in Shoji & Kurita 2014).
Run these equations at layer initialization (TidalPy does not allow for a changing pressure at the moment, so these do not need to be recalculated after the planet is built).
Now phase change for other materials, namely ice, will be a much bigger challenge and deserves its own issue.
This will be easy to do for silicates (see the equations 21 and 22 in Shoji & Kurita 2014).
Run these equations at layer initialization (TidalPy does not allow for a changing pressure at the moment, so these do not need to be recalculated after the planet is built).
Now phase change for other materials, namely ice, will be a much bigger challenge and deserves its own issue.