diff --git a/docs/fompy/constants.html b/docs/fompy/constants.html index a35a454..9dbdd38 100644 --- a/docs/fompy/constants.html +++ b/docs/fompy/constants.html @@ -3,7 +3,7 @@ - + fompy.constants API documentation @@ -265,7 +265,7 @@

Index

\ No newline at end of file diff --git a/docs/fompy/functions.html b/docs/fompy/functions.html index 19b22fc..b4a38c6 100644 --- a/docs/fompy/functions.html +++ b/docs/fompy/functions.html @@ -3,7 +3,7 @@ - + fompy.functions API documentation @@ -153,7 +153,7 @@

Index

\ No newline at end of file diff --git a/docs/fompy/index.html b/docs/fompy/index.html index 292171a..d80cd81 100644 --- a/docs/fompy/index.html +++ b/docs/fompy/index.html @@ -3,7 +3,7 @@ - + fompy API documentation @@ -110,7 +110,7 @@

Index

\ No newline at end of file diff --git a/docs/fompy/materials.html b/docs/fompy/materials.html index c45ef53..83ceef0 100644 --- a/docs/fompy/materials.html +++ b/docs/fompy/materials.html @@ -3,7 +3,7 @@ - + fompy.materials API documentation @@ -102,7 +102,7 @@

Index

\ No newline at end of file diff --git a/docs/fompy/models.html b/docs/fompy/models.html index d055d17..0aa7ba9 100644 --- a/docs/fompy/models.html +++ b/docs/fompy/models.html @@ -3,7 +3,7 @@ - + fompy.models API documentation @@ -37,15 +37,19 @@

Notes

----- All energies are counted from the valence band edge E<sub>v</sub> &equiv; 0. """ - +import cmath +import math +from abc import ABC, abstractmethod from enum import Enum from functools import partial -from math import pi, sqrt, exp +from math import pi, sqrt, exp, cos +import numpy as np from scipy.optimize import bisect -from fompy.constants import e, k, h_bar +from fompy.constants import e, k, h_bar, eV from fompy.functions import fermi, fd1 +from fompy.util.zeros import find_nth_function_zero def conductivity(n, mobility): @@ -1237,7 +1241,130 @@

Notes

The width of the depletion layer inside the p-type semiconductor [cm]. """ tmp, a, d = self._w_tmp(T) - return sqrt(tmp * d / a / (a + d)) + return sqrt(tmp * d / a / (a + d)) + + +class PeriodicPotentialModel(ABC): + """""" + + # TODO: add documentation + def __init__(self, u_min, period): + self.u_min = u_min + self.period = period + + def equation(self, energy, k, m): + return self.equation_left_part(energy, m) - self.equation_right_part(k) + + def equation_right_part(self, k): + return cos(k * self.period) + + @abstractmethod + def equation_left_part(self, energy, m): + """The part of the equation independent of k""" + + def find_lower_band_range(self, m, xtol_coarse, xtol_fine): + assert xtol_coarse > 0 and xtol_fine > 0 + + # Find band with minimal energy (starts search from self.u_min) + def f1(energy): + return self.equation_left_part(energy, m) - 1 + + def f2(energy): + return self.equation_left_part(energy, m) + 1 + + e_start = find_nth_function_zero(f1, self.u_min, xtol_coarse, xtol_fine, num=0) + e_end = find_nth_function_zero(f2, e_start - xtol_coarse / 2, xtol_coarse, xtol_fine, num=0) + + return e_start, e_end + + def get_energy(self, k, m, bracket, xtol): + start, stop = bracket + return bisect(self.equation, start, stop, args=(k, m), xtol=xtol) # noqa + + def get_k(self, energy, m): + # Returns k multiplied by period + val = self.equation_left_part(energy, m) + if not -1 <= val <= 1: + return None + return math.acos(val) + + def get_ks(self, es, m): # vectorized version of get_k + # Returns k multiplied by period + vs = np.vectorize(self.equation_left_part)(es, m) + return np.arccos(np.clip(vs, -1, 1)) + + +class KronigPenneyModel(PeriodicPotentialModel): + """""" + + # TODO: add documentation (add equations to the description of the class) + def __init__(self, a, b, u0): + assert a > 0 and b > 0 + super().__init__(min(0, u0), a + b) + self.a = a + self.b = b + self.u0 = u0 + + def equation(self, energy, k, m): + r""" + a - is the width of area where potential energy is U0 + + b - is the width of area where potential energy is 0 + + .. math:: + cos(\alpha a) cos(\beta b) - + \frac{\alpha^2 + \beta^2}{2 \alpha \beta} sin(\alpha a) sin(\beta b) = cos(k (a + b)) + .. math:: + \alpha^2 = \frac{2 m (E - U_0)}{\hbar^2}; \beta^2 = \frac{2 m E}{\hbar^2} + """ + return super(KronigPenneyModel, self).equation(energy, k, m) + + def equation_left_part(self, energy, m): + alf = cmath.sqrt(2 * m / h_bar ** 2 * (energy - self.u0)) + bet = cmath.sqrt(2 * m / h_bar ** 2 * energy) + first = cmath.cos(alf * self.a) * cmath.cos(bet * self.b) + if bet == 0: + second = - alf / 2 * self.b * cmath.sin(alf * self.a) + elif alf == 0: + second = - bet / 2 * self.a * cmath.sin(bet * self.b) + else: + second = - (alf ** 2 + bet ** 2) / (2 * alf * bet) * cmath.sin(alf * self.a) * cmath.sin(bet * self.b) + return (first + second).real + + +class DiracCombModel(PeriodicPotentialModel): + """""" + + # TODO: add documentation + def __init__(self, a, G): + assert a > 0 + super().__init__(-1e-10 * eV, a) + self.G = G + + def equation(self, energy, k, m): + r""" + .. math:: + cos(\beta b) + \sqrt{\frac{m}{2 \hbar^2 E}} G sin(\beta b) = cos(k b) + .. math:: + \beta^2 = \frac{2 m E}{\hbar^2} + + Alternative formula used in our course previously (note: different notation for alpha and beta) + + .. math:: + cos(\alpha a) + \frac{2 m G}{k \hbar^2} sin(\alpha a) = cos(k a) + .. math:: + \alpha^2 = \frac{2 m E}{\hbar^2} + """ + return super(DiracCombModel, self).equation(energy, k, m) + + def equation_left_part(self, energy, m): + bet = cmath.sqrt(2 * m / h_bar ** 2 * energy) + first = cmath.cos(bet * self.period) + if energy == 0: + second = m * self.G * self.period / h_bar ** 2 + else: + second = cmath.sqrt(m / (2 * h_bar ** 2 * energy)) * self.G * cmath.sin(bet * self.period) + return (first + second).real
@@ -4549,6 +4676,373 @@

