Introduction

Superconducting devices are often experimentally realized as thin-film circuits or hybrid structures operating in the mesoscopic regime1,2,3,4. At this length scale, where the size of the circuit elements becomes comparable with the superconducting coherence length, the nature of the superconducting state may be dictated by various finite-size or surface/interface effects5. This holds true in particular for unconventional superconductors, such as the high-temperature superconductors with an order parameter of \(d_{x^2 - y^2}\) symmetry that changes the sign around the Fermi surface. Scattering at surfaces, or defects, leads to substantial pair breaking and formation of Andreev states with energies within the superconducting gap6,7. Today, the material control of high-temperature superconducting films is sufficiently good that many advanced superconducting devices can work at elevated temperatures8,9. This raises the question how the specific surface physics of d-wave superconductors influences devices.

From a theory point of view, the physics at specular pair-breaking surfaces of d-wave superconductors is rich and interesting. The reason is the formation of zero-energy (midgap) Andreev states due to the sign change of the d-wave order parameter for quasiparticles scattered at the surface6,7,10. In modern terms, there is a flat band of spin-degenerate zero-energy surface states as a function of the parallel component of the momentum, p||, which is a good quantum number for a specular surface. A topological invariant has been identified11,12, that guarantees the flat band for a time-reversal symmetric superconducting order parameter and p|| conserved. However, the large spectral weight of these states exactly at zero energy (i.e., at the Fermi energy) is energetically unfavorable. Different scenarios have been proposed, within which there is a low-temperature instability and a phase transition into a time-reversal symmetry-broken phase where the flat band is split to finite energies, thus lowering the free energy of the system. One scenario is the presence of a subdominant pairing interaction and appearance of another order parameter component π/2 out of phase with the dominant one13,14,15, for instance a subdominant s-wave resulting in an order parameter combination Δd + iΔs. The phase transition is driven by a split of the flat band of Andreev states to ±Δs. The split Andreev states carry current along the surface, which results in a magnetic field that is screened from the bulk. In a second scenario, exchange interactions drive a ferromagnetic transition at the edge where the flat Andreev band is instead spin split16,17. A third scenario involves spontaneous appearance of supercurrents18,19,20 that Doppler shifts the Andreev states and thereby lowers the free energy. Here the electrons couple to the electromagnetic gauge field A(R), and this mechanism was first considered theoretically for a translationally invariant edge. In this case, the transition is a result of the interplay of weakly Doppler shifted surface bound states, decaying away from the surface on the scale of the superconducting coherence length ξ0, and weak diamagnetic screening currents, decaying on the scale of the penetration depth λ. The resulting transition temperature is very low, of order T* ~ (ξ0/λ)Tc, where Tc is the d-wave superconducting transition temperature. Later, the transition temperature was shown to be enhanced in a film geometry21,22,23,24,25 where two parallel pair-breaking edges are separated by a distance of the order of a few coherence lengths. The suppression of the order parameter between the pair-breaking edges can be viewed as an effective Zeeman field that splits the Andreev states and enhances the transition temperature. The mechanism does not involve subdominant channels or coupling to magnetic field, but depends on film thickness D, and the transition temperature decays rapidly with increasing thickness as T* ~ (ξ0/D)Tc.

In this paper, we consider a peculiar scenario26,27 where spontaneous supercurrents also break translational symmetry along the edge. This scenario too does not rely on any additional interaction term in the Hamiltonian. Instead, as we will discuss below, it relies on the development of a texture in the gradient of the d-wave order parameter phase χ, or more precisely in the gauge invariant superfluid momentum

$${\bf{p}}_{\mathrm{s}}({\bf{R}}) = \frac{\hbar }{2}\nabla \chi ({\bf{R}}) - \frac{e}{c}{\bf{A}}({\bf{R}}),$$
(1)

where ħ is Planck’s constant, e the charge of the electron, and c the speed of light. This superfluid momentum spontaneously takes the form of a planar vector field with a chain of sources and sinks along the boundary and saddle points in the interior, see Fig. 1. The vector field is illustrated by arrows showing the local unit vectors \(\hat {\bf{p}}_{\mathrm{s}}({\bf{R}})\), while the color scale illustrates the magnitude ps(R). An interior critical point at R0 is characterized by a Poincaré index defined as28,29

$$I = \frac{1}{{2\pi }}{\oint}_{ {\varGamma }} {\kern 1pt} \mathrm{d}\theta ,$$
(2)

