As you knew, A phase change material (PCM) is a substance with a high heat of fusion which, melting and solidifying at a certain temperature, is capable of storing and releasing large amounts of energy. Really I am not dealing before with such materials in COMSOL but I think enter the material properties as a function of temperature may be considered as a solution to deal with PCM.
I am not familiar with the nanocapsule topic and its use but my answer refer to to the physics application in comsol.
if you have the heat transfer in solids license, you can add "Phase change material" interface for a domain.
There are many tutorial in the comsol gallery and other explaination in the comsol blog that might be helpful.
The currently applied physics in Comsol for phase change is the "apparent heat capacity formulation". It is a straightforward method that include the phase change enthalpy in the heat capacity of the material. You will find more information in the heat transfer guide in comsol documentation.