.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/condensed/ginzburg_landau/plot_ginzburg_landau_healing.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_api_gallery_condensed_ginzburg_landau_plot_ginzburg_landau_healing.py: Ginzburg-Landau Theory: Healing Length and Type I vs Type II =========================================================================== Ginzburg and Landau described superconductivity with a free-energy functional of a complex order parameter alone, no microscopic pairing mechanism required. Minimizing it gives an equilibrium condensate density :math:`|\psi_0|^2=-a/b` (:func:`~physicskit.condensed.ginzburg_landau.gl_equilibrium_order_parameter`) below the transition, and two length scales -- the coherence length :math:`\xi` (:func:`~physicskit.condensed.ginzburg_landau.gl_coherence_length`) and the penetration depth :math:`\lambda` (:func:`~physicskit.condensed.ginzburg_landau.gl_penetration_depth`) -- whose ratio, the Ginzburg-Landau parameter :math:`\kappa` (:func:`~physicskit.condensed.ginzburg_landau.ginzburg_landau_parameter`), alone decides Type I vs Type II behavior. .. GENERATED FROM PYTHON SOURCE LINES 17-30 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from physicskit.condensed.ginzburg_landau import ( ginzburg_landau_parameter, gl_coherence_length, gl_equilibrium_order_parameter, gl_free_energy_density, gl_order_parameter_profile, gl_penetration_depth, ) .. GENERATED FROM PYTHON SOURCE LINES 31-35 The free energy's double-well shape below the transition --------------------------------------------------------------------- For a < 0, f(psi) has degenerate minima at psi = +-psi0 rather than the single minimum psi=0 of the normal state (a > 0). .. GENERATED FROM PYTHON SOURCE LINES 35-42 .. code-block:: Python a, b = -1.0, 1.0 psi0 = gl_equilibrium_order_parameter(a, b) psi_range = np.linspace(-1.5 * psi0, 1.5 * psi0, 200) free_energy = [gl_free_energy_density(psi, a, b) for psi in psi_range] print(f"equilibrium order parameter psi0 = {psi0:.4f}") .. rst-class:: sphx-glr-script-out .. code-block:: none equilibrium order parameter psi0 = 1.0000 .. GENERATED FROM PYTHON SOURCE LINES 43-49 The order parameter heals from a boundary over the coherence length --------------------------------------------------------------------- Pinned to zero at a boundary (e.g. a normal-superconducting interface), the order parameter recovers its bulk value over a few coherence lengths -- the exact analytic solution :func:`~physicskit.condensed.ginzburg_landau.gl_order_parameter_profile`. .. GENERATED FROM PYTHON SOURCE LINES 49-54 .. code-block:: Python xi = gl_coherence_length(a=a) x = np.linspace(0, 8 * xi, 300) profile = gl_order_parameter_profile(x, xi) .. GENERATED FROM PYTHON SOURCE LINES 55-60 Type I vs Type II: the Ginzburg-Landau parameter kappa --------------------------------------------------------------------- A denser condensate screens magnetic fields over a shorter penetration depth. Sweeping psi0 sweeps kappa=lambda/xi across the 1/sqrt(2) Type I / Type II boundary. .. GENERATED FROM PYTHON SOURCE LINES 60-87 .. code-block:: Python psi0_values = np.linspace(0.2, 3.0, 40) kappas = [ginzburg_landau_parameter(xi, gl_penetration_depth(psi0=p)) for p in psi0_values] kappa_c = 1.0 / np.sqrt(2) fig, axes = plt.subplots(1, 3, figsize=(14, 4)) axes[0].plot(psi_range / psi0, free_energy, lw=2.5) axes[0].axvline(1.0, color="gray", ls="--", lw=1) axes[0].axvline(-1.0, color="gray", ls="--", lw=1) axes[0].set_xlabel(r"$\psi/\psi_0$") axes[0].set_ylabel("free energy density f") axes[0].set_title("Double-well free energy (a<0)") axes[1].plot(x / xi, profile, lw=2.5) axes[1].set_xlabel(r"$x/\xi$") axes[1].set_ylabel(r"$\psi(x)/\psi_0$") axes[1].set_title("Order parameter healing at a boundary") axes[2].plot(psi0_values, kappas, lw=2.5) axes[2].axhline(kappa_c, color="C1", ls="--", label=r"$\kappa=1/\sqrt{2}$") axes[2].set_xlabel(r"$\psi_0$ (condensate density)") axes[2].set_ylabel(r"$\kappa=\lambda/\xi$") axes[2].set_title("Type I (below) vs Type II (above)") axes[2].legend() fig.tight_layout() .. image-sg:: /api/gallery/condensed/ginzburg_landau/images/sphx_glr_plot_ginzburg_landau_healing_001.png :alt: Double-well free energy (a<0), Order parameter healing at a boundary, Type I (below) vs Type II (above) :srcset: /api/gallery/condensed/ginzburg_landau/images/sphx_glr_plot_ginzburg_landau_healing_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.090 seconds) .. _sphx_glr_download_api_gallery_condensed_ginzburg_landau_plot_ginzburg_landau_healing.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_ginzburg_landau_healing.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_ginzburg_landau_healing.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_ginzburg_landau_healing.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_