where θ = arctan(psy/psx) is the angle of \(\hat {\bf{p}}_{\mathrm{s}}({\bf{R}})\) on the Jordan curve Γ encircling R0. Internal sources and sinks have I = +1, while saddle points have I = −1. Although the special points on the boundary have to be treated with care, there is a sum rule (Eq. (3)) for the Poincaré indices, as we will discuss below. We identify the ps vector field as the order parameter of the symmetry-broken phase, motivated by the fact that the free energy is lowered by a large split of the flat band of Andreev states by a Doppler shift vF · ps, where vF is the Fermi velocity. This free energy gain is maximized by maximizing the magnitude of ps, which is achieved by the peculiar vector field in Fig. 1. The balance of the Doppler shift gain and the energy cost in setting up the vector field with critical points where30  × ps ≠ 0 and the splay patterns between them leads to a high T* ≈ 0.18Tc. The inhomogeneous vector field induces a chain of loop-currents at the edge circulating clockwise and anti-clockwise. The induced magnetic fluxes of each loop are a fraction of the flux quantum and form a chain of fluxes with alternating signs along the edge. Here we clarify the structure of the order parameter of the symmetry-broken phase, i.e., ps, and study the thermodynamics of this phase under the influence of an external magnetic field, explicitly breaking time-reversal symmetry.

Fig. 1
figure 1

Superfluid momentum as a vector field. The superfluid momentum ps forms a non-trivial planar vector field with a regular chain of sources and sinks along the edge, thereby breaking local continuous translational symmetry along the edge. Several critical points, including saddle points, sources, and sinks, are formed in the interior. The Poincaré indices of the critical points add up to fulfill the generalized Poincaré-Hopf theorem in Eq. (3). The magnetic field is zero, Bext = 0, while the temperature is T = 0.1Tc. Since T is well below T*, the splay patterns are rather stiff, leading to triangular shapes near the edges. The stiffness is clear from the magnitude variation shown in color scale. The inset shows one period of the edge structure

Results

Translational symmetry breaking in a magnetic field

In Fig. 2, we show the influence of a rather weak external magnetic field, B = 0.5Bg1, applied to the d-wave superconducting grain with pair-breaking edges for varying temperature near the phase transition temperature T*. The scale Bg1 = Φ0/\({\cal A}\) corresponds to one flux quantum threading the grain area \({\cal A}\), see the Methods section. The left and right columns show the currents and the magnetic field densities, respectively, induced in response to the applied field. To be concrete, we discuss a few selected sets of model parameters, as listed in Table 1. First, for T > T* (parameter set I), the expected diamagnetic response of the condensate in the inner part of the grain is present, see Fig. 2a, e. On the other hand, midgap quasiparticle Andreev surface states respond paramagnetically. This situation is well established theoretically and experimentally through measurements of the competition between the diamagnetic and paramagnetic responses seen as a low-temperature up-turn in the penetration depth18,31,32. Upon lowering the temperature to TT* (parameter set II), see Fig. 2b, f, the paramagnetic response at the edge becomes locally suppressed and enhanced, forming a sequence of local minima and maxima in the induced currents and fields. The bulk response is, on the other hand, relatively unaffected. Finally, as T < T* (parameter set III), see Fig. 2c, g, the regions of minimum current turns into regions with reversed currents. The resulting loop currents with clock-wise and anti-clockwise circulations induce magnetic fluxes along the surface with opposite signs between neighboring fluxes. The situation for T < T* in an external magnetic field can be compared with the one in zero magnetic field26 displayed in Fig. 2d, h. In the presence of the magnetic field, there is an imbalance between positive and negative fluxes, while in zero external magnetic field, the total induced flux integrated over the grain area is zero.

Fig. 2
figure 2

Spontaneously formed currents and induced magnetic field. ad Total current magnitude and eh induced magnetic flux density for different temperatures and external fields (see annotations). Lines and arrows have been added to illustrate the flow of the currents

Table 1 Sets of parameters used for presenting results

Topology of the superfluid momentum vector field

Let us quantify the symmetry-broken phase in a magnetic field by plotting the superfluid momentum defined in Eq. (1), see Fig. 3. For TT* (parameter set II), the amplitude of ps varies along the edge (coordinate x), see Fig. 3a, reflecting the varying paramagnetic response in Fig. 2b, f. For T < T* (parameter set III), the sources and sinks have appeared pairwise together with a saddle point, see Fig. 3b. The left defects in the figure are not well developed because of the proximity to the corner. Finally, in Fig. 3c, we show the vector field at a lower temperature when the chain of sources, sinks, and saddle points are well established and the magnitude of ps is large, much larger than in the interior part of the grain still experiencing diamagnetism. In a magnetic field, the vector field far from the surface has a preferred direction reflecting the diamagnetic response of the interior grain. This shifts the sources and sinks along the surface, as compared with the regular chain for zero field in Fig. 1, and moves the saddle points to the surface region.

Fig. 3
figure 3

Superfluid momentum for varying temperature. a The superfluid momentum induced in an external magnetic field of Bext = 0.5Bg1 for a temperature slightly above the transition temperature T* reflects the paramagnetic response. b At the phase transition, source–sink–saddle-point motifs appear and separate along the edge breaking translational invariance along the edge coordinate x. c For lower temperature, the magnitude \(\left| {{\bf{p}}_{\mathrm{s}}} \right|\) grows large. Note that different color scales are used in the subfigures in order to enhance visibility