Inherited members

+
+class PeriodicPotentialModel +(u_min, period) +
+
+
+
+ +Expand source code + +
class PeriodicPotentialModel(ABC):
+    """"""
+
+    # TODO: add documentation
+    def __init__(self, u_min, period):
+        self.u_min = u_min
+        self.period = period
+
+    def equation(self, energy, k, m):
+        return self.equation_left_part(energy, m) - self.equation_right_part(k)
+
+    def equation_right_part(self, k):
+        return cos(k * self.period)
+
+    @abstractmethod
+    def equation_left_part(self, energy, m):
+        """The part of the equation independent of k"""
+
+    def find_lower_band_range(self, m, xtol_coarse, xtol_fine):
+        assert xtol_coarse > 0 and xtol_fine > 0
+
+        # Find band with minimal energy (starts search from self.u_min)
+        def f1(energy):
+            return self.equation_left_part(energy, m) - 1
+
+        def f2(energy):
+            return self.equation_left_part(energy, m) + 1
+
+        e_start = find_nth_function_zero(f1, self.u_min, xtol_coarse, xtol_fine, num=0)
+        e_end = find_nth_function_zero(f2, e_start - xtol_coarse / 2, xtol_coarse, xtol_fine, num=0)
+
+        return e_start, e_end
+
+    def get_energy(self, k, m, bracket, xtol):
+        start, stop = bracket
+        return bisect(self.equation, start, stop, args=(k, m), xtol=xtol)  # noqa
+
+    def get_k(self, energy, m):
+        # Returns k multiplied by period
+        val = self.equation_left_part(energy, m)
+        if not -1 <= val <= 1:
+            return None
+        return math.acos(val)
+
+    def get_ks(self, es, m):  # vectorized version of get_k
+        # Returns k multiplied by period
+        vs = np.vectorize(self.equation_left_part)(es, m)
+        return np.arccos(np.clip(vs, -1, 1))
+
+

