add colors

This commit is contained in:
matthias@quintern.xyz 2025-02-02 22:59:33 +01:00
parent c12067684a
commit 562899ed0a
67 changed files with 3713 additions and 1476 deletions

View File

@ -13,7 +13,7 @@ BIBER = biber
LATEX_OPTS := -output-directory=$(OUT_DIR) -interaction=nonstopmode -shell-escape
.PHONY: default release clean
.PHONY: default release clean scripts
default: english
release: german english
@ -28,6 +28,13 @@ german:
-cd $(SRC_DIR) && latexmk -lualatex -g main.tex
mv $(OUT_DIR)/$(MAIN_PDF) $(OUT_DIR)/$(shell date -I)_de_Formelsammlung.pdf
SCRIPT_DIR = scripts
PY_SCRIPTS = $(wildcard $(SCRIPT_DIR)/*.py)
PY_SCRIPTS_REL = $(notdir $(PY_SCRIPTS))
scripts:
-#cd $(SCRIPT_DIR) && for file in $(find -type f -name '*.py'); do echo "Running $$file"; python3 "$$file"; done
cd $(SCRIPT_DIR) && $(foreach script,$(PY_SCRIPTS_REL),echo "Running $(script)"; python3 $(script);)
# Clean auxiliary and output files
clean:
rm -r $(OUT_DIR)

View File

@ -44,6 +44,8 @@ The `<partname>:...:<lowest section name>` will be defined as `\fqname` (fully q
- figure: `fig`
- parts, (sub)sections: `sec`
Use `misc` as (sub(sub))section for anything that can not be categorized within its (sub)section/part.
### Files and directories
Separate parts in different source files named `<partname>.tex`.
If a part should be split up in multiple source files itself, use a

47
scripts/ch_elchem.py Normal file
View File

@ -0,0 +1,47 @@
#!/usr/bin env python3
from formulasheet import *
from scipy.constants import gas_constant, Avogadro, elementary_charge
Faraday = Avogadro * elementary_charge
@np.vectorize
def fbutler_volmer_left(ac, z, eta, T):
return np.exp((1-ac)*z*Faraday*eta/(gas_constant*T))
@np.vectorize
def fbutler_volmer_right(ac, z, eta, T):
return -np.exp(-ac*z*Faraday*eta/(gas_constant*T))
def fbutler_volmer(ac, z, eta, T):
return fbutler_volmer_left(ac, z, eta, T) + fbutler_volmer_right(ac, z, eta, T)
def butler_volmer():
fig, ax = plt.subplots(figsize=size_half_third)
ax.set_xlabel("$\\eta$")
ax.set_ylabel("$i/i_0$")
etas = np.linspace(-0.1, 0.1, 400)
T = 300
z = 1.0
# other a
alpha2, alpha3 = 0.2, 0.8
i2 = fbutler_volmer(0.2, z, etas, T)
i3 = fbutler_volmer(0.8, z, etas, T)
ax.plot(etas, i2, color="blue", linestyle="dashed", label=f"$\\alpha={alpha2}$")
ax.plot(etas, i3, color="green", linestyle="dashed", label=f"$\\alpha={alpha3}$")
# 0.5
ac = 0.5
irel_left = fbutler_volmer_left(ac, z, etas, T)
irel_right = fbutler_volmer_right(ac, z, etas, T)
ax.plot(etas, irel_left, color="gray")
ax.plot(etas, irel_right, color="gray")
ax.plot(etas, irel_right + irel_left, color="black", label=f"$\\alpha=0.5$")
ax.grid()
ax.legend()
ylim = 6
ax.set_ylim(-ylim, ylim)
return fig
if __name__ == '__main__':
export(butler_volmer(), "ch_butler_volmer")

64
scripts/cm_phonons.py Normal file
View File

@ -0,0 +1,64 @@
#!/usr/bin env python3
from formulasheet import *
def fone_atom_basis(q, a, M, C1, C2):
return np.sqrt(4*C1/M * (np.sin(q*a/2)**2 + C2/C1 * np.sin(q*a)**2))
def one_atom_basis():
a = 1.
C1 = 0.25
C2 = 0
M = 1.
qs = np.linspace(-2*np.pi/a, 2*np.pi/a, 300)
omega = fone_atom_basis(qs, a, M, C1, C2)
fig, ax = plt.subplots(figsize=size_half_third)
ax.set_xlabel(r"$q$")
ax.set_xticks([i * np.pi/a for i in range(-2, 3)])
ax.set_xticklabels([f"${i}\\pi/a$" if i != 0 else "0" for i in range(-2, 3)])
ax.set_ylabel(r"$\omega$ in $\left[4C_1/M\right]$")
yunit = np.sqrt(4*C1/M)
ax.set_ylim(0, yunit+0.1)
ax.set_yticks([0,yunit])
ax.set_yticklabels(["0","1"])
ax.plot(qs, omega)
ax.text(-1.8*np.pi/a, 0.8, "NN\n$C_2=0$", ha='center')
ax.text(0, 0.8, "1. BZ", ha='center')
ax.vlines([-np.pi/a, np.pi/a], ymin=-2, ymax=2, color="black")
ax.grid()
return fig
def ftwo_atom_basis_acoustic(q, a, M1, M2, C):
return np.sqrt(C*(1/M1+1/M2) - C * np.sqrt((1/M1+1/M2)**2 - 4/(M1*M2) * np.sin(q*a/2)**2))
def ftwo_atom_basis_optical(q, a, M1, M2, C):
return np.sqrt(C*(1/M1+1/M2) + C * np.sqrt((1/M1+1/M2)**2 - 4/(M1*M2) * np.sin(q*a/2)**2))
def two_atom_basis():
a = 1.
C = 0.25
M1 = 1.
M2 = 0.7
qs = np.linspace(-2*np.pi/a, 2*np.pi/a, 300)
omega_a = ftwo_atom_basis_acoustic(qs, a, M1, M2, C)
omega_o = ftwo_atom_basis_optical(qs, a, M1, M2, C)
fig, ax = plt.subplots(figsize=size_half_third)
ax.plot(qs, omega_a, label="acoustic")
ax.plot(qs, omega_o, label="optical")
ax.text(0, 0.8, "1. BZ", ha='center')
ax.vlines([-np.pi/a, np.pi/a], ymin=-2, ymax=2, color="black")
ax.set_ylim(-0.03, 1.03)
ax.set_ylabel(r"$\omega$ in $\left[\sqrt{2C\mu^{-1}}\right]$")
yunit = np.sqrt(2*C*(1/M1+1/M2))
ax.set_ylim(0, yunit+0.1)
ax.set_yticks([0,yunit])
ax.set_yticklabels(["0","1"])
ax.set_xlabel(r"$q$")
ax.set_xticks([i * np.pi/a for i in range(-2, 3)])
ax.set_xticklabels([f"${i}\\pi/a$" if i != 0 else "0" for i in range(-2, 3)])
ax.legend()
ax.grid()
return fig
if __name__ == '__main__':
export(one_atom_basis(), "cm_phonon_dispersion_one_atom_basis")
export(two_atom_basis(), "cm_phonon_dispersion_two_atom_basis")

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,6 @@
from numpy import fmax
from plot import *
from formulasheet import *
import itertools
def get_fig():
@ -22,7 +23,6 @@ def gauss():
ax.plot(x, y, label=label)
ax.legend()
return fig
export(gauss(), "distribution_gauss")
# CAUCHY / LORENTZ
def fcauchy(x, x_0, gamma):
@ -37,7 +37,6 @@ def cauchy():
ax.plot(x, y, label=label)
ax.legend()
return fig
export(cauchy(), "distribution_cauchy")
# MAXWELL-BOLTZMANN
def fmaxwell(x, a):
@ -53,7 +52,37 @@ def maxwell():
ax.legend()
return fig
export(maxwell(), "distribution_maxwell-boltzmann")
# GAMMA
@np.vectorize
def fgamma(x, alpha, lam):
return lam**alpha / scp.special.gamma(alpha) * x**(alpha-1) * np.exp(-lam*x)
def gamma():
fig, ax = get_fig()
x = np.linspace(0, 20, 300)
for (alpha, lam) in itertools.product([1, 2, 5], [1, 2]):
y = fgamma(x, alpha, lam)
label = f"$\\alpha = {alpha}, \\lambda = {lam}$"
ax.plot(x, y, label=label)
ax.set_ylim(0, 1.1)
ax.set_xlim(0, 10)
ax.legend()
return fig
# BETA
@np.vectorize
def fbeta(x, alpha, beta):
return x**(alpha-1) * (1-x)**(beta-1) / scp.special.beta(alpha, beta)
def beta():
fig, ax = get_fig()
x = np.linspace(0, 20, 300)
for (alpha, lam) in itertools.product([1, 2, 5], [1, 2]):
y = fgamma(x, alpha, lam)
label = f"$\\alpha = {alpha}, \\beta = {lam}$"
ax.plot(x, y, label=label)
ax.set_ylim(0, 1.1)
ax.set_xlim(0, 10)
ax.legend()
return fig
# POISSON
@ -73,8 +102,6 @@ def poisson():
ax.legend()
return fig
export(poisson(), "distribution_poisson")
# BINOMIAL
def binom(n, k):
return scp.special.factorial(n) / (
@ -98,9 +125,17 @@ def binomial():
ax.legend()
return fig
export(binomial(), "distribution_binomial")
if __name__ == '__main__':
export(gauss(), "distribution_gauss")
export(cauchy(), "distribution_cauchy")
export(maxwell(), "distribution_maxwell-boltzmann")
export(gamma(), "distribution_gamma")
export(beta(), "distribution_beta")
export(poisson(), "distribution_poisson")
export(binomial(), "distribution_binomial")
# FERMI-DIRAC
# BOSE-EINSTEIN
# see stat-mech

71
scripts/formulasheet.py Normal file
View File

@ -0,0 +1,71 @@
#!/usr/bin env python3
import os
import matplotlib.pyplot as plt
import numpy as np
import math
import scipy as scp
if __name__ == "__main__": # make relative imports work as described here: https://peps.python.org/pep-0366/#proposed-change
if __package__ is None:
__package__ = "formulasheet"
import sys
filepath = os.path.realpath(os.path.abspath(__file__))
sys.path.insert(0, os.path.dirname(os.path.dirname(filepath)))
from util.mpl_colorscheme import set_mpl_colorscheme
import util.colorschemes as cs
# SET THE COLORSCHEME
# hard white and black
# cs.p_gruvbox["fg0"] = "#000000"
# cs.p_gruvbox["bg0"] = "#ffffff"
COLORSCHEME = cs.gruvbox_dark()
# print(COLORSCHEME)
# COLORSCHEME = cs.GRUVBOX_DARK
tex_src_path = "../src/"
img_out_dir = os.path.join(tex_src_path, "img")
filetype = ".pdf"
skipasserts = False
full = 8
size_half_half = (full/2, full/2)
size_third_half = (full/3, full/2)
size_half_third = (full/2, full/3)
def assert_directory():
if not skipasserts:
assert os.path.abspath(".").endswith("scripts"), "Please run from the `scripts` directory"
def texvar(var, val, math=True):
s = "$" if math else ""
s += f"\\{var} = {val}"
if math: s += "$"
return s
def export(fig, name, notightlayout=False):
assert_directory()
filename = os.path.join(img_out_dir, name + filetype)
if not notightlayout:
fig.tight_layout()
fig.savefig(filename) #, bbox_inches="tight")
@np.vectorize
def smooth_step(x: float, left_edge: float, right_edge: float):
x = (x - left_edge) / (right_edge - left_edge)
if x <= 0: return 0.
elif x >= 1: return 1.
else: return 3*(x*2) - 2*(x**3)
# run even when imported
set_mpl_colorscheme(COLORSCHEME)
if __name__ == "__main__":
assert_directory()
s = \
"""% This file was generated by scripts/formulasheet.py\n% Do not edit it directly, changes will be overwritten\n""" + cs.generate_latex_colorscheme(COLORSCHEME)
filename = os.path.join(tex_src_path, "util/colorscheme.tex")
print(f"Writing tex colorscheme to {filename}")
with open(filename, "w") as file:
file.write(s)

149
scripts/mpl_colorscheme.py Normal file
View File

@ -0,0 +1,149 @@
"""
Set the colorscheme for matplotlib plots and latex.
Calling this script generates util/colorscheme.tex containing xcolor definitions.
"""
import matplotlib as mpl
import matplotlib.pyplot as plt
from cycler import cycler
skipasserts = False
GRUVBOX = {
"bg0": "#282828",
"bg0-hard": "#1d2021",
"bg0-soft": "#32302f",
"bg1": "#3c3836",
"bg2": "#504945",
"bg3": "#665c54",
"bg4": "#7c6f64",
"fg0": "#fbf1c7",
"fg0-hard": "#f9f5d7",
"fg0-soft": "#f2e5bc",
"fg1": "#ebdbb2",
"fg2": "#d5c4a1",
"fg3": "#bdae93",
"fg4": "#a89984",
"dark-red": "#cc241d",
"dark-green": "#98971a",
"dark-yellow": "#d79921",
"dark-blue": "#458588",
"dark-purple": "#b16286",
"dark-aqua": "#689d6a",
"dark-orange": "#d65d0e",
"dark-gray": "#928374",
"light-red": "#fb4934",
"light-green": "#b8bb26",
"light-yellow": "#fabd2f",
"light-blue": "#83a598",
"light-purple": "#d3869b",
"light-aqua": "#8ec07c",
"light-orange": "#f38019",
"light-gray": "#a89984",
"alt-red": "#9d0006",
"alt-green": "#79740e",
"alt-yellow": "#b57614",
"alt-blue": "#076678",
"alt-purple": "#8f3f71",
"alt-aqua": "#427b58",
"alt-orange": "#af3a03",
"alt-gray": "#7c6f64",
}
FORMULASHEET_COLORSCHEME = GRUVBOX
colors = ["red", "orange", "yellow", "green", "aqua", "blue", "purple", "gray"]
# default order for matplotlib
color_order = ["blue", "orange", "green", "red", "purple", "yellow", "aqua", "gray"]
def set_mpl_colorscheme(palette: dict[str, str], variant="dark"):
P = palette
if variant == "dark":
FIG_BG_COLOR = P["bg0"]
PLT_FG_COLOR = P["fg0"]
PLT_BG_COLOR = P["bg0"]
PLT_GRID_COLOR = P["bg2"]
LEGEND_FG_COLOR = PLT_FG_COLOR
LEGEND_BG_COLOR = P["bg1"]
LEGEND_BORDER_COLOR = P["bg2"]
else:
FIG_BG_COLOR = P["fg0"]
PLT_FG_COLOR = P["bg0"]
PLT_BG_COLOR = P["fg0"]
PLT_GRID_COLOR = P["fg2"]
LEGEND_FG_COLOR = PLT_FG_COLOR
LEGEND_BG_COLOR = P["fg1"]
LEGEND_BORDER_COLOR = P["fg2"]
COLORS = [P[f"{variant}-{c}"] for c in color_order]
color_rcParams = {
'axes.edgecolor': PLT_FG_COLOR,
'axes.facecolor': PLT_BG_COLOR,
'axes.labelcolor': PLT_FG_COLOR,
'axes.titlecolor': 'auto',
# 'axes.prop_cycle': cycler('color', ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf']),
'axes.prop_cycle': cycler('color', COLORS),
# 'axes3d.xaxis.panecolor': (0.95, 0.95, 0.95, 0.5),
# 'axes3d.yaxis.panecolor': (0.9, 0.9, 0.9, 0.5),
# 'axes3d.zaxis.panecolor': (0.925, 0.925, 0.925, 0.5),
# 'boxplot.boxprops.color': 'black',
# 'boxplot.capprops.color': 'black',
# 'boxplot.flierprops.color': 'black',
# 'boxplot.flierprops.markeredgecolor': 'black',
# 'boxplot.flierprops.markeredgewidth': 1.0,
# 'boxplot.flierprops.markerfacecolor': 'none',
# 'boxplot.meanprops.color': 'C2',
# 'boxplot.meanprops.markeredgecolor': 'C2',
# 'boxplot.meanprops.markerfacecolor': 'C2',
# 'boxplot.meanprops.markersize': 6.0,
# 'boxplot.medianprops.color': 'C1',
# 'boxplot.whiskerprops.color': 'black',
'figure.edgecolor': PLT_BG_COLOR,
'figure.facecolor': PLT_BG_COLOR,
# 'figure.figsize': [6.4, 4.8],
# 'figure.frameon': True,
# 'figure.labelsize': 'large',
'grid.color': PLT_GRID_COLOR,
# 'hatch.color': 'black',
'legend.edgecolor': LEGEND_BORDER_COLOR,
'legend.facecolor': LEGEND_BG_COLOR,
'xtick.color': PLT_FG_COLOR,
'ytick.color': PLT_FG_COLOR,
'xtick.labelcolor': PLT_FG_COLOR,
'ytick.labelcolor': PLT_FG_COLOR,
# 'lines.color': 'C0',
'text.color': PLT_FG_COLOR,
}
for k, v in color_rcParams.items():
plt.rcParams[k] = v
# override single char codes
# TODO: use color name with variant from palette instead of order
mpl.colors.get_named_colors_mapping()["b"] = COLORS[0]
mpl.colors.get_named_colors_mapping()["o"] = COLORS[1]
mpl.colors.get_named_colors_mapping()["g"] = COLORS[2]
mpl.colors.get_named_colors_mapping()["r"] = COLORS[3]
mpl.colors.get_named_colors_mapping()["m"] = COLORS[4]
mpl.colors.get_named_colors_mapping()["y"] = COLORS[5]
mpl.colors.get_named_colors_mapping()["c"] = COLORS[6]
mpl.colors.get_named_colors_mapping()["k"] = P["fg0"]
mpl.colors.get_named_colors_mapping()["w"] = P["bg0"]
def color_latex_def(name, color):
name = "{" + name.replace("-", "_") + "}"
color = "{" + color.strip("#") + "}"
return f"\\definecolor{name:10}{{HTML}}{color}"
def generate_latex_colorscheme(palette, variant="light"):
s = ""
for n, c in palette.items():
s += color_latex_def(n, c) + "\n"
return s

View File

@ -0,0 +1,55 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "790c45a0-a10a-411d-bfc0-bdd52e2c2492",
"metadata": {},
"outputs": [],
"source": [
"import tikz as t"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "6c5d640f-c287-4e8d-a0c8-8a8d801b6fae",
"metadata": {},
"outputs": [],
"source": [
"pic = t.Picture()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9b7f8347-1619-40cd-b864-24840901e7a1",
"metadata": {},
"outputs": [],
"source": [
"pic.draw(t.node("
]
}
],
"metadata": {
"kernelspec": {
"display_name": "conda",
"language": "python",
"name": "conda"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,10 @@
#!/usr/bin env python3
"""
Script to process the periodic table as json into latex stuff
Source for `elements.json` is this amazing project:
https://pse-info.de/de/data
Copyright Matthias Quintern 2024
Copyright Matthias Quintern 2025
"""
import json
import os
@ -13,7 +14,7 @@ outdir = "../src/ch"
def gen_periodic_table():
with open("elements.json") as file:
with open("other/elements.json") as file:
ptab = json.load(file)
# print(ptab["elements"][1])
s = "% This file was created by the periodic_table.py script.\n% Do not edit manually. Any changes might get lost.\n"
@ -46,7 +47,7 @@ def gen_periodic_table():
temp = ""
add_refractive_index = lambda idx: f"\\GT{{{idx['label']}}}: ${idx['value']}$, "
idxs = get("optical", "refractive_index")
print(idxs)
# print(idxs)
if type(idxs) == list:
for idx in idxs: add_refractive_index(idx)
elif type(idxs) == dict: add_refractive_index(idxs)
@ -64,7 +65,7 @@ def gen_periodic_table():
el_s += f"{match.groups()[1]}}}"
el_s += "\n\\end{element}"
print(el_s)
# print(el_s)
s += el_s + "\n"
# print(s)
return s

View File

@ -1,36 +0,0 @@
import os
import matplotlib.pyplot as plt
import numpy as np
import math
import scipy as scp
outdir = "../src/img/"
filetype = ".pdf"
skipasserts = False
full = 8
size_half_half = (full/2, full/2)
size_third_half = (full/3, full/2)
size_half_third = (full/2, full/3)
def texvar(var, val, math=True):
s = "$" if math else ""
s += f"\\{var} = {val}"
if math: s += "$"
return s
def export(fig, name, notightlayout=False):
if not skipasserts:
assert os.path.abspath(".").endswith("scripts"), "Please run from the `scripts` directory"
filename = os.path.join(outdir, name + filetype)
if not notightlayout:
fig.tight_layout()
fig.savefig(filename) #, bbox_inches="tight")
@np.vectorize
def smooth_step(x: float, left_edge: float, right_edge: float):
x = (x - left_edge) / (right_edge - left_edge)
if x <= 0: return 0.
elif x >= 1: return 1.
else: return 3*(x**2) - 2*(x**3)

View File

@ -1,4 +1,4 @@
from plot import *
from formulasheet import *
import scqubits as scq
import qutip as qt
@ -23,33 +23,36 @@ def _plot_transmon_n_wavefunctions(qubit: scq.Transmon, fig_ax, which=[0,1]):
ax.set_xlim(*xlim)
ax.set_xticks(np.arange(xlim[0], xlim[1]+1))
def _plot_transmon(qubit: scq.Transmon, ngs, fig, axs):
def _plot_transmon(qubit: scq.Transmon, ngs, fig, axs, wavefunction=True):
_,_ = qubit.plot_evals_vs_paramvals("ng", ngs, fig_ax=(fig, axs[0]), evals_count=5, subtract_ground=False)
_,_ = qubit.plot_wavefunction(fig_ax=(fig, axs[1]), which=[0, 1, 2], mode="abs_sqr")
_plot_transmon_n_wavefunctions(qubit, (fig, axs[2]), which=[0, 1, 2])
qubit.ng = 0.5
_plot_transmon_n_wavefunctions(qubit, (fig, axs[3]), which=[0, 1, 2])
qubit.ng = 0
if wavefunction:
_,_ = qubit.plot_wavefunction(fig_ax=(fig, axs[1]), which=[0, 1, 2], mode="abs_sqr")
_plot_transmon_n_wavefunctions(qubit, (fig, axs[2]), which=[0, 1, 2])
qubit.ng = 0.5
_plot_transmon_n_wavefunctions(qubit, (fig, axs[3]), which=[0, 1, 2])
qubit.ng = 0
def transmon_cpb():
def transmon_cpb(wavefunction=True):
EC = 1
qubit = scq.Transmon(EJ=30, EC=EC, ng=0, ncut=30)
ngs = np.linspace(-2, 2, 200)
fig, axs = plt.subplots(4, 3, squeeze=True, figsize=(full,full))
nrows = 4 if wavefunction else 1
fig, axs = plt.subplots(nrows, 3, squeeze=False, figsize=(full,full/3))
axs = axs.T
qubit.ng = 0
qubit.EJ = 0.1 * EC
title = lambda x: f"$E_J/E_C = {x}$"
_plot_transmon(qubit, ngs, fig, axs[0])
_plot_transmon(qubit, ngs, fig, axs[0], wavefunction=wavefunction)
axs[0][0].set_title("Cooper-Pair-Box\n"+title(qubit.EJ))
qubit.EJ = EC
_plot_transmon(qubit, ngs, fig, axs[1])
_plot_transmon(qubit, ngs, fig, axs[1], wavefunction=wavefunction)
axs[1][0].set_title("Quantronium\n"+title(qubit.EJ))
qubit.EJ = 20 * EC
_plot_transmon(qubit, ngs, fig, axs[2])
_plot_transmon(qubit, ngs, fig, axs[2], wavefunction=wavefunction)
axs[2][0].set_title("Transmon\n"+title(qubit.EJ))
for ax in axs[1:,:].flatten(): ax.set_ylabel("")
@ -58,15 +61,14 @@ def transmon_cpb():
ax.set_xticklabels(["-2", "-1", "", "0", "", "1", "2"])
ylim = ax.get_ylim()
ax.vlines([-1, -0.5], ymin=ylim[0], ymax=ylim[1], color="#aaa", linestyle="dotted")
axs[0][2].legend()
# axs[0][2].legend()
fig.tight_layout()
return fig
export(transmon_cpb(), "qubit_transmon")
def flux_onium():
fig, axs = plt.subplots(1, 3, squeeze=True, figsize=(full,full/2))
fig, axs = plt.subplots(1, 3, squeeze=True, figsize=(full,full/3))
fluxs = np.linspace(0.4, 0.6, 50)
EJ = 35.0
alpha = 0.3
@ -100,4 +102,6 @@ def flux_onium():
axs[2].set_title("Fluxonium")
return fig
export(flux_onium(), "qubit_flux_onium")
if __name__ == "__main__":
export(transmon_cpb(wavefunction=False), "qubit_transmon")
export(flux_onium(), "qubit_flux_onium")

9
scripts/readme.md Normal file
View File

@ -0,0 +1,9 @@
# Scripts
Put all scripts that generate plots or tex files here.
## Plots
For plots with `matplotlib`:
1. import `plot.py`
2. use one of the preset figsizes
3. save the image using the `export` function in the `if __name__ == '__main__'` part

View File

@ -1,4 +1,5 @@
numpy
scipy
matplotlib
scqubits
qutip

View File

@ -1,4 +1,5 @@
from plot import *
#!/usr/bin env python3
from formulasheet import *
def flennard_jones(r, epsilon, sigma):
return 4 * epsilon * ((sigma/r)**12 - (sigma/r)**6)
@ -17,7 +18,6 @@ def lennard_jones():
ax.legend()
ax.set_ylim(-1.1, 1.1)
return fig
export(lennard_jones(), "potential_lennard_jones")
# BOLTZMANN / FERMI-DIRAC / BOSE-EINSTEN DISTRIBUTIONS
def fboltzmann(x):
@ -45,7 +45,6 @@ def id_qgas():
ax.legend()
ax.set_ylim(-0.1, 4)
return fig
export(id_qgas(), "td_id_qgas_distributions")
@np.vectorize
def fstep(x):
@ -67,7 +66,6 @@ def fermi_occupation():
ax.legend()
ax.set_ylim(-0.1, 1.1)
return fig
export(fermi_occupation(), "td_fermi_occupation")
def fermi_heat_capacity():
fig, ax = plt.subplots(figsize=size_half_third)
@ -83,8 +81,8 @@ def fermi_heat_capacity():
low_temp_Cv = linear(x)
ax.plot(x, low_temp_Cv, color="orange", linestyle="dashed", label=r"${\pi^2}/{2}\,{T}/{T_\text{F}}$")
ax.hlines([3/2], xmin=0, xmax=10, color="blue", linestyle="dashed", label="Petit-Dulong")
ax.plot(x, low_temp_Cv, color="o", linestyle="dashed", label=r"${\pi^2}/{2}\,{T}/{T_\text{F}}$")
ax.hlines([3/2], xmin=0, xmax=10, color="b", linestyle="dashed", label="Petit-Dulong")
@np.vectorize
def unphysical_f(x):
# exponential
@ -104,7 +102,7 @@ def fermi_heat_capacity():
else: return a * x
# ax.plot(x, smoothing, label="smooth")
y = unphysical_f(x)
ax.plot(x, y, color="black")
ax.plot(x, y, color="k")
ax.legend(loc="lower right")
@ -116,5 +114,9 @@ def fermi_heat_capacity():
ax.set_xlim(0, 1.4 * T_F)
ax.set_ylim(0, 2)
return fig
export(fermi_heat_capacity(), "td_fermi_heat_capacity")
if __name__ == '__main__':
export(lennard_jones(), "potential_lennard_jones")
export(fermi_heat_capacity(), "td_fermi_heat_capacity")
export(fermi_occupation(), "td_fermi_occupation")
export(id_qgas(), "td_id_qgas_distributions")

View File

@ -0,0 +1,190 @@
"""
A colorscheme for this project needs:
fg and bg 0-4, where 0 is used as default font / background
fg-<color> and bg-<color> where <color> is "red", "orange", "yellow", "green", "aqua", "blue", "purple", "gray"
"""
from math import floor
colors = ["red", "orange", "yellow", "green", "aqua", "blue", "purple", "gray"]
def brightness(color:str, percent:float):
if color.startswith("#"):
color = color.strip("#")
newcolor = "#"
else:
newcolor = ""
for i in range(3):
c = float(int(color[i*2:i*2+2], 16))
c = int(round(max(0, min(c*percent, 0xff)), 0))
newcolor += f"{c:02x}"
return newcolor
#
# GRUVBOX
#
p_gruvbox = {
"fg0": "#282828",
"fg0-hard": "#1d2021",
"fg0-soft": "#32302f",
"fg1": "#3c3836",
"fg2": "#504945",
"fg3": "#665c54",
"fg4": "#7c6f64",
"bg0": "#fbf1c7",
"bg0-hard": "#f9f5d7",
"bg0-soft": "#f2e5bc",
"bg1": "#ebdbb2",
"bg2": "#d5c4a1",
"bg3": "#bdae93",
"bg4": "#a89984",
"dark-red": "#cc241d",
"dark-green": "#98971a",
"dark-yellow": "#d79921",
"dark-blue": "#458588",
"dark-purple": "#b16286",
"dark-aqua": "#689d6a",
"dark-orange": "#d65d0e",
"dark-gray": "#928374",
"light-red": "#fb4934",
"light-green": "#b8bb26",
"light-yellow": "#fabd2f",
"light-blue": "#83a598",
"light-purple": "#d3869b",
"light-aqua": "#8ec07c",
"light-orange": "#f38019",
"light-gray": "#a89984",
"alt-red": "#9d0006",
"alt-green": "#79740e",
"alt-yellow": "#b57614",
"alt-blue": "#076678",
"alt-purple": "#8f3f71",
"alt-aqua": "#427b58",
"alt-orange": "#af3a03",
"alt-gray": "#7c6f64",
}
def grubox_light():
GRUVBOX_LIGHT = { "fg0": p_gruvbox["fg0-hard"], "bg0": p_gruvbox["bg0-hard"] } \
| {f"fg{n}": p_gruvbox[f"fg{n}"] for n in range(1,5)} \
| {f"bg{n}": p_gruvbox[f"bg{n}"] for n in range(1,5)} \
| {f"fg-{n}": p_gruvbox[f"alt-{n}"] for n in colors} \
| {f"bg-{n}": p_gruvbox[f"light-{n}"] for n in colors}
return GRUVBOX_LIGHT
def gruvbox_dark():
GRUVBOX_DARK = { "fg0": p_gruvbox["bg0-hard"], "bg0": p_gruvbox["fg0-hard"] } \
| {f"fg{n}": p_gruvbox[f"bg{n}"] for n in range(1,5)} \
| {f"bg{n}": p_gruvbox[f"fg{n}"] for n in range(1,5)} \
| {f"fg-{n}": p_gruvbox[f"light-{n}"] for n in colors} \
| {f"bg-{n}": p_gruvbox[f"dark-{n}"] for n in colors}
return GRUVBOX_DARK
#
# LEGACY
#
p_legacy = {
"fg0": "#fcfcfc",
"bg0": "#333333",
"red": "#d12229",
"green": "#007940",
"yellow": "#ffc615",
"blue": "#2440fe",
"purple": "#4D1037",
"aqua": "#008585",
"orange": "#f68a1e",
"gray": "#928374",
}
def legacy():
LEGACY = \
{ f"fg{n}": brightness(p_legacy["fg0"], 1-n/8) for n in range(5)} \
| { f"bg{n}": brightness(p_legacy["bg0"], 1+n/8) for n in range(5)} \
| { f"bg-{n}": c for n,c in p_legacy.items() } \
| { f"fg-{n}": brightness(c, 2.0) for n,c in p_legacy.items() }
return LEGACY
#
# TUM
#
p_tum = {
"dark-blue": "#072140",
"light-blue": "#5E94D4",
"alt-blue": "#3070B3",
"light-yellow": "#FED702",
"dark-yellow": "#CBAB01",
"alt-yellow": "#FEDE34",
"light-orange": "#F7811E",
"dark-orange": "#D99208",
"alt-orange": "#F9BF4E",
"light-purple": "#B55CA5",
"dark-purple": "#9B468D",
"alt-purple": "#C680BB",
"light-red": "#EA7237",
"dark-red": "#D95117",
"alt-red": "#EF9067",
"light-green": "#9FBA36",
"dark-green": "#7D922A",
"alt-green": "#B6CE55",
"light-gray": "#475058",
"dark-gray": "#20252A",
"alt-gray": "#333A41",
"light-aqua": "#689d6a",
"dark-aqua": "#427b58", # taken aquas from gruvbox
"fg0-hard": "#000000",
"fg0": "#000000",
"fg0-soft": "#20252A",
"fg1": "#072140",
"fg2": "#333A41",
"fg3": "#475058",
"fg4": "#6A757E",
"bg0-hard": "#FFFFFF",
"bg0": "#FBF9FA",
"bg0-soft": "#EBECEF",
"bg1": "#DDE2E6",
"bg2": "#E3EEFA",
"bg3": "#F0F5FA",
}
def tum():
TUM = {}
for n,c in p_tum.items():
n2 = n.replace("light", "bg").replace("dark", "fg")
TUM[n2] = c
return TUM
#
# STUPID
#
p_stupid = {
"bg0": "#0505aa",
"fg0": "#ffffff",
"red": "#ff0000",
"green": "#23ff81",
"yellow": "#ffff00",
"blue": "#5555ff",
"purple": "#b00b69",
"aqua": "#00ffff",
"orange": "#ffa500",
"gray": "#444444",
}
def stupid():
LEGACY = \
{ f"fg{n}": brightness(p_stupid["fg0"], 1-n/8) for n in range(5)} \
| { f"bg{n}": brightness(p_stupid["bg0"], 1+n/8) for n in range(5)} \
| { f"bg-{n}": c for n,c in p_stupid.items() } \
| { f"fg-{n}": brightness(c, 2.0) for n,c in p_stupid.items() }
return LEGACY
# UTILITY
def color_latex_def(name, color):
# name = name.replace("-", "_")
color = color.strip("#")
return "\\definecolor{" + name + "}{HTML}{" + color + "}"
def generate_latex_colorscheme(palette, variant="light"):
s = ""
for n, c in palette.items():
s += color_latex_def(n, c) + "\n"
return s

View File

@ -0,0 +1,84 @@
"""
Set the colorscheme for matplotlib plots and latex.
Calling this script generates util/colorscheme.tex containing xcolor definitions.
"""
import matplotlib as mpl
import matplotlib.pyplot as plt
from cycler import cycler
# default order for matplotlib
color_order = ["blue", "orange", "green", "red", "purple", "yellow", "aqua", "gray"]
def set_mpl_colorscheme(palette: dict[str, str]):
P = palette
FIG_BG_COLOR = P["bg0"]
PLT_FG_COLOR = P["fg0"]
PLT_BG_COLOR = P["bg0"]
PLT_GRID_COLOR = P["bg2"]
LEGEND_FG_COLOR = PLT_FG_COLOR
LEGEND_BG_COLOR = P["bg1"]
LEGEND_BORDER_COLOR = P["bg2"]
COLORS = [P[f"fg-{c}"] for c in color_order]
color_rcParams = {
'axes.edgecolor': PLT_FG_COLOR,
'axes.facecolor': PLT_BG_COLOR,
'axes.labelcolor': PLT_FG_COLOR,
'axes.titlecolor': 'auto',
# 'axes.prop_cycle': cycler('color', ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf']),
'axes.prop_cycle': cycler('color', COLORS),
# 'axes3d.xaxis.panecolor': (0.95, 0.95, 0.95, 0.5),
# 'axes3d.yaxis.panecolor': (0.9, 0.9, 0.9, 0.5),
# 'axes3d.zaxis.panecolor': (0.925, 0.925, 0.925, 0.5),
# 'boxplot.boxprops.color': 'black',
# 'boxplot.capprops.color': 'black',
# 'boxplot.flierprops.color': 'black',
# 'boxplot.flierprops.markeredgecolor': 'black',
# 'boxplot.flierprops.markeredgewidth': 1.0,
# 'boxplot.flierprops.markerfacecolor': 'none',
# 'boxplot.meanprops.color': 'C2',
# 'boxplot.meanprops.markeredgecolor': 'C2',
# 'boxplot.meanprops.markerfacecolor': 'C2',
# 'boxplot.meanprops.markersize': 6.0,
# 'boxplot.medianprops.color': 'C1',
# 'boxplot.whiskerprops.color': 'black',
'figure.edgecolor': PLT_BG_COLOR,
'figure.facecolor': PLT_BG_COLOR,
# 'figure.figsize': [6.4, 4.8],
# 'figure.frameon': True,
# 'figure.labelsize': 'large',
'grid.color': PLT_GRID_COLOR,
# 'hatch.color': 'black',
'legend.edgecolor': LEGEND_BORDER_COLOR,
'legend.facecolor': LEGEND_BG_COLOR,
'xtick.color': PLT_FG_COLOR,
'ytick.color': PLT_FG_COLOR,
'xtick.labelcolor': PLT_FG_COLOR,
'ytick.labelcolor': PLT_FG_COLOR,
# 'lines.color': 'C0',
'text.color': PLT_FG_COLOR,
}
for k, v in color_rcParams.items():
plt.rcParams[k] = v
# override single char codes
# TODO: use color name with variant from palette instead of order
mpl.colors.get_named_colors_mapping()["b"] = COLORS[0]
mpl.colors.get_named_colors_mapping()["o"] = COLORS[1]
mpl.colors.get_named_colors_mapping()["g"] = COLORS[2]
mpl.colors.get_named_colors_mapping()["r"] = COLORS[3]
mpl.colors.get_named_colors_mapping()["m"] = COLORS[4]
mpl.colors.get_named_colors_mapping()["y"] = COLORS[5]
mpl.colors.get_named_colors_mapping()["c"] = COLORS[6]
mpl.colors.get_named_colors_mapping()["k"] = P["fg0"]
mpl.colors.get_named_colors_mapping()["w"] = P["bg0"]
mpl.colors.get_named_colors_mapping()["black"] = P["fg0"]
for color in color_order:
mpl.colors.get_named_colors_mapping()[color] = P[f"fg-{color}"]

View File

@ -1,23 +1,311 @@
\Part[
\eng{Chemie}
\eng{Chemistry}
\ger{Chemie}
]{ch}
\Section[
\eng{Periodic table}
\ger{Periodensystem}
]{ptable}
\drawPeriodicTable
\Section[
\eng{Periodic table}
\ger{Periodensystem}
]{ptable}
\drawPeriodicTable
\Section[
\eng{stuff}
\ger{stuff}
]{stuff}
\begin{formula}{covalent_bond}
\desc{Covalent bond}{}{}
\desc[german]{Kolvalente Bindung}{}{}
\ttxt{
\eng{Bonds that involve sharing of electrons to form electron pairs between atoms.}
\ger{Bindungen zwischen Atomen die durch geteilte Elektronen, welche Elektronenpaare bilden, gebildet werden.}
\Section[
\eng{Electrochemistry}
\ger{Elektrochemie}
]{el}
\eng[std_cell]{standard cell potential}
\ger[std_cell]{Standardzellpotential}
\eng[electrode_pot]{electrode potential}
\ger[electrode_pot]{Elektrodenpotential}
\begin{formula}{chemical_potential}
\desc{Chemical potential}{of species $i$\\Energy involved when the particle number changes}{\QtyRef{gibbs_free_energy}, \QtyRef{amount}}
\desc[german]{Chemisches Potential}{der Spezies $i$\\Involvierte Energie, wenn sich die Teilchenzahl ändert}{}
\quantity{\mu}{\joule\per\mol;\joule}{is}
\eq{
\mu_i \equiv \pdv{G}{n_i}_{n_j\neq n_i,p,T}
}
\end{formula}
\begin{formula}{standard_chemical_potential}
\desc{Standard chemical potential}{In equilibrium}{\QtyRef{chemical_potential}, \ConstRef{universal_gas}, \QtyRef{temperature}, \QtyRef{activity}}
\desc[german]{Standard chemisches Potential}{}{}
\eq{\mu_i = \mu_i^\theta + RT \Ln{a_i}}
\end{formula}
\begin{formula}{chemical_equilibrium}
\desc{Chemical equilibrium}{}{\QtyRef{chemical_potential}, \QtyRef{stoichiometric_coefficient}}
\desc[german]{Chemisches Gleichgewicht}{}{}
\eq{\sum_\text{\GT{products}} \nu_i \mu_i = \sum_\text{\GT{educts}} \nu_i \mu_i}
\end{formula}
\begin{formula}{activity}
\desc{Activity}{relative activity}{\QtyRef{chemical_potential}, \QtyRef{standard_chemical_potential}, \ConstRef{universal_gas}, \QtyRef{temperature}}
\desc[german]{Aktivität}{Relative Aktivität}{}
\quantity{a}{}{s}
\eq{a_i = \Exp{\frac{\mu_i-\mu_i^\theta}{RT}}}
\end{formula}
\begin{formula}{electrochemical_potential}
\desc{Electrochemical potential}{Chemical potential with electrostatic contributions}{\QtyRef{chemical_potential}, $z$ valency (charge), \ConstRef{faraday}, \QtyRef{electric_scalar_potential} (Galvani Potential)}
\desc[german]{Elektrochemisches Potential}{Chemisches Potential mit elektrostatischen Enegiebeiträgen}{\QtyRef{chemical_potential}, $z$ Ladungszahl, \ConstRef{faraday}, \QtyRef{electric_scalar_potential} (Galvanisches Potential)}
\quantity{\muecp}{\joule\per\mol;\joule}{is}
\eq{\muecp_i \equiv \mu_i + z_i F \phi}
\end{formula}
\begin{formula}{nernst_equation}
\desc{Nernst equation}{Elektrode potential for a half-cell reaction}{$E$ electrode potential, $E^\theta$ \gt{std_cell}, \ConstRef{universal_gas}, \ConstRef{temperature}, $z$ \qtyRef{charge_number}, \ConstRef{faraday}, \QtyRef{activity}, \QtyRef{stoichiometric_coefficient}}
\desc[german]{Nernst-Gleichung}{Elektrodenpotential für eine Halbzellenreaktion}{}
\eq{E = E^\theta + \frac{RT}{zF} \Ln{\frac{ \left(\prod_{i}(a_i)^{\abs{\nu_i}}\right)_\text{oxidized}}{\left(\prod_{i}(a_i)^{\abs{\nu_i}}\right)_\text{reduced}}}}
\end{formula}
\begin{formula}{cell}
\desc{Electrochemical cell}{}{}
\desc[german]{Elektrochemische Zelle}{}{}
\ttxt{
\eng{
\begin{itemize}
\item Electrolytic cell: Uses electrical energy to force a chemical reaction
\item Galvanic cell: Produces electrical energy through a chemical reaction
\end{itemize}
}
\ger{
\begin{itemize}
\item Elektrolytische Zelle: Nutzt elektrische Energie um eine Reaktion zu erzwingen
\item Galvanische Zelle: Produziert elektrische Energie durch eine chemische Reaktion
\end{itemize}
}
}
\end{formula}
\begin{formula}{standard_cell_potential}
\desc{Standard cell potential}{}{$\Delta_\txR G^\theta$ standard \qtyRef{gibbs_free_energy} of reaction, $n$ number of electrons, \ConstRef{faraday}}
\desc[german]{Standard Zellpotential}{}{$\Delta_\txR G^\theta$ Standard \qtyRef{gibbs_free_energy} der Reaktion, $n$ Anzahl der Elektronen, \ConstRef{faraday}}
\eq{E^\theta_\text{rev} = \frac{-\Delta_\txR G^\theta}{nF}}
\end{formula}
\begin{formula}{she}
\desc{Standard hydrogen electrode (SHE)}{}{}
\desc[german]{Standard Wasserstoffelektrode}{}{}
\ttxt{
\eng{Defined as reference for measuring half-cell potententials}
\ger{Definiert als Referenz für Messungen von Potentialen von Halbzellen}
}
$a_{\ce{H+}} =1 \, (\text{pH} = 0)$, $p_{\ce{H2}} = \SI{100}{\kilo\pascal}$
\end{formula}
\eng[galvanic]{galvanic}
\ger[galvanic]{galvanisch}
\eng[electrolytic]{electrolytic}
\ger[electrolytic]{electrolytisch}
\begin{formula}{cell_efficiency}
\desc{Thermodynamic cell efficiency}{}{$P$ \fqEqRef{ed:el:power}}
\desc[german]{Thermodynamische Zelleffizienz}{}{}
\eq{
\eta_\text{cell} &= \frac{P_\text{obtained}}{P_\text{maximum}} = \frac{E_\text{cell}}{E_\text{cell,rev}} & & \text{\gt{galvanic}} \\
\eta_\text{cell} &= \frac{P_\text{minimum}}{P_\text{applied}} = \frac{E_\text{cell,rev}}{E_\text{cell}} & & \text{\gt{electrolytic}}
}
\end{formula}
\Subsection[
\eng{Ionic conduction in electrolytes}
\ger{Ionische Leitung in Elektrolyten}
]{ion_cond}
\eng[z]{charge number}
\ger[z]{Ladungszahl}
\eng[of_i]{of ion $i$}
\ger[of_i]{des Ions $i$}
\begin{formula}{diffusion}
\desc{Diffusion}{caused by concentration gradients}{$z_i$ \qtyRef{charge_number} \gt{of_i}, \ConstRef{faraday}, \QtyRef{diffusion_constant} \gt{of_i}, \QtyRef{concentration} \gt{of_i}}
\desc[german]{Diffusion}{durch Konzentrationsgradienten}{}
\eq{ i_\text{diff} = \sum_i -z_i F D_i \left(\odv{c_i}{x}\right) }
\end{formula}
\begin{formula}{migration}
\desc{Migration}{caused by potential gradients}{$z_i$ \qtyRef{charge_number} \gt{of_i}, \ConstRef{faraday}, \QtyRef{concentration} \gt{of_i}, \QtyRef{mobility} \gt{of_i}, $\nabla\phi_\txs$ potential gradient in the solution}
\desc[german]{Migration}{durch Potentialgradienten}{$z_i$ \qtyRef{charge_number} \gt{of_i}, \ConstRef{faraday}, \QtyRef{concentration} \gt{of_i}, \QtyRef{mobility} \gt{of_i}, $\nabla\phi_\txs$ Potentialgradient in der Lösung}
\eq{ i_\text{mig} = \sum_i -z_i^2 F^2 \, c_i \, \mu_i \, \nabla\Phi_\txs }
\end{formula}
\begin{formula}{convection}
\desc{Convection}{caused by pressure gradients}{$z_i$ \qtyRef{charge_number} \gt{of_i}, \ConstRef{faraday}, \QtyRef{concentration} \gt{of_i}, $v_i^\text{flow}$ \qtyRef{velocity} \gt{of_i} in flowing electrolyte}
\desc[german]{Convection}{durch Druckgradienten}{$z_i$ \qtyRef{charge_number} \gt{of_i}, \ConstRef{faraday}, \QtyRef{concentration} \gt{of_i}, $v_i^\text{flow}$ \qtyRef{velocity} \gt{of_i} im fliessenden Elektrolyt}
\eq{ i_\text{conv} = \sum_i -z_i F \, c_i \, v_i^\text{flow} }
\end{formula}
\begin{formula}{ionic_conductivity}
\desc{Ionic conductivity}{}{\ConstRef{faraday}, $z_i$, $c_i$, $\mu_i$ charge number, \qtyRef{concentration} and \qtyRef{mobility} of the positive (+) and negative (-) ions}
\desc[german]{Ionische Leitfähigkeit}{}{\ConstRef{faraday}, $z_i$, $c_i$, $\mu_i$ Ladungszahl, \qtyRef{concentration} und \qtyRef{mobility} der positiv (+) und negativ geladenen Ionen}
\quantity{\kappa}{\per\ohm\cm=\siemens\per\cm}{}
\eq{\kappa = F^2 \left(z_+^2 \, c_+ \, \mu_+ + z_-^2 \, c_- \, \mu_-\right)}
\end{formula}
\begin{formula}{ionic_resistance}
\desc{Ohmic resistance of ionic current flow}{}{$L$ \qtyRef{length}, $A$ \qtyRef{area}, \QtyRef{ionic_conductivity}}
\desc[german]{Ohmscher Widerstand für Ionen-Strom}{}{}
\eq{R_\Omega = \frac{L}{A\,\kappa}}
\end{formula}
\begin{formula}{ionic_mobility}
\desc{Ionic mobility}{}{$v_\pm$ steady state drift \qtyRef{velocity}, $\phi$ \qtyRef{electric_scalar_potential}, $z$ \qtyRef{charge_number}, \ConstRef{faraday}, \ConstRef{charge}, \QtyRef{viscosity}, $r_\pm$ ion radius}
\desc[german]{Ionische Moblilität}{}{}
\quantity{u_\pm}{\cm^2\mol\per\joule\s}{}
% \eq{u_\pm = - \frac{v_\pm}{\nabla \phi \,z_\pm F} = \frac{e}{6\pi F \eta_\text{dyn} \r_\pm}}
\end{formula}
\begin{formula}{transference}
\desc{Transference number}{Ion transport number \\Fraction of the current carried by positive / negative ions}{$i_{+/-}$ current through positive/negative charges}
\desc[german]{Überführungszahl}{Anteil der positiv / negativ geladenen Ionen am Gesamtstrom}{$i_{+/-}$ Strom durch positive / negative Ladungn}
\eq{t_{+/-} = \frac{i_{+/-}}{i_+ + i_-}}
\end{formula}
\eng[csalt]{electrolyte \qtyRef{concentration}}
\eng[csalt]{\qtyRef{concentration} des Elektrolyts}
\begin{formula}{molar_conductivity}
\desc{Molar conductivity}{}{\QtyRef{ionic_conductivity}, $c_\text{salt}$ \gt{csalt}}
\desc[german]{Molare Leitfähigkeit}{}{\QtyRef{ionic_conductivity}, $c_\text{salt}$ \gt{salt}}
\quantity{\Lambda_\txM}{\siemens\cm^2\per\mol=\ampere\cm^2\per\volt\mol}{ievs}
\eq{\Lambda_\txM = \frac{\kappa}{c_\text{salt}}}
\end{formula}
\begin{formula}{kohlrausch_law}
\desc{Kohlrausch's law}{}{$\Lambda_\txM^0$ \qtyRef{molar_conductivity} at infinite dilution, $c_\text{salt}$ \gt{csalt}, $K$ \GT{constant}}
\desc[german]{}{}{$\Lambda_\txM^0$ \qtyRef{molar_conductivity} bei unendlicher Verdünnung, $\text{salt}$ \gt{csalt} $K$ \GT{constant}}
\eq{\Lambda_\txM = \Lambda_\txM^0 - K \sqrt{c_\text{salt}}}
\end{formula}
% Electrolyte conductivity
\begin{formula}{molality}
\desc{Molality}{}{\QtyRef{amount} of the solute, \QtyRef{mass} of the solvent}
\desc[german]{Molalität}{}{\QtyRef{amount} des gelösten Stoffs, \QtyRef{mass} des Lösungsmittels}
\quantity{b}{\mol\per\kg}{}
\eq{b = \frac{n}{m}}
\end{formula}
\begin{formula}{molarity}
\desc{Molarity}{\GT{see} \qtyRef{concentration}}{\QtyRef{amount} of the solute, \QtyRef{volume} of the solvent}
\desc[german]{Molarität}{}{\QtyRef{amount} des gelösten Stoffs, \QtyRef{volume} des Lösungsmittels}
\quantity{c}{\mol\per\litre}{}
\eq{c = \frac{n}{V}}
\end{formula}
\begin{formula}{ionic_strength}
\desc{Ionic strength}{Measure of the electric field in a solution through solved ions}{\QtyRef{molality}, \QtyRef{molarity}, $z$ \qtyRef{charge_number}}
\desc[german]{Ionenstärke}{Maß eienr Lösung für die elektrische Feldstärke durch gelöste Ionen}{}
\quantity{I}{\mol\per\kg;\mol\per\litre}{}
\eq{I_b &= \frac{1}{2} \sum_i b_i z_i^2 \\ I_c &= \frac{1}{2} \sum_i c_i z_i^2}
\end{formula}
\begin{formula}{debye_screening_length}
\desc{Debye screening length}{}{\ConstRef{avogadro}, \ConstRef{charge}, \QtyRef{ionic_strength}, \QtyRef{permittivity}, \ConstRef{boltzmann}, \QtyRef{temperature}}
\desc[german]{Debye-Länge / Abschirmlänge}{}{}
\eq{\lambda_\txD = \sqrt{\frac{\epsilon \kB T}{2\NA e^2 I_C}}}
\end{formula}
\begin{formula}{mean_ionic_activity}
\desc{Mean ionic activity coefficient}{Accounts for decreased reactivity because ions must divest themselves of their ion cloud before reacting}{}
\desc[german]{Mittlerer ionischer Aktivitätskoeffizient}{Berücksichtigt dass Ionen sich erst von ihrer Ionenwolke lösen müssen, bevor sie reagieren können}{}
\quantity{\gamma}{}{s}
\eq{\gamma_\pm = \left(\gamma_+^{\nu_+} \, \gamma_-^{\nu_-}\right)^{\frac{1}{\nu_+ + \nu_-}}}
\end{formula}
\begin{formula}{debye_hueckel_law}
\desc{Debye-Hückel limiting law}{For an infinitely dilute solution}{\QtyRef{mean_ionic_activity}, $A$ solvent dependant constant, $z$ \qtyRef{charge_number}, \QtyRef{ionic_strength} in [\si{\mol\per\kg}]}
\desc[german]{Debye-Hückel Gesetz}{Für eine unendlich verdünnte Lösung}{}
\eq{\Ln{\gamma_{\pm}} = -A \abs{z_+ \, z_-} \sqrt{I_b}}
\end{formula}
\Subsection[
\eng{Kinetics}
\ger{Kinetik}
]{kin}
\begin{formula}{overpotential}
\desc{Overpotential}{}{$E_\text{electrode}$ potential at which the reaction starts $E_\text{ref}$ thermodynamic potential of the reaction}
\desc[german]{Überspannung}{}{$E_\text{electrode}$ Potential bei der die Reaktion beginnt, $E_\text{ref}$ thermodynamisches Potential der Reaktion}
\eq{\eta_\text{act} = E_\text{electrode} - E_\text{ref}}
\end{formula}
\begin{formula}{activation_overpotential}
\desc{Activation overpotential}{}{}
\desc[german]{Aktivierungsüberspannung}{}{}
\eq{}
\end{formula}
\begin{formula}{concentration_overpotential}
\desc{Concentration overpotential}{}{}
\desc[german]{Konzentrationsüberspannung}{}{}
\eq{\eta_\text{conc} = -\frac{RT}{(1-\alpha) nF} \ln \left(\frac{c_\text{ox}^0}{c_\text{ox}^\txS}\right)}
\end{formula}
\begin{formula}{diffusion_overpotential}
\desc{Diffusionoverpotential}{}{}
\desc[german]{Diffusionsüberspannung}{}{}
\eq{}
\end{formula}
\begin{formula}{roughness_factor}
\desc{Roughness factor}{Surface area related to electrode geometry}{}
\eq{\rfactor}
\end{formula}
\begin{formula}{butler_volmer}
\desc{Butler-Volmer equation}{Reaction kinetics near the equilibrium potentential}
{$j$ \qtyRef{current_density}, $j_0$ exchange current density, $\eta$ \fqEqRef{ch:el:kin:overpotential}, \QtyRef{temperature}, $z$ \qtyRef{charge_number}, \ConstRef{faraday}, \ConstRef{universal_gas}, $\alpha_{\txc/\txa}$ cathodic/anodic charge transfer coefficient}
%Current through an electrode iof a unimolecular redox reaction with both anodic and cathodic reaction occuring on the same electrode
\desc[german]{Butler-Volmer-Gleichung}{Reaktionskinetik in der Nähe des Gleichgewichtspotentials}
{$j$ \qtyRef{current_density}, $j_0$ Austauschstromdichte, $\eta$ \fqEqRef{ch:el:kin:overpotential}, \QtyRef{temperature}, $z$ \qtyRef{charge_number}, \ConstRef{faraday}, \ConstRef{universal_gas}, $\alpha_{\txc/\txa}$ Ladungstransferkoeffizient an der Kathode/Anode}
\begin{gather}
j = j_0 \,\rfactor\, \left[ \Exp{\frac{(1-a_\txc) z F \eta}{RT}} - \Exp{-\frac{\alpha_\txc z F \eta}{RT}}\right]
\intertext{\GT{with}}
\alpha_\txa = 1 - \alpha_\txc
\end{gather}
\separateEntries
\fig{img/ch_butler_volmer.pdf}
\end{formula}
\Section[
\eng{misc}
\ger{misc}
]{misc}
\begin{formula}{std_condition}
\desc{Standard temperature and pressure}{}{}
\desc[german]{Standardbedingungen}{}{}
\eq{
T &= \SI{273.15}{\kelvin} = \SI{0}{\celsius} \\
p &= \SI{100000}{\pascal} = \SI{1.000}{\bar}
}
\end{formula}
\begin{formula}{ph}
\desc{pH definition}{}{$a_{\ce{H+}}$ hyrdrogen ion \qtyRef{activity}}
\desc[german]{pH-Wert definition}{}{$a_{\ce{H+}}$ Wasserstoffionen-\qtyRef{activity}}
\eq{\pH = -\log_{10}(a_{\ce{H+}})}
\end{formula}
\begin{formula}{ph_rt}
\desc{pH}{At room temperature \SI{25}{\celsius}}{}
\desc[german]{pH-Wert}{Bei Raumtemperatur \SI{25}{\celsius}}{}
\eq{
\pH > 7 &\quad\tGT{basic} \\
\pH < 7 &\quad\tGT{acidic} \\
\pH = 7 &\quad\tGT{neutral}
}
\end{formula}
\begin{formula}{covalent_bond}
\desc{Covalent bond}{}{}
\desc[german]{Kolvalente Bindung}{}{}
\ttxt{
\eng{Bonds that involve sharing of electrons to form electron pairs between atoms.}
\ger{Bindungen zwischen Atomen die durch geteilte Elektronen, welche Elektronenpaare bilden, gebildet werden.}
}
\end{formula}
\begin{formula}{grotthuss}
\desc{Grotthuß-mechanism}{}{}
\desc[german]{Grotthuß-Mechanismus}{}{}
\ttxt{
\eng{The mobility of protons in aqueous solutions is much higher than that of other ions because they can "move" by breaking and reforming covalent bonds of water molecules.}
\ger{The Moblilität von Protononen in wässrigen Lösungen ist wesentlich größer als die anderer Ionen, da sie sich "bewegen" können indem die Wassertsoffbrückenbindungen gelöst und neu gebildet werden.}
}
\end{formula}

View File

@ -3,3 +3,58 @@
\ger{Festkörperphysik}
]{cm}
\TODO{Bonds, hybridized orbitals}
\TODO{Lattice vibrations, van hove singularities, debye frequency}
\begin{formula}{dos}
\desc{Density of states (DOS)}{}{\QtyRef{volume}, $N$ number of energy levels, \QtyRef{energy}}
\desc[german]{Zustandsdichte (DOS)}{}{\QtyRef{volume}, $N$ Anzahl der Energieniveaus, \QtyRef{energy}}
\eq{D(E) = \frac{1}{V}\sum_{i=1}^{N} \delta(E-E(\vec{k_i}))}
\end{formula}
\begin{formula}{dos_parabolic}
\desc{Density of states for parabolic dispersion}{Applies to \fqSecRef{cm:egas}}{}
\desc[german]{Zustandsdichte für parabolische Dispersion}{Bei \fqSecRef{cm:egas}}{}
\eq{
D_1(E) &= \frac{1}{2\sqrt{c_k(E-E_0)}} && (\text{1D}) \\
D_2(E) &= \frac{\pi}{2c_k} && (\text{2D}) \\
D_3(E) &= \pi \sqrt{\frac{E-E_0}{c_k^3}}&& (\text{3D})
}
\end{formula}
\Section[
\eng{Lattice vibrations}
\ger{Gitterschwingungen}
]{vib}
\begin{formula}{dispersion_1atom_basis}
\desc{Phonon dispersion of a lattice with a one-atom basis}{same as the dispersion of a linear chain}{$C_n$ force constants between layer $s$ and $s+n$, $M$ \qtyRef{mass} of the reference atom, $a$ \qtyRef{lattice_constant}, $q$ phonon \qtyRef{wavevector}, $u$ Ansatz for the atom displacement}
\desc[german]{Phonondispersion eines Gitters mit zweiatomiger Basis}{gleich der Dispersion einer linearen Kette}{$C_n$ Kraftkonstanten zwischen Ebene $s$ und $s+n$, $M$ \qtyRef{mass} des Referenzatoms, $a$ \qtyRef{lattice_constant}, $q$ Phonon \qtyRef{wavevector}, $u$ Ansatz für die Atomauslenkung}
\eq{
\omega^2 = \frac{4C_1}{M}\left[\sin^2 \left(\frac{qa}{2}\right) + \frac{C2}{C1} \sin^2(qa)\right] \\
\intertext{\GT{with}}
u_{s+n} = U\e^{-i \left[\omega t - q(s+n)a \right]}
}
\fig{img/cm_phonon_dispersion_one_atom_basis.pdf}
\end{formula}
\TODO{Plots}
\begin{formula}{dispersion_2atom_basis}
\desc{Phonon dispersion of a lattice with a two-atom basis}{}{$C$ force constant between layers, $M_i$ \qtyRef{mass} of the basis atoms, $a$ \qtyRef{lattice_constant}, $q$ phonon \qtyRef{wavevector}, $u, v$ Ansatz for the displacement of basis atom 1 and 2, respectively}
\desc[german]{Phonondispersion eines Gitters mit einatomiger Basis}{}{$C$ Kraftkonstanten zwischen Ebene $s$ und $s+n$, $M_i$ \qtyRef{mass} der Basisatome, $a$ \qtyRef{lattice_constant}, $q$ Phonon \qtyRef{wavevector}, $u, v$ jeweils Ansatz für die Atomauslenkung des Basisatoms 1 und 2}
\eq{
\omega^2_{\txa,\txo} = C \left(\frac{1}{M_1}+\frac{1}{M_2}\right) \mp C \sqrt{\left(\frac{1}{M_1}+\frac{1}{M_2}\right)^2 - \frac{4}{M_1M_2} \sin^2 \left(\frac{qa}{2}\right)}
\intertext{\GT{with}}
u_{s} = U\e^{-i \left(\omega t - qsa \right)}, \quad
v_{s} = V\e^{-i \left(\omega t - qsa \right)}
}
\fig{img/cm_phonon_dispersion_two_atom_basis.pdf}
\end{formula}
\Subsection[
\eng{Debye model}
\ger{Debye-Modell}
]{debye}
\begin{ttext}
\eng{Atoms behave like coupled \hyperref[sec:qm:hosc]{quantum harmonic oscillators}. The finite sample size leads to periodic boundary conditio. The finite sample size leads to periodic boundary conditions for the vibrations.}
\ger{Atome verhalten sich wie gekoppelte \hyperref[sec:qm:hosc]{quantenmechanische harmonische Oszillatoren}. Die endliche Ausdehnung des Körpers führt zu periodischen Randbedingungen. }
\end{ttext}

View File

@ -6,11 +6,11 @@
\eng{Bravais lattice}
\ger{Bravais-Gitter}
]{bravais}
\eng[bravais_table2]{In 2D, there are 5 different Bravais lattices}
\ger[bravais_table2]{In 2D gibt es 5 verschiedene Bravais-Gitter}
\eng[table2D]{In 2D, there are 5 different Bravais lattices}
\ger[table2D]{In 2D gibt es 5 verschiedene Bravais-Gitter}
\eng[bravais_table3]{In 3D, there are 14 different Bravais lattices}
\ger[bravais_table3]{In 3D gibt es 14 verschiedene Bravais-Gitter}
\eng[table3D]{In 3D, there are 14 different Bravais lattices}
\ger[table3D]{In 3D gibt es 14 verschiedene Bravais-Gitter}
\Eng[lattice_system]{Lattice system}
\Ger[lattice_system]{Gittersystem}
@ -26,7 +26,7 @@
\newcolumntype{Z}{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}X}
\begin{table}[H]
\centering
\expandafter\caption\expandafter{\gt{bravais_table2}}
\expandafter\caption\expandafter{\gt{table2D}}
\label{tab:bravais2}
\begin{adjustbox}{width=\textwidth}
@ -46,7 +46,7 @@
\begin{table}[H]
\centering
\caption{\gt{bravais_table3}}
\caption{\gt{table3D}}
\label{tab:bravais3}
% \newcolumntype{g}{>{\columncolor[]{0.8}}}

View File

@ -95,7 +95,7 @@
]{gl}
\begin{ttext}
\eng{
\TODO{TODO}
}
\end{ttext}
@ -132,10 +132,67 @@
\eng{Microscopic theory}
\ger{Mikroskopische Theorie}
]{micro}
\begin{formula}{isotop_effect}
\desc{Isotope effect}{Superconducting behaviour depends on atomic mass and thereby of the lattice \Rightarrow Microscopic origin}{$\Tcrit$ critial temperature, $M$ isotope mass, $\omega_\text{ph}$}
\desc[german]{Isotopeneffekt}{Supraleitung hängt von der Atommasse und daher von den Gittereigenschaften ab \Rightarrow Mikroskopischer Ursprung}{$\Tcrit$ kritische Temperatur, $M$ Isotopen-Masse, $\omega_\text{ph}$}
\eq{
\Tcrit \propto \frac{1}{\sqrt{M}} \\
\omega_\text{ph} \propto \frac{1}{\sqrt{M}} \Rightarrow \Tcrit \propto \omega_\text{ph}
}
\end{formula}
\begin{formula}{cooper_pairs}
\desc{Cooper pairs}{}{}
\desc[german]{Cooper-Paars}{}{}
\ttxt{
\eng{Conduction electrons reduce their energy through an attractive interaction: One electron passing by atoms attracts the these, which creats a positive charge region behind the electron, which in turn attracts another electron. }
}
\end{formula}
\Subsection[
\Subsubsection[
\eng{BCS-Theory}
\ger{BCS-Theorie}
]{BCS}
]{bcs}
\begin{ttext}
\eng{
Electron pairs form bosonic quasi-particles called Cooper pairs which can condensate into the ground state.
The wave function spans the whole material, which makes it conduct without resistance.
The exchange bosons between the electrons are phonons.
}
\ger{
Elektronenpaar bilden bosonische Quasipartikel (Cooper Paare) welche in den Grundzustand kondensieren können.
Die Wellenfunktion übersoannt den gesamten Festkörper, was einen widerstandslosen Ladungstransport garantiert.
Die Austauschbosononen zwischen den Elektronen sind Bosonen.
}
\end{ttext}
\def\BCS{{\text{BCS}}}
\begin{formula}{hamiltonian}
\desc{BCS Hamiltonian}{for $N$ interacting electrons}{
$c_{\veck\sigma}$ creation/annihilation operators create/destroy at $\veck$ with spin $\sigma$ \\
First term: non-interacting free electron gas\\
Second term: interaction energy
}
\desc[german]{BCS Hamiltonian}{}{}
\eq{
\hat{H}_\BCS =
\sum_{\sigma} \sum_\veck \epsilon_\veck \hat{c}_{\veck\sigma}^\dagger \hat{c}_{\veck\sigma}
+ \sum_{\veck,\veck^\prime} V_{\veck,\veck^\prime}
\hat{c}_{\veck\uparrow}^\dagger \hat{c}_{-\veck\downarrow}^\dagger
\hat{c}_{-\veck^\prime\downarrow} \hat{c}_{\veck^\prime,\uparrow}
}
\end{formula}
\begin{formula}{bogoliubov-valatin}
\desc{Bogoliubov-Valatin transformation}{Diagonalization of the \fqEqRef{cm:sc:micro:bcs:hamiltonian} to derive excitation energies}{}
\desc[german]{Bogoliubov-Valatin transformation}{}{}
\eq{
\hat{H}_\BCS - N\mu = \sum_\veck \big[\xi_\veck - E_\veck + \Delta_\veck g_\veck^*\big] + \sum_\veck \big[E_\veck a_\veck^\dagger a_\veck + E_\veck \beta_{-\veck}^\dagger \beta_{-\veck}\big]
}
\end{formula}
\begin{formula}{gap_equation}
\desc{BCS-gap equation}{}{}
\desc[german]{}{}{}
\eq{\Delta_\veck^* = -\sum_\veck^+\prime V_{\veck,\veck^\prime} \frac{\Delta_{\veck^\prime}}{2E_\veck} \tanh \left(\frac{E_{\veck^\prime}}{2\kB T}\right)}
\end{formula}

14
src/cm/mat.tex Normal file
View File

@ -0,0 +1,14 @@
\Section[
\eng{Material physics}
\ger{Materialphysik}
]{mat}
\begin{formula}{tortuosity}
\desc{Tortuosity}{Degree of the winding of a transport path through a porous material. \\ Multiple definitions exist}{$l$ path length, $L$ distance of the end points}
\desc[german]{Toruosität}{Grad der Gewundenheit eines Transportweges in einem porösen Material. \\ Mehrere Definitionen existieren}{$l$ Weglänge, $L$ Distanz der Endpunkte}
\quantity{\tau}{}{}
\eq{
\tau &= \left(\frac{l}{L}\right)^2 \\
\tau &= \frac{l}{L}
}
\end{formula}

View File

@ -84,19 +84,27 @@
\ger{\GT{misc}}
]{misc}
\begin{formula}{exciton}
\desc{Exciton}{}{}
\desc[german]{Exziton}{}{}
\ttxt{
\eng{Quasi particle, excitation in condensed matter as bound electron-hole pair.}
\ger{Quasiteilchen, Anregung im Festkörper als gebundenes Elektron-Loch-Paar}
}
\end{formula}
\begin{formula}{work_function}
\desc{Work function}{Lowest energy required to remove an electron into the vacuum}{}
\desc[german]{Austrittsarbeit}{eng. "Work function"; minimale Energie um ein Elektron aus dem Festkörper zu lösen}{}
\quantity{W}{\eV}{s}
\eq{-e\phi - \EFermi}
\eq{W = \Evac - \EFermi}
\end{formula}
\begin{formula}{electron_affinity}
\desc{Electron affinity}{Energy required to remove one electron from an anion with one negative charge.\\Energy difference between vacuum level and conduction band}{}
\desc[german]{Elektronenaffinität}{Energie, die benötigt wird um ein Elektron aus einem einfach-negativ geladenen Anion zu entfernen. Entspricht der Energiedifferenz zwischen Vakuum-Niveau und dem Leitungsband}{}
\quantity{\chi}{\eV}{s}
\eq{\chi = \left(\Evac - \Econd\right)}
\end{formula}
\begin{formula}{laser}
\desc{Laser}{Light amplification by stimulated emission of radiation}{}
\desc[german]{Laser}{}{}
\ttxt{
\eng{\textit{Gain medium} is energized \textit{pumping energy} (electric current or light), light of certain wavelength is amplified in the gain medium}
}
\end{formula}

View File

@ -2,44 +2,47 @@
\eng{Semiconductors}
\ger{Halbleiter}
]{semic}
\begin{formula}{types}
\desc{Intrinsic/extrinsic}{}{$n,p$ \fqEqRef{cm:semic:charge_density_eq}}
\desc[german]{Intrinsisch/Extrinsisch}{}{}
\ttxt{
\eng{
Intrinsic: pure, electron density determiend only by thermal excitation and $n_i^2 = n_0 p_0$\\
Extrinsic: doped
}
\ger{
Intrirnsisch: Pur, Elektronendichte gegeben durch thermische Anregung und $n_i^2 = n_0 p_0$ \\
Extrinsisch: gedoped
}
\begin{formula}{types}
\desc{Intrinsic/extrinsic}{}{$n,p$ \fqEqRef{cm:semic:charge_density_eq}}
\desc[german]{Intrinsisch/Extrinsisch}{}{}
\ttxt{
\eng{
Intrinsic: pure, electron density determiend only by thermal excitation and $n_i^2 = n_0 p_0$\\
Extrinsic: doped
}
\end{formula}
\begin{formula}{charge_density_eq}
\desc{Equilibrium charge densitites}{Holds when $\frac{\Econd-\EFermi}{\kB T}>3.6$ and $\frac{\EFermi-\Evalence}{\kB T} > 3.6$}{}
\desc[german]{Ladungsträgerdichte im Equilibrium}{Gilt wenn $\frac{\Econd-\EFermi}{\kB T}>3.6$ und $\frac{\EFermi-\Evalence}{\kB T} > 3.6$}{}
\eq{
n_0 &\approx N_\text{c}(T) \Exp{-\frac{E_\text{c} - \EFermi}{\kB T}} \\
p_0 &\approx N_\text{v}(T) \Exp{-\frac{\EFermi - E_\text{v}}{\kB T}}
\ger{
Intrirnsisch: Pur, Elektronendichte gegeben durch thermische Anregung und $n_i^2 = n_0 p_0$ \\
Extrinsisch: gedoped
}
\end{formula}
\begin{formula}{charge_density_intrinsic}
\desc{Intrinsic charge density}{}{}
\desc[german]{Intrinsische Ladungsträgerdichte}{}{}
\eq{
n_\text{i} \approx \sqrt{n_0 p_0} = \sqrt{N_\text{c}(T) N_\text{v}(T)} \Exp{-\frac{E_\text{gap}}{2\kB T}}
}
\end{formula}
}
\end{formula}
\begin{formula}{mass_action}
\desc{Mass action law}{Charge densities at thermal equilibrium, independent of doping}{}
\desc[german]{Massenwirkungsgesetz}{Ladungsträgerdichten im Equilibrium, unabhängig der Dotierung }{}
\eq{np = n_i^2}
\end{formula}
\begin{formula}{charge_density_eq}
\desc{Equilibrium charge densitites}{Holds when $\frac{\Econd-\EFermi}{\kB T}>3.6$ and $\frac{\EFermi-\Evalence}{\kB T} > 3.6$}{}
\desc[german]{Ladungsträgerdichte im Equilibrium}{Gilt wenn $\frac{\Econd-\EFermi}{\kB T}>3.6$ und $\frac{\EFermi-\Evalence}{\kB T} > 3.6$}{}
\eq{
n_0 &\approx N_\text{c}(T) \Exp{-\frac{E_\text{c} - \EFermi}{\kB T}} \\
p_0 &\approx N_\text{v}(T) \Exp{-\frac{\EFermi - E_\text{v}}{\kB T}}
}
\end{formula}
\begin{formula}{charge_density_intrinsic}
\desc{Intrinsic charge density}{}{}
\desc[german]{Intrinsische Ladungsträgerdichte}{}{}
\eq{
n_\text{i} \approx \sqrt{n_0 p_0} = \sqrt{N_\text{c}(T) N_\text{v}(T)} \Exp{-\frac{E_\text{gap}}{2\kB T}}
}
\end{formula}
\begin{formula}{mass_action}
\desc{Mass action law}{Charge densities at thermal equilibrium, independent of doping}{}
\desc[german]{Massenwirkungsgesetz}{Ladungsträgerdichten im Equilibrium, unabhängig der Dotierung }{}
\eq{np = n_i^2}
\end{formula}
\begin{formula}{bandgaps}
\desc{Bandgaps of common semiconductors}{}{}
\desc[german]{Bandlücken wichtiger Halbleiter}{}{}
\begin{tabular}{l|CCc}
& \Egap(\SI{0}{\kelvin}) [\si{\eV}] & \Egap(\SI{300}{\kelvin}) [\si{\eV}] & \\ \hline
\GT{diamond} & 5,48 & 5,47 & \GT{indirect} \\
@ -51,23 +54,107 @@
InP & 1,42 & 1,35 & \GT{direct} \\
CdS & 2.58 & 2.42 & \GT{direct}
\end{tabular}
\end{formula}
\begin{formula}{min_maj}
\desc{Minority / Majority charge carriers}{}{}
\desc[german]{Minoritäts- / Majoritätsladungstraäger}{}{}
\begin{formula}{min_maj}
\desc{Minority / Majority charge carriers}{}{}
\desc[german]{Minoritäts- / Majoritätsladungstraäger}{}{}
\ttxt{
\eng{
Majority carriers: higher number of particles ($e^-$ in n-type, $h^+$ in p-type)\\
Minority carriers: lower number of particles ($h^+$ in n-type, $e^-$ in p-type)
}
\ger{
Majoritätsladungstraäger: höhere Teilchenzahl ($e^-$ in n-Typ, $h^+$ in p-Typ)\\
Minoritätsladungsträger: niedrigere Teilchenzahl ($h^+$ in n-Typ, $e^-$ in p-Typ)
}
}
\end{formula}
\TODO{effective mass approx}
\Subsection[
\eng{Devices and junctions}
\ger{Bauelemente und Kontakte}
]{junctions}
\begin{formula}{metal-sc}
\desc{Metal-semiconductor junction}{}{}
\desc[german]{Metall-Halbleiter Kontakt}{}{}
% \ttxt{
% \eng{
% }
% }
\end{formula}
\begin{bigformula}{schottky_barrier}
\desc{Schottky barrier}{Rectifying \fqEqRef{cm:sc:junctions:metal-sc}}{}
% \desc[german]{}{}{}
\centering
\resizebox{0.49\textwidth}{!}{\input{img/cm/sc_junction_metal_n_sc_separate.tex}}
\resizebox{0.49\textwidth}{!}{\input{img/cm/sc_junction_metal_n_sc.tex}}
\TODO{Work function electron affinity sind doch Energien und keine Potentiale, warum wird also immer $q$ davor geschrieben?}
\end{bigformula}
\begin{formula}{schottky-mott_rule}
\desc{Schottky-Mott rule}{}{$\Phi_\txB$ barrier potential, $\Phi_\txM$ \GT{metal} \qtyRef{work_function}, $\chi_\text{sc}$ \qtyRef{electron_affinity}}
% \desc[german]{}{}{}
\eq{\Phi_\txB \approx \Phi_\txM - \chi_\text{sc}}
\end{formula}
\TODO{work function verhältnisse, wann ist es ohmisch wann depleted?}
\begin{bigformula}{ohmic}
\desc{Ohmic contact}{}{}
\desc[german]{Ohmscher Kontakt}{}{}
\centering
\resizebox{0.49\textwidth}{!}{\input{img/cm/sc_junction_ohmic_separate.tex}}
\resizebox{0.49\textwidth}{!}{\input{img/cm/sc_junction_ohmic.tex}}
\end{bigformula}
\begin{bigformula}{pn}
\desc{p-n junction}{}{}
\desc[german]{p-n Übergang}{}{}
\centering
\input{img/cm/sc_junction_pn.tex}
\resizebox{0.49\textwidth}{!}{\tikzPnJunction{1/3}{0}{0}{1/3}{0}{0}{}}
\resizebox{0.49\textwidth}{!}{\tikzPnJunction{1/2}{0.4}{-0.4}{1/2}{-0.4}{0.4}{}}
\end{bigformula}
\Subsection[
\eng{Excitons}
\ger{Exzitons}
]{exciton}
\begin{formula}{desc}
\desc{Exciton}{}{}
\desc[german]{Exziton}{}{}
\ttxt{
\eng{
Majority carriers: higher number of particles ($e^-$ in n-type, $h^+$ in p-type)\\
Minority carriers: lower number of particles ($h^+$ in n-type, $e^-$ in p-type)
Quasi particle, excitation in condensed matter as bound electron-hole pair.
\\ Free (Wannier) excitons: delocalised over many lattice sites
\\ Bound (Frenkel) excitonsi: localised in single unit cell
}
\ger{
Majoritätsladungstraäger: höhere Teilchenzahl ($e^-$ in n-Typ, $h^+$ in p-Typ)\\
Minoritätsladungsträger: niedrigere Teilchenzahl ($h^+$ in n-Typ, $e^-$ in p-Typ)
Quasiteilchen, Anregung im Festkörper als gebundenes Elektron-Loch-Paar
\\ Freie (Wannier) Exzitons: delokalisiert, über mehrere Einheitszellen
\\ Gebundene (Frenkel) Exzitons: lokalisiert in einer Einheitszelle
}
}
\end{formula}
\end{formula}
\eng[free_X]{for free Excitons}
\ger[free_X]{für freie Exzitons}
\begin{formula}{rydberg}
\desc{Exciton Rydberg energy}{\gt{free_X}}{$R_\txH$ \fqEqRef{qm:h:rydberg_energy}}
\desc[german]{}{}{}
\eq{
E(n) = - \left(\frac{\mu}{m_0\epsilon_r^2}\right) R_\txH \frac{1}{n^2}
}
\end{formula}
\begin{formula}{bohr_radius}
\desc{Exciton Bohr radius}{\gt{free_X}}{\QtyRef{relative_permittivity}, \ConstRef{bohr_radius}, \ConstRef{electron_mass}, $mu$ \GT{reduced_mass}}
\desc[german]{Exziton-Bohr Radius}{}{}
\eq{
r_n = \left(\frac{m_\txe\epsilon_r a_\txB}{mu}\right) n^2
}
\end{formula}

View File

@ -2,10 +2,71 @@
\eng{Measurement techniques}
\ger{Messtechniken}
]{meas}
\newcommand\newTechnique{\hline}
\Eng[name]{Name}
\Ger[name]{Name}
\Eng[application]{Application}
\Ger[application]{Anwendung}
\Subsection[
\eng{Raman spectroscopy}
\ger{Raman Spektroskopie}
]{raman}
% \begin{minipagetable}{raman}
% \entry{name}{
% \eng{Raman spectroscopy}
% \ger{Raman-Spektroskopie}
% }
% \entry{application}{
% \eng{Vibrational modes, Crystal structure, Doping, Band Gaps, Layer thickness in \fqEqName{cm:misc:vdw_material}}
% \ger{Vibrationsmoden, Kristallstruktur, Dotierung, Bandlücke, Schichtdicke im \fqEqName{cm:misc:vdw_material}}
% }
% % \entry{how}{
% % \eng{Monochromatic light (\fqEqRef{Laser}) shines on sample, inelastic scattering because of rotation-, vibration-, phonon and spinflip-processes, plot spectrum as shift of the laser light (in \si{\per\cm})}
% % \ger{Monochromatisches Licht (\fqEqRef{Laser}) bestrahlt Probe, inelastische Streuung durch Rotations-, Schwingungs-, Phonon und Spin-Flip-Prozesse, plotte Spektrum als Verschiebung gegen das Laser Licht (in \si{\per\cm}) }
% % }
% \end{minipagetable}
\begin{minipage}{0.5\textwidth}
\begin{figure}[H]
\centering
% \includegraphics[width=0.8\textwidth]{img/cm_amf.pdf}
% \caption{\cite{Bian2021}}
\end{figure}
\end{minipage}
\expandafter\detokenize\expandafter{\fqname}
\GT{cm:meas:raman:raman:application}
\separateEntries
% \begin{minipagetable}{pl}
% \entry{name}{
% \eng{Photoluminescence spectroscopy}
% \ger{Photolumeszenz-Spektroskopie}
% }
% \entry{application}{
% \eng{Crystal structure, Doping, Band Gaps, Layer thickness in \fqEqName{cm:misc:vdw_material}}
% \ger{Kristallstruktur, Dotierung, Bandlücke, Schichtdicke im \fqEqName{cm:misc:vdw_material}}
% }
% \entry{how}{
% \eng{Monochromatic light (\fqEqRef{Laser}) shines on sample, electrons are excited, relax to the conduction band minimum and finally accross the band gap under photon emission}
% \ger{Monochromatisches Licht (\fqEqRef{Laser}) bestrahlt Probe, Elektronen werden angeregt und relaxieren in das Leitungsband-Minimum und schließlich über die Bandlücke unter Photonemission}
% }
% \end{minipagetable}
\begin{minipage}{0.5\textwidth}
\begin{figure}[H]
\centering
% \includegraphics[width=0.8\textwidth]{img/cm_amf.pdf}
% \caption{\cite{Bian2021}}
\end{figure}
\end{minipage}
\Subsection[
\eng{ARPES}
\ger{ARPES}
]{arpes}
]{arpes}
what?
in?
how?
@ -20,11 +81,6 @@
\ger{Bilder der Oberfläche einer Probe werden erstellt, indem die Probe mit einer Sonde abgetastet wird.}
\end{ttext}
\Eng[name]{Name}
\Ger[name]{Name}
\Eng[application]{Application}
\Ger[application]{Anwendung}
\begin{minipagetable}{amf}
\entry{name}{
@ -49,6 +105,8 @@
\end{minipage}
\begin{minipagetable}{stm}
\entry{name}{
\eng{Scanning tunneling microscopy (STM)}

View File

@ -1,8 +1,8 @@
\Part[
\Section[
\eng{Topological Materials}
\ger{Topologische Materialien}
]{topo}
\Section[
\Subsection[
\eng{Berry phase / Geometric phase}
\ger{Berry-Phase / Geometrische Phase}
]{berry_phase}

87
src/comp/ad.tex Normal file
View File

@ -0,0 +1,87 @@
\Section[
\eng{Atomic dynamics}
% \ger{}
]{ad}
\Subsection[
\eng{Born-Oppenheimer Approximation}
\ger{Born-Oppenheimer Näherung}
]{bo}
\begin{formula}{hamiltonian}
\desc{Electron Hamiltonian}{}{$\hat{T}$ \fqEqRef{comp:elsth:kinetic_energy}, $\hat{V}$ \fqEqRef{comp:elsth:potential_energy}, $\txe$ \GT{electrons}, $\txn$ \GT{nucleons}}
\desc[german]{Hamiltonian der Elektronen}{}{}
\eq{\hat{H}_\txe = \hat{T}_\txe + V_{\txe \leftrightarrow \txe} + V_{\txn \leftrightarrow \txe}}
\end{formula}
\begin{formula}{ansatz}
\desc{Wave function ansatz}{}{$\psi_\text{en}^n$ eigenstate $n$ of \fqEqRef{comp:elst:hamiltonian}, $\psi_\txe^i$ eigenstate $i$ of \fqEqRef{comp:ad:bo:hamiltonian}, $\vecr,\vecR$ electron/nucleus positions, $\sigma$ electron spin, $c^{ni}$ coefficients}
\desc[german]{Wellenfunktion Ansatz}{}{}
\eq{\psi_\text{en}^n\big(\{\vecr,\sigma\},\{\vecR\}\big) = \sum_i c^{ni}\big(\{\vecR\}\big)\, \psi_\txe^i\big(\{\vecr,\sigma\},\{\vecR\}\big)}
\end{formula}
\begin{formula}{equation}
\desc{Equation}{}{}
% \desc[german]{}{}{}
\eq{
\label{eq:\fqname}
\left[E_\txe^j\big(\{\vecR\}\big) + \hat{T}_\txn + V_{\txn \leftrightarrow \txn} - E^n \right]c^{nj} = -\sum_i \Lambda_{ij} c^{ni}\big(\{\vecR\}\big)
}
\end{formula}
\begin{formula}{coupling_operator}
\desc{Exact nonadiabtic coupling operator}{Electron-phonon couplings / electron-vibrational couplings}{$\psi^i_\txe$ electronic states, $\vecR$ nucleus position, $M$ nucleus \qtyRef{mass}}
% \desc[german]{}{}{}
\begin{multline}
\Lambda_{ij} = \int \d^3r (\psi_\txe^j)^* \left(-\sum_I \frac{\hbar^2\nabla_{\vecR_I}^2}{2M_I}\right) \psi_\txe^i \\
+ \sum_I \frac{1}{M_I} \int\d^3r \left[(\psi_\txe^j)^* (-i\hbar\nabla_{\vecR_I})\psi_\txe^i\right](-i\hbar\nabla_{\vecR_I})
\end{multline}
\end{formula}
\begin{formula}{adiabatic_approx}
\desc{Adiabatic approximation}{Electronic configuration remains the same when atoms move}{$\Lambda_{ij}$ \fqEqRef{comp:ad:bo:coupling_operator}}
\desc[german]{Adiabatische Näherung}{Elektronenkonfiguration bleibt gleich bei Bewegung der Atome gleich}{}
\eq{\Lambda_{ij} = 0 \quad \text{\GT{for} } i\neq j}
\end{formula}
\begin{formula}{approx}
\desc{Born-Oppenheimer approximation}{}{\GT{see} \fqEqRef{comp:ad:bo:equation}}
\desc[german]{Born-Oppenheimer Näherung}{}{}
\begin{gather}
\Lambda_{ij} = 0
\shortintertext{\fqEqRef{comp:ad:bo:equation} \Rightarrow}
\left[E_e^i\big(\{\vecR\}\big) + \hat{T}_\txn - E^n\right]c^{ni}\big(\{\vecR\}\big) = 0
\end{gather}
\end{formula}
\begin{formula}{surface}
\desc{Born-Oppenheimer surface}{Potential energy surface (PES)\\ The nuclei follow Newtons equations of motion on the BO surface if the system is in the electronic ground state}{$E_\txe^0, \psi_\txe^0$ lowest eigenvalue/eigenstate of \fqEqRef{comp:ad:bo:hamiltonian}}
\desc[german]{Born-Oppenheimer Potentialhyperfläche}{Die Nukleonen Newtons klassichen Bewegungsgleichungen auf der BO Hyperfläche wenn das System im elektronischen Grundzustand ist}{$E_\txe^0, \psi_\txe^0$ niedrigster Eigenwert/Eigenzustand vom \fqEqRef{comp:ad:bo:hamiltonian}}
\begin{gather}
V_\text{BO}\big(\{\vecR\}\big) = E_\txe^0\big(\{\vecR\}\big) \\
M_I \ddot{\vecR}_I(t) = - \Grad_{\vecR_I} V_\text{BO}\big(\{\vecR(t)\}\big)
\shortintertext{\GT{ansatz} \GT{for} \fqEqRef{comp:ad:bo:approx}}
\psi_\text{BO} = c^{n0} \big(\{\vecR\}\big) \,\psi_\txe^0 \big(\{\vecr,\sigma\},\{\vecR\}\big)
\end{gather}
\end{formula}
\begin{formula}{limitations}
\desc{Limitations}{}{}
\desc[german]{Limitationen}{}{}
\ttxt{
\eng{
\begin{itemize}
\item Nuclei velocities must be small and electron energy state differences large
\item Nuclei need spin for effects like spin-orbit coupling
\item Nonadiabitc effects in photochemistry, proteins
\end{itemize}
}
}
\end{formula}
\TODO{geometry optization?, lattice vibrations (harmionic approx, dynamical matrix)}
\Subsection[
\eng{Molecular Dynamics}
\ger{Molekulardynamik}
]{md}
\begin{ttext}
\eng{Statistical method}
\end{ttext}
\TODO{ab-initio MD, force-field MD}

4
src/comp/comp.tex Normal file
View File

@ -0,0 +1,4 @@
\Part[
\eng{Computational Physics}
\ger{Computergestützte Physik}
]{comp}

183
src/comp/elsth.tex Normal file
View File

@ -0,0 +1,183 @@
\Section[
\eng{Electronic structure theory}
% \ger{}
]{elst}
\begin{formula}{kinetic_energy}
\desc{Kinetic energy}{of species $i$}{$i$ = nucleons/electrons, $N$ number of particles, $m$ \qtyRef{mass}}
\desc[german]{Kinetische Energie}{von Spezies $i$}{$i$ = Nukleonen/Elektronen, $N$ Teilchenzahl, $m$ \qtyRef{mass}}
\eq{\hat{T}_i &= -\sum_{n=1}^{N_i} \frac{\hbar^2}{2 m_i} \vec{\nabla}^2_n}
\end{formula}
\begin{formula}{potential_energy}
\desc{Electrostatic potential}{between species $i$ and $j$}{$i,j$ = nucleons/electrons, $r$ particle position, $Z_i$ charge of species $i$, \ConstRef{charge}}
\desc[german]{Elektrostatisches Potential}{zwischen Spezies $i$ und $j$}{}
\eq{\hat{V}_{i \leftrightarrow j} &= -\sum_{k,l} \frac{Z_i Z_j e^2}{\abs{\vecr_k - \vecr_l}}}
\end{formula}
\begin{formula}{hamiltonian}
\desc{Electronic structure Hamiltonian}{}{$\hat{T}$ \fqEqRef{comp:elsth:kinetic_energy}, $\hat{V}$ \fqEqRef{comp:elsth:potential_energy}, $\txe$ \GT{electrons}, $\txn$ \GT{nucleons}}
\eq{\hat{H} &= \hat{T}_\txe + \hat{T}_\txn + V_{\txe \leftrightarrow \txe} + V_{\txn \leftrightarrow \txe} + V_{\txn \leftrightarrow \txn}}
\end{formula}
\begin{formula}{mean_field}
\desc{Mean field approximation}{Replaces 2-particle operator by 1-particle operator}{Example for Coulumb interaction between many electrons}
\desc[german]{Molekularfeldnäherung}{Ersetzt 2-Teilchen Operator durch 1-Teilchen Operator}{Beispiel für Coulumb Wechselwirkung zwischen Elektronen}
\eq{
\frac{1}{2}\sum_{i\neq j} \frac{e^2}{\abs{\vec{r}_i - \vec{r}_j}} \approx \sum_{i} V_\text{eff}(\vec{r}_i)
}
\end{formula}
\Subsection[
\eng{Tight-binding}
\ger{Modell der stark gebundenen Elektronen / Tight-binding}
]{tb}
\begin{formula}{assumptions}
\desc{Assumptions}{}{}
\desc[german]{Annahmen}{}{}
\ttxt{
\eng{
\begin{itemize}
\item Atomic wave functions are localized \Rightarrow Small overlap, interaction cutoff
\end{itemize}
}
}
\end{formula}
\begin{formula}{hamiltonian}
\desc{Tight-binding Hamiltonian}{in second quantized form}{$\hat{a}_i^\dagger$, $\hat{a}_i$ \GT{creation_annihilation_ops} create/destory an electron on site $i$, $\epsilon_i$ on-site energy, $t_{i,j}$ hopping amplitude, usually $\epsilon$ and $t$ are determined from experiments or other methods}
\desc[german]{Tight-binding Hamiltonian}{in zweiter Quantisierung}{$\hat{a}_i^\dagger$, $\hat{a}_i$ \GT{creation_annihilation_ops} erzeugen/vernichten ein Elektron auf Platz $i$, $\epsilon_i$ on-site Energie, $t_{i,j}$ hopping Amplitude, meist werden $\epsilon$ und $t$ aus experimentellen Daten oder anderen Methoden bestimmt}
\eq{\hat{H} = \sum_i \epsilon_i \hat{a}_i^\dagger \hat{a}_i - \sum_{i,j} t_{i,j} \left(\hat{a}_i^\dagger \hat{a}_j + \hat{a}_j^\dagger \hat{a}_i\right)}
\end{formula}
\Subsection[
\eng{Density functional theory (DFT)}
\ger{Dichtefunktionaltheorie (DFT)}
]{dft}
\Subsubsection[
\eng{Hartree-Fock}
\ger{Hartree-Fock}
]{hf}
\begin{formula}{description}
\desc{Description}{}{}
\desc[german]{Beschreibung}{}{}
\begin{ttext}
\eng{
\begin{itemize}
\item \fqEqRef{comp:elst:mean_field} theory obeying the Pauli principle
\item Self-interaction free: Self interaction is cancelled out by the Fock-term
\end{itemize}
}
\end{ttext}
\end{formula}
\begin{formula}{equation}
\desc{Hartree-Fock equation}{}{
$\varphi_\xi$ single particle wavefunction of $\xi$th orbital,
$\hat{T}$ kinetic electron energy,
$\hat{V}_{\text{en}}$ electron-nucleus attraction,
$\hat{V}_{\text{HF}}$ \fqEqRef{comp:dft:hf:potential},
}
\desc[german]{Hartree-Fock Gleichung}{}{
$\varphi_\xi$ ein-Teilchen Wellenfunktion des $\xi$-ten Orbitals,
$\hat{T}$ kinetische Energie der Elektronen,
$\hat{V}_{\text{en}}$ Electron-Kern Anziehung,
$\hat{V}_{\text{HF}}$ \fqEqRef{comp:dft:hf:potential}
}
\eq{
\left(\hat{T} + \hat{V}_{\text{en}} + \hat{V}_{\text{HF}}^\xi\right)\varphi_\xi(x) = \epsilon_\xi \varphi_\xi(x)
}
\end{formula}
\begin{formula}{potential}
\desc{Hartree-Fock potential}{}{}
\desc[german]{Hartree Fock Potential}{}{}
\eq{
V_{\text{HF}}^\xi(\vecr) =
\sum_{\vartheta} \int \d x'
\frac{e^2}{\abs{\vecr - \vecr'}}
\left(
\underbrace{\abs{\varphi_\xi(x')}^2}_{\text{Hartree-Term}}
- \underbrace{\frac{\varphi_{\vartheta}^*(x') \varphi_{\xi}(x') \varphi_{\vartheta}(x)}{\varphi_\xi(x)}}_{\text{Fock-Term}}
\right)
}
\end{formula}
\begin{formula}{scf}
\desc{Self-consistent field cycle}{}{}
% \desc[german]{}{}{}
\ttxt{
\eng{
\begin{enumerate}
\item Initial guess for $\psi$
\item Solve SG for each particle
\item Make new guess for $\psi$
\end{enumerate}
}
}
\end{formula}
\Subsubsection[
\eng{Hohenberg-Kohn Theorems}
\ger{Hohenberg-Kohn Theoreme}
]{hk}
\begin{formula}{hk1}
\desc{Hohenberg-Kohn theorem (HK1)}{}{}
\desc[german]{Hohenberg-Kohn Theorem (HK1)}{}{}
\ttxt{
\eng{For any system of interacting electrons, the ground state electron density $n(\vecr)$ determines $\hat{V}_\text{ext}$ uniquely up to a trivial constant. }
\ger{Die Elektronendichte des Grundzustandes $n(\vecr)$ bestimmt ein einzigartiges $\hat{V}_{\text{ext}}$ eines Systems aus interagierenden Elektronen bis auf eine Konstante.}
}
\end{formula}
\begin{formula}{hk2}
\desc{Hohenberg-Kohn theorem (HK2)}{}{}
\desc[german]{Hohenberg-Kohn Theorem (HK2)}{}{}
\ttxt{
\eng{Given the energy functional $E[n(\vecr)]$, the ground state density and energy can be obtained variationally. The density that minimizes the total energy is the ecxact ground state density. }
\ger{Für ein Energiefunktional $E[n(\vecr)]$ kann die Grundzustandsdichte und Energie durch systematische Variation bestimmt werden. Die Dichte, welche die Gesamtenergie minimiert ist die exakte Grundzustandsichte. }
}
\end{formula}
\Subsubsection[
\eng{Kohn-Sham DFT}
\ger{Kohn-Sham DFT}
]{ks}
\begin{formula}{map}
\desc{Kohn-Sham map}{}{}
\desc[german]{Kohn-Sham Map}{}{}
\ttxt{
\eng{Maps fully interacting system of electrons to a system of non-interacting electrons with the same ground state density $n^\prime(\vecr) = n(\vecr)$}
}
\eq{n(\vecr) = \sum_{i=1}^N \abs{\phi_i(\vecr)}^2}
\end{formula}
\begin{formula}{functional}
\desc{Kohn-Sham functional}{}{$T_\text{KS}$ kinetic enery, $V_\text{ext}$ external potential, $E_\txH$ \hyperref[f:comp:elst:dft:hf:potential]{Hartree term}, $E_\text{XC}$ exchange correlation functional}
\desc[german]{Kohn-Sham Funktional}{}{}
\eq{E_\text{KS}[n(\vecr)] = T_\text{KS}[n(\vecr)] + V_\text{ext}[n(\vecr)] + E_\text{H}[n(\vecr)] + E_\text{XC}[n(\vecr)] }
\end{formula}
\begin{formula}{equation}
\desc{Kohn-Sham equation}{Solving it uses up a large portion of supercomputer resources}{$\phi_i^\text{KS}$ KS orbitals}
\desc[german]{Kohn-Sham Gleichung}{Die Lösung der Gleichung macht einen großen Teil der Supercomputer Ressourcen aus}{}
\begin{multline}
\biggr\{
-\frac{\hbar^2\nabla^2}{2m}
+ v_\text{ext}(\vecr)
+ e^2 \int\d^3 \vecr^\prime \frac{n(\vecr^\prime)}{\abs{\vecr-\vecr^\prime}} \\
+ \pdv{E_\txX[n(\vecr)]}{n(\vecr)}
+ \pdv{E_\txC[n(\vecr)]}{n(\vecr)}
\biggr\} \phi_i^\text{KS}(\vecr) =\\
= \epsilon_i^\text{KS} \phi_i^\text{KS}(\vecr)
\end{multline}
\end{formula}
\begin{formula}{scf}
\desc{Self-consistent field cycle for Kohn-Sham}{}{}
% \desc[german]{}{}{}
\ttxt{
\itemsep=\parsep
\eng{
\begin{enumerate}
\item Initial guess for $n(\vecr)$
\item Calculate effective potential $V_\text{eff}$
\item Solve \fqEqRef{comp:elst:dft:ks:equation}
\item Calculate density $n(\vecr)$
\item Repeat 2-4 until self consistent
\end{enumerate}
}
}
\end{formula}

84
src/comp/ml.tex Normal file
View File

@ -0,0 +1,84 @@
\Section[
\eng{Machine-Learning}
\ger{Maschinelles Lernen}
]{ml}
\Subsection[
\eng{Performance metrics}
\ger{Metriken zur Leistungsmessung}
]{performance}
\eng[cp]{correct predictions}
\ger[cp]{richtige Vorhersagen}
\eng[fp]{false predictions}
\ger[fp]{falsche Vorhersagen}
\eng[y]{ground truth}
\eng[yhat]{prediction}
\ger[y]{Wahrheit}
\ger[yhat]{Vorhersage}
\begin{formula}{accuracy}
\desc{Accuracy}{}{}
\desc[german]{Genauigkeit}{}{}
\eq{a = \frac{\tgt{cp}}{\tgt{fp} + \tgt{cp}}}
\end{formula}
\TODO{is $n$ the nuber of predictions or the number of output features?}
\begin{formula}{mean_abs_error}
\desc{Mean absolute error (MAE)}{}{$y$ \gt{y}, $\hat{y}$ \gt{yhat}, $n$ ?}
\desc[german]{Mittlerer absoluter Fehler (MAE)}{}{}
\eq{\text{MAE} = \frac{1}{n} \sum_{i=1}^n \abs{y_i - \hat{y}_i}}
\end{formula}
\begin{formula}{root_mean_square_error}
\desc{Root mean squared error (RMSE)}{}{$y$ \gt{y}, $\hat{y}$ \gt{yhat}, $n$ ?}
\desc[german]{Standardfehler der Regression}{Quadratwurzel des mittleren quadratischen Fehlers (RSME)}{}
\eq{\text{RMSE} = \sqrt{\frac{1}{n} \sum_{i=1}^n \left(y_i - \hat{y}_i\right)^2}}
\end{formula}
\Subsection[
\eng{Regression}
\ger{Regression}
]{reg}
\Subsubsection[
\eng{Linear Regression}
\ger{Lineare Regression}
]{linear}
\begin{formula}{eq}
\desc{Linear regression}{Fits the data under the assumption of \hyperref[f:math:pt:distributions:cont:normal]{normally distributed errors}}{$\mat{x}\in\R^{N\times M}$ input data, $\mat{y}\in\R^{N\times L}$ output data, $\mat{b}$ bias, $\vec{W}$ weights, $N$ samples, $M$ features, $L$ output variables}
\desc[german]{Lineare Regression}{Fitted Daten unter der Annahme \hyperref[f:math:pt:distributions:cont:normal]{normalverteilter Fehler}}{}
\eq{\mat{y} = \mat{b} + \mat{x} \cdot \vec{W}}
\end{formula}
\begin{formula}{design_matrix}
\desc{Design matrix}{Stack column of ones to the feature vector\\Useful when $b$ is scalar}{$x_{ij}$ feature $j$ of sample $i$}
\desc[german]{Designmatrix Ansatz}{}{}
\eq{
\mat{X} = \begin{pmatrix} 1 & x_{11} & \ldots & x_{1M} \\ \vdots & \vdots & \vdots & \vdots \\ 1 & x_{N1} & \ldots & x_{NM} \end{pmatrix}
}
\end{formula}
\begin{formula}{scalar_bias}
\desc{Linear regression with scalar bias}{Using the design matrix, the scalar is absorbed into the weight vector}{$\mat{y}$ output data, $\mat{X}$ \fqEqRef{comp:ml:reg:design_matrix}, $\vec{W}$ weights}
\desc[german]{Lineare Regression mit skalarem Bias}{Durch die Designmatrix wird der Bias in den Gewichtsvektor absorbiert}{}
\eq{\mat{y} = \mat{X} \cdot \vec{W}}
\end{formula}
\begin{formula}{normal_equation}
\desc{Normal equation}{Solves \fqEqRef{comp:ml:reg:linear:scalar_bias}}{$\mat{y}$ output data, $\mat{X}$ \fqEqRef{comp:ml:reg:linear:design_matrix}, $\vec{W}$ weights}
\desc[german]{Normalengleichung}{Löst \fqEqRef{comp:ml:reg:linear:scalar_bias}}{}
\eq{\vec{W} = \left(\mat{X}^\T \mat{X}\right)^{-1} \mat{X}^T \mat{y}}
\end{formula}
\Subsubsection[
\eng{Ridge regression}
\ger{Ridge Regression}
]{ridge}
\TODO{ridge reg, Kernel ridge reg, gaussian process reg}
% \Subsection[
% \eng{Bayesian probability theory}
% % \ger{}
% ]{bayesian}
\Subsection[
\eng{Gradient descent}
\ger{Gradientenverfahren}
]{gd}
\TODO{TODO}

17
src/comp/qmb.tex Normal file
View File

@ -0,0 +1,17 @@
\Section[
\eng{Quantum many-body physics}
\ger{Quanten-Vielteilchenphysik}
]{qmb}
\TODO{TODO}
\Subsection[
\eng{Importance sampling}
\ger{Importance sampling / Stichprobenentnahme nach Wichtigkeit}
]{importance_sampling}
\TODO{Monte Carlo}
\Subsection[
\eng{Matrix product states}
\ger{Matrix Produktzustände}
]{mps}

View File

@ -1,148 +0,0 @@
\Part[
\eng{Computational Physics}
\ger{Computergestützte Physik}
]{cmp}
\Section[
\eng{Quantum many-body physics}
\ger{Quanten-Vielteilchenphysik}
]{mb}
\TODO{TODO}
\Subsection[
\eng{Importance sampling}
\ger{Importance sampling / Stichprobenentnahme nach Wichtigkeit}
]{importance_sampling}
\TODO{Monte Carlo}
\Subsection[
\eng{Matrix product states}
\ger{Matrix Produktzustände}
]{mps}
\Section[
\eng{Electronic structure theory}
% \ger{}
]{elsth}
\begin{formula}{hamiltonian}
\desc{Electronic structure Hamiltonian}{}{$\hat{T}$ kinetic energy, $\hat{V}$ electrostatic potential, $\txe$ electrons, $\txn$ nucleons}
% \desc[german]{}{}{}
\eq{
\hat{H} &= \hat{T}_\txe + \hat{T}_\txn + V_{\e \leftrightarrow \e} + V_{\n \leftrightarrow \e} + V_{\n \leftrightarrow \n} \\
\shortintertext{with}
\hat{T}_i &= -\sum_{n=1}^{N_i} \frac{\hbar^2}{2 m_i} \vec{\nabla}^2_n \\
\hat{V}_{i \leftrightarrow j} &= -\sum_{k,l} \frac{Z_i Z_j \e^2}{\abs{\vecr_k - \vecr_l}}
}
\end{formula}
\begin{formula}{mean_field}
\desc{Mean field approximation}{Replaces 2-particle operator by 1-particle operator}{Example for Coulumb interaction between many electrons}
\desc[german]{Molekularfeldnäherung}{Ersetzt 2-Teilchen Operator durch 1-Teilchen Operator}{Beispiel für Coulumb Wechselwirkung zwischen Elektronen}
\eq{
\frac{1}{2}\sum_{i\neq j} \frac{e^2}{\abs{\vec{r}_i - \vec{r}_j}} \approx \sum_{i} V_\text{eff}(\vec{r}_i)
}
\end{formula}
\Subsection[
\eng{Tight-binding}
\ger{Tight-binding}
]{tb}
\Subsection[
\eng{Density functional theory (DFT)}
\ger{Dichtefunktionaltheorie (DFT)}
]{dft}
\Subsubsection[
\eng{Hartree-Fock}
\ger{Hartree-Fock}
]{hf}
\begin{ttext}
\eng{
\begin{itemize}
\item \fqEqRef{comp:misc:mean_field} theory
\item Self-interaction free: Self interaction is cancelled out by the Fock-term
\end{itemize}
}
\end{ttext}
\begin{formula}{equation}
\desc{Hartree-Fock equation}{}{
$\varphi_\xi$ single particle wavefunction of $\xi$th orbital,
$\hat{T}$ kinetic electron energy,
$\hat{V}_{\text{en}}$ electron-nucleus attraction,
$\hat{V}_{\text{HF}}$ \fqEqRef{comp:dft:hf:potential},
}
\desc[german]{Hartree-Fock Gleichung}{}{
$\varphi_\xi$ ein-Teilchen Wellenfunktion des $\xi$-ten Orbitals,
$\hat{T}$ kinetische Energie der Elektronen,
$\hat{V}_{\text{en}}$ Electron-Kern Anziehung,
$\hat{V}_{\text{HF}}$ \fqEqRef{comp:dft:hf:potential}
}
\eq{
\left(\hat{T} + \hat{V}_{\text{en}} + \hat{V}_{\text{HF}}^\xi\right)\varphi_\xi(x) = \epsilon_\xi \varphi_\xi(x)
}
\end{formula}
\begin{formula}{potential}
\desc{Hartree-Fock potential}{}{}
\desc[german]{Hartree Fock Potential}{}{}
\eq{
V_{\text{HF}}^\xi(\vecr) =
\sum_{\vartheta} \int \d x'
\frac{e^2}{\abs{\vecr - \vecr'}}
\left(
\underbrace{\abs{\varphi_\xi(x')}^2}_{\text{Hartree-Term}}
- \underbrace{\frac{\varphi_{\vartheta}^*(x') \varphi_{\xi}(x') \varphi_{\vartheta}(x)}{\varphi_\xi(x)}}_{\text{Fock-Term}}
\right)
}
\end{formula}
\begin{formula}{scf}
\desc{Self-consistend field cycle}{}{}
% \desc[german]{}{}{}
\ttxt{
\eng{
\begin{enumerate}
\item Initial guess for $\psi$
\item Solve SG for each particle
\item Make new guess for $\psi$
\end{enumerate}
}
}
\end{formula}
\Section[
\eng{Atomic dynamics}
% \ger{}
]{ad}
\Subsection[
\eng{Kohn-Sham}
\ger{Kohn-Sham}
]{ks}
\TODO{TODO}
\Subsection[
\eng{Born-Oppenheimer Approximation}
\ger{Born-Oppenheimer Näherung}
]{bo}
\TODO{TODO, BO surface}
\Subsection[
\eng{Molecular Dynamics}
\ger{Molekulardynamik}
]{md}
\begin{ttext}
\eng{Statistical method}
\end{ttext}
\TODO{ab-initio MD, force-field MD}
\Section[
\eng{Gradient descent}
\ger{Gradientenverfahren}
]{gd}
\TODO{TODO}

View File

@ -44,3 +44,4 @@
\val{\NA\,e}{}
}
\end{formula}

View File

@ -8,6 +8,15 @@
\desc[german]{Elektrisches Feld}{Umgibt geladene Teilchen}{}
\quantity{\vec{\E}}{\volt\per\m=\kg\m\per\s^3\ampere}{v}
\end{formula}
\def\Epotential{\phi}
\begin{formula}{electric_scalar_potential}
\desc{Electric potential}{Work required to move a unit of charge between two points}{}
\desc[german]{Elektrisches Potential}{Benötigte Arbeit um eine Einheitsladung zwischen zwei Punkten zu bewegen}{}
\quantity{\Epotential}{\volt=\kg\m^2\per\s^3\ampere}{s}
\eq{\Epotential = -\int \vec{\E} \cdot\d\vecr}
\end{formula}
\begin{formula}{gauss_law}
\desc{Gauss's law for electric fields}{Electric flux through a closed surface is proportional to the electric charge}{$S$ closed surface}
\desc[german]{Gaußsches Gesetz für elektrische Felder}{Der magnetische Fluss durch eine geschlossene Fläche ist proportional zur elektrischen Ladung}{$S$ geschlossene Fläche}
@ -15,8 +24,8 @@
\end{formula}
\begin{formula}{permittivity}
\desc{Permittivity}{Electric polarizability of a dielectric material}{}
\desc[german]{Permitivität}{Dielektrische Konstante\\Elektrische Polarisierbarkeit eines dielektrischen Materials}{}
\desc{Permittivity}{Dieletric function\\Electric polarizability of a dielectric material}{}
\desc[german]{Permitivität}{Dielektrische Konstante / Dielektrische Funktion\\Elektrische Polarisierbarkeit eines dielektrischen Materials}{}
\quantity{\epsilon}{\ampere\s\per\volt\m=\farad\per\m=\coulomb\per\volt\m=C^2\per\newton\m^2=\ampere^2\s^4\per\kg\m^3}{}
\end{formula}
\begin{formula}{relative_permittivity}
@ -46,6 +55,27 @@
\begin{formula}{dielectric_polarization_density}
\desc{Dielectric polarization density}{}{\ConstRef{vacuum_permittivity}, \QtyRef{electric_susceptibility}, \QtyRef{electric_field}}
\desc[german]{Dielektrische Polarisationsdichte}{}{}
\quantity{\vec{P}}{\coulomb\per\m^2}{v}
\eq{\vec{P} = \epsilon_0 \chi_\txe \vec{\E}}
\end{formula}
\begin{formula}{electric_displacement_field}
\desc{Electric displacement field}{}{\ConstRef{vacuum_permittivity}, \QtyRef{electric_field}, \QtyRef{dielectric_polarization_density}}
\desc[german]{Elektrische Flussdichte / dielektrische Verschiebung}{}{}
\quantity{\vec{D}}{\coulomb\per\m^2=\ampere\s\per\m^2}{v}
\eq{\vec{D} = \epsilon_0 \vec{\E} + \vec{P}}
\end{formula}
\begin{formula}{electric_flux}
\desc{Electric flux}{through area $\vec{A}$}{\QtyRef{electric_displacement_field}}
\desc[german]{Elektrischer Fluss}{durch die Fläche $\vec{A}$}{}
\eq{\Phi_\txE = \int_A \vec{D}\cdot \d \vec{A}}
\end{formula}
\begin{formula}{power}
\desc{Electric power}{}{$U$ \qtyRef{electric_scalar_potential}, \QtyRef{current}}
\desc[german]{Elektrische Leistung}{}{}
\eq{P_\text{el} = U\,I}
\end{formula}

View File

@ -30,6 +30,21 @@
\eq{\vec{S} = \vec{E} \times \vec{H}}
\end{formula}
\begin{formula}{electric_field}
\desc{Electric field}{}{\QtyRef{electric_field}, \QtyRef{electric_scalar_potential}, \QtyRef{magnetic_vector_potential}}
\desc[german]{Elektrisches Feld}{}{}
\eq{\vec{\E} = -\Grad\Epotential - \pdv{\vec{A}}{t}}
\end{formula}
\begin{formula}{hamiltonian}
\desc{Hamiltonian of a particle in an electromagnetic field}{In the \fqEqRef{ed:em:gauge:coulomb}}{\QtyRef{mass}, $\hat{p}$ \fqEqRef{qm:se:momentum_operator}, \QtyRef{charge}, \QtyRef{magnetic_vector_potential}, \ConstRef{speed_of_light}}
\desc[german]{Hamiltonian eines Teilchens im elektromagnetischen Feld}{In der \fqEqRef{ed:em:gauge:coulomb}}{}
\eq{
\hat{H} = \frac{1}{2m} \left[\hat{p} \ \frac{e \vec{A}}{c}\right]^2
}
\end{formula}
\Subsection[
\eng{Maxwell-Equations}
\ger{Maxwell-Gleichungen}
@ -55,6 +70,21 @@
\Rot \vec{H} &= \vec{j} + \odv{\vec{D}}{t}
}
\end{formula}
\Subsubsection[
\eng{Gauges}
\ger{Eichungen}
]{gauge}
\begin{formula}{coulomb}
\desc{Coulomb gauge}{}{\QtyRef{magnetic_vector_potential}}
\desc[german]{Coulomb-Eichung}{}{}
\eq{
\Div \vec{A} = 0
}
\end{formula}
\TODO{Polarization}
\Subsection[
@ -79,4 +109,3 @@
}
}
\end{formula}

View File

@ -1,115 +0,0 @@
\Section[
\eng{Magnetic field}
\ger{Magnetfeld}
]{mag}
\begin{formula}{magnetic_flux}
\desc{Magnetic flux}{}{$\vec{A}$ \GT{area}}
\desc[german]{Magnetischer Fluss}{}{}
\quantity{\PhiB}{\weber=\volt\per\s=\kg\m^2\per\s^2\A}{scalar}
\eq{\PhiB = \iint_A \vec{B}\cdot\d\vec{A}}
\end{formula}
\begin{formula}{magnetic_flux_density}
\desc{Magnetic flux density}{Defined by \fqEqRef{ed:mag:lorentz}}{$\vec{H}$ \qtyRef{magnetic_field_intensity}, $\vec{M}$ \qtyRef{magnetization}, \ConstRef{magnetic_vacuum_permeability}}
\desc[german]{Magnetische Flussdichte}{Definiert über \fqEqRef{ed:mag:lorentz}}{}
\quantity{\vec{B}}{\tesla=\volt\s\per\m^2=\newton\per\ampere\m=\kg\per\ampere\s^2}{}
\eq{\vec{B} = \mu_0 (\vec{H}+\vec{M})}
\end{formula}
\begin{formula}{magnetic_field_intensity}
\desc{Magnetic field intensity}{}{}
\desc[german]{Magnetische Feldstärke}{}{}
\quantity{\vec{H}}{\ampere\per\m}{vector}
\eq{
\vec{H} \equiv \frac{1}{\mu_0}\vec{B} - \vec{M}
}
\end{formula}
\begin{formula}{lorentz}
\desc{Lorentz force law}{Force on charged particle}{}
\desc[german]{Lorentzkraft}{Kraft auf geladenes Teilchen}{}
\eq{
\vec{F} = q \vec{\E} + q \vec{v}\times\vec{B}
}
\end{formula}
\begin{formula}{magnetic_permeability}
\desc{Magnetic permeability}{}{$B$ \qtyRef{magnetic_flux_density}, $H$ \qtyRef{magnetic_field_intensity}}
\desc[german]{Magnetisch Permeabilität}{}{}
\quantity{\mu}{\henry\per\m=\volt\s\per\ampere\m}{scalar}
\eq{\mu=\frac{B}{H}}
\end{formula}
\begin{formula}{magnetic_vacuum_permeability}
\desc{Magnetic vauum permeability}{}{}
\desc[german]{Magnetische Vakuumpermeabilität}{}{}
\constant{\mu_0}{exp}{
\val{1.25663706127(20)}{\henry\per\m=\newton\per\ampere^2}
}
\end{formula}
\begin{formula}{relative_permeability}
\desc{Relative permeability}{}{}
\desc[german]{Realtive Permeabilität}{}{}
\eq{
\mu_\txr = \frac{\mu}{\mu_0}
}
\end{formula}
\begin{formula}{gauss_law}
\desc{Gauss's law for magnetism}{Magnetic flux through a closed surface is $0$ \Rightarrow there are no magnetic monopoles}{$S$ closed surface}
\desc[german]{Gaußsches Gesetz für Magnetismus}{Der magnetische Fluss durch eine geschlossene Fläche ist $0$ \Rightarrow es gibt keine magnetischen Monopole}{$S$ geschlossene Fläche}
\eq{\PhiB = \iint_S \vec{B}\cdot\d\vec{S} = 0}
\end{formula}
\begin{formula}{magnetization}
\desc{Magnetization}{Vector field describing the density of magnetic dipoles}{}
\desc[german]{Magnetisierung}{Vektorfeld, welches die Dichte von magnetischen Dipolen beschreibt.}{}
\quantity{\vec{M}}{\ampere\per\m}{vector}
\eq{\vec{M} = \odv{\vec{m}}{V} = \chi_\txm \cdot \vec{H}}
\end{formula}
\begin{formula}{magnetic_moment}
\desc{Magnetic moment}{Strength and direction of a magnetic dipole}{}
\desc[german]{Magnetisches Moment}{Stärke und Richtung eines magnetischen Dipols}{}
\quantity{\vec{m}}{\ampere\m^2}{vector}
\end{formula}
\begin{formula}{angular_torque}
\desc{Torque}{}{$m$ \qtyRef{magnetic_moment}}
\desc[german]{Drehmoment}{}{}
\eq{\vec{\tau} = \vec{m} \times \vec{B}}
\end{formula}
\begin{formula}{magnetic_susceptibility}
\desc{Susceptibility}{}{$\mu_\txr$ \fqEqRef{ed:mag:relative_permeability}}
\desc[german]{Suszeptibilität}{}{}
\eq{\chi_\txm = \pdv{M}{B} = \mu_\txr - 1}
\end{formula}
\Subsection[
\eng{Magnetic materials}
\ger{Magnetische Materialien}
]{materials}
\begin{formula}{paramagnetism}
\desc{Paramagnetism}{Magnetic field strengthend in the material}{$\mu$ \fqEqRef{ed:mag:magnetic_permeability}, $\chi_\txm$ \fqEqRef{ed:mag:magnetic_susceptibility}}
\desc[german]{Paramagnetismus}{Magnetisches Feld wird im Material verstärkt}{}
\eq{\mu_\txr &> 1 \\ \chi_\txm &> 0}
\end{formula}
\begin{formula}{diamagnetism}
\desc{Diamagnetism}{Magnetic field expelled from material}{$\mu$ \fqEqRef{ed:mag:magnetic_permeability}, $\chi_\txm$ \fqEqRef{ed:mag:magnetic_susceptibility}}
\desc[german]{Diamagnetismus}{Magnetisches Feld wird aus dem Material gedrängt}{}
\eq{0 < \mu_\txr < 1 \\ -1 < \chi_\txm < 0}
\end{formula}
\begin{formula}{ferromagnetism}
\desc{Ferromagnetism}{Magnetic moments align to external magnetic field and stay aligned when the field is turned off (Remanescence)}{$\mu$ \fqEqRef{ed:mag:magnetic_permeability}, $\chi_\txm$ \fqEqRef{ed:mag:magnetic_susceptibility}}
\desc[german]{Ferromagnetismus}{Magnetische Momente werden am äußeren Feld ausgerichtet und behalten diese ausrichtung auch wenn das Feld abgeschaltet wird (Remanenz)}{}
\eq{
\mu_\txr \gg 1
}
\end{formula}

View File

@ -17,6 +17,13 @@
\eq{\vec{B} = \mu_0 (\vec{H}+\vec{M})}
\end{formula}
\begin{formula}{magnetic_vector_potential}
\desc{Magnetic vector potential}{}{}
\desc[german]{Magnetisches Vektorpotential}{}{}
\quantity{\vec{A}}{\tesla\m=\volt\s\per\m=\kg\m\per\s^2\ampere}{ievs}
\eq{\Rot\vec{A}(\vecr) = \vec{B}(\vecr)}
\end{formula}
\begin{formula}{magnetic_field_intensity}
\desc{Magnetic field intensity}{}{}
\desc[german]{Magnetische Feldstärke}{}{}

103
src/ed/optics.tex Normal file
View File

@ -0,0 +1,103 @@
\Section[
\eng{Optics}
\ger{Optik}
]{optics}
\begin{ttext}
\eng{Properties of light and its interactions with matter}
\ger{Ausbreitung von Licht und die Interaktion mit Materie}
\end{ttext}
\separateEntries
\begin{formula}{refraction_index}
\eng[cm]{speed of light in the medium}
\ger[cm]{Lichtgeschwindigkeit im Medium}
\desc{Refraction index}{}{\QtyRef{relative_permittivity}, \QtyRef{relative_permeability}, \ConstRef{speed_of_light}, $c_\txM$ \gt{cm}}
\desc[german]{Brechungsindex}{}{}
\quantity{\complex{n}}{}{s}
\eq{
\complex{n} = \nreal + i\ncomplex
}
\eq{
n = \sqrt{\epsilon_\txr \mu_\txr}
}
\eq{
n = \frac{c_0}{c_\txM}
}
\end{formula}
\TODO{what does the complex part of the dielectric function represent?}
\begin{formula}{refraction_index_real}
\desc{Real part of the refraction index}{}{}
\desc[german]{Reller Teil des Brechungsindex}{}{}
\quantity{\nreal}{}{s}
\end{formula}
\begin{formula}{refraction_index_complex}
\desc{Extinction coefficient}{Complex part of the refraction index}{\GT{sometimes} $\kappa$}
\desc[german]{Auslöschungskoeffizient}{Komplexer Teil des Brechungsindex}{}
\quantity{\ncomplex}{}{s}
\end{formula}
\begin{formula}{reflectivity}
\desc{Reflectio}{}{\QtyRef{refraction_index}}
% \desc[german]{}{}{}
\eq{
R = \abs{\frac{\complex{n}-1}{\complex{n}+1}}
}
\end{formula}
\begin{formula}{snell}
\desc{Snell's law}{}{$\nreal_i$ \qtyRef{refraction_index_real}, $\theta_i$ incidence angle (normal to the surface)}
\desc[german]{Snelliussches Brechungsgesetz}{}{$n_i$ \qtyRef{refraction_index}, $\theta_i$ Einfallswinkel (normal zur Fläche)}
\eq{\nreal_1 \sin\theta_1 = \nreal_2\sin\theta_2}
\end{formula}
\begin{formula}{group_velocity}
\desc{Group velocity}{Velocity with which the envelope of a wave propagates through space}{\QtyRef{angular_frequency}, \QtyRef{angular_wavenumber}}
\desc[german]{Gruppengeschwindigkeit}{Geschwindigkeit, mit sich die Einhülende einer Welle ausbreitet}{}
\eq{
v_\txg \equiv \pdv{\omega}{k}
}
\end{formula}
\begin{formula}{phase_velocity}
\desc{Phase velocity}{Velocity with which a wave propagates through a medium}{\QtyRef{angular_frequency}, \QtyRef{angular_wavenumber}, \QtyRef{wavelength}, \QtyRef{time_period}}
\desc[german]{Phasengeschwindigkeit}{Geschwindigkeit, mit der sich eine Welle im Medium ausbreitet}{}
\eq{
v_\txp = \frac{\omega}{k} = \frac{\lambda}{T}
}
\end{formula}
\begin{formula}{absorption_coefficient}
\desc{Absorption coefficient}{Intensity reduction while traversing a medium, not necessarily by energy transfer to the medium}{\QtyRef{refraction_index_complex}, \ConstRef{speed_of_light}, \QtyRef{angular_frequency}}
\desc[german]{Absoprtionskoeffizient}{Intensitätsverringerung beim Druchgang eines Mediums, nicht zwingend durch Energieabgabe an Medium}{}
\quantity{\alpha}{\per\cm}{s}
\eq{
\alpha &= 2\ncomplex \frac{\omega}{c} \\
\alpha &= \frac{\omega}{nc} \epsilon^\prime \text{\TODO{For direct band gaps; from adv. sc: sheet 10 2b). Check which is correct}}
}
\end{formula}
\begin{formula}{intensity}
\desc{Electromagnetic radiation intensity}{Surface power density}{$S$ \fqEqRef{ed:poynting}}
\desc[german]{Elektromagnetische Strahlungsintensität}{Flächenleistungsdichte}{}
\quantity{I}{\watt\per\m^2=\k\per\s^3}{s}
\eq{I = \abs{\braket{S}_t}}
\end{formula}
% \begin{formula}{lambert_beer_law}
% \desc{Beer-Lambert law}{Intensity in an absorbing medium}{$E_\lambda$ extinction, \QtyRef{absorption_coefficient}, \QtyRef{concentration}, $d$ Thickness of the medium}
% \desc[german]{Lambert-beersches Gesetz}{Intensität in einem absorbierenden Medium}{$E_\lambda$ Extinktion, \QtyRef{refraction_index_complex}, \QtyRef{concentration}, $d$ Dicke des Mediums}
% \eq{
% E_\lambda = \log_{10} \frac{I_0}{I} = \kappa c d \\
% }
% \end{formula}
\begin{formula}{lambert_beer_law}
\desc{Beer-Lambert law}{Intensity in an absorbing medium}{\QtyRef{intensity}, \QtyRef{absorption_coefficient}, $z$ penetration depth}
\desc[german]{Lambert-beersches Gesetz}{Intensität in einem absorbierenden Medium}{\QtyRef{intensity}, \QtyRef{absorption_coefficient}, $z$ Eindringtiefe}
\eq{
I(z) = I_0 \e^{-\kappa z}
}
\end{formula}

View File

@ -0,0 +1,54 @@
\begin{tikzpicture}[scale=0.9]
\pgfmathsetmacro{\tkW}{8} % Total width
\pgfmathsetmacro{\tkH}{5} % Total height
% left
\pgfmathsetmacro{\tkLx}{0} % Start
\pgfmathsetmacro{\tkLW}{2} % Right width
\pgfmathsetmacro{\tkLyshift}{0.0} % y-shift
\pgfmathsetmacro{\tkLBendH}{0} % Band bending height
\pgfmathsetmacro{\tkLBendW}{0} % Band bending width
\pgfmathsetmacro{\tkLEV}{4.0+\tkLyshift}% Vacuum energy
\pgfmathsetmacro{\tkLEf}{1.5+\tkLyshift}% Fermi level energy
% right
\pgfmathsetmacro{\tkRx}{\tkLW} % Left start
\pgfmathsetmacro{\tkRW}{\tkW-\tkRx} % Left width
\pgfmathsetmacro{\tkRyshift}{-0.5} % y-shift
\pgfmathsetmacro{\tkRBendH}{0.5} % Band bending height
\pgfmathsetmacro{\tkRBendW}{\tkRW/4} % Band bending width
\pgfmathsetmacro{\tkREv}{0.7+\tkRyshift}% Valence band energy
\pgfmathsetmacro{\tkREc}{2.4+\tkRyshift}% Conduction band energy
\pgfmathsetmacro{\tkREV}{4.0+\tkRyshift}% Vacuum energy
\pgfmathsetmacro{\tkREf}{2.0+\tkRyshift}% Fermi level energy
% materials
\draw[sc metal] (0,0) rectangle (\tkLW,\tkH);
\node at (\tkLW/2,\tkH-0.2) {\GT{metal}};
\path[sc n type] (\tkRx,0) rectangle (\tkW,\tkH);
\node at (\tkRx+\tkRW/2,\tkH-0.2) {\GT{n-type}};
\path[sc separate] (\tkLW,0) -- (\tkLW,\tkH);
% axes
\draw[->] (0,0) -- (\tkW+0.2,0) node[anchor=north] {$x$};
\draw[->] (0,0) -- (0,\tkH+0.2) node[anchor=east] {$E$};
% right bands
\path[sc occupied] (\tkRx, 0) -- \rightBandUp{}{\tkREv} -- (\tkW, 0) -- cycle;
\draw[sc band con] \rightBandUp{$\Econd$}{\tkREc};
\draw[sc band val] \rightBandUp{$\Evalence$}{\tkREv};
\draw[sc band vac] (0,\tkLEV) -- \rightBandUp{$\Evac$}{\tkREV};
\draw[sc fermi level] \rightBand{$\Efermi$}{\tkREf};
% left bands
\path[sc occupied] (0,0) rectangle (\tkLW,\tkLEf);
\draw[sc fermi level] \leftBand{$\Efermi$}{\tkLEf};
% work functions
\drawDArrow{\tkLW/2}{\tkLEf}{\tkLEV}{$e\Phi_\txM$}
\drawDArrow{\tkRx+\tkRW*3/4}{\tkREf}{\tkREV}{$e\Phi_\txS$}
\drawDArrow{\tkRx+\tkRW*2/4}{\tkREc}{\tkREV}{$e\chi$}
% barrier height
\drawDArrow{\tkRx+\tkRBendW}{\tkREc}{\tkREc+\tkRBendH}{$eU_\text{Bias}$}
\drawDArrow{\tkRx}{\tkREf}{\tkREc+\tkRBendH}{$e\Phi_\txB$}
\end{tikzpicture}

View File

@ -0,0 +1,49 @@
\begin{tikzpicture}[scale=0.9]
\pgfmathsetmacro{\tkW}{8} % Total width
\pgfmathsetmacro{\tkH}{5} % Total height
% left
\pgfmathsetmacro{\tkLx}{0} % Start
\pgfmathsetmacro{\tkLW}{2} % Right width
\pgfmathsetmacro{\tkLyshift}{0.0} % y-shift
\pgfmathsetmacro{\tkLBendH}{0} % Band bending height
\pgfmathsetmacro{\tkLBendW}{0} % Band bending width
\pgfmathsetmacro{\tkLEV}{4.0+\tkLyshift}% Vacuum energy
\pgfmathsetmacro{\tkLEf}{1.5+\tkLyshift}% Fermi level energy
% right
\pgfmathsetmacro{\tkRx}{4} % Left start
\pgfmathsetmacro{\tkRW}{\tkW-\tkRx} % Left width
\pgfmathsetmacro{\tkRyshift}{0} % y-shift
\pgfmathsetmacro{\tkRBendH}{0.5} % Band bending height
\pgfmathsetmacro{\tkRBendW}{\tkRW/4} % Band bending width
\pgfmathsetmacro{\tkREv}{0.7+\tkRyshift}% Valence band energy
\pgfmathsetmacro{\tkREc}{2.4+\tkRyshift}% Conduction band energy
\pgfmathsetmacro{\tkREV}{4.0+\tkRyshift}% Vacuum energy
\pgfmathsetmacro{\tkREf}{2.0+\tkRyshift}% Fermi level energy
% materials
\draw[sc metal] (0,0) rectangle (\tkLW,\tkH);
\node at (\tkLW/2,\tkH-0.2) {\GT{metal}};
\path[sc n type] (\tkRx,0) rectangle (\tkW,\tkH);
\node at (\tkRx+\tkRW/2,\tkH-0.2) {\GT{n-type}};
% axes
\draw[->] (0,0) -- (\tkW+0.2,0) node[anchor=north] {$x$};
\draw[->] (0,0) -- (0,\tkH+0.2) node[anchor=east] {$E$};
% right bands
\path[sc occupied] (\tkRx, 0) -- \rightBand{}{\tkREv} -- (\tkW, 0) -- cycle;
\draw[sc band con] \rightBand{$\Econd$}{\tkREc};
\draw[sc band val] \rightBand{$\Evalence$}{\tkREv};
\draw[sc band vac] (0,\tkLEV) -- \rightBand{$\Evac$}{\tkREV};
\draw[sc fermi level] \rightBand{$\Efermi$}{\tkREf};
% left bands
\path[sc occupied] (0,0) rectangle (\tkLW,\tkLEf);
\draw[sc fermi level] \leftBand{$\Efermi$}{\tkLEf};
% work functions
\drawDArrow{\tkLW/2}{\tkLEf}{\tkLEV}{$e\Phi_\txM$}
\drawDArrow{\tkRx+\tkRW*2/3}{\tkREf}{\tkREV}{$e\Phi_\txS$}
\drawDArrow{\tkRx+\tkRW*1/3}{\tkREc}{\tkREV}{$e\chi$}
\end{tikzpicture}

View File

@ -0,0 +1,51 @@
\begin{tikzpicture}[scale=1]
\pgfmathsetmacro{\tkW}{8} % Total width
\pgfmathsetmacro{\tkH}{5} % Total height
% left
\pgfmathsetmacro{\tkLx}{0} % Start
\pgfmathsetmacro{\tkLW}{2} % Right width
\pgfmathsetmacro{\tkLyshift}{-0.5} % y-shift
\pgfmathsetmacro{\tkLBendH}{0} % Band bending height
\pgfmathsetmacro{\tkLBendW}{0} % Band bending width
\pgfmathsetmacro{\tkLEV}{4.0+\tkLyshift}% Vacuum energy
\pgfmathsetmacro{\tkLEf}{2.5+\tkLyshift}% Fermi level energy
% right
\pgfmathsetmacro{\tkRx}{\tkLW} % Left start
\pgfmathsetmacro{\tkRW}{\tkW-\tkRx} % Left width
\pgfmathsetmacro{\tkRyshift}{0} % y-shift
\pgfmathsetmacro{\tkRBendH}{-0.5} % Band bending height
\pgfmathsetmacro{\tkRBendW}{\tkRW/4} % Band bending width
\pgfmathsetmacro{\tkREv}{0.7+\tkRyshift}% Valence band energy
\pgfmathsetmacro{\tkREc}{2.5+\tkRyshift}% Conduction band energy
\pgfmathsetmacro{\tkREV}{4.0+\tkRyshift}% Vacuum energy
\pgfmathsetmacro{\tkREf}{2.0+\tkRyshift}% Fermi level energy
% materials
\draw[sc metal] (0,0) rectangle (\tkLW,\tkH);
\node at (\tkLW/2,\tkH-0.2) {\GT{metal}};
\path[sc n type] (\tkRx,0) rectangle (\tkW,\tkH);
\node at (\tkRx+\tkRW/2,\tkH-0.2) {\GT{n-type}};
\path[sc separate] (\tkRx,0) -- (\tkRx,\tkH);
\drawAxes
% right bands
\path[sc occupied] (\tkRx, 0) -- \rightBandAuto{}{\tkREv} -- (\tkW, 0) -- cycle;
\draw[sc band con] \rightBandAuto{$\Econd$}{\tkREc};
\draw[sc band val] \rightBandAuto{$\Evalence$}{\tkREv};
\draw[sc band vac] (0,\tkLEV) -- \rightBandAuto{$\Evac$}{\tkREV};
\draw[sc fermi level] \rightBand{$\Efermi$}{\tkREf};
% left bands
\path[sc occupied] (0,0) rectangle (\tkLW,\tkLEf);
\draw[sc fermi level] \leftBand{$\Efermi$}{\tkLEf};
% work functions
\drawDArrow{\tkLW/2}{\tkLEf}{\tkLEV}{$e\Phi_\txM$}
\drawDArrow{\tkRx+\tkRW*3/4}{\tkREf}{\tkREV}{$e\Phi_\txS$}
\drawDArrow{\tkRx+\tkRW*2/4}{\tkREc}{\tkREV}{$e\chi$}
% barrier height
\drawDArrow{\tkRx+\tkRBendW}{\tkREc}{\tkREc-\tkRBendH}{$eU_\text{Bias}$}
\end{tikzpicture}

View File

@ -0,0 +1,48 @@
\begin{tikzpicture}[scale=1]
\pgfmathsetmacro{\tkW}{8} % Total width
\pgfmathsetmacro{\tkH}{5} % Total height
% left
\pgfmathsetmacro{\tkLx}{0} % Start
\pgfmathsetmacro{\tkLW}{2} % Right width
\pgfmathsetmacro{\tkLyshift}{0.0} % y-shift
\pgfmathsetmacro{\tkLBendH}{0} % Band bending height
\pgfmathsetmacro{\tkLBendW}{0} % Band bending width
\pgfmathsetmacro{\tkLEV}{4.0+\tkLyshift}% Vacuum energy
\pgfmathsetmacro{\tkLEf}{2.5+\tkLyshift}% Fermi level energy
% right
\pgfmathsetmacro{\tkRx}{4} % Left start
\pgfmathsetmacro{\tkRW}{\tkW-\tkRx} % Left width
\pgfmathsetmacro{\tkRyshift}{0} % y-shift
\pgfmathsetmacro{\tkRBendH}{0.5} % Band bending height
\pgfmathsetmacro{\tkRBendW}{\tkRW/4} % Band bending width
\pgfmathsetmacro{\tkREv}{0.7+\tkRyshift}% Valence band energy
\pgfmathsetmacro{\tkREc}{2.5+\tkRyshift}% Conduction band energy
\pgfmathsetmacro{\tkREV}{4.0+\tkRyshift}% Vacuum energy
\pgfmathsetmacro{\tkREf}{2.0+\tkRyshift}% Fermi level energy
% materials
\draw[sc metal] (0,0) rectangle (\tkLW,\tkH);
\node at (\tkLW/2,\tkH-0.2) {\GT{metal}};
\path[sc n type] (\tkRx,0) rectangle (\tkW,\tkH);
\node at (\tkRx+\tkRW/2,\tkH-0.2) {\GT{n-type}};
\drawAxes
% right bands
\path[sc occupied] (\tkRx, 0) -- \rightBand{}{\tkREv} -- (\tkW, 0) -- cycle;
\draw[sc band con] \rightBand{$\Econd$}{\tkREc};
\draw[sc band val] \rightBand{$\Evalence$}{\tkREv};
\draw[sc band vac] (0,\tkLEV) -- \rightBand{$\Evac$}{\tkREV};
\draw[sc fermi level] \rightBand{$\Efermi$}{\tkREf};
% left bands
\path[sc occupied] (0,0) rectangle (\tkLW,\tkLEf);
\draw[sc fermi level] \leftBand{$\Efermi$}{\tkLEf};
% work functions
\drawDArrow{\tkLW/2}{\tkLEf}{\tkLEV}{$e\Phi_\txM$}
\drawDArrow{\tkRx+\tkRW*2/3}{\tkREf}{\tkREV}{$e\Phi_\txS$}
\drawDArrow{\tkRx+\tkRW*1/3}{\tkREc}{\tkREV}{$e\chi$}
\end{tikzpicture}

View File

@ -0,0 +1,65 @@
\newcommand\tikzPnJunction[7]{
\begin{tikzpicture}[scale=1.0]
\pgfmathsetmacro{\tkW}{8} % Total width
\pgfmathsetmacro{\tkH}{5} % Total height
% left
\pgfmathsetmacro{\tkLx}{0} % Start
\pgfmathsetmacro{\tkLW}{\tkW*#1} % Width
\pgfmathsetmacro{\tkLyshift}{#2} % y-shift
\pgfmathsetmacro{\tkLBendH}{#3} % Band bending height
\pgfmathsetmacro{\tkLBendW}{\tkLW/4} % Band bending width
\pgfmathsetmacro{\tkLEv}{0.7+\tkLyshift}% Valence band energy
\pgfmathsetmacro{\tkLEc}{2.3+\tkLyshift}% Conduction band energy
\pgfmathsetmacro{\tkLEV}{4.0+\tkLyshift}% Vacuum energy
\pgfmathsetmacro{\tkLEf}{1.1+\tkLyshift}% Fermi level energy
% right
\pgfmathsetmacro{\tkRx}{\tkW*(1-#4)} % Start
\pgfmathsetmacro{\tkRW}{\tkW*#4} % Width
\pgfmathsetmacro{\tkRyshift}{#5} % y-shift
\pgfmathsetmacro{\tkRBendH}{#6} % Band bending height
\pgfmathsetmacro{\tkRBendW}{\tkRW/4} % Band bending width
\pgfmathsetmacro{\tkREv}{0.7+\tkRyshift}% Valence band energy
\pgfmathsetmacro{\tkREc}{2.3+\tkRyshift}% Conduction band energy
\pgfmathsetmacro{\tkREV}{4.0+\tkRyshift}% Vacuum energy
\pgfmathsetmacro{\tkREf}{1.9+\tkRyshift}% Fermi level energy
% materials
\draw[sc p type] (0,0) rectangle (\tkLW,\tkH);
\node at (\tkLW/2,\tkH-0.2) {\GT{p-type}};
\path[sc separate] (\tkRx,0) -- (\tkRx,\tkH);
\path[sc n type] (\tkRx,0) rectangle (\tkW,\tkH);
\node at (\tkRx+\tkRW/2,\tkH-0.2) {\GT{n-type}};
\path[sc separate] (\tkLW,0) -- (\tkLW,\tkH);
\drawAxes
% right bands
\path[sc occupied] (\tkRx, 0) -- \rightBandAuto{}{\tkREv} -- (\tkW, 0) -- cycle;
\draw[sc band con] \rightBandAuto{$\Econd$}{\tkREc};
\draw[sc band val] \rightBandAuto{$\Evalence$}{\tkREv};
\draw[sc band vac] \rightBandAuto{$\Evac$}{\tkREV};
\draw[sc fermi level] \rightBand{$\Efermi$}{\tkREf};
% left bands
\path[sc occupied] (\tkLx, 0) -- \leftBandAuto{}{\tkLEv} -- (\tkLW, 0) -- cycle;
\draw[sc band con] \leftBandAuto{$\Econd$}{\tkLEc};
\draw[sc band val] \leftBandAuto{$\Evalence$}{\tkLEv};
\draw[sc band vac] \leftBandAuto{$\Evac$}{\tkLEV};
\draw[sc fermi level] \leftBand{$\Efermi$}{\tkLEf};
% work functions
\drawDArrow{\tkRx+\tkRW*2/3}{\tkREf}{\tkREV}{$e\Phi_\txn$}
\drawDArrow{\tkRx+\tkRW*1/3}{\tkREc}{\tkREV}{$e\chi_\txn$}
\drawDArrow{\tkLx+\tkLW*2/3}{\tkLEf}{\tkLEV}{$e\Phi_\txp$}
\drawDArrow{\tkLx+\tkLW*1/3}{\tkLEc}{\tkLEV}{$e\chi_\txp$}
% barrier height
% \drawDArrow{\tkRx+\tkRBendW}{\tkREc}{\tkREc+\tkRBendH}{$eU_\text{Bias}$}
% \drawDArrow{\tkRx}{\tkREf}{\tkREc+\tkRBendH}{$e\Phi_\txB$}
#7
\end{tikzpicture}
}
% \tikzPnJunction{1/3}{0}{0}{1/3}{0}{0}{}
% \tikzPnJunction{1/2}{0.4}{-0.4}{1/2}{-0.4}{0.4}{}

View File

@ -22,6 +22,11 @@
\usepackage{subcaption} % subfigures
\usepackage[hidelinks]{hyperref} % hyperrefs for \fqEqRef, \qtyRef, etc
\usepackage[shortlabels]{enumitem} % easily change enum symbols to i), a. etc
\setlist{noitemsep} % no vertical space between items
\setlist[1]{labelindent=\parindent} % < Usually a good idea
\setlist[itemize]{leftmargin=*}
\setlist[enumerate]{labelsep=*, leftmargin=1.5pc} % horizontal indent of items
\usepackage{titlesec} % colored titles
\usepackage{array} % more array options
\newcolumntype{C}{>{$}c<{$}} % math-mode version of "c" column type
@ -30,10 +35,14 @@
\usepackage{translations}
\input{util/translation.tex}
\input{util/colorscheme.tex}
\input{util/colors.tex} % after colorscheme
% GRAPHICS
\usepackage{tikz} % drawings
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.pathreplacing} % braces
\usetikzlibrary{calc}
\usetikzlibrary{patterns}
\input{util/tikz_macros}
% speed up compilation by externalizing figures
% \usetikzlibrary{external}
% \tikzexternalize[prefix=tikz_figures]
@ -78,9 +87,11 @@
\newcommand{\TODO}[1]{{\color{bright_red}TODO:#1}}
\newcommand{\TODO}[1]{{\color{fg-red}TODO:#1}}
\newcommand{\ts}{\textsuperscript}
\newcommand\printFqName{\expandafter\detokenize\expandafter{\fqname}}
% "automate" sectioning
% start <section>, get heading from translation, set label
% fqname is the fully qualified name: the keys of all previous sections joined with a ':'
@ -145,11 +156,13 @@
% 1: key/fully qualified name (without qty/eq/sec/const/el... prefix)
% Equations/Formulas
% <name>
% \newrobustcmd{\fqEqRef}[1]{%
\newrobustcmd{\fqEqRef}[1]{%
% \edef\fqeqrefname{\GT{#1}}
% \hyperref[eq:#1]{\fqeqrefname}
\hyperref[f:#1]{\GT{#1}}%
}
% Section
% <name>
\newrobustcmd{\fqSecRef}[1]{%
@ -178,7 +191,7 @@
% Element from periodic table
% <symbol>
\newrobustcmd{\elRef}[1]{%
\hyperref[el:#1]{{\color{dark0_hard}#1}}%
\hyperref[el:#1]{{\color{fg0}#1}}%
}
% <name>
\newrobustcmd{\ElRef}[1]{%
@ -197,12 +210,12 @@
% Write directlua command to aux and run it as well
% This one expands the argument in the aux file:
\newcommand\directLuaAuxExpand[1]{
\immediate\write\luaauxfile{\noexpand\directlua{#1}}
\immediate\write\luaAuxFile{\noexpand\directlua{#1}}
\directlua{#1}
}
% This one does not:
\newcommand\directLuaAux[1]{
\immediate\write\luaauxfile{\noexpand\directlua{\detokenize{#1}}}
\immediate\write\luaAuxFile{\noexpand\directlua{\detokenize{#1}}}
\directlua{#1}
}
% read
@ -212,11 +225,20 @@
% \@latex@warning@no@line{"Lua aux not loaded!"}
}
\def\luaAuxLoaded{False}
% write
\newwrite\luaauxfile
\immediate\openout\luaauxfile=\jobname.lua.aux
\immediate\write\luaauxfile{\noexpand\def\noexpand\luaAuxLoaded{True}}%
\AtEndDocument{\immediate\closeout\luaauxfile}
\newwrite\luaAuxFile
\immediate\openout\luaAuxFile=\jobname.lua.aux
\immediate\write\luaAuxFile{\noexpand\def\noexpand\luaAuxLoaded{True}}%
\AtEndDocument{\immediate\closeout\luaAuxFile}
% Create a text file with relevant labels for vim-completion
\newwrite\labelsFile
\immediate\openout\labelsFile=\jobname.labels.txt
\newcommand\storeLabel[1]{
\immediate\write\labelsFile{#1}%
}
\AtEndDocument{\immediate\closeout\labelsFile}
\input{circuit.tex}
\input{util/macros.tex}
@ -262,7 +284,7 @@
\input{util/translations.tex}
% \InputOnly{math}
% \InputOnly{ch}
\Input{math/math}
\Input{math/linalg}
@ -277,10 +299,11 @@
\Input{ed/el}
\Input{ed/mag}
\Input{ed/em}
\Input{ed/optics}
\Input{ed/misc}
\Input{quantum_mechanics}
\Input{atom}
\Input{qm/qm}
\Input{qm/atom}
\Input{cm/cm}
\Input{cm/crystal}
@ -290,29 +313,30 @@
\Input{cm/semiconductors}
\Input{cm/misc}
\Input{cm/techniques}
\Input{cm/topo}
\Input{topo}
\Input{particle}
\Input{quantum_computing}
\Input{computational}
\Input{quantities}
\Input{constants}
\Input{comp/comp}
\Input{comp/qmb}
\Input{comp/elsth}
\Input{comp/ad}
\Input{comp/ml}
\Input{ch/periodic_table} % only definitions
\Input{ch/ch}
% \newpage
% \Input{test}
\newpage
\Part[
\eng{Appendix}
\ger{Anhang}
]{appendix}
% \listofmyenv
\Input{quantities}
\Input{constants}
% \listofquantities
\listoffigures
\listoftables
@ -321,6 +345,8 @@
\ger{Liste der Elemente}
]{elements}
\printAllElements
\newpage
\Input{test}
% \bibliographystyle{plain}
% \bibliography{ref}

View File

@ -145,7 +145,7 @@
\begin{formula}{delta_of_function}
\desc{Dirac-Delta of a function}{}{$g(x_0) = 0$}
\desc[german]{Dirac-Delta einer Funktion}{}{}
\eq{\delta(f(x)) = \frac{\delta(x-x_0)}{\abs{g'(x_0)}}}
\eq{\delta(f(x)) = \frac{\delta(x-x_0)}{\abs{g^\prime(x_0)}}}
\end{formula}
\begin{formula}{geometric_series}
@ -179,6 +179,36 @@
}
\end{formula}
\Subsection[
\eng{Vector calculus}
\ger{Vektor Analysis}
]{vec}
\begin{formula}{laplace}
\desc{Laplace operator}{}{}
\desc[german]{Laplace-Operator}{}{}
\eq{\laplace = \Grad^2 = \pdv[2]{}{x} + \pdv[2]{}{y} + \pdv[2]{}{z}}
\end{formula}
\Subsubsection[
\eng{Spherical symmetry}
\ger{Kugelsymmetrie}
]{sphere}
\begin{formula}{coordinates}
\desc{Spherical coordinates}{}{}
\desc[german]{Kugelkoordinaten}{}{}
\eq{
x &= r \sin\phi,\cos\theta \\
y &= r \cos\phi,\cos\theta \\
z &= r \sin\theta
}
\end{formula}
\begin{formula}{laplace}
\desc{Laplace operator}{}{}
\desc[german]{Laplace-Operator}{}{}
\eq{\Grad^2 = \laplace = \frac{1}{r^2} \pdv{}{r} \left(r^2 \pdv{}{r}\right)}
\end{formula}
\Subsection[
\eng{Integrals}
\ger{Integralrechnung}
@ -187,7 +217,7 @@
\desc{Partial integration}{}{}
\desc[german]{Partielle integration}{}{}
\eq{
\int_a^b f'(x)\cdot g(x) \d x= \left[f(x)\cdot g(x)\right]_a^b - \int_a^b f(x)\cdot g'(x) \d x
\int_a^b f^\prime(x)\cdot g(x) \d x= \left[f(x)\cdot g(x)\right]_a^b - \int_a^b f(x)\cdot g^\prime(x) \d x
}
\end{formula}
@ -195,7 +225,7 @@
\desc{Integration by substitution}{}{}
\desc[german]{Integration durch Substitution}{}{}
\eq{
\int_a^b f(g(x))\,g'(x) \d x = \int_{g(a)}^{g(b)} f(z) \d z
\int_a^b f(g(x))\,g^\prime(x) \d x = \int_{g(a)}^{g(b)} f(z) \d z
}
\end{formula}
@ -203,7 +233,7 @@
\desc{Gauss's theorem / Divergence theorem}{Divergence in a volume equals the flux through the surface}{$A = \partial V$}
\desc[german]{Satz von Gauss}{Divergenz in einem Volumen ist gleich dem Fluss durch die Oberfläche}{}
\eq{
\iiint_V (\Div{\vec{F}}) \d V = \oiint_A \vec{F} \cdot \d\vec{A}
\iiint_V \Div{\vec{F}} \d V = \oiint_A \vec{F} \cdot \d\vec{A}
}
\end{formula}
@ -239,15 +269,6 @@
}
\end{formula}
\begin{formula}{spherical-coordinates}
\desc{Spherical coordinates}{}{}
\desc[german]{Kugelkoordinaten}{}{}
\eq{
x &= r \sin\phi,\cos\theta \\
y &= r \cos\phi,\cos\theta \\
z &= r \sin\theta
}
\end{formula}
\begin{formula}{spheical-coordinates-int}
\desc{Integration in spherical coordinates}{}{}
\desc[german]{Integration in Kugelkoordinaten}{}{}
@ -260,6 +281,40 @@
\eq{\zeta(s) = \sum_{n=1}^{\infty} \frac{1}{n^s} = \frac{1}{(1-2^{(1-s)})\Gamma(s)} \int_0^\infty \d\eta \frac{\eta^{(s-1)}}{\e^\eta + 1}}
\end{formula}
\begin{formula}{gamma_function}
\desc{Gamma function}{}{}
\desc[german]{Gamma-Funktion}{}{}
\eq{
\Gamma(n) &= (n-1)! \\
\Gamma(z) &= \int_0^\infty t^{z-1} \e^{-t} \d t \\
\Gamma(z+1) &= z\Gamma(z)
}
\end{formula}
\begin{formula}{upper_incomplete_gamma_function}
\desc{Upper incomplete gamma function}{}{}
\desc[german]{Unvollständige Gamma-Funktion der unteren Grenze}{}{}
\eq{\Gamma(s,x) = \int_x-^\infty t^{s-1}\e^{-t} \d t}
\end{formula}
\begin{formula}{lower_incomplete_gamma_function}
\desc{Lower incomplete gamma function}{}{}
\desc[german]{Unvollständige Gamma-Funktion der oberen Grenze}{}{}
\eq{\gamma(s,x) = \int_0^x t^{s-1}\e^{-t} \d t}
\end{formula}
\begin{formula}{beta_function}
\desc{Beta function}{Complete beta function}{}
\desc[german]{Beta-Funktion}{}{}
\eq{
\txB(z_1,z_2) &= \int_0^1 t^{z_1-1} (1-t)^{z_2-1} \d t \\
\txB(z_1, z_2) &= \frac{\Gamma(z_1) \Gamma(z_2)}{\Gamma(z_1+z_2)}
}
\end{formula}
\begin{formula}{incomplete_beta_function}
\desc{Incomplete beta function}{Complete beta function}{}
\desc[german]{Unvollständige Beta-Funktion}{}{}
\eq{\txB(x; z_1,z_2) = \int_0^x t^{z_1-1} (1-t)^{z_2-1} \d t}
\end{formula}
\TODO{differential equation solutions}

View File

@ -9,6 +9,7 @@
\eq{\braket{x} = \int w(x)\, x\, \d x}
\end{formula}
\begin{formula}{variance}
\desc{Variance}{Square of the \fqEqRef{math:pt:std-deviation}}{}
\desc[german]{Varianz}{Quadrat der\fqEqRef{math:pt:std-deviation}}{}
@ -47,35 +48,51 @@
\eq{F(x) = \int_{-\infty}^x f(t) \d t}
\end{formula}
\begin{formula}{pmf}
\desc{Probability mass function}{Probability $p$ that \textbf{discrete} random variable $X$ has exact value $x$}{$P$ probability measure}
\desc[german]{Wahrscheinlichkeitsfunktion / Zählfunktion}{Wahrscheinlichkeit $p$ dass eine \textbf{diskrete} Zufallsvariable $X$ einen exakten Wert $x$ annimmt}{}
\eq{p_X(x) = P(X = x)}
\end{formula}
\begin{formula}{autocorrelation}
\desc{Autocorrelation}{Correlation of $f$ to itself at an earlier point in time, $C$ is a covariance function}{}
\desc[german]{Autokorrelation}{Korrelation vonn $f$ zu sich selbst zu einem früheren Zeitpunkt. $C$ ist auch die Kovarianzfunktion}{}
\eq{C_A(\tau) = \lim_{T \to \infty} \frac{1}{2T}\int_{-T}^{T} f(t+\tau) f(t) \d t) = \braket{f(t+\tau)\cdot f(t)}}
\end{formula}
\begin{formula}{binomial_coefficient}
\desc{Binomial coefficient}{Number of possibilitites of choosing $k$ objects out of $n$ objects\\}{}
\desc[german]{Binomialkoeffizient}{Anzahl der Möglichkeiten, $k$ aus $n$ zu wählen\\ "$n$ über $k$"}{}
\eq{\binom{n}{k} = \frac{n!}{k!(n-k)!}}
\end{formula}
\Subsection[
\eng{Distributions}
\ger{Verteilungen}
]{distributions}
\Subsubsection[
\eng{Gauß/Normal distribution}
\ger{Gauß/Normal-Verteilung}
]{normal}
\begin{minipage}{\distleftwidth}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{img/distribution_gauss.pdf}
\end{figure}
\end{minipage}
\begin{distribution}
\disteq{parameters}{\mu \in \R,\quad \sigma^2 \in \R}
\disteq{support}{x \in \R}
\disteq{pdf}{\frac{1}{\sqrt{2\pi\sigma^2}}\exp \left(-\frac{(x-\mu)^2}{2\sigma^2}\right)}
\disteq{cdf}{\frac{1}{2}\left[1 + \erf \left(\frac{x-\mu}{\sqrt{2}\sigma}\right)\right]}
\disteq{mean}{\mu}
\disteq{median}{\mu}
\disteq{variance}{\sigma^2}
\end{distribution}
\eng{Continuous probability distributions}
\ger{Kontinuierliche Wahrscheinlichkeitsverteilungen}
]{cont}
\begin{bigformula}{normal}
\desc{Gauß/Normal distribution}{}{}
\desc[german]{Gauß/Normal-Verteilung}{}{}
\begin{minipage}{\distleftwidth}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{img/distribution_gauss.pdf}
\end{figure}
\end{minipage}
\begin{distribution}
\disteq{parameters}{\mu \in \R,\quad \sigma^2 \in \R}
\disteq{support}{x \in \R}
\disteq{pdf}{\frac{1}{\sqrt{2\pi\sigma^2}}\exp \left(-\frac{(x-\mu)^2}{2\sigma^2}\right)}
\disteq{cdf}{\frac{1}{2}\left[1 + \erf \left(\frac{x-\mu}{\sqrt{2}\sigma}\right)\right]}
\disteq{mean}{\mu}
\disteq{median}{\mu}
\disteq{variance}{\sigma^2}
\end{distribution}
\end{bigformula}
\begin{formula}{standard_normal_distribution}
\desc{Density function of the standard normal distribution}{$\mu = 0$, $\sigma = 1$}{}
@ -83,98 +100,138 @@
\eq{\varphi(x) = \frac{1}{\sqrt{2\pi}} \e^{-\frac{1}{2}x^2}}
\end{formula}
\Subsubsection[
\eng{Cauchys / Lorentz distribution}
\ger{Cauchy / Lorentz-Verteilung}
]{cauchy}
\begin{minipage}{\distleftwidth}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{img/distribution_cauchy.pdf}
\end{figure}
\end{minipage}
\begin{distribution}
\disteq{parameters}{x_0 \in \R,\quad \gamma \in \R}
\disteq{support}{x \in \R}
\disteq{pdf}{\frac{1}{\pi\gamma\left[1+\left(\frac{x-x_0}{\gamma}\right)^2\right]}}
\disteq{cdf}{\frac{1}{\pi}\arctan\left(\frac{x-x_0}{\gamma}\right) + \frac{1}{2}}
\disteq{mean}{\text{\GT{undefined}}}
\disteq{median}{x_0}
\disteq{variance}{\text{\GT{undefined}}}
\end{distribution}
\noindent
\begin{ttext}
\eng{Also known as \textbf{Cauchy-Lorentz distribution}, \textbf{Lorentz(ian) function}, \textbf{Breit-Wigner distribution}.}
\ger{Auch bekannt als \textbf{Cauchy-Lorentz Verteilung}, \textbf{Lorentz Funktion}, \textbf{Breit-Wigner Verteilung}.}
\end{ttext}
\begin{bigformula}{cauchy}
\desc{Cauchys / Lorentz distribution}{Also known as Cauchy-Lorentz distribution, Lorentz(ian) function, Breit-Wigner distribution.}{}
\desc[german]{Cauchy / Lorentz-Verteilung}{Auch bekannt als Cauchy-Lorentz Verteilung, Lorentz Funktion, Breit-Wigner Verteilung.}{}
\begin{minipage}{\distleftwidth}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{img/distribution_cauchy.pdf}
\end{figure}
\end{minipage}
\begin{distribution}
\disteq{parameters}{x_0 \in \R,\quad \gamma \in \R}
\disteq{support}{x \in \R}
\disteq{pdf}{\frac{1}{\pi\gamma\left[1+\left(\frac{x-x_0}{\gamma}\right)^2\right]}}
\disteq{cdf}{\frac{1}{\pi}\arctan\left(\frac{x-x_0}{\gamma}\right) + \frac{1}{2}}
\disteq{mean}{\text{\GT{undefined}}}
\disteq{median}{x_0}
\disteq{variance}{\text{\GT{undefined}}}
\end{distribution}
\end{bigformula}
\begin{bigformula}{maxwell-boltzmann}
\desc{Maxwell-Boltzmann distribution}{}{}
\desc[german]{Maxwell-Boltzmann Verteilung}{}{}
\begin{minipage}{\distleftwidth}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{img/distribution_maxwell-boltzmann.pdf}
\end{figure}
\end{minipage}
\begin{distribution}
\disteq{parameters}{a > 0}
\disteq{support}{x \in (0, \infty)}
\disteq{pdf}{\sqrt{\frac{2}{\pi}} \frac{x^2}{a^3} \exp\left(-\frac{x^2}{2a^2}\right)}
\disteq{cdf}{\erf \left(\frac{x}{\sqrt{2} a}\right) - \sqrt{\frac{2}{\pi}} \frac{x}{a} \exp\left({\frac{-x^2}{2a^2}}\right)}
\disteq{mean}{2a \frac{2}{\pi}}
\disteq{median}{}
\disteq{variance}{\frac{a^2(3\pi-8)}{\pi}}
\end{distribution}
\end{bigformula}
\begin{bigformula}{gamma}
\desc{Gamma Distribution}{with $\lambda$ parameter}{$\Gamma$ \fqEqRef{math:cal:integral:list:gamma}, $\gamma$ \fqEqRef{math:cal:integral:list:lower_incomplete_gamma_function}}
\desc[german]{Gamma Verteilung}{mit $\lambda$ Parameter}{}
\begin{minipage}{\distleftwidth}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{img/distribution_gamma.pdf}
\end{figure}
\end{minipage}
\begin{distribution}
\disteq{parameters}{\alpha > 0, \lambda > 0}
\disteq{support}{x\in(0,1)}
\disteq{pdf}{\frac{\lambda^\alpha}{\Gamma(\alpha) x^{\alpha-1} \e^{-\lambda x}}}
\disteq{cdf}{\frac{1}{\Gamma(\alpha) \gamma(\alpha, \lambda x)}}
\disteq{mean}{\frac{\alpha}{\lambda}}
\disteq{variance}{\frac{\alpha}{\lambda^2}}
\end{distribution}
\end{bigformula}
\begin{bigformula}{beta}
\desc{Beta Distribution}{}{$\txB$ \fqEqRef{math:cal:integral:list:beta_function} / \fqEqRef{math:cal:integral:list:incomplete_beta_function}}
\desc[german]{Beta Verteilung}{}{}
\begin{minipage}{\distleftwidth}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{img/distribution_beta.pdf}
\end{figure}
\end{minipage}
\begin{distribution}
\disteq{parameters}{\alpha \in \R, \beta \in \R}
\disteq{support}{x\in[0,1]}
\disteq{pdf}{\frac{x^{\alpha-1} (1-x)^{\beta-1}}{\txB(\alpha,\beta)}}
\disteq{cdf}{\frac{\txB(x;\alpha,\beta)}{\txB(\alpha,\beta)}}
\disteq{mean}{\frac{\alpha}{\alpha+\beta}}
% \disteq{median}{\frac{}{}} % pretty complicated, probably not needed
\disteq{variance}{\frac{\alpha\beta}{(\alpha+\beta)^2(\alpha+\beta+1)}}
\end{distribution}
\end{bigformula}
\Subsubsection[
\eng{Binomial distribution}
\ger{Binomialverteilung}
]{binomial}
\begin{ttext}
\eng{For the number of trials going to infinity ($n\to\infty$), the binomial distribution converges to the \hyperref[sec:pb:distributions:poisson]{poisson distribution}}
\ger{Geht die Zahl der Versuche gegen unendlich ($n\to\infty$), konvergiert die Binomualverteilung gegen die \hyperref[sec:pb:distributions:poisson]{Poissonverteilung}}
\end{ttext}\\
\begin{minipage}{\distleftwidth}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{img/distribution_binomial.pdf}
\end{figure}
\end{minipage}
\begin{distribution}
\disteq{parameters}{n \in \Z, \quad p \in [0,1],\quad q = 1 - p}
\disteq{support}{k \in \{0,\,1,\,\dots,\,n\}}
\disteq{pmf}{\binom{n}{k} p^k q^{n-k}}
% \disteq{cdf}{\text{regularized incomplete beta function}}
\disteq{mean}{np}
\disteq{median}{\floor{np} \text{ or } \ceil{np}}
\disteq{variance}{npq = np(1-p)}
\end{distribution}
\Subsubsection[
\eng{Poisson distribution}
\ger{Poissonverteilung}
]{poisson}
\begin{minipage}{\distleftwidth}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{img/distribution_poisson.pdf}
\end{figure}
\end{minipage}
\begin{distribution}
\disteq{parameters}{\lambda \in (0,\infty)}
\disteq{support}{k \in \N}
\disteq{pmf}{\frac{\lambda^k \e^{-\lambda}}{k!}}
\disteq{cdf}{\e^{-\lambda} \sum_{j=0}^{\floor{k}} \frac{\lambda^j}{j!}}
\disteq{mean}{\lambda}
\disteq{median}{\approx\floor*{\lambda + \frac{1}{3} - \frac{1}{50\lambda}}}
\disteq{variance}{\lambda}
\end{distribution}
\eng{Discrete probability distributions}
\ger{Diskrete Wahrscheinlichkeitsverteilungen}
]{discrete}
\begin{bigformula}{binomial}
\desc{Binomial distribution}{}{}
\desc[german]{Binomialverteilung}{}{}
\begin{ttext}
\eng{For the number of trials going to infinity ($n\to\infty$), the binomial distribution converges to the \hyperref[sec:pb:distributions:poisson]{poisson distribution}}
\ger{Geht die Zahl der Versuche gegen unendlich ($n\to\infty$), konvergiert die Binomualverteilung gegen die \hyperref[sec:pb:distributions:poisson]{Poissonverteilung}}
\end{ttext}\\
\begin{minipage}{\distleftwidth}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{img/distribution_binomial.pdf}
\end{figure}
\end{minipage}
\begin{distribution}
\disteq{parameters}{n \in \Z, \quad p \in [0,1],\quad q = 1 - p}
\disteq{support}{k \in \{0,\,1,\,\dots,\,n\}}
\disteq{pmf}{\binom{n}{k} p^k q^{n-k}}
% \disteq{cdf}{\text{regularized incomplete beta function}}
\disteq{mean}{np}
\disteq{median}{\floor{np} \text{ or } \ceil{np}}
\disteq{variance}{npq = np(1-p)}
\end{distribution}
\end{bigformula}
\Subsubsection[
\eng{Maxwell-Boltzmann distribution}
\ger{Maxwell-Boltzmann Verteilung}
]{maxwell-boltzmann}
\begin{minipage}{\distleftwidth}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{img/distribution_maxwell-boltzmann.pdf}
\end{figure}
\end{minipage}
\begin{distribution}
\disteq{parameters}{a > 0}
\disteq{support}{x \in (0, \infty)}
\disteq{pdf}{\sqrt{\frac{2}{\pi}} \frac{x^2}{a^3} \exp\left(-\frac{x^2}{2a^2}\right)}
\disteq{cdf}{\erf \left(\frac{x}{\sqrt{2} a}\right) - \sqrt{\frac{2}{\pi}} \frac{x}{a} \exp\left({\frac{-x^2}{2a^2}}\right)}
\disteq{mean}{2a \frac{2}{\pi}}
\disteq{median}{}
\disteq{variance}{\frac{a^2(3\pi-8)}{\pi}}
\end{distribution}
\begin{bigformula}{poisson}
\desc{Poisson distribution}{}{}
\desc[german]{Poissonverteilung}{}{}
\begin{minipage}{\distleftwidth}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{img/distribution_poisson.pdf}
\end{figure}
\end{minipage}
\begin{distribution}
\disteq{parameters}{\lambda \in (0,\infty)}
\disteq{support}{k \in \N}
\disteq{pmf}{\frac{\lambda^k \e^{-\lambda}}{k!}}
\disteq{cdf}{\e^{-\lambda} \sum_{j=0}^{\floor{k}} \frac{\lambda^j}{j!}}
\disteq{mean}{\lambda}
\disteq{median}{\approx\floor*{\lambda + \frac{1}{3} - \frac{1}{50\lambda}}}
\disteq{variance}{\lambda}
\end{distribution}
\end{bigformula}
% TEMPLATE
% \begin{distribution}{maxwell-boltzmann}
% \distdesc{Maxwell-Boltzmann distribution}{}
% \distdesc[german]{Maxwell-Boltzmann Verteilung}{}
@ -238,4 +295,51 @@
\eq{\sigma^2_{\overline{x}} = \frac{1}{\sum_i w_i}}
\end{formula}
\Subsection[
\eng{Maximum likelihood estimation}
\ger{Maximum likelihood Methode}
]{mle}
\begin{formula}{likelihood}
\desc{Likelihood function}{Likelihood of observing $x$ when parameter is $\theta$\\in general not normalized!}{$\rho$ \fqEqRef{math:pt:pdf} $x\mapsto \rho(x|\theta)$ depending on parameter $\theta$, $\Theta$ parameter space}
\desc[german]{Likelihood Funktion}{"Plausibilität" $x$ zu messen, wenn der Parameter $\theta$ ist\\nicht normalisiert!}{$\rho$ \fqEqRef{math:pt:pdf} $x\mapsto \rho(x|\theta)$ hängt ab von Parameter $\theta$, $\Theta$ Parameterraum}
\eq{L:\Theta \rightarrow [0,1], \quad \theta \mapsto \rho(x|\theta)}
\end{formula}
\begin{formula}{likelihood_independant}
\desc{Likelihood function}{for independent and identically distributed random variables}{$x_i$ $n$ random variables, $\rho$ \fqEqRef{math:pt:pdf} $x\mapsto \rho(x|\theta)$ depending on parameter $\theta$}
\desc[german]{Likelihood function}{für unabhängig und identisch verteilte Zufallsvariablen}{$x_i$ $n$ Zufallsvariablen$\rho$ \fqEqRef{math:pt:pdf} $x\mapsto \rho(x|\theta)$ hängt ab von Parameter $\theta$}
\eq{L(\theta) = \prod_{i=1}^n f(x_i;\theta)}
\end{formula}
\begin{formula}{maximum_likelihood_estimate}
\desc{Maximum likelihood estimate (MLE)}{Paramater for which outcome is most likely}{$L$ \fqEqRef{pt:mle:likelihood}, $\theta$ parameter of a \fqEqRef{math:pt:pdf}}
\desc[german]{Maximum likelihood-Schätzung (MLE)}{Paramater, für den das Ergebnis am Wahrscheinlichsten ist}{$L$ \fqEqRef{math:pt:mle:likelihood}, $\theta$ Parameter einer \fqEqRef{math:pt:pdf}}
\eq{\theta_\text{ML} &= \argmax_\theta L(\theta)\\ &= \argmax_\theta \log \big(L(\theta)\big)}
\end{formula}
\Subsection[
\eng{Bayesian probability theory}
\ger{Bayessche Wahrscheinlichkeitstheorie}
]{bayesian}
\begin{formula}{prior}
\desc{Prior distribution}{Expected distribution before conducting the experiment}{$\theta$ parameter}
\desc[german]{Prior Verteilung}{}{}
\eq{p(\theta)}
\end{formula}
\begin{formula}{evidence}
\desc{Evidence}{}{$p(\mathcal{D}|\theta)$ \fqEqRef{math:pt:mle:likelihood}, $p(\theta)$ \fqEqRef{math:pt:bayesian:prior}, $\mathcal{D}$ data set}
% \desc[german]{}{}{}
\eq{p(\mathcal{D}) = \int\d\theta \,p(\mathcal{D}|\theta)\,p(\theta)}
\end{formula}
\begin{formula}{theorem}
\desc{Bayes' theorem}{}{$p(\theta|\mathcal{D})$ posterior distribution, $p(\mathcal{D}|\theta)$ \fqEqRef{math:pt:mle:likelihood}, $p(\theta)$ \fqEqRef{math:pt:bayesian:prior}, $p(\mathcal{D})$ \fqEqRef{math:pt:bayesian:evidence}, $\mathcal{D}$ data set}
\desc[german]{Satz von Bayes}{}{}
\eq{p(\theta|\mathcal{D}) = \frac{p(\mathcal{D}|\theta)\,p(\theta)}{p(\mathcal{D})}}
\end{formula}
\begin{formula}{map}
\desc{Maximum a posterior estimation (MAP)}{}{}
% \desc[german]{}{}{}
\eq{\theta_\text{MAP} = \argmax_\theta p(\theta|\mathcal{D}) = \argmax_\theta p(\mathcal{D}|\theta)\,p(\theta)}
\end{formula}

View File

@ -3,6 +3,34 @@
\ger{Mechanik}
]{mech}
\Section[
\eng{Newton}
\ger{Newton}
]{newton}
\begin{formula}{newton_laws}
\desc{Newton's laws}{}{}
\desc[german]{Newtonsche Gesetze}{}{}
\ttxt{
\eng{
\begin{enumerate}
\item A body remains at rest, or in motion at a constant speed in a straight line, except insofar as it is acted upon by a force
\item $$\vec{F} = m \cdot \vec{a}$$
\item If two bodies exert forces on each other, these force have the same magnitude but opposite directions
$$\vec{F}_{\txA\rightarrow\txB} = -\vec{F}_{\txB\rightarrow\txA}$$
\end{enumerate}
}
\ger{
\begin{enumerate}
\item Ein kräftefreier Körper bleibt in Ruhe oder bewegt sich geradlinig mit konstanter Geschwindigkeit
\item $$\vec{F} = m \cdot \vec{a}$$
\item Eine Kraft von Körper A auf Körper B geht immer mit einer gleich große, aber entgegen gerichteten Kraft von Körper B auf Körper A einher:
$$\vec{F}_{\txA\rightarrow\txB} = -\vec{F}_{\txB\rightarrow\txA}$$
\end{enumerate}
}
}
\end{formula}
\Section[
\eng{Misc}
\ger{Verschiedenes}

101
src/particle.tex Normal file
View File

@ -0,0 +1,101 @@
\Part[
\eng{Particle physics}
\ger{Teilchenphysik}
]{particle}
\begin{formula}{electron_mass}
\desc{Electron mass}{}{}
\desc[german]{Elektronenmasse}{}{}
\constant{m_\txe}{exp}{
\val{9.1093837139(28) \xE{-31}}{\kg}
}
\end{formula}
\tikzset{%
label/.style = { black, midway, align=center },
toplabel/.style = { label, above=.5em, anchor=south },
leftlabel/.style = { midway, left=.5em, anchor=east },
bottomlabel/.style = { label, below=.5em, anchor=north },
force/.style = { rotate=-90,scale=0.4 },
round/.style = { rounded corners=2mm },
legend/.style = { anchor=east },
nosep/.style = { inner sep=0pt },
generation/.style = { anchor=base },
brace/.style = { decoration={brace,mirror},decorate }
}
% [1]: color
% 2: symbol
% 3: name
% 4: mass
% 5: spin
% 6: charge
% 7: colors
\newcommand\drawParticle[7][white]{%
\begin{tikzpicture}[x=2.2cm, y=2.2cm]
% \path[fill=#1,blur shadow={shadow blur steps=5}] (0,0) -- (1,0) -- (1,1) -- (0,1) -- cycle;
% \path[fill=#1,stroke=black,blur shadow={shadow blur steps=5},rounded corners] (0,0) rectangle (1,1);
\path[fill=#1!20!bg0,draw=#1,thick] (0.02,0.02) rectangle (0.98,0.98);
\node at(0.92, 0.50) [nosep,anchor=east]{\Large #2};
% \node at(0.95, 0.15) [nosep,anchor=south east]{\footnotesize #3};
\node at(0.05, 0.15) [nosep,anchor=south west]{\footnotesize #3};
% \ifstrempty{#2}{}{\node at(0) [nosep,anchor=west,scale=1.5] {#2};}
% \ifstrempty{#3}{}{\node at(0.1,-0.85) [nosep,anchor=west,scale=0.3] {#3};}
\ifstrempty{#4}{}{\node at(0.05,0.85) [nosep,anchor=west] {\footnotesize #4};}
\ifstrempty{#5}{}{\node at(0.05,0.70) [nosep,anchor=west] {\footnotesize #5};}
\ifstrempty{#6}{}{\node at(0.05,0.55) [nosep,anchor=west] {\footnotesize #6};}
% \ifstrempty{#7}{}{\node at(0.05,0.40) [nosep,anchor=west] {\footnotesize #7};}
\end{tikzpicture}
}
\def\colorLepton{bg-aqua}
\def\colorQuarks{bg-purple}
\def\colorGauBos{bg-red}
\def\colorScaBos{bg-yellow}
\eng[quarks]{Quarks}
\ger[quarks]{Quarks}
\eng[leptons]{Leptons}
\ger[leptons]{Leptonen}
\eng[fermions]{Fermions}
\ger[fermions]{Fermionen}
\eng[bosons]{Bosons}
\ger[bosons]{Bosonen}
\begin{tikzpicture}[x=2.2cm, y=2.2cm]
\node at(0, 0) {\drawParticle[\colorQuarks]{$u$} {up} {$2.3$ MeV}{1/2}{$2/3$}{R/G/B}};
\node at(0,-1) {\drawParticle[\colorQuarks]{$d$} {down} {$4.8$ MeV}{1/2}{$-1/3$}{R/G/B}};
\node at(0,-2) {\drawParticle[\colorLepton]{$e$} {electron} {$511$ keV}{1/2}{$-1$}{}};
\node at(0,-3) {\drawParticle[\colorLepton]{$\nu_e$} {$e$ neutrino} {$<2.2$ eV}{1/2}{0}{}};
\node at(1, 0) {\drawParticle[\colorQuarks]{$c$} {charm} {$1.275$ GeV}{1/2}{$2/3$}{R/G/B}};
\node at(1,-1) {\drawParticle[\colorQuarks]{$s$} {strange} {$95$ MeV}{1/2}{$-1/3$}{R/G/B}};
\node at(1,-2) {\drawParticle[\colorLepton]{$\mu$} {muon} {$105.7$ MeV}{1/2}{$-1$}{}};
\node at(1,-3) {\drawParticle[\colorLepton]{$\nu_\mu$} {$\mu$ neutrino}{$<170$ keV}{1/2}{0}{}};
\node at(2, 0) {\drawParticle[\colorQuarks]{$t$} {top} {$173.2$ GeV}{1/2}{$2/3$}{R/G/B}};
\node at(2,-1) {\drawParticle[\colorQuarks]{$b$} {bottom} {$4.18$ GeV}{1/2}{$-1/3$}{R/G/B}};
\node at(2,-2) {\drawParticle[\colorLepton]{$\tau$} {tau} {$1.777$ GeV}{1/2}{$-1$}{}};
\node at(2,-3) {\drawParticle[\colorLepton]{$\nu_\tau$} {$\tau$ neutrino} {$<15.5$ MeV}{1/2}{0}{}};
\node at(3, 0) {\drawParticle[\colorGauBos]{$g$} {gluon} {0}{1}{0}{color}};
\node at(3,-1) {\drawParticle[\colorGauBos]{$\gamma$} {photon} {0}{1}{0}{}};
\node at(3,-2) {\drawParticle[\colorGauBos]{$Z$} {} {$91.2$ GeV}{1}{0}{}};
\node at(3,-3) {\drawParticle[\colorGauBos]{$W_\pm$} {} {$80.4$ GeV}{1}{$\pm1$}{}};
\node at(4,0) {\drawParticle[\colorScaBos]{$H$} {Higgs} {$125.1$ GeV}{0}{0}{}};
\draw [->] (-0.7, 0.35) node [legend] {\qtyRef{mass}} -- (-0.5, 0.35);
\draw [->] (-0.7, 0.20) node [legend] {\qtyRef{spin}} -- (-0.5, 0.20);
\draw [->] (-0.7, 0.05) node [legend] {\qtyRef{charge}} -- (-0.5, 0.05);
\draw [->] (-0.7,-0.10) node [legend] {\qtyRef{colors}} -- (-0.5,-0.10);
\draw [brace,draw=\colorQuarks] (-0.55, 0.5) -- (-0.55,-1.5) node[leftlabel,color=\colorQuarks] {\gt{quarks}};
\draw [brace,draw=\colorLepton] (-0.55,-1.5) -- (-0.55,-3.5) node[leftlabel,color=\colorLepton] {\gt{leptons}};
\draw [brace] (-0.5,-3.55) -- ( 2.5,-3.55) node[bottomlabel] {\gt{fermions}};
\draw [brace] ( 2.5,-3.55) -- ( 4.5,-3.55) node[bottomlabel] {\gt{bosons}};
\draw [brace] (0.5,0.55) -- (-0.5,0.55) node[toplabel] {\small standard matter};
\draw [brace] (2.5,0.55) -- ( 0.5,0.55) node[toplabel] {\small unstable matter};
\draw [brace] (4.5,0.55) -- ( 2.5,0.55) node[toplabel] {\small force carriers};
\node at (0,0.85) [generation] {\small I};
\node at (1,0.85) [generation] {\small II};
\node at (2,0.85) [generation] {\small III};
\node at (1,1.05) [generation] {\small generation};
\end{tikzpicture}

View File

@ -49,10 +49,36 @@
\eq{E_n &= \frac{Z^2\mu e^4}{n^2(4\pi\epsilon_0)^2 2\hbar^2} = -E_\textrm{H}\frac{Z^2}{n^2}}
\end{formula}
\begin{formula}{rydberg_constant_heavy}
\desc{Rydberg constant}{for heavy atoms}{\ConstRef{electron_mass}, \ConstRef{elementary_charge}, \QtyRef{vacuum_permittivity}, \ConstRef{planck}, \ConstRef{vacuum_speed_of_light}}
\desc[german]{Rydberg-Konstante}{für schwere Atome}{}
\constant{R_\infty}{exp}{
\val{10973731.568157(12)}{\per\m}
}
\eq{
R_\infty = \frac{m_e e^4}{8\epsilon_0^2 h^3 c}
}
\end{formula}
\begin{formula}{rydberg_constant_corrected}
\desc{Rydberg constant}{corrected for nucleus mass $M$}{\QtyRef{rydberg_constant_heavy}, $\mu = \left(\frac{1}{m_\txe} + \frac{1}{M}\right)^{-1}$ \GT{reduced_mass}, \ConstRef{electron_mass}}
\desc[german]{Rydberg Konstante}{korrigiert für Kernmasse $M$}{}
\eq{R_\txM = \frac{\mu}{m_\txe} R_\infty}
\end{formula}
\begin{formula}{rydberg_energy}
\desc{Rydberg energy}{}{}
\desc[german]{Rydberg-Energy}{}{}
\eq{E_\textrm{H} = h\,c\,R_\textrm{H} = \frac{\mu e^4}{(4\pi\epsilon_0)^2 2\hbar^2}}
\desc{Rydberg energy}{Energy unit}{\ConstRef{rydberg_constant_heavy}, \ConstRef{planck}, \ConstRef{vacuum_speed_of_light}}
\desc[german]{Rydberg-Energy}{Energie Einheit}{}
\eq{1\,\text{Ry} = hc\,R_\infty}
\end{formula}
\begin{formula}{bohr_radius}
\desc{Bohr radius}{}{\ConstRef{vacuum_permittivity}, \ConstRef{electron_mass}}
\desc[german]{Bohrscher Radius}{}{}
\constant{a_0}{exp}{
\val{5.29177210544(82) \xE{-11}}{\m}
}
\eq{a_0 = \frac{4\pi \epsilon_0 \hbar^2}{e^2 m_\txe}}
\end{formula}

View File

@ -80,11 +80,12 @@
\begin{formula}{pauli_matrices}
\desc{Pauli matrices}{}{}
\desc[german]{Pauli Matrizen}{}{}
\eqAlignedAt{2}{
\newFormulaEntry
\begin{alignat}{2}
\sigma_x &= \sigmaxmatrix &&= \sigmaxbraket \label{eq:pauli_x} \\
\sigma_y &= \sigmaymatrix &&= \sigmaybraket \label{eq:pauli_y} \\
\sigma_z &= \sigmazmatrix &&= \sigmazbraket \label{eq:pauli_z}
}
\end{alignat}
\end{formula}
% $\sigma_x$ NOT
% $\sigma_y$ PHASE
@ -177,7 +178,7 @@
\Section[
\eng{Schrödinger equation}
\ger{Schrödingergleichung}
]{schroedinger_equation}
]{se}
\begin{formula}{energy_operator}
\desc{Energy operator}{}{}
\desc[german]{Energieoperator}{}{}
@ -338,7 +339,7 @@
\desc{2. order energy shift}{}{}
\desc[german]{Energieverschiebung 2. Ordnung}{}{}
% \eq{E_n^{(1)} = \Braket{\psi_n^{(0)}|\hat{H_1}|\psi_n^{(0)}}}
\eq{E_n^{(2)} = \sum_{k\neq n}\frac{\abs*{\Braket{\psi_k^{(0)}|\hat{H_1}|\psi_n^{(0)}}}^2}{E_n^{(0)} - E_k^{(0)}}}
\eq{E_n^{(2)} = \sum_{k\neq n}\frac{\abs{\Braket{\psi_k^{(0)}|\hat{H_1}|\psi_n^{(0)}}}^2}{E_n^{(0)} - E_k^{(0)}}}
\end{formula}
% \begin{formula}{qm:pertubation:}
% \desc{1. order states}{}{}
@ -347,16 +348,16 @@
% \end{formula}
\begin{formula}{golden_rule}
\desc{Fermi\'s golden rule}{Transition rate from initial state $\ket{i}$ under a pertubation $H^1$ to final state $\ket{f}$}{}
\desc{Fermi's golden rule}{Transition rate from initial state $\ket{i}$ under a pertubation $H^1$ to final state $\ket{f}$}{}
\desc[german]{Fermis goldene Regel}{Übergangsrate des initial Zustandes $\ket{i}$ unter einer Störung $H^1$ zum Endzustand $\ket{f}$}{}
\eq{\Gamma_{i\to f} = \frac{2\pi}{\hbar} \abs*{\braket{f | H^1 | i}}^2\,\rho(E_f)}
\eq{\Gamma_{i\to f} = \frac{2\pi}{\hbar} \abs{\braket{f | H^1 | i}}^2\,\rho(E_f)}
\end{formula}
\Section[
\eng{Harmonic oscillator}
\ger{Harmonischer Oszillator}
]{qm_hosc}
]{hosc}
\begin{formula}{hamiltonian}
\desc{Hamiltonian}{}{}
\desc[german]{Hamiltonian}{}{}

View File

@ -18,7 +18,7 @@
\quantity{t}{\second}{}
\end{formula}
\begin{formula}{Length}
\begin{formula}{length}
\desc{Length}{}{}
\desc[german]{Länge}{}{}
\quantity{l}{\m}{e}
@ -58,7 +58,6 @@
\eng{Mechanics}
\ger{Mechanik}
]{mech}
\begin{formula}{force}
\desc{Force}{}{}
\desc[german]{Kraft}{}{}
@ -107,13 +106,42 @@
\desc[german]{Ladung}{}{}
\quantity{q}{\coulomb=\ampere\s}{}
\end{formula}
\begin{formula}{charge_number}
\desc{Charge number}{}{}
\desc[german]{ladungszahl}{Anzahl der Elementarladungen}{}
\quantity{Z}{}{}
\end{formula}
\begin{formula}{charge_density}
\desc{Charge density}{}{}
\desc[german]{Ladungsdichte}{}{}
\quantity{\rho}{\coulomb\per\m^3}{s}
\end{formula}
\begin{formula}{frequency}
\desc{Frequency}{}{}
\desc[german]{Frequenz}{}{}
\quantity{f}{\hertz=\per\s}{s}
\end{formula}
\begin{formula}{angular_frequency}
\desc{Angular frequency}{}{\QtyRef{time_period}, \QtyRef{frequency}}
\desc[german]{Winkelgeschwindigkeit}{}{}
\quantity{\omega}{\radian\per\s}{s}
\eq{\omega = \frac{2\pi/T}{2\pi f}}
\end{formula}
\begin{formula}{time_period}
\desc{Time period}{}{\QtyRef{frequency}}
\desc[german]{Periodendauer}{}{}
\quantity{T}{\s}{s}
\eq{T = \frac{1}{f}}
\end{formula}
\Subsection[
\eng{Others}
\ger{Sonstige}
]{other}
\begin{formula}{area}
\desc{Area}{}{}
\desc[german]{Fläche}{}{}
\quantity{A}{m^2}{v}
\end{formula}

View File

@ -24,12 +24,12 @@
\begin{formula}{gates}
\desc{}{}{}
\desc[german]{}{}{}
\eqAlignedAt{2}{
\begin{alignat}{2}
& \text{\gt{bitflip}:} & \hat{X} &= \sigma_x = \sigmaxmatrix \\
& \text{\gt{bitphaseflip}:} & \hat{Y} &= \sigma_y = \sigmaymatrix \\
& \text{\gt{phaseflip}:} & \hat{Z} &= \sigma_z = \sigmazmatrix \\
& \text{\gt{hadamard}:} & \hat{H} &= \frac{1}{\sqrt{2}}(\hat{X}-\hat{Z}) = \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}
}
\end{alignat}
\end{formula}
% \begin{itemize}
% \item \gt{bitflip}: $\hat{X} = \sigma_x = \sigmaxmatrix$

View File

@ -111,27 +111,32 @@
\ger{Irreversible Gasexpansion (Gay-Lussac-Versuch)}
]{gay}
\begin{minipage}{0.6\textwidth}
\vfill
\begin{ttext}
\eng{
A classical gas in a system with volume $V_1$ is separated from another system with volume $V_2$.
In the Gay-Lussac experiment, the separation is removed and the gas flows into $V_2$.
}
\ger{
Ein klassisches Gas in einem System mit Volumen $V_1$ ist getrennt von einem zweiten System mit Volumen $V_2$.
Beim Gay-Lussac Versuch wird die Trennwand entfern und das Gas fließt in das Volumen $V_2$.
}
\end{ttext}
\vfill
\end{minipage}
\hfill
\begin{minipage}{0.3\textwidth}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{img/td_gay_lussac.pdf}
\end{figure}
\end{minipage}
\begin{bigformula}{experiment}
\desc{Gay-Lussac experiment}{}{}
\desc[german]{Gay-Lussac-Versuch}{}{}
\begin{minipage}{0.6\textwidth}
\vfill
\begin{ttext}
\eng{
A classical gas in a system with volume $V_1$ is separated from another system with volume $V_2$.
In the Gay-Lussac experiment, the separation is removed and the gas flows into $V_2$.
}
\ger{
Ein klassisches Gas in einem System mit Volumen $V_1$ ist getrennt von einem zweiten System mit Volumen $V_2$.
Beim Gay-Lussac Versuch wird die Trennwand entfern und das Gas fließt in das Volumen $V_2$.
}
\end{ttext}
\vfill
\end{minipage}
\hfill
\begin{minipage}{0.3\textwidth}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{img/td_gay_lussac.pdf}
\end{figure}
\end{minipage}
\end{bigformula}
\begin{formula}{entropy}
\desc{Entropy change}{}{}

0
src/svgs/convertToPdf.sh Executable file → Normal file
View File

View File

@ -30,6 +30,17 @@ Is german? = \IfTranslation{german}{\ttest:name}{yes}{no} \\
Is defined? = \IfTranslationExists{\ttest:name}{yes}{no} \\
Is defined? = \expandafter\IfTranslationExists\expandafter{\ttest:name}{yes}{no}
\paragraph{Testing relative translations}
\begingroup
\edef\prevFqname{\fqname}
\edef\fqname{\prevFqname:test}
\eng{English, relative}
\ger{Deutsch, relativ}
\endgroup
\dt[testkey]{english}{Testkey}
{\textbackslash}gt\{test\}: \gt{test}\\
{\textbackslash}gt\{test\}: \gt{testkey}
% \DT[qty:test]{english}{HAHA}
\paragraph{Testing hyperrefs}

37
src/util/colors.tex Normal file
View File

@ -0,0 +1,37 @@
% \redefinecolor{black}{HTML}{fg0}
% Dark mode
\pagecolor{bg0}
\color{fg0}
% \pagecolor{dark0_hard}
% \color{light0_hard}
% section headings in bright colors, \titleformat from titlesec package
\titleformat{\section}
{\color{fg-purple}\normalfont\Large\bfseries}
{\color{fg-purple}\thesection}{1em}{}
\titleformat{\subsection}
{\color{fg-blue}\normalfont\large\bfseries}
{\color{fg-blue}\thesubsection}{1em}{}
\titleformat{\subsubsection}
{\color{fg-aqua}\normalfont\normalsize\bfseries}
{\color{fg-aqua}\thesubsubsection}{1em}{}
\titleformat{\paragraph}
{\color{fg-green}\normalfont\normalsize\bfseries}
{\color{fg-green}\theparagraph}{1em}{}
\titleformat{\subparagraph}
{\color{fg-purple}\normalfont\normalsize\bfseries}
{\color{fg-purple}\thesubparagraph}{1em}{}
\hypersetup{
colorlinks=true,
linkcolor=fg-purple,
citecolor=fg-green,
filecolor=fg-blue,
urlcolor=fg-orange
}

View File

@ -1,72 +1,28 @@
% Gruvbox colors
\definecolor{dark0_hard}{HTML}{1d2021}
\definecolor{dark0}{HTML}{282828}
\definecolor{dark0_soft}{HTML}{32302f}
\definecolor{dark1}{HTML}{3c3836}
\definecolor{dark2}{HTML}{504945}
\definecolor{dark3}{HTML}{665c54}
\definecolor{dark4}{HTML}{7c6f64}
\definecolor{medium}{HTML}{928374}
\definecolor{light0_hard}{HTML}{f9f5d7}
\definecolor{light0}{HTML}{fbf1c7}
\definecolor{light0_soft}{HTML}{f2e5bc}
\definecolor{light1}{HTML}{ebdbb2}
\definecolor{light2}{HTML}{d5c4a1}
\definecolor{light3}{HTML}{bdae93}
\definecolor{light4}{HTML}{a89984}
\definecolor{bright_red}{HTML}{fb4934}
\definecolor{bright_green}{HTML}{b8bb26}
\definecolor{bright_yellow}{HTML}{fabd2f}
\definecolor{bright_blue}{HTML}{83a598}
\definecolor{bright_purple}{HTML}{d3869b}
\definecolor{bright_aqua}{HTML}{8ec07c}
\definecolor{bright_orange}{HTML}{fe8019}
\definecolor{neutral_red}{HTML}{cc241d}
\definecolor{neutral_green}{HTML}{98971a}
\definecolor{neutral_yellow}{HTML}{d79921}
\definecolor{neutral_blue}{HTML}{458588}
\definecolor{neutral_purple}{HTML}{b16286}
\definecolor{neutral_aqua}{HTML}{689d6a}
\definecolor{neutral_orange}{HTML}{d65d0e}
\definecolor{faded_red}{HTML}{9d0006}
\definecolor{faded_green}{HTML}{79740e}
\definecolor{faded_yellow}{HTML}{b57614}
\definecolor{faded_blue}{HTML}{076678}
\definecolor{faded_purple}{HTML}{8f3f71}
\definecolor{faded_aqua}{HTML}{427b58}
\definecolor{faded_orange}{HTML}{af3a03}
% Dark mode
% \pagecolor{light0_hard}
% \color{dark0_hard}
% \pagecolor{dark0_hard}
% \color{light0_hard}
% section headings in bright colors, \titleformat from titlesec package
\titleformat{\section}
{\color{neutral_purple}\normalfont\Large\bfseries}
{\color{neutral_purple}\thesection}{1em}{}
\titleformat{\subsection}
{\color{neutral_blue}\normalfont\large\bfseries}
{\color{neutral_blue}\thesubsection}{1em}{}
\titleformat{\subsubsection}
{\color{neutral_aqua}\normalfont\normalsize\bfseries}
{\color{neutral_aqua}\thesubsubsection}{1em}{}
\titleformat{\paragraph}
{\color{neutral_green}\normalfont\normalsize\bfseries}
{\color{neutral_green}\theparagraph}{1em}{}
\titleformat{\subparagraph}
{\color{neutral_purple}\normalfont\normalsize\bfseries}
{\color{neutral_purple}\thesubparagraph}{1em}{}
\hypersetup{
colorlinks=true,
linkcolor=neutral_purple,
citecolor=neutral_green,
filecolor=neutral_blue,
urlcolor=neutral_orange
}
% This file was generated by scripts/formulasheet.py
% Do not edit it directly, changes will be overwritten
\definecolor{fg0}{HTML}{f9f5d7}
\definecolor{bg0}{HTML}{1d2021}
\definecolor{fg1}{HTML}{ebdbb2}
\definecolor{fg2}{HTML}{d5c4a1}
\definecolor{fg3}{HTML}{bdae93}
\definecolor{fg4}{HTML}{a89984}
\definecolor{bg1}{HTML}{3c3836}
\definecolor{bg2}{HTML}{504945}
\definecolor{bg3}{HTML}{665c54}
\definecolor{bg4}{HTML}{7c6f64}
\definecolor{fg-red}{HTML}{fb4934}
\definecolor{fg-orange}{HTML}{f38019}
\definecolor{fg-yellow}{HTML}{fabd2f}
\definecolor{fg-green}{HTML}{b8bb26}
\definecolor{fg-aqua}{HTML}{8ec07c}
\definecolor{fg-blue}{HTML}{83a598}
\definecolor{fg-purple}{HTML}{d3869b}
\definecolor{fg-gray}{HTML}{a89984}
\definecolor{bg-red}{HTML}{cc241d}
\definecolor{bg-orange}{HTML}{d65d0e}
\definecolor{bg-yellow}{HTML}{d79921}
\definecolor{bg-green}{HTML}{98971a}
\definecolor{bg-aqua}{HTML}{689d6a}
\definecolor{bg-blue}{HTML}{458588}
\definecolor{bg-purple}{HTML}{b16286}
\definecolor{bg-gray}{HTML}{928374}

View File

@ -15,6 +15,12 @@
\def\descwidth{0.3\textwidth}
\def\eqwidth{0.6\textwidth}
\newcommand\separateEntries{
\vspace{0.5\baselineskip}
\textcolor{fg3}{\hrule}
\vspace{0.5\baselineskip}
}
%
% FORMULA ENVIRONMENT
@ -32,7 +38,7 @@
\GT{#2}
}{\detokenize{#2}}
\IfTranslationExists{#3}{
\\ {\color{dark1} \GT{#3}}
\\ {\color{fg1} \GT{#3}}
}{}
\end{minipage}
}
@ -51,7 +57,7 @@
\smartnewline
\noindent
\begingroup
\color{dark1}
\color{fg1}
\GT{\ContentFqName}
% \edef\temp{\GT{#1_defs}}
% \expandafter\StrSubstitute\expandafter{\temp}{:}{\\}
@ -90,7 +96,7 @@
\newcommand{\eq}[1]{
\newFormulaEntry
\begin{align}
\label{eq:\fqname:#1}
% \label{eq:\fqname:#1}
##1
\end{align}
}
@ -175,17 +181,79 @@
\begingroup
\label{f:\fqname:#1}
\storeLabel{\fqname:#1}
\par\noindent\ignorespaces
% \textcolor{gray}{\hrule}
\vspace{0.5\baselineskip}
% \vspace{0.5\baselineskip}
\NameWithDescription[\descwidth]{\fqname:#1}{\fqname:#1_desc}
\hfill
\begin{ContentBoxWithExplanation}{\fqname:#1_defs}
}{
\end{ContentBoxWithExplanation}
\endgroup
\textcolor{dark3}{\hrule}
\vspace{0.5\baselineskip}
\separateEntries
% \textcolor{fg3}{\hrule}
% \vspace{0.5\baselineskip}
\ignorespacesafterend
}
% BIG FORMULA
\newenvironment{bigformula}[1]{
% [1]: language
% 2: name
% 3: description
% 4: definitions/links
\newcommand{\desc}[4][english]{
% language, name, description, definitions
\ifblank{##2}{}{\dt[#1]{##1}{##2}}
\ifblank{##3}{}{\dt[#1_desc]{##1}{##3}}
\ifblank{##4}{}{\dt[#1_defs]{##1}{##4}}
}
\directlua{n_formulaEntries = 0}
\newcommand{\newFormulaEntry}{
\directlua{
if n_formulaEntries > 0 then
tex.print("\\vspace{0.3\\baselineskip}\\hrule\\vspace{0.3\\baselineskip}")
end
n_formulaEntries = n_formulaEntries + 1
}
% \par\noindent\ignorespaces
}
% 1: equation for align environment
\edef\tmpFormulaName{#1}
\par\noindent
\begin{minipage}{\textwidth} % using a minipage to now allow line breaks within the bigformula
\label{f:\fqname:#1}
\par\noindent\ignorespaces
% \textcolor{gray}{\hrule}
% \vspace{0.5\baselineskip}
\IfTranslationExists{\fqname:#1}{%
\raggedright
\GT{\fqname:#1}
}{\detokenize{#1}}
\IfTranslationExists{\fqname:#1_desc}{
: {\color{fg1} \GT{\fqname:#1_desc}}
}{}
\hfill
\par
}{
\edef\tmpContentDefs{\fqname:\tmpFormulaName_defs}
\IfTranslationExists{\tmpContentDefs}{%
\smartnewline
\noindent
\begingroup
\color{fg1}
\GT{\tmpContentDefs}
% \edef\temp{\GT{#1_defs}}
% \expandafter\StrSubstitute\expandafter{\temp}{:}{\\}
\endgroup
}{}
\end{minipage}
\separateEntries
% \textcolor{fg3}{\hrule}
% \vspace{0.5\baselineskip}
\ignorespacesafterend
}
%
@ -308,7 +376,8 @@
pmf = "f:math:pt:pmf",
cdf = "f:math:pt:cdf",
mean = "f:math:pt:mean",
variance = "f:math:pt:variance"
variance = "f:math:pt:variance",
median = "f:math:pt:median",
}
if cases["\luaescapestring{##1}"] \string~= nil then
tex.sprint("\\hyperref["..cases["\luaescapestring{##1}"].."]{\\GT{##1}}")
@ -341,6 +410,7 @@
\edef\tmpMinipagetableWidth{#1}
\edef\tmpMinipagetableName{#2}
\directlua{
table_name = "\luaescapestring{#2}"
entries = {}
}
@ -357,6 +427,8 @@
}
}{
% \hfill
% reset the fqname
\edef\fqname{\tmpFqname}
\begin{minipage}{\tmpMinipagetableWidth}
\begingroup
\setlength{\tabcolsep}{0.9em} % horizontal
@ -365,12 +437,11 @@
\hline
\directlua{
for _, k in ipairs(entries) do
tex.print("\\GT{" .. k .. "} & \\gt{\tmpMinipagetableName:" .. k .. "}\\\\")
tex.print("\\GT{" .. k .. "} & \\gt{"..table_name..":"..k .."}\\\\")
end
}
\hline
\end{tabularx}
\endgroup
\end{minipage}
% reset the fqname
}

View File

@ -1,28 +1,67 @@
\newcommand\smartnewline[1]{\ifhmode\\\fi} % newline only if there in horizontal mode
\def\gooditem{\item[{$\color{neutral_red}\bullet$}]}
\def\baditem{\item[{$\color{neutral_green}\bullet$}]}
\def\gooditem{\item[{$\color{fg-red}\bullet$}]}
\def\baditem{\item[{$\color{fg-green}\bullet$}]}
% Functions with (optional) paranthesis
% 1: The function (like \exp, \sin etc.)
% 2: The argument (optional)
% If an argument is provided, it is wrapped in paranthesis.
\newcommand\CmdWithParenthesis[2]{
\ifstrequal{#2}{\relax}{
#1
}{
#1\left(#2\right)
}
}
\newcommand\CmdInParenthesis[2]{
\ifstrequal{#2}{\relax}{
#1
}{
\left(#1 #2\right)
}
}
% COMMON SYMBOLS WITH SUPER/SUBSCRIPTS, VECTOR ARROWS ETC.
% \def\laplace{\Delta} % Laplace operator
\def\laplace{\bigtriangleup} % Laplace operator
\def\Grad{\vec{\nabla}}
\def\Div{\vec{\nabla} \cdot}
\def\Rot{\vec{\nabla} \times}
% symbols
\def\Grad{\vec{\nabla}}
\def\Div {\vec{\nabla} \cdot}
\def\Rot {\vec{\nabla} \times}
% symbols with parens
\newcommand\GradS[1][\relax]{\CmdInParenthesis{\Grad}{#1}}
\newcommand\DivS [1][\relax]{\CmdInParenthesis{\Div} {#1}}
\newcommand\RotS [1][\relax]{\CmdInParenthesis{\Rot} {#1}}
% text with parens
\newcommand\GradT[1][\relax]{\CmdWithParenthesis{\text{grad}\,}{#1}}
\newcommand\DivT[1][\relax] {\CmdWithParenthesis{\text{div}\,} {#1}}
\newcommand\RotT[1][\relax] {\CmdWithParenthesis{\text{rot}\,} {#1}}
\def\vecr{\vec{r}}
\def\vecR{\vec{R}}
\def\veck{\vec{k}}
\def\vecx{\vec{x}}
\def\kB{k_\text{B}} % boltzmann
\def\NA{N_\text{A}} % avogadro
\def\EFermi{E_\text{F}}
\def\Evalence{E_\text{v}}
\def\Econd{E_\text{c}}
\def\Egap{E_\text{gap}}
\def\masse{m_\textrm{e}}
\def\Four{\mathcal{F}} % Fourier transform
\def\kB{k_\text{B}} % boltzmann
\def\NA{N_\text{A}} % avogadro
\def\EFermi{E_\text{F}} % fermi energy
\def\Efermi{E_\text{F}} % fermi energy
\def\Evalence{E_\text{v}} % val vand energy
\def\Econd{E_\text{c}} % cond. band nergy
\def\Egap{E_\text{gap}} % band gap energy
\def\Evac{E_\text{vac}} % vacuum energy
\def\masse{m_\text{e}} % electron mass
\def\Four{\mathcal{F}} % Fourier transform
\def\Lebesgue{\mathcal{L}} % Lebesgue
\def\O{\mathcal{O}}
\def\PhiB{\Phi_\text{B}}
\def\PhiE{\Phi_\text{E}}
\def\O{\mathcal{O}} % order
\def\PhiB{\Phi_\text{B}} % mag. flux
\def\PhiE{\Phi_\text{E}} % electric flux
\def\nreal{n^{\prime}} % refraction real part
\def\ncomplex{n^{\prime\prime}} % refraction index complex part
\def\I{i} % complex unit
\def\crit{\text{crit}} % crit (for subscripts)
\def\muecp{\overline{\mu}} % electrochemical potential
\def\pH{\text{pH}} % pH
\def\rfactor{\text{rf}} % rf roughness_factor
% SYMBOLS
@ -87,8 +126,6 @@
\def\txx{\text{x}}
\def\txy{\text{y}}
\def\txz{\text{z}}
% complex, may be changed later to idot or upright...
\def\I{i}
% SPACES
\def\sdots{\,\dots\,}
@ -104,16 +141,18 @@
\newcommand{\explOverEq}[2][=]{%
\overset{\substack{\mathrlap{\text{\hspace{-1em}#2}}\\\downarrow}}{#1}}
\newcommand{\eqnote}[1]{
\text{\color{dark2}#1}
\text{\color{fg2}#1}
}
% DELIMITERS
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
% not using DeclarePairedDelmiter to always get scaling
\newcommand{\abs}[1]{\left\lvert #1 \right\rvert}
\newcommand{\floor}[1]{\left\lfloor#1\right\rfloor}
\newcommand{\ceil}[1]{\left\lceil#1\right\rceil}
% OPERATORS
% * places subset under the word instead of next to it
\DeclareMathOperator{\e}{e}
\def\T{\text{T}} % transposed
\DeclareMathOperator{\sgn}{sgn}
@ -122,6 +161,12 @@
\DeclareMathOperator{\erf}{erf}
\DeclareMathOperator{\erfc}{erfc}
\DeclareMathOperator{\cov}{cov}
\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator*{\argmax}{arg\,max}
% \DeclareMathOperator{\div}{div}
% \DeclareMathOperator{\grad}{grad}
% \DeclareMathOperator{\rot}{rot}
% \DeclareMathOperator{\arcsin}{arcsin}
% \DeclareMathOperator{\arccos}{arccos}
% \DeclareMathOperator{\arctan}{arctan}
@ -135,22 +180,22 @@
\renewcommand*\d{\mathop{}\!\mathrm{d}}
% times 10^{x}
\newcommand\xE[1]{\cdot 10^{#1}}
% functions with paranthesis
\newcommand\CmdWithParenthesis[2]{
#1\left(#2\right)
}
\newcommand\Exp[1]{\CmdWithParenthesis{\exp}{#1}}
\newcommand\Sin[1]{\CmdWithParenthesis{\sin}{#1}}
\newcommand\Cos[1]{\CmdWithParenthesis{\cos}{#1}}
\newcommand\Ln[1]{\CmdWithParenthesis{\ln}{#1}}
\newcommand\Log[1]{\CmdWithParenthesis{\log}{#1}}
\newcommand\Order[1]{\CmdWithParenthesis{\mathcal{O}}{#1}}
% VECTOR AND MATRIX
% VECTOR, MATRIX and TENSOR
% use vecA to force an arrow
\NewCommandCopy{\vecA}{\vec}
% extra {} assure they can b directly used after _
%% arrow/underline
\newcommand\mat[1]{{\ensuremath{\underline{#1}}}}
\renewcommand\vec[1]{{\ensuremath{\vecA{#1}}}}
\newcommand\ten[1]{{\ensuremath{[#1]}}}
\newcommand\complex[1]{{\ensuremath{\tilde{#1}}}}
%% bold
% \newcommand\mat[1]{{\ensuremath{\bm{#1}}}}
% \renewcommand\vec[1]{{\ensuremath{\bm{#1}}}}

View File

@ -76,7 +76,7 @@
}
\end{ContentBoxWithExplanation}
\endgroup
\textcolor{dark3}{\hrule}
\textcolor{fg3}{\hrule}
\vspace{0.5\baselineskip}
\ignorespacesafterend
}
@ -93,22 +93,22 @@
% PERIODIC TABLE
\directlua{
category2color = {
metal = "neutral_blue",
metalloid = "bright_orange",
transitionmetal = "bright_blue",
lanthanoide = "neutral_orange",
alkalimetal = "bright_red",
alkalineearthmetal = "bright_purple",
nonmetal = "bright_aqua",
halogen = "bright_yellow",
noblegas = "neutral_purple"
metal = "bg-blue!50!bg0",
metalloid = "fg-orange!50!bg0",
transitionmetal = "fg-blue!50!bg0",
lanthanoide = "bg-orange!50!bg0",
alkalimetal = "fg-red!50!bg0",
alkalineearthmetal = "fg-purple!50!bg0",
nonmetal = "fg-aqua!50!bg0",
halogen = "fg-yellow!50!bg0",
noblegas = "bg-purple!50!bg0"
}
}
\directlua{
function getColor(cat)
local color = category2color[cat]
if color == nil then
return "light3"
return "bg3"
else
return color
end
@ -138,7 +138,7 @@
end
end
}
\draw[ultra thick,faded_purple] (4,-6) -- (4,-11);
\draw[ultra thick,fg-purple] (4,-6) -- (4,-11);
% color legend for categories
\directlua{
local x0 = 4

105
src/util/tikz_macros.tex Normal file
View File

@ -0,0 +1,105 @@
\tikzset{
% bands
sc band con/.style={ draw=fg0, thick},
sc band val/.style={ draw=fg0, thick},
sc band vac/.style={ draw=fg1, thick},
sc band/.style={ draw=fg0, thick},
sc fermi level/.style={draw=fg-aqua,dashed,thick},
% electron filled
sc occupied/.style={
pattern=north east lines,
pattern color=fg-aqua,
draw=none
},
% materials
sc p type/.style={ draw=none,fill=bg-yellow!20},
sc n type/.style={ draw=none,fill=bg-blue!20},
sc metal/.style={ draw=none,fill=bg-purple!20},
sc oxide/.style={ draw=none,fill=bg-green!20},
sc separate/.style={ draw=fg0,dotted},
}
\newcommand\drawDArrow[4]{
\draw[<->] (#1,#2) -- (#1,#3) node[midway,right] () {#4};
}
% Band bending down at L-R interface: BendH must be negative
% need two functions for different out= angles, or use if else on the sign of BendH
\newcommand\leftBandAuto[2]{
\directlua{
if \tkLBendH == 0 then
tex.print([[(\tkLx,#2) \ifblank{#1}{}{node[anchor=east] \detokenize{{#1}}} -- (\tkLW,#2) ]])
else
if \tkLBendH > 0 then
angle = 180+45
else
angle = 180-45
end
tex.sprint([[(\tkLx,#2) \ifblank{#1}{}{node[anchor=east] \detokenize{{#1}}}
-- (\tkLW-\tkLBendW,#2) to[out=0,in=]], angle, [[](\tkLW,#2+\tkLBendH)]])
end
}
% % \ifthenelse{\equal{\tkLBendH}{0}}%
% % {%
% \ifthenelse{\tkLBendH > 0}%
% {\pgfmathsetmacro{\angle}{-45}}%
% {\pgfmathsetmacro{\angle}{45}}%
% % }
}
\newcommand\rightBandAuto[2]{
\directlua{
if \tkRBendH == 0 then
%-- tex.print([[\rightBand{#1}{#2}]])
tex.print([[(\tkRx,#2) -- (\tkW,#2)]]) %-- \ifblank{#1}{}{node[anchor=west] \{#1\}}]])
else
if \tkRBendH > 0 then
angle = -45
else
angle = 45
end
tex.sprint([[(\tkRx,#2+\tkRBendH) to[out=]], angle, [[,in=180] (\tkRx+\tkRBendW,#2) -- (\tkW,#2) ]])
%-- \ifblank{#1}{}{node[anchor=west] \{#1\}} ]])
end
if "\luaescapestring{#1}" \string~= "" then
tex.print([[node[anchor=west] \detokenize{{#1}} ]])
end
}
% \ifthenelse{\equal{\tkRBendH}{0}}%
% {\rightBand{#1}{#2}}
% {%
% \ifthenelse{\tkRBendH > 0}%
% {\pgfmathsetmacro{\angle}{-45}}%
% {\pgfmathsetmacro{\angle}{45}}%
% (\tkRx,#2+\tkRBendH) to[out=45,in=180] (\tkRx+\tkRBendW,#2) -- (\tkW,#2)
% \ifblank{#1}{}{node[anchor=west]{#1}}
% }
}
\newcommand\leftBandDown[2]{
(\tkRx,#2+\tkRBendH) to[out=45,in=180] (\tkRx+\tkRBendW,#2) -- (\tkW,#2)
\ifblank{#1}{}{node[anchor=west]{#1}}
}
\newcommand\rightBandDown[2]{
(\tkRx,#2+\tkRBendH) to[out=45,in=180] (\tkRx+\tkRBendW,#2) -- (\tkW,#2)
\ifblank{#1}{}{node[anchor=west]{#1}}
}
% Band bending down at L-R interface: BendH must be positive
\newcommand\leftBandUp[2]{
(\tkLx,#2) \ifblank{#1}{}{node[anchor=east]{#1}}
-- (\tkLW-\tkLBendW,#2) to[out=0,in=180+45] (\tkLW,#2+\tkLBendH)
}
\newcommand\rightBandUp[2]{
(\tkRx,#2+\tkRBendH) to[out=-45,in=180] (\tkRx+\tkRBendW,#2) -- (\tkW,#2)
\ifblank{#1}{}{node[anchor=west]{#1}}
}
% Straight band
\newcommand\leftBand[2]{
(\tkLx,#2) \ifblank{#1}{}{node[anchor=east]{#1}} -- (\tkLW,#2)
}
\newcommand\rightBand[2]{
(\tkRx,#2) -- (\tkW,#2) \ifblank{#1}{}{node[anchor=west]{#1}}
}
\newcommand\drawAxes{
\draw[->] (0,0) -- (\tkW+0.2,0) node[anchor=north] {$x$};
\draw[->] (0,0) -- (0,\tkH+0.2) node[anchor=east] {$E$};
}

View File

@ -26,11 +26,18 @@
% \expandafter\IfTranslationExists\expandafter{\fqname:#1}
}
\newcommand{\gt}[1]{%
\iftranslation{#1}{%
\newrobustcmd{\robustGt}[1]{%
\IfTranslationExists{\fqname:#1}{%
\expandafter\GetTranslation\expandafter{\fqname:#1}%
}{%
\detokenize{\fqname}:\detokenize{#1}%
\printFqName:\detokenize{#1}%
}%
}
\newcommand{\gt}[1]{%
\IfTranslationExists{\fqname:#1}{%
\expandafter\GetTranslation\expandafter{\fqname:#1}%
}{%
\printFqName:\detokenize{#1}%
}%
}
\newrobustcmd{\GT}[1]{%\expandafter\GetTranslation\expandafter{#1}}
@ -40,6 +47,9 @@
\detokenize{#1}%
}%
}
% text variants for use in math mode
\newcommand{\tgt}[1]{\text{\gt{#1}}}
\newcommand{\tGT}[1]{\text{\GT{#1}}}
% Define a translation and also make the fallback if it is the english translation
% 1: lang, 2: key, 3: translation

View File

@ -25,6 +25,16 @@
\Eng[diamond]{Diamond}
\Ger[diamond]{Diamant}
\Eng[metal]{Metal}
\Ger[metal]{Metall}
\Eng[semiconductor]{Semiconductor}
\Ger[semiconductor]{Halbleiter}
\Eng[creation_annihilation_ops]{Creation / Annihilation operators}
\Ger[creation_annihilation_ops]{Erzeugungs / Vernichtungs-Operatoren}
% FORMATING
\Eng[list_of_quantitites]{List of quantitites}
\Ger[list_of_quantitites]{Liste von Größen}
@ -32,6 +42,9 @@
\Eng[other]{Others}
\Ger[other]{Sonstige}
\Eng[sometimes]{sometimes}
\Ger[sometimes]{manchmal}
\Eng[see_also]{See also}
\Ger[see_also]{Siehe auch}