The superflow pattern of sources, sinks, and saddle points satisfy a certain sum rule related to the topology of the sample. This relation also ties the special points of the ps field on the edge of the sample with critical points in its bulk. The generalized Poincaré-Hopf theorem for manifolds with boundaries33,34 connects the properties of a vector field v inside a manifold M, and on its boundary ∂M, with the Euler characteristic of the manifold χ(M). Using the formulation presented in ref. 34, we write

$${\mathrm{Ind}}_M(v) + \frac{1}{2}\left[ {{\mathrm{Ind}}_{\partial _ - M}(v_{||}) - {\mathrm{Ind}}_{\partial _ + M}(v_{||})} \right] = \chi (M),$$
(3)

where Ind M (v) is the total Poincaré index of critical points of the field v internal to M, \({\mathrm{Ind}}_{\partial _ \pm M}(v_{||})\) is the total Poincaré index of critical points of the tangent vector v|| || ∂M on the boundary. The theorem applies when the boundary ∂M does not go through any critical points of v. Boundary indices where field points inside (M) / outside (+M) of M, come with positive/negative signs. In Supplementary Note 1, we demonstrate in detail how the sum rule works for the vector field in Fig. 1, redrawn as a streamline plot in Supplementary Fig. 2. We also provide other examples of grain geometries in Supplementary Figs. 310. We utilize the sum rule as a tool to verify that the calculations are correct.

In a magnetic field, as in Fig. 3, a motif with one edge source, one edge sink, and one saddle point annihilate at T*. In the same fashion, increasing the magnetic field strength, the motif gets smaller as the defects are forced toward each other to match the superflow in the bulk. However, the magnitude of ps near the surface due to Meissner screening of the bulk is not large enough to force an annihilation of the motifs. The broken symmetry phase therefore survives the application of an external magnetic field within the whole Meissner state, b [0, 1].

For higher fields, when Abrikosov vortices start to enter the grain, the problem quickly becomes complicated by the interplay of the Abrikosov vortex lattice formation and finite grain size effects. The free energy landscape is very flat and it is possible to find multiple metastable configurations. For a variety of grain sizes and magnetic field strengths, we have established coexistence of Abrikosov vortices and the spontaneously formed edge loop currents35. We therefore conclude that the edge loop-current phase established for T < T* should survive into the mixed state, but a complete investigation of the geometry-dependent phase diagram for large fields is beyond the scope of this paper.

Induced currents and magnetic fields

Let us investigate further how the currents and magnetic fields are induced at T*. As we have seen, the paramagnetic response and the spontaneously appearing edge loop currents compete, as they both lead to shifts of midgap Andreev states. As the temperature is lowered, the strength of the paramagnetic response increases slowly and linearly, while the strength of the loop currents increases highly non-linearly. This is illustrated in Fig. 4, by plotting the area-averaged current magnitude

$$\overline j = \frac{1}{{\cal A}}{\int} {\kern 1pt} {\mathrm{d}^2}R{\kern 1pt} \left| {{\bf{j}}({\bf{R}})} \right|,$$
(4)

as a function of temperature for the cases when Bext = 0 (solid line), Bext = 0.5Bg1 (dashed line), and for comparison also for a system without pair-breaking edges having only a diamagnetic response at Bext = 0.5Bg1 (dash-dotted line). The paramagnetic response is fully suppressed at low temperatures T < T*. Such a sudden disappearance of the paramagnetic response at a temperature T* should be experimentally measurable, for example in the penetration depth or by using nano-squids36,37.

Fig. 4
figure 4

Current as a function of temperature. The area-averaged current magnitude, defined in Eq. (4), is plotted for zero external magnetic field (solid line), with an external magnetic field of magnitude Bext = 0.5Bg1 (dashed line), and for a system without pair-breaking edges at Bext = 0.5Bg1 (dash-dotted line). In the latter case, the system only displays a diamagnetic response. Letters (I)–(IV) indicate the parameter values corresponding to the fields in Fig. 2, see Table 1

We show in Fig. 5a the total induced magnetic flux through the grain

$${ {\Phi }}_{{\mathrm{ind}}} = {\int} {\kern 1pt} {\mathrm{d}^2}RB_{{\mathrm{ind}}}({\bf{R}}),$$
(5)

and in Fig. 5b the area-averaged order parameter magnitude

$$\overline { {\Delta }} _{\mathrm{d}} = \frac{1}{{\cal A}}{\int} {\kern 1pt} {\mathrm{d}^2}R\left| {{ {\Delta }}_{\mathrm{d}}({\bf{R}})} \right|,$$
(6)

both as functions of temperature for different values of Bext. The figures also show results for a d-wave grain without pair-breaking edges at Bext = 0.5Bg1 (dash-dotted line). For better visibility, the latter results have been scaled by a factor 0.4 and 0.9 in (a) and (b), respectively. Two different trends are distinguishable in the observables for T < T* and T > T*, separated by a “kink”. The induced magnetic flux through the grain area decreases as T decreases down to T* due to the increasing paramagnetic response that competes with the diamagnetic one. At T*, the inhomogeneous edge state appear and starts competing with the paramagnetic response. Thus, the total magnetic flux increases again. At the same time, the order parameter is partially healed.