Ancestors

+ +

Subclasses

+ +

Methods

+
+
+def equation(self, energy, k, m) +
+
+
+
+ +Expand source code + +
def equation(self, energy, k, m):
+    return self.equation_left_part(energy, m) - self.equation_right_part(k)
+
+
+
+def equation_right_part(self, k) +
+
+
+
+ +Expand source code + +
def equation_right_part(self, k):
+    return cos(k * self.period)
+
+
+
+def equation_left_part(self, energy, m) +
+
+

The part of the equation independent of k

+
+ +Expand source code + +
@abstractmethod
+def equation_left_part(self, energy, m):
+    """The part of the equation independent of k"""
+
+
+
+def find_lower_band_range(self, m, xtol_coarse, xtol_fine) +
+
+
+
+ +Expand source code + +
def find_lower_band_range(self, m, xtol_coarse, xtol_fine):
+    assert xtol_coarse > 0 and xtol_fine > 0
+
+    # Find band with minimal energy (starts search from self.u_min)
+    def f1(energy):
+        return self.equation_left_part(energy, m) - 1
+
+    def f2(energy):
+        return self.equation_left_part(energy, m) + 1
+
+    e_start = find_nth_function_zero(f1, self.u_min, xtol_coarse, xtol_fine, num=0)
+    e_end = find_nth_function_zero(f2, e_start - xtol_coarse / 2, xtol_coarse, xtol_fine, num=0)
+
+    return e_start, e_end
+
+
+
+def get_energy(self, k, m, bracket, xtol) +
+
+
+
+ +Expand source code + +
def get_energy(self, k, m, bracket, xtol):
+    start, stop = bracket
+    return bisect(self.equation, start, stop, args=(k, m), xtol=xtol)  # noqa
+
+
+
+def get_k(self, energy, m) +
+
+
+
+ +Expand source code + +
def get_k(self, energy, m):
+    # Returns k multiplied by period
+    val = self.equation_left_part(energy, m)
+    if not -1 <= val <= 1:
+        return None
+    return math.acos(val)
+
+
+
+def get_ks(self, es, m) +
+
+
+
+ +Expand source code + +
def get_ks(self, es, m):  # vectorized version of get_k
+    # Returns k multiplied by period
+    vs = np.vectorize(self.equation_left_part)(es, m)
+    return np.arccos(np.clip(vs, -1, 1))
+
+
+
+
+
+class KronigPenneyModel +(a, b, u0) +
+
+
+
+ +Expand source code + +
class KronigPenneyModel(PeriodicPotentialModel):
+    """"""
+
+    # TODO: add documentation (add equations to the description of the class)
+    def __init__(self, a, b, u0):
+        assert a > 0 and b > 0
+        super().__init__(min(0, u0), a + b)
+        self.a = a
+        self.b = b
+        self.u0 = u0
+
+    def equation(self, energy, k, m):
+        r"""
+        a - is the width of area where potential energy is U0
+
+        b - is the width of area where potential energy is 0
+
+        .. math::
+             cos(\alpha a) cos(\beta b) -
+            \frac{\alpha^2 + \beta^2}{2 \alpha \beta} sin(\alpha a) sin(\beta b) = cos(k (a + b))
+        .. math::
+            \alpha^2 = \frac{2 m (E - U_0)}{\hbar^2}; \beta^2 = \frac{2 m E}{\hbar^2}
+        """
+        return super(KronigPenneyModel, self).equation(energy, k, m)
+
+    def equation_left_part(self, energy, m):
+        alf = cmath.sqrt(2 * m / h_bar ** 2 * (energy - self.u0))
+        bet = cmath.sqrt(2 * m / h_bar ** 2 * energy)
+        first = cmath.cos(alf * self.a) * cmath.cos(bet * self.b)
+        if bet == 0:
+            second = - alf / 2 * self.b * cmath.sin(alf * self.a)
+        elif alf == 0:
+            second = - bet / 2 * self.a * cmath.sin(bet * self.b)
+        else:
+            second = - (alf ** 2 + bet ** 2) / (2 * alf * bet) * cmath.sin(alf * self.a) * cmath.sin(bet * self.b)
+        return (first + second).real
+
+

Ancestors

+ +

Methods

+
+
+def equation(self, energy, k, m) +
+
+

a - is the width of area where potential energy is U0

