  Modelling elastocaloric effect (eCE) is crucial for the design of
environmentally friendly and energy-efficient eCE based solid-state cooling
devices. Here, a thermodynamically consistent non-isothermal phase-field model
(PFM) coupling martensitic transformation with mechanics and heat transfer is
developed and applied for simulating eCE. The model is derived from a
thermodynamic framework which invokes the microforce theory and Coleman--Noll
procedure. To avoid the numerical issue related to the non-differentiable
energy barrier function across the transition point, the austenite-martensite
transition energy barrier in PFM is constructed as a smooth function of
temperature. Both the indirect method using isothermal PFM with Maxwell
relations and the direct method using non-isothermal PFM are applied to
calculate the elastocaloric properties. The former is capable of calculating
both isothermal entropy change and adiabatic temperature change ($\Delta
T_{\text{ad}}$), but induces high computation cost. The latter is
computationally efficient, but only yields $\Delta T_{\text{ad}}$. In a model
Mn-22Cu alloy, the maximum $\Delta T_{\text{ad}}$ ($\Delta
T_{\text{ad}}^{\text{max}}$) under a compressive stress of 100 MPa is
calculated as 9.5 and 8.5 K in single crystal (3.5 and 3.8 K in polycrystal)
from the indirect and direct method, respectively. It is found that the
discrepancy of $\Delta T_{\text{ad}}^{\text{max}}$ by indirect and direct
method is within 10% at stress less than 150 MPa, confirming the feasibility of
both methods in evaluating eCE at low stress. The results demonstrate the
developed PFM herein, combined with both indirect and direct method for eCE
calculations, as a practicable toolkit for the computational design of
elastocaloric devices.