Fig. 5
figure 5

Magnetic flux as a function of temperature. a Temperature dependence of the induced magnetic flux, defined in Eq. (5). The solid lines indicate, from bottom to top (colors purple to red), the external field magnitude from Bext = 0 to Bext = 0.5Bg1 in steps of 0.05Bg1. The line corresponding to zero field lies exactly at zero since there is an equal amount of positive and negative fluxes induced in this case, see Fig. 2. Panel b shows the area-averaged order parameter magnitude defined in Eq. (6) versus temperature. Results are also shown for a system without pair-breaking edges (dash-dotted line) at Bext = 0.5Bg1, but scaled with a factor 0.4 and 0.9 in a and b, respectively

Phase transition and thermodynamics

The sudden changes with a discontinuity in the derivative as a function of temperature of the total induced current, the magnetic flux, as well as the order parameter (Figs. 4 and 5) indicate that there is a phase transition occurring at the temperature T*. In zero external magnetic field, there is a second-order phase transition at T*, where both time-reversal symmetry and continuous translational symmetry along the edge are spontaneously broken26. Let us now investigate the thermodynamics in an external magnetic field already explicitly breaking time-reversal symmetry.

In Fig. 6a, we plot the free energy difference between the superconducting and normal states ΩS − ΩN, defined in Eq. (29), for external field B = 0.5Bg1 (red dashed line) and for zero field (solid black line). For comparison, we show the free energy difference for a purely real order parameter in zero field (gray fine line), i.e., without the symmetry breaking edge loop currents. For T < T*, this solution is not the global minimum of the free energy, and we therefore refer to it as a metastable state. To enhance the visibility of the differences in free energy between the possible solutions, we show in Fig. 6b the free energy difference with respect to the metastable state, i.e., ΩS − Ωms. The small slope in the red dashed line at T > T* in Fig. 6b is caused by the shift of midgap Andreev states due to the paramagnetic response, which increases as T decreases. The phase transition temperature T* for the second-order phase transition can be identified with the “knee” in the entropy difference defined in Eq. (31), see Fig. 6c, d. Since time-reversal symmetry is already explicitly broken by the external magnetic field, the phase transition signals breaking of local continuous translational symmetry and establishment of the vector field ps with the chain of defects along the edge, as shown in Fig. 3. The magnitude of the order parameter follows the expected scaling law for second-order phase transitions, ps(T)  (1 − T/T*)β with β = 1/2, as shown in the inset of Fig. 6d. However, the temperature range within which the scaling law holds is very limited and non-linear terms play an important role for lower temperatures T < T*.

Fig. 6
figure 6

Thermodynamics and phase transition. a, b free energy, c, d entropy, and e, f specific heat capacity, versus temperature. The lines correspond to a system with purely real order parameter without edge currents (gray fine line), a system with spontaneous edge currents in zero magnetic field (black solid line), and in a finite external field B = 0.5Bg1 (red dashed line). In the lower panels b, d, and f, the quantities have been subtracted by the corresponding values of the system with a purely real order parameter, the metastable (ms) state. The heat capacity is normalized by the heat capacity jump at the normal-superconducting phase transition for a bulk d-wave system, ΔCd in Eq. (7). The inset in (d) shows the temperature dependence of the superfluid momentum near T*, averaged over a few source–sink unit cells at one edge. It follows the expected temperature dependence for the order parameter at a mean-field second-order phase transition

The knee in the entropy leads to a jump in the specific heat, as shown in Fig. 6e, f. The heat capacity is expressed in units of the heat capacity jump at the normal-superconducting phase transition at Tc for a bulk d-wave system

$${\mathrm{\Delta }}C_{\mathrm{d}} = \frac{{2\alpha }}{3}{\cal A}k_{\mathrm{B}}^2T_{\mathrm{c}}N_{\mathrm{F}},$$
(7)

where α = 8π2/[7ζ(3)], with ζ being the Riemann-zeta function. The jump in heat capacity at the phase transition is an edge-to-area effect, and grows linearly as the sample becomes smaller. The jump is roughly 4.5% of ΔCd for the mesoscopic \({\cal A} = 60 \times 60\xi _0^2\) grain considered here, and grows as the size of the grain is reduced. The phase transition temperature T* is extracted as a function of Bext as the midpoint temperature of the jump in the specific heat. Figure 7 shows a phase diagram where the T*, extracted in this way from the specific heat, is plotted versus external field strength (crosses). We compare this with T* extracted as the minimum (the “kink”, see Fig. 5a) in the induced flux. The small lowering of T* with increased Bext is caused by the competing paramagnetic response.

Fig. 7
figure 7

Phase diagram. The transition temperature T* to a state with spontaneously broken continuous translational symmetry is plotted as a function of the external magnetic flux density. The crosses show T* extracted from the jump in the specific heat in Fig. 6e, while the open circles show T* extracted from the minimum of the total induced magnetic flux in Fig. 5a

