コード例 #1
0
    def plot_p(self):
        uvb = UpperValenceBand(self.dichalcogenide)
        sc = Induced(self.dichalcogenide)
        dk = sc.Δk(0)

        p = Optical(self.dichalcogenide).p_circular
        psc = lambda a, xi: p(xi + uvb.μ, 1, a)
        fn_m = lambda xi: psc(-1, xi)
        fn_p = lambda xi: psc(1, xi)

        xi = numpy.linspace(-0.01, 0, self.opts['n'])

        err = numpy.geterr()
        numpy.seterr(invalid='ignore')

        line = next(self.lines)
        self.plot[0].plot(xi,
                          numpy.vectorize(fn_p)(xi),
                          line,
                          color='black',
                          linewidth=2)

        self.plot[1].plot(xi,
                          numpy.vectorize(fn_m)(xi),
                          line,
                          color='black',
                          linewidth=2)

        numpy.seterr(**err)

        self.plot[1].set_xlabel(
            '$E - \\mu$ $\\left(\\mathregular{eV} \\right)$')

        return self
コード例 #2
0
    def plot_bands(self):
        """Plot energy bands."""
        e = Energy(self.dichalcogenide).e
        mu = self.opts['mu_scale'] * UpperValenceBand(self.dichalcogenide).μ
        lk = Induced(self.dichalcogenide).λk
        k0, dk = self.opts['k0'], self.opts['dk']

        p = (-1, 1)
        for x in itertools.product(p, p, p):
            n = self.opts['n']
            k = numpy.linspace(x[1] * (k0 - dk), x[1] * (k0 + dk), n)
            if x[0] == -1 and x[1] == x[2]:
                fn = lambda k, s=x: mu + lk(e(k - s[1] * k0, *s))
                self.plot.plot(k, numpy.vectorize(fn)(k), color='black')
            if x[0] == -1:
                pass
            else:
                fn = lambda k, s=x: e(k - s[1] * k0, *s)
                self.plot.plot(k, numpy.vectorize(fn)(k), color='black')

        self.plot.annotate('BCS Condensate', (0, -1.0),
                           horizontalalignment='center',
                           verticalalignment='center')

        return self
コード例 #3
0
    def plot_chemical_potential(self):
        """Add chemical potential."""
        t = self.opts['t']
        uvb = UpperValenceBand(self.dichalcogenide)
        self.plot.axhline(uvb.μ, linestyle='--', color='black')
        self.plot.annotate('$\\mu$', (-1, uvb.μ + t))

        return self
コード例 #4
0
    def plot_pairs(self):
        e = Energy(self.dichalcogenide).e
        mu = self.opts['mu_scale'] * UpperValenceBand(self.dichalcogenide).μ
        lk = Induced(self.dichalcogenide).λk
        k0, dk = self.opts['k0'], self.opts['dk']
        k1 = 1.5 * dk

        self.plot.plot(k1,
                       e(k1 - k0, 1, 1, 1),
                       marker='o',
                       color='black',
                       markersize=10)

        self.plot.plot(-k1,
                       mu + lk(e(k1 - k0, -1, 1, 1)),
                       marker='o',
                       color='black',
                       markersize=10)

        return self
コード例 #5
0
ファイル: induced.py プロジェクト: nicheal/dichalcogenides
class Induced(Superconductor):
    """Induced superconductor.

    Inherits from :class:`.Superconductor`.
    """

    def __init__(self, model):
        super().__init__(model)
        self._energy = UpperValenceBand(self.model)

    @property
    def Δc(self):
        """Conduction band coupling constant.

        :return: :math:`Δ_c`
        :rtype: float
        """
        return self.model.system_parameter('Δc')

    @property
    def Δv(self):
        """Valance band coupling constant.

        :return: :math:`Δ_v`
        :rtype: float
        """
        return self.model.system_parameter('Δv')

    @property
    def Δk(self):
        """The superconducting parameter :math:`Δ_\\mathbf{k}`
        as a function of the energy :math:`E`.

        :return: :math:`Δ(E)`
        :rtype: func
        """
        Δc, Δv = self.Δc, self.Δv
        cos = self._energy.trig('cos θ')
        return lambda e: (1 / 2) * ((Δc + Δv) + (Δc - Δv) * cos(e))
コード例 #6
0
class Induced(Superconductor):
    """Induced superconductor.

    Inherits from :class:`.Superconductor`.
    """
    def __init__(self, model):
        super().__init__(model)
        self._energy = UpperValenceBand(self.model)

    @property
    def Δc(self):
        """Conduction band coupling constant.

        :return: :math:`Δ_c`
        :rtype: float
        """
        return self.model.system_parameter('Δc')

    @property
    def Δv(self):
        """Valance band coupling constant.

        :return: :math:`Δ_v`
        :rtype: float
        """
        return self.model.system_parameter('Δv')

    @property
    def Δk(self):
        """The superconducting parameter :math:`Δ_\\mathbf{k}`
        as a function of the energy :math:`E`.

        :return: :math:`Δ(E)`
        :rtype: func
        """
        Δc, Δv = self.Δc, self.Δv
        cos = self._energy.trig('cos θ')
        return lambda e: (1 / 2) * ((Δc + Δv) + (Δc - Δv) * cos(e))
コード例 #7
0
    def plot_p_sc(self):
        uvb = UpperValenceBand(self.dichalcogenide)
        sc = Induced(self.dichalcogenide)
        xi = sc.ξ
        dk = sc.Δk(0)
        sc_trig = sc.trig('sin^2 β')

        p = Optical(self.dichalcogenide).p_circular
        psc = lambda a, lk: sc_trig(dk, lk) * p(xi(dk, lk) + uvb.μ, 1, a)
        fn_m = lambda lk: psc(-1, lk)
        fn_p = lambda lk: psc(1, lk)

        lk = numpy.linspace(*sc.λk_bounds(dk), self.opts['n'])
        x = lk / dk

        err = numpy.geterr()
        numpy.seterr(invalid='ignore')

        line = next(self.lines)
        self.plot[0].plot(x,
                          numpy.vectorize(fn_p)(x * dk),
                          line,
                          color='black',
                          linewidth=2)

        self.plot[1].plot(x,
                          numpy.vectorize(fn_m)(x * dk),
                          line,
                          color='black',
                          linewidth=2)

        numpy.seterr(**err)

        self.plot[1].set_xlabel(
            '$\\lambda_{\\mathbf{k}} / \\Delta_{\\mathbf{k}}$')

        return self
コード例 #8
0
 def __init__(self, model, energy=None):
     self.model = model
     if not energy: self._energy = UpperValenceBand(self.model)
コード例 #9
0
ファイル: induced.py プロジェクト: nicheal/dichalcogenides
 def __init__(self, model):
     super().__init__(model)
     self._energy = UpperValenceBand(self.model)
コード例 #10
0
 def __init__(self, model):
     super().__init__(model)
     self._energy = UpperValenceBand(self.model)