The heat equation is often written as $\frac{\partial T}{\partial t} = \frac{\kappa}{c} \nabla^2T$ where $\kappa$ is the thermal conductivity and $c$ is a heat capacity per volume.
I often see $c$ written as $c_P$ implying that it is the heat capacity (per unit volume) for a system held at constant pressure, but I was wondering if this was necessary of not?
I understand that in most 'everyday' experimental examples, pressure will be the variable that is held constant, and that for liquids and solids there isn't much difference between $c_P$ and $c_V$ anyway. However, in theory, can the heat capacity in this equation be with whatever variable you want to hold constant (so could be either $c_P$ or $c_V$ depending on your situation?
I also found this similar question but I couldn't find a definitnive answer to my question in their answers: In deriving the heat transfer equation, why do we use heat capacity at constant pressure?.