From the above, it is clear that the phase with edge loop currents shows extreme robustness against an external magnetic field in the whole Meissner region (Bext ≤ Bg1). The magnitude of the spontaneously formed superfluid momentum ps at the edge grows non-linearly to be very large for T < T*, fueled by the lowering of the free energy by Doppler shifts of the flat band of Andreev surface states. The corresponding correction to ps, due to the process of screening of the external magnetic field, is in comparison small. Thereby, T* is not dramatically shifted in a magnetic field and the symmetry-broken phase below T* is robust.

Discussion

Which of the scenarios outlined in the introduction wins will ultimately depend on the material properties of a specific high-temperature superconducting sample, or the material properties of other candidate d-wave superconductors, e.g., FeSe38. In the scenario studied here, the resulting transition temperature is high, T* ~ 0.18Tc. It means that the interaction terms in the Hamiltonian for the other scenarios would have to be sufficiently large in order to compete. It is even possible that one or another scenario wins in different parts of the material’s phase diagram16.

We note that the phase transition at T* means that the initially topologically protected flat band of zero energy surface states is shifted away from the Fermi energy. Such fragility of topologically protected states has been studied recently e.g., for topological insulators39 supporting the quantum spin-Hall state. In that case, an edge reconstruction due to Coulomb interactions leads to breaking of time-reversal symmetry. In the d-wave superconductor case, although the bulk Hamiltonian still maintains required symmetries, a local instability at the surface violates these symmetries spontaneously and moves the flat band of bound states to finite energies. The spontaneously broken translational symmetry allows for a larger shift from zero energy and a high T*.

From an experimental point of view, the surface physics of d-wave superconductors is complicated by, for instance, surface roughness, inhomogeneous stoichiometry, and presence of impurities. The formation of a band of Andreev states centered at zero energy is well established by numerous tunneling experiments, in agreement with the expectation for d-wave symmetry of the order parameter, as reviewed in refs. 6,7. One consistent experimental result is that the band is typically quite broad, with a width that saturates at low temperature. On the other hand, the establishment of a time-reversal symmetry breaking phase remains under discussion, see for instance refs. 40,41. Several tunneling experiments on YBCO42,43,44 show a split of the zero-bias conductance peak, while others do not45,46. Other probes indicating time-reversal symmetry breaking include thermal conductivity47, Coulomb blockade in nanoscale islands5, and STM tunneling at grain boundaries in FeSe38. As we argued in refs. 26,27 within the scenario with spontaneous loop currents, the split of the Andreev band might be difficult to resolve in a tunneling experiment because of the broken translational symmetry along the edge and associated variations in the superflow field. This leads to a smearing effect for tunnel contacts with an area larger than the coherence length and an expected wide, largely temperature-independent, peak centered at zero energy. In fact, this would be consistent with most tunneling experiments.

With an eye to inspire a new generation of experiments, we have presented results for the interplay between an external magnetic field, that induces screening supercurrents, and the phase transition at T* into a state with the spontaneous loop currents at the edges. We have shown that the phase should be quantified in terms of its order parameter, the vector field ps(R), which contains edge sources and sinks, as well as saddle points. At all these critical points,  × ps ≠ 0. The ps vector field drives the loop currents with opposite circulations in neighboring loops. The loop-current strength increases highly non-linearly, suppressing the paramagnetic response present for T > T*. As the strength of the external magnetic field increases, the size of the Doppler shift due to the paramagnetic response grows linearly. Therefore, T* decreases slightly as the magnitude of the external field increases. The influence of the external field, and in particular the sudden disappearance of the paramagnetic response, leads to observables which we argue should be visible in experiment. For example the “kink” in the total induced flux at T*. The magnetic fluxes induced by the loop currents should be directly observable with recently developed scanning probes36,37, and the sudden disappearance of the paramagnetic response should be observable with nano-SQUIDS and possibly in penetration-depth experiments. Furthermore, the large jump in heat capacity at the phase transition should be observable with nanocalorimetry48.

The identification of the order parameter ps(R), with its topological textures, leads to similarities with other systems, including general relativity33, fluid dynamics49, liquid crystals50, and superfluid 3He51. An interesting difference is that in those systems, there is typically a transition in a preexisting vector field to a state with topological textures. Here, instead, we have a singlet d-wave superconductor that spontaneously establishes ps(R) with topological textures different than the traditional Abrikosov vortices.

Methods

Model and grain geometry

Our aim is to investigate the ground state of clean mesoscopic d-wave superconducting grains in an external magnetic field applied perpendicular to the crystal ab-plane, as shown in Fig. 8. As a typical geometry, we consider a square grain with side lengths D = 60ξ0, where ξ0 = ħvF/(2πkBTc) is the zero-temperature superconducting coherence length. Here, vF is the normal state Fermi velocity, and kB the Boltzmann constant. The sides of the system are assumed to be misaligned by a 45° rotation with respect to the crystal ab-axes, inducing maximal pair-breaking at the edges.

