コード例 #1
0
def test_belitsky2006_fig2():
    """Recreate Figure 2 from:

        V. Y. Belitsky and E. L. Kollberg, “Superconductor–insulator–
        superconductor tunnel strip line: Features and applications,” J. Appl.
        Phys., vol. 80, no. 8, pp. 4741–4748, Oct. 1996.

    """

    # Parameters
    T = 4.0
    Vgap = 2.53e-3  # Gap voltage is not specified in the paper!!!
    param = dict(sigma_n=1.739e7, Tc=8.1, Vgap0=2.65e-3, lambda0=85 * sc.nano)

    # Calculate sigma_1
    filename = 'validation-data/belitsky2006/belitsky2006-fig2-sigma1.txt'
    fghz, lit_sigma1 = np.genfromtxt(filename, delimiter=',').T
    sigma = mb.conductance(fghz * 1e9, T, Vgap, **param)
    max_difference = np.abs(lit_sigma1 - sigma.real / param['sigma_n']).max()
    assert max_difference < 0.02

    # Calculate sigma_2
    filename = 'validation-data/belitsky2006/belitsky2006-fig2-sigma2.txt'
    fghz, lit_sigma2 = np.genfromtxt(filename, delimiter=',').T
    sigma = mb.conductance(fghz * 1e9, T, Vgap, **param)
    max_difference = np.abs(lit_sigma2 + sigma.imag / param['sigma_n']).max()
    assert max_difference < 0.2

    # Calculate E-field penetration
    filename = 'validation-data/belitsky2006/belitsky2006-fig2-lambda.txt'
    fghz, lit_lambda = np.genfromtxt(filename, delimiter=',').T
    d = 500e-9  # The thickness is not specified in the paper!!!
    zs = mb.surface_impedance(fghz * 1e9, d, T, Vgap, **param)
    _lambda = mb.efield_penetration(zs, fghz * 1e9) / mb._lambda0(**param)
    max_difference = np.abs(_lambda - lit_lambda).max()
    assert max_difference < 0.1

    # Calculate H-field penetration
    filename = 'validation-data/belitsky2006/belitsky2006-fig2-delta.txt'
    fghz, lit_delta = np.genfromtxt(filename, delimiter=',').T
    d = 500e-9  # The thickness is not specified in the paper!!!
    zs = mb.surface_impedance(fghz * 1e9, d, T, Vgap, **param)
    _delta = mb.hfield_penetration(zs, fghz * 1e9) / mb._lambda0(**param)
    max_difference = np.abs(_delta - lit_delta).max()
    assert max_difference < 0.1
コード例 #2
0
def test_compare_simple_and_MB_models():
    """Compare the surface impedance that is calculated from Mattis-Bardeen
    theory to the results from [1]."""

    # Frequency
    f = np.arange(100, 1000, 100) * 1e9

    # Surface impedance (using both models)
    zs_simple = mb.surface_impedance(f, 250e-9, 4., 2.75e-3, method='simple')
    zs_mb = mb.surface_impedance(f, 250e-9, 4., 2.75e-3, method='MB')

    # Below ~fgap/2, both models should be roughly the same
    mask = f < 350e9

    # Check real values
    assert (zs_simple.real == 0.).all()
    assert (zs_mb[mask].real < 0.01).all()

    # Check imaginary values
    error_imag = (zs_simple.imag - zs_mb.imag) / zs_mb.imag * 100.
    max_error = np.abs(error_imag[mask]).max()
    assert max_error < 5.  # below 5% relative error
コード例 #3
0
import numpy as np
import matplotlib.pyplot as plt
import scipy.constants as sc

# Optional
plt.style.use(['science', 'notebook'])

# Properties of the superconducting material, i.e., normal-state conductance,
# critical temperature, gap voltage at T=0K, and penetration depth
param = dict(sigma_n=1.74e7, Tc=8.1, Vgap0=2.65e-3, lambda0=86 * sc.nano)

# Properties of the specific superconductor
d = 100e-9  # thickness of the superconducting film in [m]
T = 4.  # ambient temperature in [K]
Vgap = 2.8e-3  # gap voltage at temperature T in [V]

# Frequency in [Hz]
f = np.linspace(0, 1000, 201) * 1e9

# Surface impedance [ohm / sq.]
Zs = mb.surface_impedance(f, d, T, Vgap, **param)

# Plot results
fig, ax = plt.subplots()
ax.plot(f / 1e9, Zs.real, label='Real')
ax.plot(f / 1e9, Zs.imag, 'r', label='Imaginary')
ax.legend()
ax.set(xlabel='Frequency (GHz)', xlim=[0, 1000])
ax.set(ylabel=r'Surface impedance ($\Omega$/sq.)', ylim=[0, 1.1])
plt.savefig("example.png", dpi=600)