-
Notifications
You must be signed in to change notification settings - Fork 63
Add effective DOS and energy band gap model #2673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: marc/non_isothermal
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
from __future__ import annotations | ||
|
||
import pydantic.v1 as pd | ||
|
||
from tidy3d.components.base import Tidy3dBaseModel | ||
from tidy3d.constants import ELECTRON_VOLT | ||
|
||
|
||
class ConstantEnergyBandGap(Tidy3dBaseModel): | ||
"""Constant Energy band gap""" | ||
|
||
eg: pd.PositiveFloat = pd.Field( | ||
title="Band Gap", | ||
description="Energy band gap", | ||
units=ELECTRON_VOLT, | ||
) | ||
|
||
|
||
class QuadraticEnergyBandGap(Tidy3dBaseModel): | ||
""" | ||
Models the temperature dependence of the energy band gap (Eg) using a | ||
quadratic approximation. | ||
|
||
Notes | ||
----- | ||
The model uses the following formula: | ||
|
||
.. math:: | ||
|
||
E_g(T) = E_g(300) + \\alpha T + \\beta T^2 | ||
|
||
Example | ||
------- | ||
>>> model = QuadraticEnergyBandGap( | ||
... eg_300=1.12, | ||
... alpha=-4.73e-4, | ||
... beta=-2.0e-7, | ||
... ) | ||
""" | ||
|
||
eg_300: pd.PositiveFloat = pd.Field( | ||
..., | ||
title="Band Gap at 300 K", | ||
description="Energy band gap at a reference temperature of 300 K.", | ||
units=ELECTRON_VOLT, | ||
) | ||
|
||
alpha: float = pd.Field( | ||
..., | ||
title="Linear Temperature Coefficient (alpha)", | ||
description="Linear coefficient for the temperature dependence of the band gap.", | ||
units="eV/K", | ||
) | ||
|
||
beta: float = pd.Field( | ||
..., | ||
title="Quadratic Temperature Coefficient (beta)", | ||
description="Quadratic coefficient for the temperature dependence of the band gap.", | ||
units="eV/K²", | ||
) | ||
|
||
|
||
class VarshniEnergyBandGap(Tidy3dBaseModel): | ||
""" | ||
Models the temperature dependence of the energy band gap (Eg) | ||
using the Varshni formula. | ||
|
||
Notes | ||
----- | ||
The model implements the following formula: | ||
|
||
.. math:: | ||
|
||
E_g(T) = E_g(0) - \\frac{\\alpha T^2}{T + \\beta}$ | ||
|
||
Example | ||
------- | ||
>>> # Parameters for Silicon (Si) | ||
>>> si_model = VarshniBandGap( | ||
... eg_0=1.17, | ||
... alpha=4.73e-4, | ||
... beta=636.0, | ||
... ) | ||
|
||
References | ||
------- | ||
|
||
Varshni, Y. P. (1967). Temperature dependence of the energy gap in semiconductors. Physica, 34(1), 149-154. | ||
|
||
""" | ||
|
||
eg_0: pd.PositiveFloat = pd.Field( | ||
..., | ||
title="Band Gap at 0 K", | ||
description="Energy band gap at absolute zero (0 Kelvin).", | ||
units=ELECTRON_VOLT, | ||
) | ||
|
||
alpha: pd.PositiveFloat = pd.Field( | ||
..., | ||
title="Varshni Alpha Coefficient", | ||
description="Empirical Varshni coefficient (α).", | ||
units="eV/K", | ||
) | ||
|
||
beta: pd.PositiveFloat = pd.Field( | ||
..., | ||
title="Varshni Beta Coefficient", | ||
description="Empirical Varshni coefficient (β), related to the Debye temperature.", | ||
units="K", | ||
) |
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,158 @@ | ||||||||||||||
from abc import ABC, abstractmethod | ||||||||||||||
|
||||||||||||||
import numpy as np | ||||||||||||||
import pydantic.v1 as pd | ||||||||||||||
|
||||||||||||||
from tidy3d.components.base import Tidy3dBaseModel | ||||||||||||||
from tidy3d.constants import C_0, HBAR, K_B | ||||||||||||||
|
||||||||||||||
from ...exceptions import DataError | ||||||||||||||
|
||||||||||||||
# constants definition | ||||||||||||||
m_e_C_square = 0.51099895069e6 # (electron mass * C_0^2) in eV | ||||||||||||||
m_e_eV = m_e_C_square / C_0 / C_0 # equivalent electron mass in eV | ||||||||||||||
um_3_to_cm_3 = 1e12 # conversion factor from micron^(-3) to cm^(-3) | ||||||||||||||
|
||||||||||||||
DOS_aux_const = 2.0 * np.power((m_e_eV * K_B) / (2 * np.pi * HBAR * HBAR), 1.5) * um_3_to_cm_3 | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
class EffectiveDOS(Tidy3dBaseModel, ABC): | ||||||||||||||
"""Abstract class for the effective density of states""" | ||||||||||||||
|
||||||||||||||
@abstractmethod | ||||||||||||||
def calc_eff_dos(self, T: float): | ||||||||||||||
"""Abstract method to calculate the effective density of states.""" | ||||||||||||||
pass | ||||||||||||||
|
||||||||||||||
@abstractmethod | ||||||||||||||
def calc_eff_dos_derivative(self, T: float): | ||||||||||||||
"""Abstract method to calculate the temperature derivative of the effective density of states.""" | ||||||||||||||
pass | ||||||||||||||
|
||||||||||||||
def get_effective_DOS(self, T: float): | ||||||||||||||
if T <= 0: | ||||||||||||||
raise DataError( | ||||||||||||||
f"Incorrect temperature value ({T}) for the effectve density of states calculation." | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. syntax: Typo in error message: 'effectve' should be 'effective'
Suggested change
|
||||||||||||||
) | ||||||||||||||
|
||||||||||||||
return self.calc_eff_dos(T) | ||||||||||||||
|
||||||||||||||
def get_effective_DOS_derivative(self, T: float): | ||||||||||||||
if T <= 0: | ||||||||||||||
raise DataError( | ||||||||||||||
f"Incorrect temperature value ({T}) for the effectve density of states calculation." | ||||||||||||||
) | ||||||||||||||
|
||||||||||||||
return self.calc_eff_dos_derivative(T) | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
class ConstantEffectiveDOS(EffectiveDOS): | ||||||||||||||
"""Constant effective density of states model.""" | ||||||||||||||
|
||||||||||||||
N: pd.PositiveFloat = pd.Field( | ||||||||||||||
..., title="Effective DOS", description="Effective density of states", units="cm^(-3)" | ||||||||||||||
) | ||||||||||||||
|
||||||||||||||
def calc_eff_dos(self, T: float): | ||||||||||||||
return self.N | ||||||||||||||
|
||||||||||||||
def calc_eff_dos_derivative(self, T: float): | ||||||||||||||
return 0.0 | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
class IsotropicEffectiveDOS(EffectiveDOS): | ||||||||||||||
"""Effective density of states model that assumes single valley and isotropic effective mass. | ||||||||||||||
The model assumes the standard equation for the 3D semiconductor with parabolic energy dispersion: | ||||||||||||||
|
||||||||||||||
.. math:: | ||||||||||||||
|
||||||||||||||
\\begin{equation} | ||||||||||||||
\\mathbf{N_eff} = 2 * (\\frac{m_eff * m_e * k_B T}{2 \\pi \\hbar^2})^(3/2) | ||||||||||||||
\\end{equation} | ||||||||||||||
""" | ||||||||||||||
|
||||||||||||||
m_eff: pd.PositiveFloat = pd.Field( | ||||||||||||||
..., | ||||||||||||||
title="Effective mass", | ||||||||||||||
description="Effective mass of the carriers", | ||||||||||||||
units="Electron mass", | ||||||||||||||
) | ||||||||||||||
|
||||||||||||||
def calc_eff_dos(self, T: float): | ||||||||||||||
return np.power(self.m_eff * T, 1.5) * DOS_aux_const | ||||||||||||||
|
||||||||||||||
def calc_eff_dos_derivative(self, T: float): | ||||||||||||||
return self.calc_eff_dos(T) * 1.5 / T | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
class MultiValleyEffectiveDOS(EffectiveDOS): | ||||||||||||||
"""Effective density of states model that assumes multiple equivalent valleys and anisotropic effective mass. | ||||||||||||||
The model assumes the standard equation for the 3D semiconductor with parabolic energy dispersion: | ||||||||||||||
|
||||||||||||||
.. math:: | ||||||||||||||
|
||||||||||||||
\\begin{equation} | ||||||||||||||
\\mathbf{N_eff} = 2 * N_valley * (m_{eff_long} * m_{eff_trans} * m_{eff_trans})^(1/2) *(\\frac{m_e * k_B * T}{2 \\pi * \\hbar^2})^(3/2) | ||||||||||||||
\\end{equation} | ||||||||||||||
""" | ||||||||||||||
|
||||||||||||||
m_eff_long: pd.PositiveFloat = pd.Field( | ||||||||||||||
..., | ||||||||||||||
title="Longitudinal effective mass", | ||||||||||||||
description="Effective mass of the carriers in the longitudinal direction", | ||||||||||||||
units="Electron mass", | ||||||||||||||
) | ||||||||||||||
|
||||||||||||||
m_eff_trans: pd.PositiveFloat = pd.Field( | ||||||||||||||
..., | ||||||||||||||
title="Longitudinal effective mass", | ||||||||||||||
description="Effective mass of the carriers in the transverse direction", | ||||||||||||||
Comment on lines
+107
to
+109
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. syntax: Copy-paste error in title: 'Longitudinal effective mass' should be 'Transverse effective mass'
Suggested change
|
||||||||||||||
units="Electron mass", | ||||||||||||||
) | ||||||||||||||
|
||||||||||||||
N_valley: pd.PositiveFloat = pd.Field( | ||||||||||||||
..., title="Number of valleys", description="Number of effective valleys" | ||||||||||||||
) | ||||||||||||||
|
||||||||||||||
def calc_eff_dos(self, T: float): | ||||||||||||||
return ( | ||||||||||||||
self.N_valley | ||||||||||||||
* np.power(self.m_eff_long * self.m_eff_trans * self.m_eff_trans, 0.5) | ||||||||||||||
* np.power(T, 1.5) | ||||||||||||||
* DOS_aux_const | ||||||||||||||
) | ||||||||||||||
|
||||||||||||||
def calc_eff_dos_derivative(self, T: float): | ||||||||||||||
return self.calc_eff_dos(T) * 1.5 / T | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
class DualValleyEffectiveDOS(EffectiveDOS): | ||||||||||||||
"""Effective density of states model that assumes combibation of light holes and heavy holes with isotropic effective masses. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. syntax: Typo in docstring: 'combibation' should be 'combination'
Suggested change
|
||||||||||||||
The model assumes the standard equation for the 3D semiconductor with parabolic energy dispersion: | ||||||||||||||
|
||||||||||||||
.. math:: | ||||||||||||||
|
||||||||||||||
\\begin{equation} | ||||||||||||||
\\mathbf{N_eff} = 2 * ( {\\frac{m_{eff_lh} * m_e * k_B * T}{2 \\pi \\hbar^2})^(3/2) + (\\frac{m_{eff_hh} * m_e * k_B * T}{2 \\pi \\hbar^2})^(3/2) ) | ||||||||||||||
\\end{equation} | ||||||||||||||
""" | ||||||||||||||
|
||||||||||||||
m_eff_lh: pd.PositiveFloat = pd.Field( | ||||||||||||||
..., | ||||||||||||||
title="Light hole effective mass", | ||||||||||||||
description="Effective mass of the light holes", | ||||||||||||||
units="Electron mass", | ||||||||||||||
) | ||||||||||||||
|
||||||||||||||
m_eff_hh: pd.PositiveFloat = pd.Field( | ||||||||||||||
..., | ||||||||||||||
title="Heavy hole effective mass", | ||||||||||||||
description="Effective mass of the heavy holes", | ||||||||||||||
units="Electron mass", | ||||||||||||||
) | ||||||||||||||
|
||||||||||||||
def calc_eff_dos(self, T: float): | ||||||||||||||
return (np.power(self.m_eff_lh * T, 1.5) + np.power(self.m_eff_hh * T, 1.5)) * DOS_aux_const | ||||||||||||||
|
||||||||||||||
def calc_eff_dos_derivative(self, T: float): | ||||||||||||||
return self.calc_eff_dos(T) * 1.5 / T |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Class name in example is 'VarshniBandGap' but actual class is 'VarshniEnergyBandGap'