Fig. 8
figure 8

Grain geometry. The system consists of a d-wave superconducting grain exposed to an external magnetic field Bext = \(- B_{{\mathrm{ext}}}\widehat {\bf{z}}\). The crystal ab-axes are rotated 45° relative to the grain edges, inducing pair breaking at the edges of the system. The color scale shows the magnetic field Bind induced in response to an external field of size Bext = Φ0/2\({\cal A}\) at a temperature T = 0.2Tc. There is a diamagnetic response carried by the condensate in the interior, and a paramagnetic response carried by midgap surface Andreev states at the edges

The external field is directed perpendicular to the xy-plane,

$${\bf{B}}_{{\mathrm{ext}}} = - B_{{\mathrm{ext}}}\widehat {\bf{z}}||\widehat {\bf{c}}.$$
(8)

We shall consider rather small external fields, and will use a field scale Bg1 = Φ0/\({\cal A}\), corresponding to one flux quantum threading the grain of area \({\cal A}\) = D2 = 60ξ0 × 60ξ0. The flux quantum Φ0 = hc/(2|e|) is given in Gaussian CGS units. The field Bg1 is larger than the lower critical field \(B_{{\mathrm{c}}1} \propto { {\Phi }}_0{\mathrm{/}}\lambda _0^2\), where vortices can enter a macroscopically large superconductor, since the grain side length is smaller than the penetration depth. We assume that λ0 = 100ξ0, relevant for YBCO. The upper critical field \(B_{{\mathrm{c}}2} \propto { {\Phi }}_0{\mathrm{/}}\xi _0^2\) is much larger than any field we include in this study. To be precise, we parameterize the field strength as

$$B_{{\mathrm{ext}}} = bB_{{\mathrm{g}}1},B_{{\mathrm{g}}1} \equiv \frac{{{ {\Phi }}_0}}{\cal A},$$
(9)

and we will consider b [0, 1].

Quasiclassical theory

We utilize the quasiclassical theory of superconductivity52,53,54, which is a theory based on a separation of scales55,56,57,58. For instance, the atomic scale is assumed small compared with the superconducting coherence length, \(\hbar {\mathrm{/}}p_{\mathrm{F}} \ll \xi _0\). This separation of scales makes it possible to systematically expand all quantities in small parameters such as ħ/pFξ0, Δ/\(\epsilon _{\mathrm{F}}\), and kBTc/\(\epsilon _{\mathrm{F}}\), where Δ is the superconducting order parameter, pF is the Fermi momentum, and \(\epsilon _{\mathrm{F}}\) is the Fermi energy. In equilibrium, the central object of the theory is the quasiclassical Green’s function \(\hat g({\bf{p}}_{\mathrm{F}},{\bf{R}};z)\), which is a function of quasiparticle momentum on the Fermi surface pF, the quasiparticle center-of-mass coordinate R, and the quasiparticle energy z. The latter is real z = \(\epsilon\) + i0+ with an infinitesimal imaginary part i0+ for the retarded Green’s function, or an imaginary Matsubara energy z = i\(\epsilon _n\) = iπkBT(2n + 1) in the Matsubara technique (n is an integer). To keep the notation compact, the dependence on the parameters pF, R, and z will often not be written out. The hat on \(\hat g\) denotes Nambu (electron-hole) space

$$\hat g = \left( {\begin{array}{*{20}{c}} g & f \\ { - \tilde f} & {\tilde g} \end{array}} \right),$$
(10)

where g and f are the quasiparticle and pair propagators, respectively. The tilde operation denotes particle-hole conjugation

$$\tilde \alpha ({\bf{p}}_{\mathrm{F}},{\bf{R}};z) = \alpha ^ \ast ( - {\bf{p}}_{\mathrm{F}},{\bf{R}}; - z^ \ast ).$$
(11)

The quasiclassical Green’s function is parameterized in terms of two scalar coherence functions, γ(pF, R; z) and \(\tilde \gamma\)(pF, R; z), as59,60,61,62,63,64,65

$$\hat g = - \frac{{i\pi }}{{1 + \gamma \tilde \gamma }}\left( {\begin{array}{*{20}{c}} {1 - \gamma \tilde \gamma } & {2\gamma } \\ {2\tilde \gamma } & { - 1 + \gamma \tilde \gamma } \end{array}} \right).$$
(12)

Note that with this parameterization, the Green’s function is automatically normalized to \(\hat g^2 = - \pi ^2\hat 1\). The coherence functions obey two Riccati equations:

$$(i\hbar {\bf{v}}_{\mathrm{F}} \cdot \nabla + 2z + 2\frac{e}{c}{\bf{v}}_{\mathrm{F}} \cdot {\bf{A}})\gamma = - {\tilde{ \Delta }}\gamma ^2 - { {\Delta }},$$
(13)
$$(i\hbar {\bf{v}}_{\mathrm{F}} \cdot \nabla - 2z - 2\frac{e}{c}{\bf{v}}_{\mathrm{F}} \cdot {\bf{A}})\tilde \gamma = - { {\Delta }}\tilde \gamma ^2 - {\tilde{ \Delta }},$$
(14)