+

b - is the width of area where potential energy is 0

+

cos(\alpha a) cos(\beta b) - +\frac{\alpha^2 + \beta^2}{2 \alpha \beta} sin(\alpha a) sin(\beta b) = cos(k (a + b)) + \alpha^2 = \frac{2 m (E - U_0)}{\hbar^2}; \beta^2 = \frac{2 m E}{\hbar^2}

+
+ +Expand source code + +
def equation(self, energy, k, m):
+    r"""
+    a - is the width of area where potential energy is U0
+
+    b - is the width of area where potential energy is 0
+
+    .. math::
+         cos(\alpha a) cos(\beta b) -
+        \frac{\alpha^2 + \beta^2}{2 \alpha \beta} sin(\alpha a) sin(\beta b) = cos(k (a + b))
+    .. math::
+        \alpha^2 = \frac{2 m (E - U_0)}{\hbar^2}; \beta^2 = \frac{2 m E}{\hbar^2}
+    """
+    return super(KronigPenneyModel, self).equation(energy, k, m)
+
+
+
+

Inherited members

+ +
+
+class DiracCombModel +(a, G) +
+
+
+
+ +Expand source code + +
class DiracCombModel(PeriodicPotentialModel):
+    """"""
+
+    # TODO: add documentation
+    def __init__(self, a, G):
+        assert a > 0
+        super().__init__(-1e-10 * eV, a)
+        self.G = G
+
+    def equation(self, energy, k, m):
+        r"""
+        .. math::
+            cos(\beta b) + \sqrt{\frac{m}{2 \hbar^2 E}} G sin(\beta b) = cos(k b)
+        .. math::
+            \beta^2 = \frac{2 m E}{\hbar^2}
+
+        Alternative formula used in our course previously (note: different notation for alpha and beta)
+
+        .. math::
+            cos(\alpha a) + \frac{2 m G}{k \hbar^2} sin(\alpha a) = cos(k a)
+        .. math::
+            \alpha^2 = \frac{2 m E}{\hbar^2}
+        """
+        return super(DiracCombModel, self).equation(energy, k, m)
+
+    def equation_left_part(self, energy, m):
+        bet = cmath.sqrt(2 * m / h_bar ** 2 * energy)
+        first = cmath.cos(bet * self.period)
+        if energy == 0:
+            second = m * self.G * self.period / h_bar ** 2
+        else:
+            second = cmath.sqrt(m / (2 * h_bar ** 2 * energy)) * self.G * cmath.sin(bet * self.period)
+        return (first + second).real
+
+

Ancestors

+ +

Methods

+
+
+def equation(self, energy, k, m) +
+
+

cos(\beta b) + \sqrt{\frac{m}{2 \hbar^2 E}} G sin(\beta b) = cos(k b) + \beta^2 = \frac{2 m E}{\hbar^2} +Alternative formula used in our course previously (note: different notation for alpha and beta)

+

cos(\alpha a) + \frac{2 m G}{k \hbar^2} sin(\alpha a) = cos(k a) + \alpha^2 = \frac{2 m E}{\hbar^2}

+
+ +Expand source code + +
def equation(self, energy, k, m):
+    r"""
+    .. math::
+        cos(\beta b) + \sqrt{\frac{m}{2 \hbar^2 E}} G sin(\beta b) = cos(k b)
+    .. math::
+        \beta^2 = \frac{2 m E}{\hbar^2}
+
+    Alternative formula used in our course previously (note: different notation for alpha and beta)
+
+    .. math::
+        cos(\alpha a) + \frac{2 m G}{k \hbar^2} sin(\alpha a) = cos(k a)
+    .. math::
+        \alpha^2 = \frac{2 m E}{\hbar^2}
+    """
+    return super(DiracCombModel, self).equation(energy, k, m)
+
+
+
+

Inherited members

+ +
@@ -4673,13 +5167,37 @@

