DC Josephson effect I was taught that currents are always associated with some nonequilibrium situtations. Now I encountered the DC Josephson effect where equilibrium current can be calculated from this formula:
$I = \frac{2e}{\hbar}\frac{dF}{d\phi}$
where $F$ is just the free energy.
1) First of all, where does this formula come from?
2) This macroscopic phase of the superconductor $\phi$ should somehow be included in internal energy, or am I wrong?
3) What about long junction limits - is this a general formula? Maybe I can handle this effect by Green function method or other machinery? 
I am trying to understand where this current comes from and what is the general transport scheme in that situations? If you stick together two superconductors and make a loop, the current will also flow? How can you define a current through thermodynamic quantities (I know the classical nonequilibrium thermodynamics, but thats the point). Any references are welcome. 
 A: The free energy of a circuit looks like, in the thermodynamic limit
$$F\sim\dfrac{I\Phi}{2}+\dfrac{VQ}{2}$$
where $\sim$ means that I forget the temperature and pressure terms, which are not important usually in a circuit. $I$ is the current, and $\Phi$ the magnetic flux, whereas $V$ and $Q$ are voltage and charge. For instance, for an inductance, we have the constitutive relation $\Phi=LI$ and thus 
$$F\sim L\dfrac{I^{2}}{2}$$
where I kept only the magnetic energy. 
Now, in a quantum coherent circuit, you have for instance
$$H\propto\dfrac{\hbar^{2}}{2m}\left(\nabla-\mathbf{i}\dfrac{e}{\hbar}\boldsymbol{A}\right)^{2}
 $$
and thus 
$$H\Psi=E\Psi\Rightarrow\Psi\sim\Psi_{0}e^{\mathbf{i}\frac{e}{\hbar}\int\boldsymbol{A\cdot dl}}$$
is an allowed substitution which locally removes the gauge-potential from the Hamiltonian. The last quantity $\int\boldsymbol{A\cdot dl}=\Phi$ is a magnetic flux. But you also now that the usual way of writing a wave-function in the polar representation is $\Psi=\Psi_{0}e^{\mathbf{i}\varphi}$, with $\varphi$ the phase of the junction, so you have
$$\varphi=\dfrac{e}{\hbar}\int\boldsymbol{A\cdot dl}=\dfrac{e\Phi}{\hbar}$$
and hence, you have
$$I=\dfrac{\partial F}{\partial\Phi}=\dfrac{2e}{\hbar}\dfrac{\partial F}{\partial\varphi}$$
as the thermodynamic between the current and the phase. The factor $2$ comes from the doubling of the charge, due tot he formation of Cooper pairs. 
This formula is true as long as quantum coherence survives. If you prefer, it is true as long as you can replace $\varphi=\dfrac{e\Phi}{\hbar}$ and as long as the thermodynamic works. 
In particular, it is no more true for dynamic problem, but to excite the superconductors dynamics, you should reach some GHz frequencies, so for low-frequency problem, you can use the above quasi-static formulas.
Check the book by Tinkham, Superconductivity to get more details.
In a loop, no current flow at equilibrium, but you can bias the loop of course, it is called a DC-SQUID when you have two-junctions. Spontaneous current flow if you make a loop with 2 Josephson junction, one breaking the time-reversal symmetry. Check the page about $\pi$-Josephson junctions on Wikipedia. 