where A is the vector potential. These first-order non-linear differential equations are solved by integration along straight (ballistic) quasiparticle trajectories. Quantum coherence is retained along these trajectories, but not between neighboring trajectories. A clean superconducting grain in vacuum is assumed by imposing the boundary condition of perfect specular reflection of quasiparticles along the edges of the system.

The superconducting order parameter is assumed to have pure d-wave symmetry

$${ {\Delta }}({\bf{p}}_{\mathrm{F}},{\bf{R}}) = { {\Delta }}_{\mathrm{d}}({\bf{R}})\eta _{\mathrm{d}}(\theta ),$$
(15)

where θ is the angle between the Fermi momentum pF and the crystal \(\widehat {\bf{a}}\)-axis, and ηd(θ) is the d-wave basis function:

$$\eta _{\mathrm{d}}(\theta ) = \sqrt 2 {\kern 1pt} {\mathrm{cos}}(2\theta ),$$
(16)

fulfilling the normalization condition

$${\int} {\frac{{\mathrm{d}\theta }}{{2\pi }}\left| {\eta _{\mathrm{d}}(\theta )} \right|^2} = 1.$$
(17)

The order parameter amplitude satisfies the gap equation

$$\Delta _{\mathrm{d}}({\bf{R}}) = \lambda _{\mathrm{d}}N_{\mathrm{F}}k_{\mathrm{B}}T\mathop {\sum}\limits_{\left| {\epsilon _n} \right| \le { {\Omega }}_{\mathrm{c}}} {\kern 1pt} {\int} {\kern 1pt} \frac{{\mathrm{d}\theta }}{{2\pi }}\eta _{\mathrm{d}}^ \ast (\theta )f({\bf{p}}_F,{\bf{R}};\epsilon _n),$$
(18)

where λd is the pairing interaction, NF is the density of states at the Fermi level in the normal state, and Ωc is a cutoff energy. The pairing interaction and the cutoff energy are eliminated in favor of the superconducting transition temperature Tc (see for example ref. 66) as

$$\frac{1}{{\lambda _{\mathrm{d}}N_{\mathrm{F}}}} = {\mathrm{ln}}\frac{T}{{T_{\mathrm{c}}}} + \mathop {\sum}\limits_{n \ge 0} \frac{1}{{n + \frac{1}{2}}}.$$
(19)

The above equations are solved self-consistently with respect to γ, \(\tilde \gamma\), and Δd. As an initial guess, we assume a homogenous superconductor with a small modulation of the phase. The coherence functions on the boundaries have to be updated in each iteration, taking into account the specular boundary condition. The starting guess is the local homogeneous solution. After several iterations, the information of the initial guess for the coherence functions is lost67.

We choose an electromagnetic gauge where the vector potential has the form

$${\bf{A}}_{{\mathrm{ext}}}({\bf{R}}) = \frac{1}{2}{\bf{B}}_{{\mathrm{ext}}} \times {\bf{R}}.$$
(20)

The total vector potential A(R), that enters Eqs. (13) and (14), is given by Aext(R) and the field Aind(R) induced by the currents j(R) in the superconductor (Eq. (27) below):

$${\bf{A}}({\bf{R}}) = {\bf{A}}_{{\mathrm{ext}}}({\bf{R}}) + {\bf{A}}_{{\mathrm{ind}}}({\bf{R}}).$$
(21)

The vector potential Aind(R) should be solved from Ampère’s circuit law

$$\nabla \times \nabla \times {\bf{A}}_{{\mathrm{ind}}}({\bf{R}}) = \frac{{4\pi }}{c}{\bf{j}}({\bf{R}}){\kern 1pt} ,$$
(22)

with appropriate boundary conditions for the induced field inside and outside the sample. To take the full electrodynamics into account, Aind(R) also needs to be computed self-consistently in each iteration. However, the strength of the electrodynamic back-coupling scales as κ−2, where κ ≡ λ0/ξ0 is the dimensionless Ginzburg-Landau parameter. The electrodynamic back-coupling is therefore a very small effect for type II superconductors (typically κ−1 ≈ 10−2 for the cuprates). We have verified through fully self-consistent calculations that for grains with side lengths D < λ, as we limit ourselves to in this paper, it is always safe to neglect this back-coupling. For large system sizes, \(D \gg \lambda\), back-coupling would ensure proper Meissner screening on the length scale λ in the interior for b < 1 and the establishment of a proper Abrikosov vortex lattice with inter-vortex distances of order λ for moderate fields b > 1, corresponding to field strengths of order Hc1. Since the spontaneous fields appearing below T* are located within a small distance of order \(\xi _0 \ll \lambda\) from the boundary, the effect of back-coupling is small also in these cases. Only in very high fields, approaching Hc2, where inter-vortex distances become of order ξ0 may we expect a serious effect on T*, but this is beyond the scope of this paper.