w_p +
  • +

    PeriodicPotentialModel

    + +
  • +
  • +

    KronigPenneyModel

    + +
  • +
  • +

    DiracCombModel

    + +
  • \ No newline at end of file diff --git a/docs/fompy/units.html b/docs/fompy/units.html index 16b9847..ecfa018 100644 --- a/docs/fompy/units.html +++ b/docs/fompy/units.html @@ -3,7 +3,7 @@ - + fompy.units API documentation @@ -71,16 +71,18 @@

    Module fompy.units

    """ prefix = None multiplier = 1 + unit_name = name for p, n in PREFIXES.items(): if len(p) < len(name) and name.startswith(p): - name = name[len(p):] - prefix = p - multiplier = n + if prefix is None or len(p) > len(prefix): + unit_name = name[len(p):] + prefix = p + multiplier = n - self.name = name + self.name = unit_name self.prefix = prefix self.multiplier = multiplier - self.value = UNITS[name] + self.value = UNITS[unit_name] self.power = power def get_number(self): @@ -208,6 +210,16 @@

    Module fompy.units

    return parse_unit(text).get_number() +def to_unit(val, unit_text): + # TODO: documentation + return val / unit(unit_text) + + +def from_unit(val, unit_text): + # TODO: documentation + return val * unit(unit_text) + + def _register_unit(name, text): UNITS[name] = unit(text) @@ -378,6 +390,34 @@

    Returns

    return parse_unit(text).get_number() +
    +def to_unit(val, unit_text) +
    +
    +
    +
    + +Expand source code + +
    def to_unit(val, unit_text):
    +    # TODO: documentation
    +    return val / unit(unit_text)
    +
    +
    +
    +def from_unit(val, unit_text) +
    +
    +
    +
    + +Expand source code + +
    def from_unit(val, unit_text):
    +    # TODO: documentation
    +    return val * unit(unit_text)
    +
    +
    @@ -440,16 +480,18 @@

    Parameters

    """ prefix = None multiplier = 1 + unit_name = name for p, n in PREFIXES.items(): if len(p) < len(name) and name.startswith(p): - name = name[len(p):] - prefix = p - multiplier = n + if prefix is None or len(p) > len(prefix): + unit_name = name[len(p):] + prefix = p + multiplier = n - self.name = name + self.name = unit_name self.prefix = prefix self.multiplier = multiplier - self.value = UNITS[name] + self.value = UNITS[unit_name] self.power = power def get_number(self): @@ -606,6 +648,8 @@

    Index

  • Classes

    @@ -628,7 +672,7 @@

    \ No newline at end of file diff --git a/docs/fompy/util/fermi_dirac.html b/docs/fompy/util/fermi_dirac.html index 528c29c..18b8cab 100644 --- a/docs/fompy/util/fermi_dirac.html +++ b/docs/fompy/util/fermi_dirac.html @@ -3,7 +3,7 @@ - + fompy.util.fermi_dirac API documentation @@ -329,7 +329,7 @@

    Index

    \ No newline at end of file diff --git a/docs/fompy/util/index.html b/docs/fompy/util/index.html index 2f48b1a..7a158f1 100644 --- a/docs/fompy/util/index.html +++ b/docs/fompy/util/index.html @@ -3,7 +3,7 @@ - + fompy.util API documentation @@ -45,6 +45,10 @@

    Sub-modules

    This module contains classes for lexical analysis of text.

    +
    fompy.util.zeros
    +
    +
    +

  • @@ -69,13 +73,14 @@

    Index

    \ No newline at end of file diff --git a/docs/fompy/util/parser.html b/docs/fompy/util/parser.html index 5583e9c..a650440 100644 --- a/docs/fompy/util/parser.html +++ b/docs/fompy/util/parser.html @@ -3,7 +3,7 @@ - + fompy.util.parser API documentation @@ -413,7 +413,7 @@

    -

    Generated by pdoc 0.9.1.

    +

    Generated by pdoc 0.9.2.

    \ No newline at end of file diff --git a/docs/fompy/util/zeros.html b/docs/fompy/util/zeros.html new file mode 100644 index 0000000..30ded4d --- /dev/null +++ b/docs/fompy/util/zeros.html @@ -0,0 +1,163 @@ + + + + + + +fompy.util.zeros API documentation + + + + + + + + + + + + +
    +
    +
    +

    Module fompy.util.zeros

    +
    +
    +
    + +Expand source code + +
    from itertools import count, islice
    +
    +from scipy.optimize import bisect
    +
    +
    +def locate_zeros(points):
    +    px = py = None
    +    for x, y in points:
    +        if px is not None and py * y < 0:
    +            yield px, x
    +        px = x
    +        py = y
    +
    +
    +def locate_function_zeros(func, start, step):
    +    xs = (start + step * i for i in count())
    +    points = ((x, func(x)) for x in xs)
    +    return locate_zeros(points)
    +
    +
    +def locate_nth_function_zero(func, start, step, num=0):
    +    if num < 0:
    +        step = -step
    +        num = -num - 1
    +    return next(islice(locate_function_zeros(func, start, step), num, num + 1), None)
    +
    +
    +def find_nth_function_zero(func, x0, xtol_coarse, xtol_fine, num=0):
    +    bracket = locate_nth_function_zero(func, x0, xtol_coarse, num)
    +    return bisect(func, *bracket, xtol=xtol_fine)
    +
    +
    +
    +
    +
    +
    +
    +

    Functions

    +
    +
    +def locate_zeros(points) +
    +
    +
    +
    + +Expand source code + +
    def locate_zeros(points):
    +    px = py = None
    +    for x, y in points:
    +        if px is not None and py * y < 0:
    +            yield px, x
    +        px = x
    +        py = y
    +
    +
    +
    +def locate_function_zeros(func, start, step) +
    +
    +
    +
    + +Expand source code + +
    def locate_function_zeros(func, start, step):
    +    xs = (start + step * i for i in count())
    +    points = ((x, func(x)) for x in xs)
    +    return locate_zeros(points)
    +
    +
    +
    +def locate_nth_function_zero(func, start, step, num=0) +
    +
    +
    +
    + +Expand source code + +
    def locate_nth_function_zero(func, start, step, num=0):
    +    if num < 0:
    +        step = -step
    +        num = -num - 1
    +    return next(islice(locate_function_zeros(func, start, step), num, num + 1), None)
    +
    +
    +
    +def find_nth_function_zero(func, x0, xtol_coarse, xtol_fine, num=0) +
    +
    +
    +
    + +Expand source code + +
    def find_nth_function_zero(func, x0, xtol_coarse, xtol_fine, num=0):
    +    bracket = locate_nth_function_zero(func, x0, xtol_coarse, num)
    +    return bisect(func, *bracket, xtol=xtol_fine)
    +
    +
    +
    +
    +
    +
    +
    + +
    + + + \ No newline at end of file diff --git a/fompy/models.py b/fompy/models.py index c6af2f2..bf5f79f 100644 --- a/fompy/models.py +++ b/fompy/models.py @@ -1213,6 +1213,8 @@ def w_p(self, T=300): class PeriodicPotentialModel(ABC): + """""" + # TODO: add documentation def __init__(self, u_min, period): self.u_min = u_min @@ -1261,6 +1263,8 @@ def get_ks(self, es, m): # vectorized version of get_k class KronigPenneyModel(PeriodicPotentialModel): + """""" + # TODO: add documentation (add equations to the description of the class) def __init__(self, a, b, u0): assert a > 0 and b > 0 @@ -1272,14 +1276,14 @@ def __init__(self, a, b, u0): def equation(self, energy, k, m): r""" a - is the width of area where potential energy is U0 + b - is the width of area where potential energy is 0 + .. math:: cos(\alpha a) cos(\beta b) - \frac{\alpha^2 + \beta^2}{2 \alpha \beta} sin(\alpha a) sin(\beta b) = cos(k (a + b)) - - \alpha^2 = \frac{2 m (E - U_0)}{\hbar^2} - - \beta^2 = \frac{2 m E}{\hbar^2} + .. math:: + \alpha^2 = \frac{2 m (E - U_0)}{\hbar^2}; \beta^2 = \frac{2 m E}{\hbar^2} """ return super(KronigPenneyModel, self).equation(energy, k, m) @@ -1297,6 +1301,8 @@ def equation_left_part(self, energy, m): class DiracCombModel(PeriodicPotentialModel): + """""" + # TODO: add documentation def __init__(self, a, G): assert a > 0 @@ -1307,14 +1313,14 @@ def equation(self, energy, k, m): r""" .. math:: cos(\beta b) + \sqrt{\frac{m}{2 \hbar^2 E}} G sin(\beta b) = cos(k b) - + .. math:: \beta^2 = \frac{2 m E}{\hbar^2} Alternative formula used in our course previously (note: different notation for alpha and beta) .. math:: cos(\alpha a) + \frac{2 m G}{k \hbar^2} sin(\alpha a) = cos(k a) - + .. math:: \alpha^2 = \frac{2 m E}{\hbar^2} """ return super(DiracCombModel, self).equation(energy, k, m)