The induced magnetic flux density is computed as

$${\bf{B}}_{{\mathrm{ind}}} = \nabla \times {\bf{A}}_{{\mathrm{ind}}}.$$
(23)

We consider a layered superconductor with many weakly, for our purposes negligibly, coupled layers stacked in the c-axis direction. This ensures translational invariance in that direction. Therefore, we neglect the problem of the field distribution around the superconductor and focus on the field induced at the ab-plane where we have simply Bind = \(B_{{\mathrm{ind}}}\widehat {\bf{z}}\).

Gauge transformation

Once the Green’s function and the order parameter have been determined self-consistently, we can perform a gauge transformation in order to make the order parameter a real quantity and in the process extract the superfluid momentum ps. This can be illustrated by transforming the Riccati equation in Eq. (13). To begin with, the self-consistently obtained order parameter is complex, i.e.,

$$\Delta ({\bf{p}}_{\mathrm{F}},{\bf{R}}) = \left| {{ {\Delta }}_{\mathrm{d}}({\bf{R}})} \right|\eta _{\mathrm{d}}(\theta )e^{i\chi ({\bf{R}})}.$$
(24)

We make the ansatz

$$\gamma ({\bf{p}}_{\mathrm{F}},{\bf{R}};z) = \gamma _0({\bf{p}}_{\mathrm{F}},{\bf{R}};z)e^{i\chi ({\bf{R}})},$$
(25)

and put that into the Riccati equation. We obtain

$$\left[ {i\hbar {\bf{v}}_{\mathrm{F}} \cdot \nabla + 2(z - {\bf{v}}_{\mathrm{F}} \cdot {\bf{p}}_{\mathrm{s}})} \right]\gamma _0 = - \left| {{ {\Delta }}_{\mathrm{d}}} \right|\eta _{\mathrm{d}}(\gamma _0^2 + 1),$$
(26)

where ps is defined in Eq. (1).

Observables

The current density is computed within the Matsubara technique through the formula

$${\bf{j}}({\bf{R}}) = 2\pi eN_{\mathrm{F}}k_{\mathrm{B}}T\mathop {\sum}\limits_{\epsilon _n} {\int} {\kern 1pt} \frac{{\mathrm{d}\theta }}{{2\pi }}{\bf{v}}_{\mathrm{F}}g({\bf{p}}_{\mathrm{F}},{\bf{R}};\epsilon _n).$$
(27)

In the results section, we shall show this current density in units of the depairing current

$$j_{\mathrm{d}} \equiv 4\pi \left| e \right|k_{\mathrm{B}}T_{\mathrm{c}}N_{\mathrm{F}}v_{\mathrm{F}}.$$
(28)

The free-energy difference between the superconducting and the normal states is calculated with the Eilenberger free-energy functional52

$$\begin{array}{*{20}{l}} {{ {\Omega }}_{\mathrm{S}}(B,T) - { {\Omega }}_{\mathrm{N}}(B,T)} \hfill & = \hfill & {{\int} {\kern 1pt} {\mathrm{d}}{\bf{R}}\left\{ {\frac{{{\bf{B}}_{{\mathrm{ind}}}({\bf{R}})^2}}{{8\pi }} + \left| {{ {\Delta }}_{\mathrm{d}}({\bf{R}})} \right|^2N_{\mathrm{F}}{\kern 1pt}{\mathrm{ln}}\frac{T}{{T_{\mathrm{c}}}}} \right.} \hfill \\ {} \hfill & {} \hfill & {\left. { + 2\pi N_{\mathrm{F}}k_{\mathrm{B}}T\mathop {\sum}\limits_{\epsilon _n > 0} \left[ {\frac{{\left| {{ {\Delta }}_{\mathrm{d}}({\bf{R}})} \right|^2}}{{\epsilon _n}} + i{\cal I}({\bf{R}};\epsilon _n)} \right]} \right\},} \hfill \end{array}$$
(29)
$${\cal I}({\bf{R}},\epsilon _n) = {\int} {\frac{{\mathrm{d}\theta }}{{2\pi }}\left[ {{\tilde{ \Delta }}({\bf{p}}_{\mathrm{F}},{\bf{R}})\gamma ({\bf{p}}_{\mathrm{F}},{\bf{R}};\epsilon _n) - { {\Delta }}({\bf{p}}_{\mathrm{F}},{\bf{R}})\tilde \gamma ({\bf{p}}_{\mathrm{F}},{\bf{R}};\epsilon _n)} \right]} .$$
(30)

We have verified that this form of the free energy gives the same results as the Luttinger-Ward functional26,55,64. The entropy and specific heat capacity are obtained from the thermodynamic definitions

$$S = - \frac{{\partial { {\Omega }}}}{{\partial T}},$$
(31)
$$C = T\frac{{\partial S}}{{\partial T}} = - T\frac{{\partial ^2{ {\Omega }}}}{{\partial T^2}}.$$
(32)

Data availability

All relevant data are available from the authors.