Compare commits

..

9 Commits

Author SHA1 Message Date
921d2b099a refactor with own translation package 2025-02-17 02:16:22 +01:00
3e172175a7 add cmp 2025-02-15 16:01:05 +01:00
562899ed0a add colors 2025-02-02 22:59:33 +01:00
c12067684a Improve readme 2025-01-12 14:20:02 +01:00
a333c7a5fb Refactor formula 2025-01-10 09:59:07 +01:00
7745922b1f add periodic table 2025-01-02 18:12:26 +01:00
82556282f3 qtys, constants 2024-12-23 09:26:53 +01:00
2c2da27752 fixes 2024-11-30 16:50:47 +01:00
02c1d40bc9 work 2024-11-16 16:25:57 +01:00
95 changed files with 44424 additions and 2720 deletions

44
Makefile Normal file
View File

@ -0,0 +1,44 @@
# Makefile for lualatex
# Paths and filenames
SRC_DIR = src
OUT_DIR = out
MAIN_TEX = main.tex # in SRC_DIR
MAIN_PDF = main.pdf # in OUT_DIR
# LaTeX and Biber commands
LATEX = lualatex
BIBER = biber
LATEX_OPTS := -output-directory=$(OUT_DIR) -interaction=nonstopmode -shell-escape
.PHONY: default release clean scripts
default: english
release: german english
# Default target
english:
sed -r -i 's/usepackage\[[^]]+\]\{babel\}/usepackage[english]{babel}/' $(SRC_DIR)/$(MAIN_TEX)
-cd $(SRC_DIR) && latexmk -lualatex -g main.tex
mv $(OUT_DIR)/$(MAIN_PDF) $(OUT_DIR)/$(shell date -I)_en_Formulary.pdf
german:
sed -r -i 's/usepackage\[[^]]+\]\{babel\}/usepackage[german]{babel}/' $(SRC_DIR)/$(MAIN_TEX)
-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)
# Phony targets
.PHONY: all clean biber

113
readme.md Normal file
View File

@ -0,0 +1,113 @@
# Formulary
This is supposed to be a compact, searchable collection of the most important stuff I learned during my physics studides,
because it would be a shame if I forget it all!
## Building the PDF
### Dependencies
Any recent **TeX Live** distribution should work. You need:
- `LuaLaTeX` compiler
- several packages from ICAN
- `latexmk` to build it
### With GNU make
1. In the project directory (where this `readme` is), run `make german` or `make english`.
2. Rendered document will be `out/<date>_<formulary>.pdf`
### With Latexmk
1. Choose the language: In `main.tex`, set the language in `\usepackage[english]{babel}` to either `english` or `german`
2. In the `src` directory, run `latexmk -lualatex main.tex`
3. Rendered document will be `out/main.pdf`
### With LuaLatex
1. Choose the language: In `main.tex`, set the language in `\usepackage[english]{babel}` to either `english` or `german`
2. Create the `.aux` directory
3. In the `src` directory, run
- `lualatex -output-directory="../.aux" --interaction=nonstopmode --shell-escape "main.tex"` **3 times**
4. Rendered document will be `.aux/main.pdf`
# LaTeX Guideline
Here is some info to help myself remember why I did things the way I did.
In general, most content should be written with macros, so that the behaviour can be changed later.
## Structure
All translation keys and LaTeX labels should use a structured approach:
`<key type>:<partname>:<section name>:<subsection name>:<...>:<name>`
The `<partname>:...:<lowest section name>` will be defined as `\fqname` (fully qualified name) when using the `\Part`, `\Section`, ... commands.
`<key type>` is:
- formula: `f`
- equation: `eq`
- table: `tab`
- 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
subdirectory named `<partname>` containing `<partname>.tex` and other source files for sections.
This way, the `fqname` of a section or formula partially matches the path of the source file it is in.
## `formula` environment
The main way to display something is the formula environment:
```tex
\begin{formula}{<key>}
\desc{English name}{English description}{$q$ is some variable, $s$ \qtyRef{some_quantity}}
\desc[german]{Deutscher Name}{Deutsche Beschreibung}{$q$ ist eine Variable, $s$ \qtyRef{some_quantity}}
<content>
\end{formula}
```
Each formula automatically gets a `f:<section names...>:<key>` label.
For the content, several macros are available:
- `\eq{<equation>}` a wrapper for the `align` environment
- `\fig[width]{<path>}`
- `\quantity{<symbol>}{<units>}{<vector, scalar, extensive etc.>}` for physical quantites
- `\constant{<symbol>}{ <values> }` for constants, where `<values>` may contain one or more `\val{value}{unit}` commands.
### References
**Use references where ever possible.**
In equations, reference or explain every variable. Several referencing commands are available for easy referencing:
- `\fqSecRef{<fqname of section>}` prints the translated title of the section
- `\fqEqRef{<fqname of formula>}` prints the translated title of the formula (first argument of `\desc`)
- `\qtyRef{<key>}` prints the translated name of the quantity
- `\QtyRef{<key>}` prints the symbol and the translated name of the quantity
- `\constRef{<key>}` prints the translated name of the constant
- `\ConstRef{<key>}` prints the symbol and the translated name of the constant
- `\elRef{<symbol>}` prints the symbol of the chemical element
- `\ElRef{<symbol>}` prints the name of the chemical element
## Multilanguage
All text should be defined as a translation (`translations` package, see `util/translation.tex`).
Use `\dt` or `\DT` or the the shorthand language commands `\eng`, `\Eng` etc. to define translations.
These commands also be write the translations to an auxiliary file, which is read after the document begins.
This means (on subsequent compilations) that the translation can be resolved before they are defined.
Use the `gt` or `GT` macros to retrieve translations.
The english translation of any key must be defined, because it will also be used as fallback.
Lower case macros are relative to the current `fqname`, while upper case macros are absolute.
Never make a macro that would have to be changed if a new language was added, eg dont do
```tex
% 1: key, 2: english version, 3: german version
\newcommand{\mycmd}[3]{
\dosomestuff{english}{#1}{#2}
\dosomestuff{german}{#1}{#3}
}
\mycmd{key}{this is english}{das ist deutsch}
```
Instead, do
```tex
% [1]: lang, 2: key, 2: text
\newcommand{\mycmd}[3][english]{
\dosomestuff{#1}{#2}{#3}
}
\mycmd{key}{this is english}
\mycmd[german]{key}{das ist deutsch}
```

80
scripts/ch_elchem.py Normal file
View File

@ -0,0 +1,80 @@
#!/usr/bin env python3
from formulary import *
from scipy.constants import gas_constant, Avogadro, elementary_charge
Faraday = Avogadro * elementary_charge
@np.vectorize
def fbutler_volmer_anode(ac, z, eta, T):
return np.exp((1-ac)*z*Faraday*eta/(gas_constant*T))
@np.vectorize
def fbutler_volmer_cathode(ac, z, eta, T):
return -np.exp(-ac*z*Faraday*eta/(gas_constant*T))
def fbutler_volmer(ac, z, eta, T):
return fbutler_volmer_anode(ac, z, eta, T) + fbutler_volmer_cathode(ac, z, eta, T)
def butler_volmer():
fig, ax = plt.subplots(figsize=size_half_third)
ax.set_xlabel("$\\eta$ [V]")
ax.set_ylabel("$j/j_0$")
etas = np.linspace(-0.1, 0.1, 400)
T = 300
z = 1.0
# other a
ac2, ac3 = 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_\\text{{C}}={ac2}$")
ax.plot(etas, i3, color="green", linestyle="dashed", label=f"$\\alpha_\\text{{C}}={ac3}$")
# 0.5
ac = 0.5
irel_anode = fbutler_volmer_anode(ac, z, etas, T)
irel_cathode = fbutler_volmer_cathode(ac, z, etas, T)
ax.plot(etas, irel_anode, color="gray")
ax.plot(etas, irel_cathode, color="gray")
ax.plot(etas, irel_cathode + irel_anode, color="black", label=f"$\\alpha_\\text{{C}}=0.5$")
ax.grid()
ax.legend()
ylim = 6
ax.set_ylim(-ylim, ylim)
return fig
@np.vectorize
def ftafel_anode(ac, z, eta, T):
return 10**((1-ac)*z*Faraday*eta/(gas_constant*T*np.log(10)))
@np.vectorize
def ftafel_cathode(ac, z, eta, T):
return -10**(-ac*z*Faraday*eta/(gas_constant*T*np.log(10)))
def tafel():
i0 = 1
ac = 0.2
z = 1
T = 300
eta_max = 0.2
etas = np.linspace(-eta_max, eta_max, 400)
i = np.abs(fbutler_volmer(ac, z, etas ,T))
iright = i0 * np.abs(ftafel_cathode(ac, z, etas, T))
ileft = i0 * ftafel_anode(ac, z, etas, T)
fig, ax = plt.subplots(figsize=size_half_third)
ax.set_xlabel("$\\eta$ [V]")
ax.set_ylabel("$\\log_{10}\\left(\\frac{|j|}{j_0}\\right)$")
# ax.set_ylabel("$\\log_{10}\\left(|j|/j_0\\right)$")
ax.set_yscale("log")
# ax.plot(etas, linear, label="Tafel slope")
ax.plot(etas[etas >= 0], ileft[etas >= 0], linestyle="dashed", color="gray", label="Tafel Approximation")
ax.plot(etas[etas <= 0], iright[etas <= 0], linestyle="dashed", color="gray")
ax.plot(etas, i, label=f"Butler-Volmer $\\alpha_\\text{{C}}={ac:.1f}$")
ax.legend()
ax.grid()
return fig
if __name__ == '__main__':
export(butler_volmer(), "ch_butler_volmer")
export(tafel(), "ch_tafel")

64
scripts/cm_phonons.py Normal file
View File

@ -0,0 +1,64 @@
#!/usr/bin env python3
from formulary 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")

View File

@ -1,5 +1,6 @@
from numpy import fmax from numpy import fmax
from plot import * from formulary import *
import itertools
def get_fig(): def get_fig():
@ -22,7 +23,6 @@ def gauss():
ax.plot(x, y, label=label) ax.plot(x, y, label=label)
ax.legend() ax.legend()
return fig return fig
export(gauss(), "distribution_gauss")
# CAUCHY / LORENTZ # CAUCHY / LORENTZ
def fcauchy(x, x_0, gamma): def fcauchy(x, x_0, gamma):
@ -37,7 +37,6 @@ def cauchy():
ax.plot(x, y, label=label) ax.plot(x, y, label=label)
ax.legend() ax.legend()
return fig return fig
export(cauchy(), "distribution_cauchy")
# MAXWELL-BOLTZMANN # MAXWELL-BOLTZMANN
def fmaxwell(x, a): def fmaxwell(x, a):
@ -53,7 +52,37 @@ def maxwell():
ax.legend() ax.legend()
return fig 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 # POISSON
@ -73,8 +102,6 @@ def poisson():
ax.legend() ax.legend()
return fig return fig
export(poisson(), "distribution_poisson")
# BINOMIAL # BINOMIAL
def binom(n, k): def binom(n, k):
return scp.special.factorial(n) / ( return scp.special.factorial(n) / (
@ -98,9 +125,17 @@ def binomial():
ax.legend() ax.legend()
return fig 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 # FERMI-DIRAC
# BOSE-EINSTEIN # BOSE-EINSTEIN
# see stat-mech

81
scripts/formulary.py Normal file
View File

@ -0,0 +1,81 @@
#!/usr/bin env python3
import os
import matplotlib.pyplot as plt
import numpy as np
import math
import scipy as scp
import matplotlib as mpl
mpl.rcParams["font.family"] = "serif"
mpl.rcParams["mathtext.fontset"] = "stix"
mpl.rcParams["text.usetex"] = True
mpl.rcParams['text.latex.preamble'] = r'\usepackage{amsmath}\usepackage{siunitx}'
if __name__ == "__main__": # make relative imports work as described here: https://peps.python.org/pep-0366/#proposed-change
if __package__ is None:
__package__ = "formulary"
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
from util.gen_tex_colorscheme import generate_latex_colorscheme
# SET THE COLORSCHEME
# hard white and black
# cs.p_gruvbox["fg0"] = "#000000"
# cs.p_gruvbox["bg0"] = "#ffffff"
# COLORSCHEME = cs.gruvbox_light()
# COLORSCHEME = cs.gruvbox_dark()
# cs.p_tum["fg0"] = cs.p_tum["alt-blue"]
COLORSCHEME = cs.tum()
# COLORSCHEME = cs.legacy()
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, tight_layout=True):
assert_directory()
filename = os.path.join(img_out_dir, name + filetype)
if tight_layout:
fig.tight_layout()
fig.savefig(filename, bbox_inches="tight", pad_inches=0.0)
@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/formulary.py\n% Do not edit it directly, changes will be overwritten\n""" + 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

File diff suppressed because it is too large Load Diff

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

28402
scripts/other/elements.json Normal file

File diff suppressed because it is too large Load Diff

79
scripts/periodic_table.py Normal file
View File

@ -0,0 +1,79 @@
#!/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 2025
"""
import json
import os
import re
outdir = "../src/ch"
def gen_periodic_table():
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"
for i, el_key in enumerate(ptab):
el = ptab[el_key]
def get(*keys):
"""get keys or return empty string"""
val = el
for key in keys:
if not key in val: return ""
val = val[key]
return val
# print(i, el)
el_s = f"\\begin{{element}}{{{el['symbol']}}}{{{el['number']}}}{{{el['period']}}}{{{el['column']}}}"
# description
el_s += f"\n\t\\desc[english]{{{el['names']['en']}}}{{{get('appearance', 'en')}}}{{}}"
el_s += f"\n\t\\desc[german]{{{el['names']['de']}}}{{English: {get('names', 'en')}\\\\{get('appearance', 'de')}}}{{}}"
# simple properties
for field in ["crystal_structure", "set", "magnetic_ordering"]:
if field in el:
el_s += f"\n\t\\property{{{field}}}{{{el[field]}}}"
# mass
m = get("atomic_mass", "value")
if m:
assert(get("atomic_mass", "unit") == "u")
el_s += f"\n\t\\property{{{'atomic_mass'}}}{{{m}}}"
# refractive indices
temp = ""
add_refractive_index = lambda idx: f"\\GT{{{idx['label']}}}: ${idx['value']}$, "
idxs = get("optical", "refractive_index")
# print(idxs)
if type(idxs) == list:
for idx in idxs: add_refractive_index(idx)
elif type(idxs) == dict: add_refractive_index(idxs)
elif type(idxs) == float: temp += f"${idxs}$, "
if temp:
el_s += f"\n\t\\property{{{'refractive_index'}}}{{{temp[:-2]}}}"
# electron configuration
match = re.fullmatch(r"([A-Z][a-z]*)? ?(.+?)", el["electron_config"])
if match:
el_s += f"\n\t\\property{{{'electron_config'}}}{{"
if match.groups()[0]:
el_s += f"\\elRef{{{match.groups()[0]}}} "
el_s += f"{match.groups()[1]}}}"
el_s += "\n\\end{element}"
# print(el_s)
s += el_s + "\n"
# print(s)
return s
if __name__ == "__main__":
ptable = gen_periodic_table()
assert os.path.abspath(".").endswith("scripts"), "Please run from the `scripts` directory"
with open(f"{outdir}/periodic_table.tex", "w") as file:
file.write(ptable)

View File

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

16
scripts/readme.md Normal file
View File

@ -0,0 +1,16 @@
# Scripts
Put all scripts that generate plots or tex files here.
You can run all files at once using `make scripts`
## Plots
For plots with `matplotlib`:
1. import `formulary.py`
2. use one of the preset figsizes
3. save the image using the `export` function in the `if __name__ == '__main__'` part
## Colorscheme
To ensure a uniform look of the tex source and the python plots,
the tex and matplotlib colorschemes are both handled in `formulary.py`.
Set the `COLORSCHEME` variable to the desired colors.
Importing `formulary.py` will automatically apply the colors to matplotlib,
and running it will generate `util/colorscheme.tex` for LaTeX.

View File

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

View File

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

View File

@ -0,0 +1,10 @@
def color_latex_def(name, color):
# name = name.replace("-", "_")
color = color.strip("#")
return "\\definecolor{" + name + "}{HTML}{" + color + "}"
def generate_latex_colorscheme(palette):
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}"]

31
src/.latexmkrc Normal file
View File

@ -0,0 +1,31 @@
# Specify the auxiliary and output directories
$aux_dir = '../.aux';
$out_dir = '../out';
# Set lualatex as the default engine
$pdf_mode = 1; # Enable PDF generation mode
# $pdflatex = 'lualatex --interaction=nonstopmode --shell-escape'
$lualatex = 'lualatex %O --interaction=nonstopmode --shell-escape %S'
# Additional options for compilation
# '-verbose',
# '-file-line-error',
# Quickfix-like filtering (warnings to ignore)
# @warnings_to_filter = (
# qr/Underfull \\hbox/,
# qr/Overfull \\hbox/,
# qr/LaTeX Warning: .+ float specifier changed to/,
# qr/LaTeX hooks Warning/,
# qr/Package siunitx Warning: Detected the "physics" package:/,
# qr/Package hyperref Warning: Token not allowed in a PDF string/
# );
# # Filter function for warnings
# sub filter_warnings {
# my $warning = shift;
# foreach my $filter (@warnings_to_filter) {
# return 0 if $warning =~ $filter;
# }
# return 1;
# }

View File

@ -1,125 +0,0 @@
\Part[
\eng{Calculus}
\ger{Analysis}
]{cal}
\Subsection[
\eng{Convolution}
\ger{Faltung / Konvolution}
]{conv}
\begin{ttext}
\eng{Convolution is \textbf{commutative}, \textbf{associative} and \textbf{distributive}.}
\ger{Die Faltung ist \textbf{kommutativ}, \textbf{assoziativ} und \textbf{distributiv}}
\end{ttext}
\begin{formula}{def}
\desc{Definition}{}{}
\desc[german]{Definition}{}{}
\eq{(f*g)(t) = f(t) * g(t) = int_{-\infty}^\infty f(\tau) g(t-\tau) \d \tau}
\end{formula}
\begin{formula}{notation}
\desc{Notation}{}{}
\desc[german]{Notation}{}{}
\eq{
f(t) * g(t-t_0) &= (f*g)(t-t_0) \\
f(t-t_0) * g(t-t_0) &= (f*g)(t-2t_0)
}
\end{formula}
\begin{formula}{commutativity}
\desc{Commutativity}{}{}
\desc[german]{Kommutativität}{}{}
\eq{f * g = g * f}
\end{formula}
\begin{formula}{associativity}
\desc{Associativity}{}{}
\desc[german]{Assoziativität]}{}{}
\eq{(f*g)*h = f*(g*h)}
\end{formula}
\begin{formula}{distributivity}
\desc{Distributivity}{}{}
\desc[german]{Distributivität}{}{}
\eq{f * (g + h) = f*g + f*h}
\end{formula}
\begin{formula}{complex_conjugate}
\desc{Complex conjugate}{}{}
\desc[german]{Komplexe konjugation}{}{}
\eq{(f*g)^* = f^* * g^*}
\end{formula}
\Subsection[
\eng{Fourier analysis}
\ger{Fourieranalyse}
]{fourier}
\Subsubsection[
\eng{Fourier series}
\ger{Fourierreihe}
]{series}
\begin{formula}{series}
\desc{Fourier series}{Complex representation}{$f\in \Lebesgue^2(\R,\C)$ $T$-\GT{periodic}}
\desc[german]{Fourierreihe}{Komplexe Darstellung}{}
\eq{f(t) = \sum_{k=-\infty}^{\infty} c_k \Exp{\frac{2\pi \I kt}{T}}}
\end{formula}
\Eng[real]{real}
\Ger[real]{reellwertig}
\begin{formula}{coefficient}
\desc{Fourier coefficients}{Complex representation}{}
\desc[german]{Fourierkoeffizienten}{Komplexe Darstellung}{}
\eq{
c_k &= \frac{1}{T} \int_{-\frac{T}{2}}^{\frac{T}{2}} f(t)\,\Exp{-\frac{2\pi \I}{T}kt}\d t \quad\text{\GT{for}}\,k\ge0\\
c_{-k} &= \overline{c_k} \quad \text{\GT{if} $f$ \GT{real}}
}
\end{formula}
\begin{formula}{series_sincos}
\desc{Fourier series}{Sine and cosine representation}{$f\in \Lebesgue^2(\R,\C)$ $T$-\GT{periodic}}
\desc[german]{Fourierreihe}{Sinus und Kosinus Darstellung}{}
\eq{f(t) = \frac{a_0}{2} + \sum_{k=1}^{\infty} \left(a_k \Cos{\frac{2\pi}{T}kt} + b_k\Sin{\frac{2\pi}{T}kt}\right)}
\end{formula}
\begin{formula}{coefficient}
\desc{Fourier coefficients}{Sine and cosine representation\\If $f$ has point symmetry: $a_{k>0}=0$, if $f$ has axial symmetry: $b_k=0$}{}
\desc[german]{Fourierkoeffizienten}{Sinus und Kosinus Darstellung\\Wenn $f$ punktsymmetrisch: $a_{k>0}=0$, wenn $f$ achsensymmetrisch: $b_k=0$}{}
\eq{
a_k &= \frac{2}{T} \int_{-\frac{T}{2}}^{\frac{T}{2}} f(t)\,\Cos{-\frac{2\pi}{T}kt}\d t \quad\text{\GT{for}}\,k\ge0\\
b_k &= \frac{2}{T} \int_{-\frac{T}{2}}^{\frac{T}{2}} f(t)\,\Sin{-\frac{2\pi}{T}kt}\d t \quad\text{\GT{for}}\,k\ge1\\
a_k &= c_k + c_{-k} \quad\text{\GT{for}}\,k\ge0\\
b_k &= \I(c_k - c_{-k}) \quad\text{\GT{for}}\,k\ge1
}
\end{formula}
\TODO{cleanup}
\Subsubsection[
\eng{Fourier transformation}
\ger{Fouriertransformation}
]{trafo}
\begin{formula}{transform}
\desc{Fourier transform}{}{$\hat{f}:\R^n \mapsto \C$, $\forall f\in L^1(\R^n)$}
\desc[german]{Fouriertransformierte}{}{}
\eq{\hat{f}(k) \coloneq \frac{1}{\sqrt{2\pi}^n} \int_{\R^n} \e^{-\I kx}f(x)\d x}
\end{formula}
\Eng[linear_in]{linear in}
\Ger[linear_in]{linear in}
\GT{for} $f\in L^1(\R^n)$:
\begin{enumerate}[i)]
\item $f \mapsto \hat{f}$ \GT{linear_in} $f$
\item $g(x) = f(x-h) \qRarrow \hat{g}(k) = \e^{-\I kn}\hat{f}(k)$
\item $g(x) = \e^{ih\cdot x}f(x) \qRarrow \hat{g}(k) = \hat{f}(k-h)$
\item $g(\lambda) = f\left(\frac{x}{\lambda}\right) \qRarrow \hat{g}(k)\lambda^n \hat{f}(\lambda k)$
\end{enumerate}
\Section[
\eng{List of common integrals}
\ger{Liste nützlicher Integrale}
]{integrals}
\begin{formula}{riemann_zeta}
\desc{Riemann Zeta Function}{}{}
\desc[german]{Riemannsche Zeta-Funktion}{}{}
\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}

View File

@ -1,55 +0,0 @@
\Part[
\eng{Analysis}
\ger{Analysis}
]{ana}
\Subsection[
\eng{Convolution}
\ger{Faltung / Konvolution}
]{conv}
\begin{ttext}
\eng{Convolution is \textbf{commutative}, \textbf{associative} and \textbf{distributive}.}
\ger{Die Faltung ist \textbf{kommutativ}, \textbf{assoziativ} und \textbf{distributiv}}
\end{ttext}
\begin{formula}{def}
\desc{Definition}{}{}
\desc[german]{Definition}{}{}
\eq{(f*g)(t) = f(t) * g(t) = int_{-\infty}^\infty f(\tau) g(t-\tau) \d \tau}
\end{formula}
\begin{formula}{notation}
\desc{Notation}{}{}
\desc[german]{Notation}{}{}
\eq{
f(t) * g(t-t_0) &= (f*g)(t-t_0) \\
f(t-t_0) * g(t-t_0) &= (f*g)(t-2t_0)
}
\end{formula}
\begin{formula}{commutativity}
\desc{Commutativity}{}{}
\desc[german]{Kommutativität}{}{}
\eq{f * g = g * f}
\end{formula}
\begin{formula}{associativity}
\desc{Associativity}{}{}
\desc[german]{Assoziativität]}{}{}
\eq{(f*g)*h = f*(g*h)}
\end{formula}
\begin{formula}{distributivity}
\desc{Distributivity}{}{}
\desc[german]{Distributivität}{}{}
\eq{f * (g + h) = f*g + f*h}
\end{formula}
\begin{formula}{complex_conjugate}
\desc{Complex conjugate}{}{}
\desc[german]{Komplexe konjugation}{}{}
\eq{(f*g)^* = f^* * g^*}
\end{formula}
\Subsection[
\eng{Fourier analysis}
\ger{Fourieranalyse}
]{fourier}

9
src/ch/ch.tex Normal file
View File

@ -0,0 +1,9 @@
\Part[
\eng{Chemistry}
\ger{Chemie}
]{ch}
\Section[
\eng{Periodic table}
\ger{Periodensystem}
]{ptable}
\drawPeriodicTable

583
src/ch/el.tex Normal file
View File

@ -0,0 +1,583 @@
\Section[
\eng{Electrochemistry}
\ger{Elektrochemie}
]{el}
\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}
\Subsection[
\eng{Electrochemical cell}
\ger{Elektrochemische Zelle}
]{cell}
\eng[galvanic]{galvanic}
\ger[galvanic]{galvanisch}
\eng[electrolytic]{electrolytic}
\ger[electrolytic]{electrolytisch}
\Eng[working_electrode]{Working electrode}
\Eng[counter_electrode]{Counter electrode}
\Eng[reference_electrode]{Reference electrode}
\Ger[working_electrode]{Working electrode}
\Ger[counter_electrode]{Gegenelektrode}
\Ger[reference_electrode]{Referenzelektrode}
\Eng[potentiostat]{Potentiostat}
\Ger[potentiostat]{Potentiostat}
\begin{formula}{schematic}
\desc{Schematic}{}{}
\desc[german]{Aufbau}{}{}
\begin{tikzpicture}[scale=1.0,transform shape]
\pgfmathsetmacro{\W}{6}
\pgfmathsetmacro{\H}{3}
\pgfmathsetmacro{\elW}{\W/20}
\pgfmathsetmacro{\CEx}{1/6*\W}
\pgfmathsetmacro{\WEx}{3/6*\W}
\pgfmathsetmacro{\REx}{5/6*\W}
\fill[bg-blue] (0,0) rectangle (\W, \H/2);
\draw[ultra thick] (0,0) rectangle (\W,\H);
% Electrodes
\draw[thick, fill=bg-gray] (\CEx-\elW,\H/5) rectangle (\CEx+\elW,\H);
\draw[thick, fill=bg-purple] (\WEx-\elW,\H/5) rectangle (\WEx+\elW,\H);
\draw[thick, fill=bg-yellow] (\REx-\elW,\H/5) rectangle (\REx+\elW,\H);
\node at (\CEx,3*\H/5) {C};
\node at (\WEx,3*\H/5) {W};
\node at (\REx,3*\H/5) {R};
% potentiostat
\pgfmathsetmacro{\potH}{\H+0.5+2}
\pgfmathsetmacro{\potM}{\H+0.5+1}
\draw[thick] (0,\H+0.5) rectangle (\W,\potH);
% Wires
\draw (\CEx,\H) -- (\CEx,\potM) to[voltmeter,-o] (\WEx,\potM) to[european voltage source] (\WEx+1/6*\W,\potM) to[ammeter] (\REx,\potM);
\draw (\WEx,\H) -- (\WEx,\H+1.5);
\draw (\REx,\H) -- (\REx,\H+1.5);
% labels
\node[anchor=west, align=left] at (\W+0.2, 1*\H/4) {{\color{bg-gray} \blacksquare} \GT{counter_electrode}};
\node[anchor=west, align=left] at (\W+0.2, 2*\H/4) {{\color{bg-purple}\blacksquare} \GT{working_electrode}};
\node[anchor=west, align=left] at (\W+0.2, 3*\H/4) {{\color{bg-yellow}\blacksquare} \GT{reference_electrode}};
\node[anchor=west, align=left] at (\W+0.2, \potM) {\GT{potentiostat}};
\end{tikzpicture}
\end{formula}
\begin{formula}{cell}
\desc{Electrochemical cell types}{}{}
\desc[german]{Arten der 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}
% todo group together
\begin{formula}{faradaic}
\desc{Faradaic process}{}{}
\desc[german]{Faradäischer Prozess}{}{}
\ttxt{
\eng{Charge transfers between the electrode bulk and the electrolyte.}
\ger{Ladung wird zwischen Elektrode und dem Elektrolyten transferiert.}
}
\end{formula}
\begin{formula}{non-faradaic}
\desc{Non-Faradaic (capacitive) process}{}{}
\desc[german]{Nicht-Faradäischer (kapazitiver) Prozess}{}{}
\ttxt{
\eng{Charge is stored at the electrode-electrolyte interface.}
\ger{Ladung lagert sich am Elektrode-Elektrolyt Interface an.}
}
\end{formula}
\begin{formula}{electrode_potential}
\desc{Electrode potential}{}{}
\desc[german]{Elektrodenpotential}{}{}
\quantity{E}{\volt}{s}
\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}{nernst_equation}
\desc{Nernst equation}{Electrode potential for a half-cell reaction}{\QtyRef{electrode_potential}, $E^\theta$ \secEqRef{standard_cell_potential}, \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_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}{stokes_friction}
\desc{Stokes's law}{Frictional force exerted on spherical objects moving in a viscous fluid at low Reynolds numbers}{$r$ particle radius, \QtyRef{viscosity}, $v$ particle \qtyRef{velocity}}
\desc[german]{Gesetz von Stokes}{Reibungskraft auf ein sphärisches Objekt in einer Flüssigkeit bei niedriger Reynolds-Zahl}{$r$ Teilchenradius, \QtyRef{viscosity}, $v$ Teilchengeschwindigkeit}
\eq{F_\txR = 6\pi\,r \eta v}
\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}{transfer_coefficient}
\desc{Transfer coefficient}{}{}
\desc[german]{Durchtrittsfaktor}{Transferkoeffizient\\Anteil des Potentials der sich auf die freie Reaktionsenthalpie des anodischen Prozesses auswirkt}{}
\eq{
\alpha_\txA &= \alpha \\
\alpha_\txC &= 1-\alpha
}
\end{formula}
\begin{formula}{overpotential}
\desc{Overpotential}{}{}
\desc[german]{Überspannung}{}{}
\ttxt{
\eng{Potential deviation from the equilibrium cell potential}
\ger{Abweichung der Spannung von der Zellspannung im Gleichgewicht}
}
\end{formula}
\begin{formula}{activation_overpotential}
\desc{Activation verpotential}{}{$E_\text{electrode}$ potential at which the reaction starts $E_\text{ref}$ thermodynamic potential of the reaction}
\desc[german]{Aktivierungsü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}
\Subsubsection[
\eng{Mass transport}
\ger{Massentransport}
]{mass}
\begin{formula}{concentration_overpotential}
\desc{Concentration overpotential}{Due to concentration gradient near the electrode, the ions need to \hyperref[f:ch:el:ion_cond:diffusion]{diffuse} to the electrode before reacting}{\ConstRef{universal_gas}, \QtyRef{temperature}, $\c_{0/\txS}$ ion concentration in the electrolyte / at the double layer, $z$ \qtyRef{charge_number}, \ConstRef{faraday}}
\desc[german]{Konzentrationsüberspannung}{Durch einen Konzentrationsgradienten an der Elektrode müssen Ionen erst zur Elektrode \hyperref[f:ch:el:ion_cond:diffusion]{diffundieren}, bevor sie reagieren können}{}
\eq{
\eta_\text{conc,anodic} &= -\frac{RT}{\alpha \,zF} \ln \left(\frac{c_\text{red}^0}{c_\text{red}^\txS}\right) \\
\eta_\text{conc,cathodic} &= -\frac{RT}{(1-\alpha) zF} \ln \left(\frac{c_\text{ox}^0}{c_\text{ox}^\txS}\right)
}
\end{formula}
\begin{formula}{diffusion_overpotential}
\desc{Diffusion overpotential}{Due to mass transport limitations}{$j_\infty$ \secEqRef{limiting_current}, $j_\text{meas}$ measured \qtyRef{current_density}, \ConstRef{universal_gas}, \QtyRef{temperature}, $n$ \qtyRef{charge_number}, \ConstRef{faraday}}
\desc[german]{Diffusionsüberspannung}{Durch Limit des Massentransports}{}
% \eq{\eta_\text{diff} = \frac{RT}{nF} \ln \left( \frac{\cfrac{c^\txs_\text{ox}}{c^0_\text{ox}}}{\cfrac{c^\txs_\text{red}}{c^0_\text{red}}} \right)}
\eq{\eta_\text{diff} = \frac{RT}{nF} \Ln{\frac{j_\infty}{j_\infty - j_\text{meas}}}}
\end{formula}
\begin{formula}{diffusion_layer}
\desc{Cell layers}{}{}
\desc[german]{Zellschichten}{}{}
\begin{tikzpicture}
\tikzset{
label/.style={color=fg1,anchor=center,rotate=90},
}
\pgfmathsetmacro{\tkW}{8} % Total width
\pgfmathsetmacro{\tkH}{4} % Total height
\pgfmathsetmacro{\edW}{1} % electrode width
\pgfmathsetmacro{\hhW}{1} % helmholtz width
\pgfmathsetmacro{\ndW}{2} % nernst diffusion with
\pgfmathsetmacro{\eyW}{\tkW-\edW-\hhW-\ndW} % electrolyte width
\pgfmathsetmacro{\edX}{0} % electrode width
\pgfmathsetmacro{\hhX}{\edW} % helmholtz width
\pgfmathsetmacro{\ndX}{\edW+\hhW} % nernst diffusion with
\pgfmathsetmacro{\eyX}{\tkW-\eyW} % electrolyte width
\path[fill=bg-orange] (\edX,0) rectangle (\edX+\edW,\tkH); \node[label] at (\edX+\edW/2,\tkH/2) {\GT{electrode}};
\path[fill=bg-green!90!bg0] (\hhX,0) rectangle (\hhX+\hhW,\tkH); \node[label] at (\hhX+\hhW/2,\tkH/2) {\GT{helmholtz_layer}};
\path[fill=bg-green!60!bg0] (\ndX,0) rectangle (\ndX+\ndW,\tkH); \node[label] at (\ndX+\ndW/2,\tkH/2) {\GT{nernst_layer}};
\path[fill=bg-green!20!bg0] (\eyX,0) rectangle (\eyX+\eyW,\tkH); \node[label] at (\eyX+\eyW/2,\tkH/2) {\GT{electrolyte}};
\draw (\hhX,2) -- (\ndX,3) -- (\tkW,3);
% axes
\draw[->] (0,0) -- (\tkW+0.2,0) node[anchor=north] {$x$};
\draw[->] (0,0) -- (0,\tkH+0.2) node[anchor=east] {$c$};
\tkYTick{2}{$c^\txS$};
\tkYTick{3}{$c^0$};
\end{tikzpicture}
\end{formula}
\Eng[c_surface]{surface \qtyRef{concentration}}
\Eng[c_bulk]{bulk \qtyRef{concentration}}
\Ger[c_surface]{Oberflächen-\qtyRef{concentration}}
\Ger[c_bulk]{Bulk-\qtyRef{concentration}}
\begin{formula}{diffusion_layer_thickness}
\desc{Nerst Diffusion layer thickness}{}{$c^0$ \GT{c_bulk}, $c^\txS$ \GT{c_surface}}
\desc[german]{Dicke der Nernstschen Diffusionsschicht}{}{}
\eq{\delta_\txN = \frac{c^0 - c^\txS}{\odv{c}{x}_{x=0}}}
\end{formula}
\begin{formula}{limiting_current}
\desc{(Limiting) current density}{}{$n$ \QtyRef{charge_number}, \ConstRef{faraday}, $c^0$ \GT{c_bulk}, $D$ \qtyRef{diffusion_coefficient}, $\delta_\text{diff}$ \secEqRef{diffusion_layer_thickness}}
% \desc[german]{Limitierender Strom}{}{}
\eq{
\abs{j} &= nFD \frac{c^0-c^\txS}{\delta_\text{diff}}
\shortintertext{\GT{for} $c^\txS \to 0$}
\abs{j_\infty} &= nFD \frac{c^0}{\delta_\text{diff}}
}
\end{formula}
\begin{formula}{relation?}
\desc{Current - concentration relation}{}{$c^0$ \GT{c_bulk}, $c^\txS$ \GT{c_surface}, $j$ \secEqRef{limiting_current}}
\desc[german]{Strom - Konzentrationsbeziehung}{}{}
\eq{\frac{j}{j_\infty} = 1 - \frac{c^\txS}{c^0}}
\end{formula}
\begin{formula}{kinetic_current}
\desc{Kinetic current density}{}{$j_\text{meas}$ measured \qtyRef{current_density}, $j_\infty$ \secEqRef{limiting_current}}
\desc[german]{Kinetische Stromdichte}{}{$j_\text{meas}$ gemessene \qtyRef{current_density}, $j_\infty$ \secEqRef{limiting_current}}
\eq{j_\text{kin} = \frac{j_\text{meas} j_\infty}{j_\infty - j_\text{meas}}}
\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, $\text{rf}$ \secEqRef{roughness_factor}}
%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, $\text{rf}$ \secEqRef{roughness_factor}}
\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}
% \Subsubsection[
% \eng{Tafel approximation}
% \ger{Tafel Näherung}
% ]{tafel}
% \begin{formula}{slope}
% \desc{Tafel slope}{}{}
% \desc[german]{Tafel Steigung}{}{}
% \eq{}
% \end{formula}
\begin{formula}{equation}
\desc{Tafel approximation}{For slow kinetics: $\abs{\eta} > \SI{0.1}{\volt}$}{}
\desc[german]{Tafel Näherung}{Für langsame Kinetik: $\abs{\eta} > \SI{0.1}{\volt}$}{}
\eq{
\Log{j} &\approx \Log{j_0} + \frac{\alpha_\txC zF \eta}{RT\ln(10)} && \eta \gg \SI{0.1}{\volt}\\
\Log{\abs{j}} &\approx \Log{j_0} - \frac{(1-\alpha_\txC) zF \eta}{RT\ln(10)} && \eta \ll -\SI{0.1}{\volt}
}
\fig{img/ch_tafel.pdf}
\end{formula}
\Subsection[
\eng{Techniques}
\ger{Techniken}
]{tech}
\Subsubsection[
\eng{Reference electrodes}
\ger{Referenzelektroden}
]{ref}
\begin{ttext}
\eng{Defined as reference for measuring half-cell potententials}
\ger{Definiert als Referenz für Messungen von Potentialen von Halbzellen}
\end{ttext}
\begin{formula}{she}
\desc{Standard hydrogen elektrode (SHE)}{}{$p=\SI{e5}{\pascal}$, $a_{\ce{H+}}=\SI{1}{\mol\per\litre}$ (\Rightarrow $\pH=0$)}
\desc[german]{Standardwasserstoffelektrode (SHE)}{}{}
\ttxt{
\eng{Potential of the reaction: \ce{2H^+ +2e^- <--> H2}}
\ger{Potential der Reaktion: \ce{2H^+ +2e^- <--> H2}}
}
\end{formula}
\begin{formula}{rhe}
\desc{Reversible hydrogen electrode (RHE)}{RHE Potential does not change with the pH value}{$E^0\equiv \SI{0}{\volt}$, \QtyRef{activity}, \QtyRef{pressure}, \GT{see} \fqEqRef{ch:el:cell:nernst_equation}}
\desc[german]{Reversible Wasserstoffelektrode (RHE)}{Potential ändert sich nicht mit dem pH-Wert}{}
\eq{
E_\text{RHE} &= E^0 + \frac{RT}{F} \Ln{\frac{a_{\ce{H^+}}}{p_{\ce{H2}}}} \\
&= \SI{0}{\volt} - \SI{0.059}{\volt}
}
\end{formula}
\Subsubsection[
\eng{Cyclic voltammetry}
\ger{Zyklische Voltammetrie}
]{cv}
\begin{bigformula}{duck}
\desc{Cyclic voltammogram}{}{}
% \desc[german]{}{}{}
\begin{minipage}{0.44\textwidth}
\begin{tikzpicture}
\pgfmathsetmacro{\Ax}{-2.3}
\pgfmathsetmacro{\Ay}{ 0.0}
\pgfmathsetmacro{\Bx}{ 0.0}
\pgfmathsetmacro{\By}{ 1.0}
\pgfmathsetmacro{\Cx}{ 0.4}
\pgfmathsetmacro{\Cy}{ 1.5}
\pgfmathsetmacro{\Dx}{ 2.0}
\pgfmathsetmacro{\Dy}{ 0.5}
\pgfmathsetmacro{\Ex}{ 0.0}
\pgfmathsetmacro{\Ey}{-1.5}
\pgfmathsetmacro{\Fx}{-0.4}
\pgfmathsetmacro{\Fy}{-2.0}
\pgfmathsetmacro{\Gx}{-2.3}
\pgfmathsetmacro{\Gy}{-0.3}
\pgfmathsetmacro{\x}{3}
\pgfmathsetmacro{\y}{3}
\begin{axis}[ymin=-\y,ymax=\y,xmax=\x,xmin=-\x,
% equal axis,
minor tick num=1,
xlabel={$E$}, xlabel style={at={(axis description cs:0.5,-0.06)}},
ylabel={$j$}, ylabel style={at={(axis description cs:-0.06,0.5)}},
anchor=center, at={(0,0)},
axis equal image,clip=false,
]
% CV with beziers
\draw[thick, fg-blue] (axis cs:\Ax,\Ay) coordinate (A) node[left] {A}
..controls (axis cs:\Ax+1.8, \Ay+0.0) and (axis cs:\Bx-0.2, \By-0.4) .. (axis cs:\Bx,\By) coordinate (B) node[left] {B}
..controls (axis cs:\Bx+0.1, \By+0.2) and (axis cs:\Cx-0.3, \Cy+0.0) .. (axis cs:\Cx,\Cy) coordinate (C) node[above] {C}
..controls (axis cs:\Cx+0.5, \Cy+0.0) and (axis cs:\Dx-1.3, \Dy+0.1) .. (axis cs:\Dx,\Dy) coordinate (D) node[right] {D}
..controls (axis cs:\Dx-2.0, \Dy-0.1) and (axis cs:\Ex+0.3, \Ey+0.8) .. (axis cs:\Ex,\Ey) coordinate (E) node[right] {E}
..controls (axis cs:\Ex-0.1, \Ey-0.2) and (axis cs:\Fx+0.2, \Fy+0.0) .. (axis cs:\Fx,\Fy) coordinate (F) node[below] {F}
..controls (axis cs:\Fx-0.2, \Fy+0.0) and (axis cs:\Gx+1.5, \Gy-0.2) .. (axis cs:\Gx,\Gy) coordinate (G) node[left] {G};
\node[above] at (A) {\rightarrow};
\draw[dashed, fg2] (axis cs: \Bx,\By) -- (axis cs: \Ex, \Ey);
\draw[->] (axis cs:-\x-0.6, 0.4) -- (axis cs:-\x-0.6, \y) node[left=0.3cm, anchor=east, rotate=90] {Cath / Red};
\draw[->] (axis cs:-\x-0.6,-0.4) -- (axis cs:-\x-0.6,-\y) node[left=0.3cm, anchor=west, rotate=90] {An / Ox};
\end{axis}
\end{tikzpicture}
\end{minipage}
\begin{minipage}{0.55\textwidth}
\begin{ttext}
\eng{\begin{itemize}
\item {\color{fg-blue}A-D}: Diffusion layer growth \rightarrow decreased current after peak
\item {\color{fg-blue}D}: Switching potential
\item {\color{fg-blue}B,E}: Equal concentrations of reactants
\item {\color{fg-blue}C,F}: Formal potential of redox pair: $E \approx \frac{E_\txC - E_\txF}{2}$
\item {\color{fg-blue}C,F}: Peak separation for reverisble processes: $\Delta E_\text{rev} = E_\txC - E_\txF = n\,\SI{59}{\milli\volt}$
\item Information about surface chemistry
\item Double-layer capacity (horizontal lines): $I = C v$
\end{itemize}}
\end{ttext}
\end{minipage}
\end{bigformula}
\begin{formula}{peak_current}
\desc{Randles-Sevcik equation}{For reversible reaction.\\Peak current depends on square root of the scan rate}{$n$ \qtyRef{charge_number}, \ConstRef{faraday}, $A$ electrode surface area, $c^0$ bulk \qtyRef{concentration}, $v$ \qtyRef{scan_rate}, $D_\text{ox}$ \qtyRef{diffusion_coefficient} of oxidized analyte, \ConstRef{universal_gas}, \QtyRef{temperature}}
\desc[german]{Randles-Sevcik Gleichung}{Spitzenstrom}{}
\eq{i_\text{peak} = 0.446\,nFAc^0 \sqrt{\frac{nFvD_\text{ox}}{RT}}}
\end{formula}
\begin{hiddenformula}{scan_rate}
\desc{Scan rate}{}{}
\desc[german]{Scanrate}{}{}
\quantity{v}{\volt\per\s}{s}
\end{hiddenformula}
\begin{formula}{upd}
\desc{Underpotential deposition (UPD)}{}{}
\desc[german]{}{}{}
\ttxt{Reversible deposition of metal onto a foreign metal electrode at potentials positive of the Nernst potential \TODO{clarify}}
\end{formula}
\Subsubsection[
\eng{Rotating disk electrodes}
% \ger{}
]{rde} \abbrLink{rde}{RDE}
\begin{formula}{viscosity}
\desc{Dynamic viscosity}{}{}
\desc[german]{Dynamisch Viskosität}{}{}
\quantity{\eta,\mu}{\pascal\s=\newton\s\per\m^2=\kg\per\m\s}{}
\end{formula}
\begin{formula}{kinematic_viscosity}
\desc{Kinematic viscosity}{\qtyRef{viscosity} related to density of a fluid}{\QtyRef{viscosity}, \QtyRef{density}}
\desc[german]{Kinematische Viskosität}{\qtyRef{viscosity} im Verhältnis zur Dichte der Flüssigkeit}{}
\quantity{\nu}{\cm^2\per\s}{}
\eq{\nu = \frac{\eta}{\rho}}
\end{formula}
\begin{formula}{diffusion_layer_thickness}
\desc{Diffusion layer thickness}{\TODO{Where does 1.61 come from}}{$D$ \qtyRef{diffusion_coefficient}, $\nu$ \qtyRef{kinematic_viscosity}, \QtyRef{angular_frequency}}
\desc[german]{Diffusionsshichtdicke}{}{}
\eq{\delta_\text{diff}= 1.61 D{^\frac{1}{3}} \nu^{\frac{1}{6}} \omega^{-\frac{1}{2}}}
\end{formula}
\begin{formula}{limiting_current}
\desc{Limiting current density}{for a \abbrRef{rde}}{$n$ \QtyRef{charge_number}, \ConstRef{faraday}, $c^0$ \GT{c_bulk}, $D$ \qtyRef{diffusion_coefficient}, $\delta_\text{diff}$ \secEqRef{diffusion_layer_thickness}, $\nu$ \qtyRef{kinematic_viscosity}, \QtyRef{angular_frequency}}
% \desc[german]{Limitierender Strom}{}{}
\eq{j_\infty = nFD \frac{c^0}{\delta_\text{diff}} = \frac{1}{1.61} nFD^{\frac{2}{3}} v^{\frac{-1}{6}} c^0 \sqrt{\omega}}
\end{formula}

115
src/ch/misc.tex Normal file
View File

@ -0,0 +1,115 @@
\Section[
\eng{Thermoelectricity}
\ger{Thermoelektrizität}
]{thermo}
\begin{formula}{seebeck}
\desc{Seebeck coefficient}{}{$V$ voltage, \QtyRef{temperature}}
\desc[german]{Seebeck-Koeffizient}{}{}
\quantity{S}{\micro\volt\per\kelvin}{s}
\eq{S = -\frac{\Delta V}{\Delta T}}
\end{formula}
\begin{formula}{seebeck_effect}
\desc{Seebeck effect}{Elecromotive force across two points of a material with a temperature difference}{\QtyRef{conductivity}, $V$ local voltage, \QtyRef{seebeck}, \QtyRef{temperature}}
\desc[german]{Seebeck-Effekt}{}{}
\eq{\vec{j} = \sigma(-\Grad V - S \Grad T)}
\end{formula}
\begin{formula}{thermal_conductivity}
\desc{Thermal conductivity}{Conduction of heat, without mass transport}{\QtyRef{heat}, \QtyRef{length}, \QtyRef{area}, \QtyRef{temperature}}
\desc[german]{Wärmeleitfähigkeit}{Leitung von Wärme, ohne Stofftransport}{}
\quantity{\kappa,\lambda,k}{\watt\per\m\K=\kg\m\per\s^3\kelvin}{s}
\eq{\kappa = \frac{\dot{Q} l}{A\,\Delta T}}
\eq{\kappa_\text{tot} = \kappa_\text{lattice} + \kappa_\text{electric}}
\end{formula}
\begin{formula}{wiedemann-franz}
\desc{Wiedemann-Franz law}{}{Electric \QtyRef{thermal_conductivity}, $L$ in \si{\watt\ohm\per\kelvin} Lorentz number, \QtyRef{conductivity}}
\desc[german]{Wiedemann-Franz Gesetz}{}{Elektrische \QtyRef{thermal_conductivity}, $L$ in \si{\watt\ohm\per\kelvin} Lorentzzahl, \QtyRef{conductivity}}
\eq{\kappa = L\sigma T}
\end{formula}
\begin{formula}{zt}
\desc{Thermoelectric figure of merit}{Dimensionless quantity for comparing different materials}{\QtyRef{seebeck}, \QtyRef{conductivity}, }
\desc[german]{Thermoelektrische Gütezahl}{Dimensionsoser Wert zum Vergleichen von Materialien}{}
\eq{zT = \frac{S^2\sigma}{\lambda} T}
\end{formula}
\Section[
\eng{misc}
\ger{misc}
]{misc}
% TODO: hide
\begin{formula}{stoichiometric_coefficient}
\desc{Stoichiometric coefficient}{}{}
\desc[german]{Stöchiometrischer Koeffizient}{}{}
\quantity{\nu}{}{s}
\end{formula}
\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}
\begin{formula}{common_chemicals}
\desc{Common chemicals}{}{}
\desc[german]{Häufige Chemikalien}{}{}
\begin{tabular}{l|c}
\GT{name} & \GT{formula} \\ \hline\hline
\begin{ttext}[cyanide]\eng{Cyanide}\ger{Zyanid}\end{ttext} & \ce{CN} \\ \hline
\begin{ttext}[ammonia]\eng{Ammonia}\ger{Ammoniak}\end{ttext} & \ce{NH3} \\ \hline
\begin{ttext}[hydrogen peroxide]\eng{Hydrogen Peroxide}\ger{Wasserstoffperoxid}\end{ttext} & \ce{H2O2} \\ \hline
\begin{ttext}[sulfuric acid]\eng{Sulfuric Acid}\ger{Schwefelsäure}\end{ttext} & \ce{H2SO4} \\ \hline
\begin{ttext}[ethanol]\eng{Ethanol}\ger{Ethanol}\end{ttext} & \ce{C2H5OH} \\ \hline
\begin{ttext}[acetic acid]\eng{Acetic Acid}\ger{Essigsäure}\end{ttext} & \ce{CH3COOH} \\ \hline
\begin{ttext}[methane]\eng{Methane}\ger{Methan}\end{ttext} & \ce{CH4} \\ \hline
\begin{ttext}[hydrochloric acid]\eng{Hydrochloric Acid}\ger{Salzsäure}\end{ttext} & \ce{HCl} \\ \hline
\begin{ttext}[sodium hydroxide]\eng{Sodium Hydroxide}\ger{Natriumhydroxid}\end{ttext} & \ce{NaOH} \\ \hline
\begin{ttext}[nitric acid]\eng{Nitric Acid}\ger{Salpetersäure}\end{ttext} & \ce{HNO3} \\ \hline
\begin{ttext}[calcium carbonate]\eng{Calcium Carbonate}\ger{Calciumcarbonat}\end{ttext} & \ce{CaCO3} \\ \hline
\begin{ttext}[glucose]\eng{Glucose}\ger{Glukose}\end{ttext} & \ce{C6H12O6} \\ \hline
\begin{ttext}[benzene]\eng{Benzene}\ger{Benzol}\end{ttext} & \ce{C6H6} \\ \hline
\begin{ttext}[acetone]\eng{Acetone}\ger{Aceton}\end{ttext} & \ce{C3H6O} \\ \hline
\begin{ttext}[ethylene]\eng{Ethylene}\ger{Ethylen}\end{ttext} & \ce{C2H4} \\ \hline
\begin{ttext}[potassium permanganate]\eng{Potassium Permanganate}\ger{Kaliumpermanganat}\end{ttext} & \ce{KMnO4} \\ \hline
\end{tabular}
\end{formula}

1054
src/ch/periodic_table.tex Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,95 @@
\Section[
\eng{Charge transport}
\ger{Ladungstransport}
]{charge_transport}
\Subsection[
\eng{Drude model}
\ger{Drude-Modell}
]{drude}
\begin{ttext}
\eng{Classical model describing the transport properties of electrons in materials (metals):
The material is assumed to be an ion lattice and with freely moving electrons (electron gas). The electrons are
accelerated by an electric field and decelerated through collisions with the lattice ions.
The model disregards the Fermi-Dirac partition of the conducting electrons.
}
\ger{Ein klassisches Model zur Beschreibung der Transporteigenschaften von Elektronen in (v.a.) Metallen:
Der Festkörper wird als Ionenkristall mit frei beweglichen Elektronen (Elektronengas).
Die Elektronen werden durch ein Elektrisches Feld $E$ beschleunigt und durch Stöße mit den Gitterionen gebremst.
Das Modell vernachlässigt die Fermi-Dirac Verteilung der Leitungselektronen.
}
\end{ttext}
\begin{formula}{motion}
\desc{Equation of motion}{}{$v$ electron speed, $\vec{v}_\text{D}$ drift velocity, $\tau$ mean free time between collisions}
\desc[german]{Bewegungsgleichung}{}{$v$ Elektronengeschwindigkeit, $\vec{v}_\text{D}$ Driftgeschwindigkeit, $\tau$ Stoßzeit}
\eq{\masse \odv{\vec{v}}{t} + \frac{\masse}{\tau} \vec{v}_\text{D} = -e \vec{\E}}
\end{formula}
\begin{formula}{scattering_time}
\desc{Scattering time}{Momentum relaxation time}{}
\desc[german]{Streuzeit}{}{}
\quantity{\tau}{\s}{s}
\ttxt{
\eng{$\tau$\\ the average time between scattering events weighted by the characteristic momentum change cause by the scattering process.}
}
\end{formula}
\begin{formula}{current_density}
\desc{Current density}{Ohm's law}{$n$ charge particle density}
\desc[german]{Stromdichte}{Ohmsches Gesetz}{$n$ Ladungsträgerdichte}
\quantity{\vec{j}}{\ampere\per\m^2}{v}
\eq{\vec{j} = -ne\vec{v}_\text{D} = ne\mu \vec{\E}}
\end{formula}
\begin{formula}{conductivity}
\desc{Drude-conductivity}{}{}
\desc[german]{Drude-Leitfähigkeit}{}{}
\eq{\sigma = \frac{\vec{j}}{\vec{\E}} = \frac{e^2 \tau n}{\masse} = n e \mu}
\end{formula}
\Subsection[
\eng{Sommerfeld model}
\ger{Sommerfeld-Modell}
]{sommerfeld}
\begin{ttext}
\eng{Assumes a gas of free fermions underlying the pauli-exclusion principle. Only electrons in an energy range of $\kB T$ around the Fermi energy $\EFermi$ participate in scattering processes.}
\ger{Annahme eines freien Fermionengases, welches dem Pauli-Prinzip unterliegt. Nur Elektronen in einem Energiebereich von $\kB T$ um die Fermi Energe $\EFermi$ nehmen an Streuprozessen teil.}
\end{ttext}
\begin{formula}{current_density}
\desc{Electrical current density}{}{}
\desc[german]{Elektrische Stromdichte}{}{}
\eq{\vec{j} = -en\braket{v} = -e n \frac{\hbar}{\masse}\braket{\vec{k}} = -e \frac{1}{V} \sum_{\vec{k},\sigma} \frac{\hbar \vec{k}}{\masse}}
\end{formula}
\TODO{The formula for the conductivity is the same as in the drude model?}
\Subsection[
\eng{Boltzmann-transport}
\ger{Boltzmann-Transport}
]{boltzmann}
\begin{ttext}
\eng{Semiclassical description using a probability distribution (\fqEqRef{stat:todo:fermi_dirac}) to describe the particles.}
\ger{Semiklassische Beschreibung, benutzt eine Wahrscheinlichkeitsverteilung (\fqEqRef{stat:todo:fermi_dirac}).}
\end{ttext}
\begin{formula}{boltzmann_transport}
\desc{Boltzmann Transport equation}{for charge transport}{$f$ \ref{stat:todo:fermi-dirac}}
\desc[german]{Boltzmann-Transportgleichung}{für Ladungstransport}{}
\eq{
\pdv{f(\vec{r},\vec{k},t)}{t} = -\vec{v} \cdot \Grad_{\vec{r}} f - \frac{e}{\hbar}(\vec{\mathcal{E}} + \vec{v} \times \vec{B}) \cdot \Grad_{\vec{k}} f + \left(\pdv{f(\vec{r},\vec{k},t)}{t}\right)_{\text{\GT{scatter}}}
}
\end{formula}
\Subsection[
\eng{misc}
\ger{misc}
]{misc}
\begin{formula}{tsu_esaki}
\desc{Tsu-Esaki tunneling current}{Describes the current $I_{\txL \leftrightarrow \txR}$ through a barrier}{$\mu_i$ \qtyRef{chemical_pot} at left/right side, $U_i$ voltage on left/right side. Electrons occupy region between $U_i$ and $\mu_i$}
\desc[german]{Tsu-Esaki Tunnelstrom}{Beschreibt den Strom $I_{\txL \leftrightarrow \txR}$ durch eine Barriere }{$\mu_i$ \qtyRef{chemical_pot} links/rechts, $U_i$ Spannung links/rechts. Elektronen besetzen Bereich zwischen $U_i$ und $\mu_i$}
\eq{
I_\text{T} = \frac{2e}{h} \int_{U_\txL}^\infty \left(f(E, \mu_\txL) -f(E, \mu_\txR)\right) T(E) \d E
}
\end{formula}
\begin{formula}{continuity}
\desc{Charge continuity equation}{Electric charge can only change by the amount of electric current}{\QtyRef{charge_density}, \QtyRef{current_density}}
\desc[german]{Kontinuitätsgleichung der Ladung}{Elektrische Ladung kann sich nur durch die Stärke des Stromes ändern}{}
\eq{
\pdv{\rho}{t} = - \nabla \vec{j}
}
\end{formula}

60
src/cm/cm.tex Normal file
View File

@ -0,0 +1,60 @@
\Part[
\eng{Condensed matter physics}
\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}

182
src/cm/crystal.tex Normal file
View File

@ -0,0 +1,182 @@
\Section[
\eng{Crystals}
\ger{Kristalle}
]{crystal}
\Subsection[
\eng{Bravais lattice}
\ger{Bravais-Gitter}
]{bravais}
\Eng[lattice_system]{Lattice system}
\Ger[lattice_system]{Gittersystem}
\Eng[crystal_family]{Crystal system}
\Ger[crystal_family]{Kristall-system}
\Eng[point_group]{Point group}
\Ger[point_group]{Punktgruppe}
\eng[bravais_lattices]{Bravais lattices}
\ger[bravais_lattices]{Bravais Gitter}
\newcommand\bvimg[1]{\begin{center}\includegraphics[width=0.1\textwidth]{img/bravais/#1.pdf}\end{center}}
\renewcommand\tabularxcolumn[1]{m{#1}}
\newcolumntype{Z}{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}X}
\begin{bigformula}{2d}
\desc{2D}{In 2D, there are 5 different Bravais lattices}{}
\desc[german]{2D}{In 2D gibt es 5 verschiedene Bravais-Gitter}{}
\begin{adjustbox}{width=\textwidth}
\begin{tabularx}{\textwidth}{||Z|c|Z|Z||}
\hline
\multirow{2}{*}{\GT{lattice_system}} & \multirow{2}{*}{\GT{point_group}} & \multicolumn{2}{c||}{5 \gt{bravais_lattices}} \\ \cline{3-4}
& & \GT{primitive} (p) & \GT{centered} (c) \\ \hline
\GT{monoclinic} (m) & $\text{C}_\text{2}$ & \bvimg{mp} & \\ \hline
\GT{orthorhombic} (o) & $\text{D}_\text{2}$ & \bvimg{op} & \bvimg{oc} \\ \hline
\GT{tetragonal} (t) & $\text{D}_\text{4}$ & \bvimg{tp} & \\ \hline
\GT{hexagonal} (h) & $\text{D}_\text{6}$ & \bvimg{hp} & \\ \hline
\end{tabularx}
\end{adjustbox}
\end{bigformula}
\begin{bigformula}{3d}
\desc{3D}{In 3D, there are 14 different Bravais lattices}{}
\desc[german]{3D}{In 3D gibt es 14 verschiedene Bravais-Gitter}{}
% \newcolumntype{g}{>{\columncolor[]{0.8}}}
\begin{adjustbox}{width=\textwidth}
\begin{tabularx}{\textwidth}{||Z|Z|c|Z|Z|Z|Z||}
\hline
\multirow{2}{*}{\GT{crystal_family}} & \multirow{2}{*}{\GT{lattice_system}} & \multirow{2}{*}{\GT{point_group}} & \multicolumn{4}{c||}{14 \gt{bravais_lattices}} \\ \cline{4-7}
& & & \GT{primitive} (P) & \GT{base_centered} (S) & \GT{body_centered} (I) & \GT{face_centered} (F) \\ \hline
\multicolumn{2}{||c|}{\GT{triclinic} (a)} & $\text{C}_\text{i}$ & \bvimg{tP} & & & \\ \hline
\multicolumn{2}{||c|}{\GT{monoclinic} (m)} & $\text{C}_\text{2h}$ & \bvimg{mP} & \bvimg{mS} & & \\ \hline
\multicolumn{2}{||c|}{\GT{orthorhombic} (o)} & $\text{D}_\text{2h}$ & \bvimg{oP} & \bvimg{oS} & \bvimg{oI} & \bvimg{oF} \\ \hline
\multicolumn{2}{||c|}{\GT{tetragonal} (t)} & $\text{D}_\text{4h}$ & \bvimg{tP} & & \bvimg{tI} & \\ \hline
\multirow{2}{*}{\GT{hexagonal} (h)} & \GT{rhombohedral} & $\text{D}_\text{3d}$ & \bvimg{hR} & & & \\ \cline{2-7}
& \GT{hexagonal} & $\text{D}_\text{6h}$ & \bvimg{hP} & & & \\ \hline
\multicolumn{2}{||c|}{\GT{cubic} (c)} & $\text{O}_\text{h}$ & \bvimg{cP} & & \bvimg{cI} & \bvimg{cF} \\ \hline
\end{tabularx}
\end{adjustbox}
\end{bigformula}
\begin{formula}{lattice_constant}
\desc{Lattice constant}{Parameter (length or angle) describing the smallest unit cell}{}
\desc[german]{Gitterkonstante}{Parameter (Länge oder Winkel) der die Einheitszelle beschreibt}{}
\quantity{a}{}{s}
\end{formula}
\begin{formula}{lattice_vector}
\desc{Lattice vector}{}{$n_i \in \Z$}
\desc[german]{Gittervektor}{}{}
\quantity{\vec{R}}{}{\angstrom}
\eq{\vec{R} = n_1 \vec{a_1} + n_2 \vec{a_2} + n_3 \vec{a_3}}
\end{formula}
\TODO{primitive unit cell: contains one lattice point}\\
\begin{formula}{miller}
\desc{Miller index}{}{Miller family: planes that are equivalent due to crystal symmetry}
\desc[german]{Millersche Indizes}{}{}
\eq{
(hkl) & \text{\GT{plane}}\\
[hkl] & \text{\GT{direction}}\\
\{hkl\} & \text{\GT{millerFamily}}
}
\end{formula}
\Subsection[
\eng{Reciprocal lattice}
\ger{Reziprokes Gitter}
]{reci}
\begin{ttext}
\eng{The reciprokal lattice is made up of all the wave vectors $\vec{k}$ that ressemble standing waves with the periodicity of the Bravais lattice.}
\ger{Das rezioproke Gitter besteht aus dem dem Satz aller Wellenvektoren $\vec{k}$, die ebene Wellen mit der Periodizität des Bravais-Gitters ergeben.}
\end{ttext}
\begin{formula}{vectors}
\desc{Reciprocal lattice vectors}{}{$a_i$ real-space lattice vectors, $V_c$ volume of the primitive lattice cell}
\desc[german]{Reziproke Gittervektoren}{}{$a_i$ Bravais-Gitter Vektoren, $V_c$ Volumen der primitiven Gitterzelle}
\eq{
\vec{b_1} &= \frac{2\pi}{V_c} \vec{a_2} \times \vec{a_3} \\
\vec{b_2} &= \frac{2\pi}{V_c} \vec{a_3} \times \vec{a_1} \\
\vec{b_3} &= \frac{2\pi}{V_c} \vec{a_1} \times \vec{a_2}
}
\end{formula}
\begin{formula}{reciprocal_lattice_vector}
\desc{Reciprokal attice vector}{}{$n_i \in \Z$}
\desc[german]{Reziproker Gittervektor}{}{}
\quantity{\vec{G}}{}{\angstrom}
\eq{\vec{G}_{{hkl}} = h \vec{b_1} + k \vec{b_2} + l \vec{b_3}}
\end{formula}
\Subsection[
\eng{Scattering processes}
\ger{Streuprozesse}
]{scatter}
\begin{formula}{matthiessen}
\desc{Matthiessen's rule}{Approximation, only holds if the processes are independent of each other}{\QtyRef{mobility}, \QtyRef{scattering_time}}
\desc[german]{Matthiessensche Regel}{Näherung, nur gültig wenn die einzelnen Streuprozesse von einander unabhängig sind}{}
\eq{
\frac{1}{\mu} &= \sum_{i = \textrm{\GT{\fqname}}} \frac{1}{\mu_i} \\
\frac{1}{\tau} &= \sum_{i = \textrm{\GT{\fqname}}} \frac{1}{\tau_i}
}
\end{formula}
\Subsection[
\eng{Lattices}
\ger{Gitter}
]{lat}
\begin{formula}{sc}
\desc{Simple cubic (SC)}{Reciprocal: Simple cubic}{\QtyRef{lattice_constant}}
\desc[german]{Einfach kubisch (SC)}{Reziprok: Einfach kubisch}{}
\eq{
\vec{a}_{1}=a \begin{pmatrix} 1\\0\\0 \end{pmatrix},\,
\vec{a}_{2}=a \begin{pmatrix} 0\\1\\0 \end{pmatrix},\,
\vec{a}_{3}=a \begin{pmatrix} 0\\0\\1 \end{pmatrix}
}
\end{formula}
\begin{formula}{bcc}
\desc{Body centered cubic (BCC)}{Reciprocal: \fqEqRef{cm:bravais:fcc}}{\QtyRef{lattice_constant}}
\desc[german]{Kubisch raumzentriert (BCC)}{Reziprok: \fqEqRef{cm:bravais:fcc}}{}
\eq{
\vec{a}_{1}=\frac{a}{2} \begin{pmatrix} -1\\1\\1 \end{pmatrix},\,
\vec{a}_{2}=\frac{a}{2} \begin{pmatrix} 1\\-1\\1 \end{pmatrix},\,
\vec{a}_{3}=\frac{a}{2} \begin{pmatrix} 1\\1\\-1 \end{pmatrix}
}
\end{formula}
\begin{formula}{fcc}
\desc{Face centered cubic (FCC)}{Reciprocal: \fqEqRef{cm:bravais:bcc}}{\QtyRef{lattice_constant}}
\desc[german]{Kubisch flächenzentriert (FCC)}{Reziprok: \fqEqRef{cm:bravais:bcc}}{}
\eq{
\vec{a}_{1}=\frac{a}{2} \begin{pmatrix} 0\\1\\1 \end{pmatrix},\,
\vec{a}_{2}=\frac{a}{2} \begin{pmatrix} 1\\0\\1 \end{pmatrix},\,
\vec{a}_{3}=\frac{a}{2} \begin{pmatrix} 1\\1\\0 \end{pmatrix}
}
\end{formula}
\begin{formula}{diamond}
\desc{Diamond lattice}{}{}
\desc[german]{Diamantstruktur}{}{}
\ttxt{
\eng{\fqEqRef{cm:bravais:fcc} with basis $\begin{pmatrix} 0 & 0 & 0 \end{pmatrix}$ and $\begin{pmatrix} \frac{1}{4} & \frac{1}{4} & \frac{1}{4} \end{pmatrix}$}
\ger{\fqEqRef{cm:bravais:fcc} mit Basis $\begin{pmatrix} 0 & 0 & 0 \end{pmatrix}$ und $\begin{pmatrix} \frac{1}{4} & \frac{1}{4} & \frac{1}{4} \end{pmatrix}$}
}
\end{formula}
\begin{formula}{zincblende}
\desc{Zincblende lattice}{}{}
\desc[german]{Zinkblende-Struktur}{}{}
\ttxt{
\includegraphics[width=0.5\textwidth]{img/cm_zincblende.png}
\eng{Like \fqEqRef{cm:bravais:diamond} but with different species on each basis}
\ger{Wie \fqEqRef{cm:bravais:diamond} aber mit unterschiedlichen Spezies auf den Basen}
}
\end{formula}
\begin{formula}{wurtzite}
\desc{Wurtzite structure}{hP4}{}
\desc[german]{Wurtzite-Struktur}{hP4}{}
\ttxt{
\includegraphics[width=0.5\textwidth]{img/cm_wurtzite.png}
Placeholder
}
\end{formula}

72
src/cm/egas.tex Normal file
View File

@ -0,0 +1,72 @@
\Section[
\eng{Free electron gas}
\ger{Freies Elektronengase}
]{egas}
\begin{ttext}
\eng{Assumptions: electrons can move freely and independent of each other.}
\ger{Annahmen: Elektronen bewegen sich frei und unabhänig voneinander.}
\end{ttext}
\begin{formula}{drift_velocity}
\desc{Drift velocity}{Velocity component induced by an external force (eg. electric field)}{$v_\text{th}$ thermal velocity}
\desc[german]{Driftgeschwindgkeit}{Geschwindigkeitskomponente durch eine externe Kraft (z.B. ein elektrisches Feld)}{$v_\text{th}$ thermische Geschwindigkeit}
\eq{\vec{v}_\text{D} = \vec{v} - \vec{v}_\text{th}}
\end{formula}
\begin{formula}{mean_free_path}
\desc{Mean free path}{}{}
\desc[german]{Mittlere freie Weglänge}{}{}
\eq{\ell = \braket{v} \tau}
\end{formula}
\begin{formula}{mobility}
\desc{Electrical mobility}{How quickly a particle moves through a material when moved by an electric field}{$q$ \qtyRef{charge}, $m$ \qtyRef{mass}, $\tau$ \qtyRef{scattering_time}}
\desc[german]{Elektrische Mobilität / Beweglichkeit}{Leichtigkeit mit der sich durch ein Elektrisches Feld beeinflusstes Teilchen im Material bewegt}{}
\quantity{\mu}{\centi\m^2\per\volt\s}{s}
\eq{\mu = \frac{q \tau}{m}}
\end{formula}
\Subsection[
\eng{2D electron gas}
\ger{2D Elektronengas}
]{2deg}
\begin{ttext}
\eng{Lower dimension gases can be obtained by restricting a 3D gas with infinetly high potential walls on a narrow area with the width $L$.}
\ger{
Niederdimensionale Elektronengase erhält man, wenn ein 3D Gas durch unendlich hohe Potentialwände auf einem schmalen Bereich mit Breite $L$ eingeschränkt wird.
}
\end{ttext}
\begin{formula}{confinement_energy}
\desc{Confinement energy}{Raises ground state energy}{}
\desc[german]{Confinement Energie}{Erhöht die Grundzustandsenergie}{}
\eq{\Delta E = \frac{\hbar^2 \pi^2}{2\masse L^2}}
\end{formula}
\Eng[plain_wave]{plain wave}
\Ger[plain_wave]{ebene Welle}
\begin{formula}{energy}
\desc{Energy}{}{}
\desc[german]{Energie}{}{}
\eq{E_n = \underbrace{\frac{\hbar^2 k_\parallel^2}{2\masse}}_\text{$x$-$y$: \GT{plain_wave}} + \underbrace{\frac{\hbar^2 \pi^2}{2\masse L^2} n^2}_\text{$z$}}
\end{formula}
\Subsection[
\eng{1D electron gas / quantum wire}
\ger{1D Eleltronengas / Quantendraht}
]{1deg}
\begin{formula}{energy}
\desc{Energy}{}{}
\desc[german]{Energie}{}{}
\eq{E_n = \frac{\hbar^2 k_x^2}{2\masse} + \frac{\hbar^2 \pi^2}{2\masse L_z^2} n_1^2 + \frac{\hbar^2 \pi^2}{2\masse L_y^2} n_2^2}
\end{formula}
\TODO{condunctance}
\Subsection[
\eng{0D electron gas / quantum dot}
\ger{0D Elektronengase / Quantenpunkt}
]{0deg}
\TODO{TODO}

198
src/cm/low_temp.tex Normal file
View File

@ -0,0 +1,198 @@
\def\L{\text{L}}
\def\gl{\text{GL}}
\def\GL{Ginzburg-Landau }
\def\Tcrit{T_\text{c}}
\def\Bcrit{B_\text{c}}
\def\ssc{\text{s}}
\def\ssn{\text{n}}
\Section[
\eng{Superconductivity}
\ger{Supraleitung}
]{sc}
\begin{ttext}
\eng{
Materials for which the electric resistance jumps to 0 under a critical temperature $\Tcrit$.
Below $\Tcrit$ they have perfect conductivity and perfect diamagnetism, up until a critical magnetic field $\Bcrit$.
\\\textbf{Type I}: Has a single critical magnetic field at which the superconuctor becomes a normal conductor.
\\\textbf{Type II}: Has two critical
}
\ger{
Materialien, bei denen der elektrische Widerstand beim unterschreiten einer kritischen Temperatur $\Tcrit$ auf 0 springt.
Sie verhalten sich dann wie ideale Leiter und ideale Diamagnete, bis zu einem kritischen Feld $\Bcrit$.
}
\end{ttext}
\begin{formula}{perfect_conductor}
\desc{Perfect conductor}{}{}
\desc[german]{Ideale Leiter}{}{}
\ttxt{
\eng{
In contrast to a superconductor, perfect conductors become diamagnetic only when the external magnetic field is turned on \textbf{after} the material was cooled below the critical temperature.
(\fqEqRef{ed:fields:mag:induction:lenz})
}
\ger{
Im Gegensatz zu einem Supraleiter werden ideale Leiter nur dann diamagnetisch, wenn das externe magnetische Feld \textbf{nach} dem Abkühlen unter die kritische Temperatur eingeschaltet wird.
(\fqEqRef{ed:fields:mag:induction:lenz})
}
}
\end{formula}
\begin{formula}{meissner_effect}
\desc{Meißner-Ochsenfeld effect}{Perfect diamagnetism}{}
\desc[german]{Meißner-Ochsenfeld Effekt}{Idealer Diamagnetismus}{}
\ttxt{
\eng{External magnetic field decays exponetially inside the superconductor below a critical temperature and a critical magnetic field.}
\ger{Externes Magnetfeld fällt im Supraleiter exponentiell unterhalb einer kritischen Temperatur und unterhalb einer kritischen Feldstärke ab.}
}
\end{formula}
\Subsection[
\eng{London equations}
\ger{London-Gleichungen}
]{london}
\begin{ttext}
\eng{
Quantitative description of the \fqEqRef{cm:sc:meissner_effect}.
}
\ger{
Quantitative Beschreibung des \fqEqRef{cm:sc:meissner_effect}s.
}
\end{ttext}
% \begin{formula}{coefficient}
% \desc{London-coefficient}{}{}
% \desc[german]{London-Koeffizient}{}{}
% \eq{\Lambda = \frac{m_\ssc}{n_\ssc q_\ssc^2}}
% \end{formula}
\begin{formula}{first}
% \vec{j} = \frac{nq\hbar}{m}\Grad S - \frac{nq^2}{m}\vec{A}
\desc{First London Equation}{}{$\vec{j}$ current density, $n_\ssc$, $m_\ssc$, $q_\ssc$ density, mass and charge of superconduticng particles}
\desc[german]{Erste London-Gleichun-}{}{$\vec{j}$ Stromdichte, $n_\ssc$, $m_\ssc$, $q_\ssc$ Dichte, Masse und Ladung der supraleitenden Teilchen}
\eq{
\pdv{\vec{j}_{\ssc}}{t} = \frac{n_\ssc q_\ssc^2}{m_\ssc}\vec{E} {\color{gray}- \Order{\vec{j}_\ssc^2}}
% \\{\color{gray} = \frac{q}{m}\Grad \left(\frac{1}{2} \TODO{FActor} \vec{j}^2\right)}
}
\end{formula}
\begin{formula}{second}
\desc{Second London Equation}{Describes the \fqEqRef{cm:sc:meissner_effect}}{$\vec{j}$ current density, $n_\ssc$, $m_\ssc$, $q_\ssc$ density, mass and charge of superconduticng particles}
\desc[german]{Zweite London-Gleichung}{Beschreibt den \fqEqRef{cm:sc:meissner_effect}}{$\vec{j}$ Stromdichte, $n_\ssc$, $m_\ssc$, $q_\ssc$ Dichte, Masse und Ladung der supraleitenden Teilchen}
\eq{
\Rot \vec{j_\ssc} = -\frac{n_\ssc q_\ssc^2}{m_\ssc} \vec{B}
}
\end{formula}
\begin{formula}{penetration_depth}
\desc{London penetration depth}{}{}
\desc[german]{London Eindringtiefe}{}{}
\eq{\lambda_\L = \sqrt{\frac{m_\ssc}{\mu_0 n_\ssc q_\ssc^2}}}
\end{formula}
\Subsection[
\eng{\GL Theory (GLAG)}
\ger{\GL Theorie (GLAG)}
]{gl}
\begin{ttext}
\eng{
\TODO{TODO}
}
\end{ttext}
\begin{formula}{coherence_length}
\desc{\GL Coherence Length}{}{}
\desc[german]{\GL Kohärenzlänge}{}{}
\eq{
\xi_\gl &= \frac{\hbar}{\sqrt{2m \abs{\alpha}}} \\
\xi_\gl(T) &= \xi_\gl(0) \frac{1}{\sqrt{1-\frac{T}{\Tcrit}}}
}
\end{formula}
\begin{formula}{penetration_depth}
\desc{\GL Penetration Depth / Field screening length}{}{}
\desc[german]{\GL Eindringtiefe}{}{}
\eq{
\lambda_\gl &= \sqrt{\frac{m_\ssc\beta}{\mu_0 \abs{\alpha} q_s^2}} \\
\lambda_\gl(T) &= \lambda_\gl(0) \frac{1}{\sqrt{1-\frac{T}{\Tcrit}}}
}
\end{formula}
\begin{formula}{first}
\desc{First Ginzburg-Landau Equation}{}{$\xi_\gl$ \fqEqRef{cm:sc:gl:coherence_length}, $\lambda_\gl$ \fqEqRef{cm:sc:gl:penetration_depth}}
\desc[german]{Erste Ginzburg-Landau Gleichung}{}{}
\eq{\alpha\Psi + \beta\abs{\Psi}^2 \Psi + \frac{1}{2m} (-i\hbar \Grad + 2e\vec{A})^2\Psi = 0}
\end{formula}
\begin{formula}{second}
\desc{Second Ginzburg-Landau Equation}{}{}
\desc[german]{Zweite Ginzburg-Landau Gleichung}{}{}
\eq{\vec{j_\ssc} = \frac{ie\hbar}{m}(\Psi^*\Grad\Psi - \Psi\Grad\Psi^*) - \frac{4e^2}{m}\abs{\Psi}^2 \vec{A}}
\end{formula}
\TODO{proximity effect}
\Subsection[
\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}
\Subsubsection[
\eng{BCS-Theory}
\ger{BCS-Theorie}
]{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}

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

@ -0,0 +1,28 @@
\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}
\begin{formula}{stress}
\desc{Stress}{Force per area}{\QtyRef{force}, \QtyRef{area}}
\desc[german]{Spannung}{(Engl. "stress") Kraft pro Fläche}{}
\quantity{\sigma}{\newton\per\m^2}{v}
\eq{\ten{\sigma}_{ij} = \frac{F_i}{A_j}}
\end{formula}
\begin{formula}{strain}
\desc{Strain}{}{$\Delta x$ distance from reference position $x_0$}
\desc[german]{Dehnung}{(Engl. "strain")}{$\Delta x$ Auslenkung aus der Referenzposition $x_0$}
\quantity{\epsilon}{}{s}
\eq{\epsilon = \frac{\Delta x}{x_0}}
\end{formula}

110
src/cm/misc.tex Normal file
View File

@ -0,0 +1,110 @@
\Section[
\eng{Band theory}
\ger{Bändermodell}
]{band}
\Subsection[
\eng{Hybrid orbitals}
\ger{Hybridorbitale}
]{hybrid_orbitals}
\begin{ttext}
\eng{Hybrid orbitals are linear combinations of other atomic orbitals.}
\ger{Hybridorbitale werden durch Linearkombinationen von anderen atomorbitalen gebildet.}
\end{ttext}
% chemmacros package
\begin{formula}{sp3}
\desc{sp3 Orbital}{\GT{eg} \ce{CH4}}{}
\desc[german]{sp3 Orbital}{}{}
\eq{
1\text{s} + 3\text{p} = \text{sp3}
\orbital{sp3}
}
\end{formula}
\begin{formula}{sp2}
\desc{sp2 Orbital}{}{}
\desc[german]{sp2 Orbital}{}{}
\eq{
1\text{s} + 2\text{p} = \text{sp2}
\orbital{sp2}
}
\end{formula}
\begin{formula}{sp}
\desc{sp Orbital}{}{}
\desc[german]{sp Orbital}{}{}
\eq{
1\text{s} + 1\text{p} = \text{sp}
\orbital{sp}
}
\end{formula}
\Section[
\eng{Diffusion}
\ger{Diffusion}
]{diffusion}
\begin{formula}{diffusion_coefficient}
\desc{Diffusion coefficient}{}{}
\desc[german]{Diffusionskoeffizient}{}{}
\quantity{D}{\m^2\per\s}{s}
\end{formula}
\begin{formula}{particle_current_density}
\desc{Particle current density}{Number of particles through an area}{}
\desc[german]{Teilchenstromdichte}{Anzahl der Teilchen durch eine Fläche}{}
\quantity{J}{1\per\s^2}{s}
\end{formula}
\begin{formula}{einstein_relation}
\desc{Einstein relation}{Classical}{\QtyRef{diffusion_coefficient}, \mu \qtyRef{mobility}, \QtyRef{temperature}, $q$ \qtyRef{charge}}
\desc[german]{Einsteinrelation}{Klassisch}{}
\eq{D = \frac{\mu \kB T}{q}}
\end{formula}
\begin{formula}{concentration}
\desc{Concentration}{A quantity per volume}{}
\desc[german]{Konzentration}{Eine Größe pro Volumen}{}
\quantity{c}{x\per\m^3}{s}
\end{formula}
\begin{formula}{fick_law_1}
\desc{Fick's first law}{Particle movement is proportional to concentration gradient}{\QtyRef{particle_current_density}, \QtyRef{diffusion_coefficient}, \QtyRef{concentration}}
\desc[german]{Erstes Ficksches Gesetz}{Teilchenbewegung ist proportional zum Konzentrationsgradienten}{}
\eq{J = -D\frac{c}{x}}
\end{formula}
\begin{formula}{fick_law_2}
\desc{Fick's second law}{}{\QtyRef{particle_current_density}, \QtyRef{diffusion_coefficient}, \QtyRef{concentration}}
\desc[german]{Zweites Ficksches Gesetz}{}{}
\eq{\pdv{c}{t} = D \pdv[2]{c}{x}}
\end{formula}
\Section[
\eng{\GT{misc}}
\ger{\GT{misc}}
]{misc}
\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{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}

160
src/cm/semiconductors.tex Normal file
View File

@ -0,0 +1,160 @@
\Section[
\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
}
}
\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} \\
Si & 1,17 & 1,12 & \GT{indirect} \\
Ge & 0,75 & 0,66 & \GT{indirect} \\
GaP & 2,32 & 2,26 & \GT{indirect} \\
GaAs & 1,52 & 1,43 & \GT{direct} \\
InSb & 0,24 & 0,18 & \GT{direct} \\
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}{}{}
\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{
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{
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}
\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}

212
src/cm/techniques.tex Normal file
View File

@ -0,0 +1,212 @@
\Section[
\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}
% TODO remove fqname from minipagetable?
\begin{bigformula}{raman}
\desc{Raman spectroscopy}{}{}
\desc[german]{Raman-Spektroskopie}{}{}
\begin{minipagetable}{raman}
\tentry{application}{
\eng{Vibrational modes, Crystal structure, Doping, Band Gaps, Layer thickness in \fqEqRef{cm:misc:vdw_material}}
\ger{Vibrationsmoden, Kristallstruktur, Dotierung, Bandlücke, Schichtdicke im \fqEqRef{cm:misc:vdw_material}}
}
\tentry{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.45\textwidth}
\begin{figure}[H]
\centering
% \includegraphics[width=0.8\textwidth]{img/cm_amf.pdf}
% \caption{\cite{Bian2021}}
\end{figure}
\end{minipage}
\end{bigformula}
\begin{bigformula}{pl}
\desc{Photoluminescence spectroscopy}{}{}
\desc[german]{Photolumeszenz-Spektroskopie}{}{}
\begin{minipagetable}{pl}
\tentry{application}{
\eng{Crystal structure, Doping, Band Gaps, Layer thickness in \fqEqRef{cm:misc:vdw_material}}
\ger{Kristallstruktur, Dotierung, Bandlücke, Schichtdicke im \fqEqRef{cm:misc:vdw_material}}
}
\tentry{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.45\textwidth}
\begin{figure}[H]
\centering
% \includegraphics[width=0.8\textwidth]{img/cm_amf.pdf}
% \caption{\cite{Bian2021}}
\end{figure}
\end{minipage}
\end{bigformula}
\Subsection[
\eng{ARPES}
\ger{ARPES}
]{arpes}
what?
in?
how?
plot
\Subsection[
\eng{Scanning probe microscopy SPM}
\ger{Rastersondenmikroskopie (SPM)}
]{spm}
\begin{ttext}
\eng{Images of surfaces are taken by scanning the specimen with a physical probe.}
\ger{Bilder der Oberfläche einer Probe werden erstellt, indem die Probe mit einer Sonde abgetastet wird.}
\end{ttext}
\begin{bigformula}{amf}
\desc{Atomic force microscopy (AMF)}{}{}
\desc[german]{Atomare Rasterkraftmikroskopie (AMF)}{}{}
\begin{minipagetable}{amf}
\tentry{application}{
\eng{Surface stuff}
\ger{Oberflächenzeug}
}
\tentry{how}{
\eng{With needle}
\ger{Mit Nadel}
}
\end{minipagetable}
\begin{minipage}{0.45\textwidth}
\begin{figure}[H]
\centering
\includegraphics[width=0.8\textwidth]{img/cm_amf.pdf}
\caption{\cite{Bian2021}}
\end{figure}
\end{minipage}
\end{bigformula}
\begin{bigformula}{stm}
\desc{Scanning tunneling microscopy (STM)}{}{}
\desc[german]{Rastertunnelmikroskop (STM)}{}{}
\begin{minipagetable}{stm}
\tentry{application}{
\eng{Surface stuff}
\ger{Oberflächenzeug}
}
\tentry{how}{
\eng{With TUnnel}
\ger{Mit TUnnel}
}
\end{minipagetable}
\begin{minipage}{0.45\textwidth}
\begin{figure}[H]
\centering
\includegraphics[width=0.8\textwidth]{img/cm_stm.pdf}
\caption{\cite{Bian2021}}
\end{figure}
\end{minipage}
\end{bigformula}
\Section[
\eng{Fabrication techniques}
\ger{Herstellungsmethoden}
]{fab}
\begin{bigformula}{cvd}
\desc{Chemical vapor deposition (CVD)}{}{}
\desc[german]{Chemische Gasphasenabscheidung (CVD)}{}{}
\begin{minipagetable}{cvd}
\tentry{how}{
\eng{
A substrate is exposed to volatile precursors, which react and/or decompose on the heated substrate surface to produce the desired deposit.
By-products are removed by gas flow through the chamber.
}
\ger{
An der erhitzten Oberfläche eines Substrates wird aufgrund einer chemischen Reaktion mit einem Gas eine Feststoffkomponente abgeschieden.
Nebenprodukte werden durch den Gasfluss durch die Kammer entfernt.
}
}
\tentry{application}{
\eng{
\begin{itemize}
\item Polysilicon \ce{Si}
\item Silicon dioxide \ce{SiO_2}
\item Graphene
\item Diamond
\end{itemize}
}
\ger{
\begin{itemize}
\item Poly-silicon \ce{Si}
\item Siliziumdioxid \ce{SiO_2}
\item Graphen
\item Diamant
\end{itemize}
}
}
\end{minipagetable}
\begin{minipage}{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{img/cm_cvd_english.pdf}
\end{minipage}
\end{bigformula}
\Subsection[
\eng{Epitaxy}
\ger{Epitaxie}
]{epitaxy}
\begin{ttext}
\eng{A type of crystal groth in which new layers are formed with well-defined orientations with respect to the crystalline seed layer.}
\ger{Eine Art des Kristallwachstums, bei der mindestens eine kristallographische Ordnung der wachsenden Schicht der des Substrates entspricht.}
\end{ttext}
\begin{bigformula}{mbe}
\desc{Molecular Beam Epitaxy (MBE)}{}{}
\desc[german]{Molekularstrahlepitaxie (MBE)}{}{}
\begin{minipagetable}{mbe}
\tentry{how}{
\eng{In a ultra-high vacuum, the elements are heated until they slowly sublime. The gases then condensate on the substrate surface}
\ger{Die Elemente werden in einem Ultrahochvakuum erhitzt, bis sie langsam sublimieren. Die entstandenen Gase kondensieren dann auf der Oberfläche des Substrats}
}
\tentry{application}{
\eng{
\begin{itemize}
\item Gallium arsenide \ce{GaAs}
\end{itemize}
\TODO{Link to GaAs}
}
\ger{
\begin{itemize}
\item Galliumarsenid \ce{GaAs}
\end{itemize}
}
}
\end{minipagetable}
\begin{minipage}{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{img/cm_mbe_english.pdf}
\end{minipage}
\end{bigformula}

View File

@ -1,8 +1,11 @@
\Part{Topo}
\Section[ \Section[
\eng{Topological Materials}
\ger{Topologische Materialien}
]{topo}
\Subsection[
\eng{Berry phase / Geometric phase} \eng{Berry phase / Geometric phase}
\ger{Berry-Phase / Geometrische Phase} \ger{Berry-Phase / Geometrische Phase}
]{berry_phase} ]{berry_phase}
\begin{ttext}[desc] \begin{ttext}[desc]
\eng{ \eng{
@ -53,28 +56,34 @@
\eq{\gamma_n = \oint_C \d \vec{R} \cdot A_n(\vec{R}) = \int_S \d\vec{S} \cdot \vec{\Omega}_n(\vec{R})} \eq{\gamma_n = \oint_C \d \vec{R} \cdot A_n(\vec{R}) = \int_S \d\vec{S} \cdot \vec{\Omega}_n(\vec{R})}
\end{formula} \end{formula}
\begin{ttext}[chern_number_desc]
\eng{The Berry flux through any 2D closed surface is quantized by the \textbf{Chern number}.
If there is time-reversal symmetry, the Chern-number is 0.
}
\ger{Der Berry-Fluß durch eine geschlossene 2D Fl[cher is quantisiert durch die \textbf{Chernzahl}
Bei erhaltener Zeitumkehrungssymmetrie ist die Chernzahl 0.
}
\end{ttext}
\begin{formula}{chern_number} \begin{formula}{chern_number}
\desc{Chern number}{Eg. number of Berry curvature monopoles in the Brillouin zone (then $\vec{R} = \vec{k}$)}{$\vec{S}$ closed surface in $\vec{R}$-space. A \textit{Chern insulator} is a 2D insulator with $C_n \neq 0$} \desc{Chern number}{Eg. number of Berry curvature monopoles in the Brillouin zone (then $\vec{R} = \vec{k}$)}{$\vec{S}$ closed surface in $\vec{R}$-space. A \textit{Chern insulator} is a 2D insulator with $C_n \neq 0$}
\desc[german]{Chernuzahl}{Z.B. Anzahl der Berry-Krümmungs-Monopole in der Brilouinzone (dann ist $\vec{R} = \vec{k}$). Ein \textit{Chern-Isolator} ist ein 2D Isolator mit $C_n\neq0$}{$\vec{S}$ geschlossene Fläche im $\vec{R}$-Raum} \desc[german]{Chernuzahl}{Z.B. Anzahl der Berry-Krümmungs-Monopole in der Brilouinzone (dann ist $\vec{R} = \vec{k}$). Ein \textit{Chern-Isolator} ist ein 2D Isolator mit $C_n\neq0$}{$\vec{S}$ geschlossene Fläche im $\vec{R}$-Raum}
\ttxt{
\eng{The Berry flux through any 2D closed surface is quantized by the \textbf{Chern number}.
If there is time-reversal symmetry, the Chern-number is 0.
}
\ger{Der Berry-Fluß durch eine geschlossene 2D Fl[cher is quantisiert durch die \textbf{Chernzahl}
Bei erhaltener Zeitumkehrungssymmetrie ist die Chernzahl 0.
}
}
\eq{C_n = \frac{1}{2\pi} \oint \d \vec{S}\ \cdot \vec{\Omega}_n(\vec{R})} \eq{C_n = \frac{1}{2\pi} \oint \d \vec{S}\ \cdot \vec{\Omega}_n(\vec{R})}
\end{formula} \end{formula}
\TODO{Hall conductance of 2D band insulator (lecture 4 revision)}
\begin{formula}{hall_conductance} \begin{formula}{hall_conductance}
\desc{Hall conductance of a 2D band insulator}{}{} \desc{Hall conductance of a 2D band insulator}{}{}
\desc[german]{Hall-Leitfähigkeit eines 2D Band-Isolators}{}{} \desc[german]{Hall-Leitfähigkeit eines 2D Band-Isolators}{}{}
\eq{\vec{\sigma}_{xy} = \sum_n \frac{e^2}{h} \int_\text{\GT{occupied}} \d^2k\, \frac{\Omega_{xy}^n}{2\pi} = \sum_n C_n \frac{e^2}{h}} \eq{\vec{\sigma}_{xy} = \sum_n \frac{e^2}{h} \int_\text{\GT{occupied}} \d^2k\, \frac{\Omega_{xy}^n}{2\pi} = \sum_n C_n \frac{e^2}{h}}
\end{formula} \end{formula}
\begin{ttext} \begin{formula}{topological_insulator}
\eng{A 2D insulator with a non-zero Chern number is called a \textbf{topological insulator}} \desc{Topological insulator}{}{}
\desc[german]{Topologischer Isolator}{}{}
\end{ttext} \ttxt{
\eng{A 2D insulator with a non-zero Chern number is called a \textbf{topological insulator}.}
\ger{Ein 2D Isolator mit einer Chernzahl ungleich 0 wird \textbf{topologischer Isolator} genannt.}
}
\end{formula}

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

@ -0,0 +1,374 @@
\Section[
\eng{Atomic dynamics}
% \ger{}
]{ad}
\begin{formula}{hamiltonian}
\desc{Electron Hamiltonian}{}{$\hat{T}$ \fqEqRef{comp:est:kinetic_energy}, $\hat{V}$ \fqEqRef{comp:est: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:est: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}
\Subsection[
\eng{Born-Oppenheimer Approximation}
\ger{Born-Oppenheimer Näherung}
]{bo}
\begin{formula}{adiabatic_approx}
\desc{Adiabatic approximation}{Electronic configuration remains the same when atoms move (\absRef{adiabatic_theorem})}{$\Lambda_{ij}$ \fqEqRef{comp:ad:coupling_operator}}
\desc[german]{Adiabatische Näherung}{Elektronenkonfiguration bleibt gleich bei Bewegung der Atome gleichl (\absRef{adiabatic_theorem})}{}
\eq{\Lambda_{ij} = 0 \quad \text{\GT{for} } i\neq j}
\end{formula}
\begin{formula}{approx}
\desc{Born-Oppenheimer approximation}{Electrons are not influenced by the movement of the atoms}{\GT{see} \fqEqRef{comp:ad:equation}, $V_{\txn \leftrightarrow \txn} = \const$ absorbed into $E_\txe^j$}
\desc[german]{Born-Oppenheimer Näherung}{Elektronen werden nicht durch die Bewegung der Atome beeinflusst}{}
\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)
\end{gather}
\end{formula}
\begin{formula}{ansatz}
\desc{Ansatz for \secEqRef{approx}}{Product of single electronic and single nuclear state}{}
\desc[german]{Ansatz für \secEqRef{approx}}{Produkt aus einem einzelnen elektronischen Zustand und einem Nukleus-Zustand}{}
\eq{
\psi_\text{BO} = c^{n0} \big(\{\vecR\}\big) \,\psi_\txe^0 \big(\{\vecr,\sigma\},\{\vecR\}\big)
}
\end{formula}
\begin{formula}{limitations}
\desc{Limitations}{}{$\tau$ passage of time for electrons/nuclei, $L$ characteristic length scale of atomic dynamics, $\dot{\vec{R}}$ nuclear velocity, $\Delta E$ difference between two electronic states}
\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}
Valid when Massey parameter $\xi \gg 1$
}
}
\eq{
\xi = \frac{\tau_\txn}{\tau_\txe} = \frac{L \Delta E}{\hbar \abs{\dot{\vecR}}}
}
\end{formula}
\Subsection[
\eng{Structure optimization}
\ger{Strukturoptimierung}
]{opt}
\begin{formula}{forces}
\desc{Forces}{}{}
\desc[german]{Kräfte}{}{}
\eq{\vec{F}_I = -\Grad_{\vecR_I} E \explOverEq{\fqEqRef{qm:se:hellmann_feynmann}} -\Braket{\psi(\vecR_I) | \left(\Grad_{\vecR_I} \hat{H}(\vecR_I)\right) | \psi(\vecR) }}
\end{formula}
\begin{formula}{ionic_cycle}
\desc{Ionic cycle}{\fqEqRef{comp:est:dft:ks:scf} for geometry optimization}{}
\desc[german]{}{}{}
\ttxt{
\eng{
\begin{enumerate}
\item Initial guess for $n(\vecr)$
\begin{enumerate}
\item Calculate effective potential $V_\text{eff}$
\item Solve \fqEqRef{comp:est:dft:ks:equation}
\item Calculate density $n(\vecr)$
\item Repeat b-d until self consistent
\end{enumerate}
\item Calculate \secEqRef{forces}
\item If $F\neq0$, get new geometry by interpolating $R$ and restart
\end{enumerate}
}
}
\end{formula}
\begin{formula}{transformation}
\desc{Transformation of atomic positions under stress}{}{$\alpha,\beta=1,2,3$ position components, $R$ position, $R(0)$ zero-strain position, $\ten{\epsilon}$ \qtyRef{strain} tensor}
\desc[german]{Transformation der Atompositionen unter Spannung}{}{$\alpha,\beta=1,2,3$ Positionskomponenten, $R$ Position, $R(0)$ Position ohne Dehnung, $\ten{\epsilon}$ \qtyRef{strain} Tensor}
\eq{R_\alpha(\ten{\epsilon}_{\alpha\beta}) = \sum_\beta \big(\delta_{\alpha\beta} + \ten{\epsilon}_{\alpha\beta}\big)R_\beta(0)}
\end{formula}
\begin{formula}{stress_tensor}
\desc{Stress tensor}{}{$\Omega$ unit cell volume, \ten{\epsilon} \qtyRef{strain} tensor}
\desc[german]{Spannungstensor}{}{}
\eq{\ten{\sigma}_{\alpha,\beta} = \frac{1}{\Omega} \pdv{E_\text{total}}{\ten{\epsilon}_{\alpha\beta}}_{\ten{\epsilon}=0}}
\end{formula}
\begin{formula}{pulay_stress}
\desc{Pulay stress}{}{}
\desc[german]{Pulay-Spannung}{}{}
\eq{
N_\text{PW} \propto E_\text{cut}^\frac{3}{2} \propto \abs{\vec{G}_\text{max}}^3
}
\ttxt{\eng{
Number of plane waves $N_\text{PW}$ depends on $E_\text{cut}$.
If $G$ changes during optimization, $N_\text{PW}$ may change, thus the basis set can change.
This typically leads to too small volumes.
}}
\end{formula}
\Subsection[
\eng{Lattice vibrations}
\ger{Gitterschwingungen}
]{latvib}
\begin{formula}{force_constant_matrix}
\desc{Force constant matrix}{}{}
% \desc[german]{}{}{}
\eq{\Phi_{IJ}^{\mu\nu} = \pdv{V(\{\vecR\})}{R_I^\mu,R_J^\nu}_{\{\vecR_I\}=\{\vecR_I^0\}}}
\end{formula}
\begin{formula}{harmonic_approx}
\desc{Harmonic approximation}{Hessian matrix, 2nd order Taylor expansion of the \fqEqRef{comp:ad:bo:surface} around every nucleus position $\vecR_I^0$}{$\Phi_{IJ}^{\mu\nu}$ \secEqRef{force_constant_matrix}, $s$ displacement}
\desc[german]{Harmonische Näherung}{Hesse matrix, Taylor Entwicklung der \fqEqRef{comp:ad:bo:surface} in zweiter Oddnung um Atomposition $\vecR_I^0$}{}
\eq{ V^\text{BO}(\{\vecR_I\}) \approx V^\text{BO}(\{\vecR_I^0\}) + \frac{1}{2} \sum_{I,J}^N \sum_{\mu,\nu}^3 s_I^\mu s_J^\nu \Phi_{IJ}^{\mu\nu} }
\end{formula}
% solving difficult becaus we need to calculate (3N)^2 derivatives, Hellmann-Feynman cant be applied directly
% -> DFPT
% finite-difference method
\Subsubsection[
\eng{Finite difference method}
% \ger{}
]{fin_diff}
\begin{formula}{approx}
\desc{Approximation}{Assume forces in equilibrium structure vanish}{$\Delta s$ displacement of atom $J$}
% \desc[german]{}{}{}
\eq{\Phi_{IJ}^{\mu\nu} \approx \frac{\vecF_I^\mu(\vecR_1^0, \dots, \vecR_J^0+\Delta s_J^\nu,\dots, \vecR_N^0)}{\Delta s_J^\nu}}
\end{formula}
\begin{formula}{dynamical_matrix}
\desc{Dynamical matrix}{Mass reduced \absRef[fourier transform]{fourier_transform} of the \fqEqRef{comp:ad:latvib:force_constant_matrix}}{$\vec{L}$ vector from origin to unit cell $n$, $\alpha/\beta$ atom index in th unit cell, $\vecq$ \qtyRef{wave_vector}, $\Phi$ \fqEqRef{comp:ad:latvib:force_constant_matrix}, $M$ \qtyRef{mass}}
% \desc[german]{}{}{}
\eq{D_{\alpha\beta}^{\mu\nu} = \frac{1}{\sqrt{M_\alpha M_\beta}} \sum_{n^\prime} \Phi_{\alpha\beta}^{\mu\nu}(n-n^\prime) \e^{\I \vec{q}(\vec{L}_n - \vec{L}_{n^\prime})}}
\end{formula}
\begin{formula}{eigenvalue_equation}
\desc{Eigenvalue equation}{For a periodic crystal, reduces number of equations from $3N_p\times N$ to $3N_p$. Eigenvalues represent phonon band structure.}{$N_p$ number of atoms per unit cell, $\vecc$ displacement amplitudes, $\vecq$ \qtyRef{wave_vector}, $\mat{D}$ \secEqRef{dynamical_matrix}}
\desc[german]{Eigenwertgleichung}{}{}
\eq{\omega^2 \vecc(\vecq) = \mat{D}(\vecq) \vecc(\vecq) }
\end{formula}
\Subsubsection[
\eng{Anharmonic approaches}
\ger{Anharmonische Ansätze}
]{anharmonic}
\begin{formula}{qha}
\desc{Quasi-harmonic approximation}{}{}
\desc[german]{}{}{}
\ttxt{\eng{
Include thermal expansion by assuming \fqEqRef{comp:ad:bo:surface} is volume dependant.
}}
\end{formula}
\begin{formula}{pertubative}
\desc{Pertubative approaches}{}{}
% \desc[german]{Störungs}{}{}
\ttxt{\eng{
Expand \fqEqRef{comp:ad:latvib:force_constant_matrix} to third order.
}}
\end{formula}
\Subsection[
\eng{Molecular Dynamics}
\ger{Molekulardynamik}
]{md} \abbrLink{md}{MD}
\begin{formula}{desc}
\desc{Description}{}{}
\desc[german]{Beschreibung}{}{}
\ttxt{\eng{
\begin{itemize}
\item Exact (within previous approximations) approach to treat anharmonic effects in materials.
\item Computes time-dependant observables.
\item Assumes fully classical nuclei.
\item Macroscropical observables from statistical ensembles
\item System evolves in time (ehrenfest). Number of points to consider does NOT scale with system size.
\item Exact because time dependance is studied explicitly, not via harmonic approx.
\end{itemize}
\TODO{cleanup}
}}
\end{formula}
\begin{formula}{procedure}
\desc{MD simulation procedure}{}{}
\desc[german]{Ablauf von MD Simulationen}{}{}
\ttxt{\eng{
\begin{enumerate}
\item Initialize with optimized geometry, interaction potential, ensemble, integration scheme, temperature/pressure control
\item Equilibrate to desired temperature/pressure (eg with statistical starting velocities)
\item Production run, run MD long enough to calculate desired observables
\end{enumerate}
}}
\end{formula}
\Subsubsection[
\eng{Ab-initio molecular dynamics}
\ger{Ab-initio molecular dynamics}
]{ab-initio}
\begin{formula}{bomd}
\abbrLabel{BOMD}
\desc{Born-Oppenheimer MD (BOMD)}{}{}
\desc[german]{Born-Oppenheimer MD (BOMD)}{}{}
\ttxt{\eng{
\begin{enumerate}
\item Calculate electronic ground state of current nucleui configuration $\{\vecR(t)\}$ with \abbrRef{ksdft}
\item \hyperref[f:comp:ad:opt:forces]{Calculate forces} from the \fqEqRef{comp:ad:bo:surface}
\item Update positions and velocities
\end{enumerate}
\begin{itemize}
\gooditem "ab-inito" - no empirical information required
\baditem Many expensive \abbrRef{dft} calculations
\end{itemize}
}}
\end{formula}
\begin{formula}{cpmd}
\desc{Car-Parrinello MD (CPMD)}{}{$\mu$ electron orbital mass, $\varphi_i$ \abbrRef{ksdft} eigenststate, $\lambda_{ij}$ Lagrange multiplier}
\desc[german]{Car-Parrinello MD (CPMD)}{}{}
\ttxt{\eng{
Evolve electronic wave function $\varphi$ (adiabatically) along with the nuclei \Rightarrow only one full \abbrRef{ksdft}
}}
\begin{gather}
M_I \odv[2]{\vecR_I}{t} = -\Grad_{\vecR_I} E[\{\varphi_i\},\{\vecR_I\}] \\
% not using pdv because of comma in parens
% E[\{\varphi_i\}\{\vecR_I\}] = \Braket{\psi_0|H_\text{el}^\text{KS}|\psi_0}
\mu \odv[2]{\varphi_i(\vecr,t)}{t} = - \frac{\partial}{\partial\varphi_i^*(\vecr,t)} E[\{\varphi_i\},\{\vecR_I\}] + \sum_j \lambda_{ij} \varphi_j(\vecr,t)
\end{gather}
\end{formula}
\Subsubsection[
\eng{Force-field MD}
\ger{Force-field MD}
]{ff}
\begin{formula}{ffmd}
\desc{Force field MD (FFMD)}{}{}
% \desc[german]{}{}{}
\ttxt{\eng{
\begin{itemize}
\item Use empirical interaction potential instead of electronic structure
\baditem Force fields need to be fitted for specific material \Rightarrow not transferable
\gooditem Faster than \abbrRef{bomd}
\item Example: \absRef{lennard_jones}
\end{itemize}
}}
\end{formula}
\Subsubsection[
\eng{Integration schemes}
% \ger{}
]{scheme}
\begin{ttext}
\eng{Procedures for updating positions and velocities to obey the equations of motion.}
\end{ttext}
\begin{formula}{euler}
\desc{Euler method}{First-order procedure for solving \abbrRef{ode}s with a given initial value.\\Taylor expansion of $\vecR/\vecv (t+\Delta t)$}{}
\desc[german]{Euler-Verfahren}{Prozedur um gewöhnliche DGLs mit Anfangsbedingungen in erster Ordnung zu lösen.\\Taylor Entwicklung von $\vecR/\vecv (t+\Delta t)$}{}
\eq{
\vecR(t+\Delta t) &= \vecR(t) + \vecv(t) \Delta t + \Order{\Delta t^2} \\
\vecv(t+\Delta t) &= \vecv(t) + \veca(t) \Delta t + \Order{\Delta t^2}
}
\ttxt{\eng{
Cumulative error scales linearly $\Order{\Delta t}$. Not time reversible.
}}
\end{formula}
\begin{formula}{verlet}
\desc{Verlet integration}{Preverses time reversibility, does not require velocity updates}{}
\desc[german]{Verlet-Algorithmus}{Zeitumkehr-symmetrisch}{}
\eq{
\vecR(t+\Delta t) = 2\vecR(t) -\vecR(t-\Delta t) + \veca(t) \Delta t^2 + \Order{\Delta t^4}
}
\end{formula}
\begin{formula}{velocity-verlet}
\desc{Velocity-Verlet integration}{}{}
% \desc[german]{}{}{}
\eq{
\vecR(t+\Delta t) &= \vecR(t) + \vecv(t)\Delta t + \frac{1}{2} \veca(t) \Delta t^2 + \Order{\Delta t^4} \\
\vecv(t+\Delta t) &= \vecv(t) + \frac{\veca(t) + \veca(t+\Delta t)}{2} \Delta t + \Order{\Delta t^4}
}
\end{formula}
\TODO{leapfrog}
\Subsubsection[
\eng{Thermostats and barostats}
\ger{Thermostate und Barostate}
]{stats}
\begin{formula}{velocity_rescaling}
\desc{Velocity rescaling}{Thermostat, keep temperature at $T_0$ by rescaling velocities. Does not allow temperature fluctuations and thus does not obey the \absRef{c_ensemble}}{$T$ target \qtyRef{temperature}, $M$ \qtyRef{mass} of nucleon $I$, $\vecv$ \qtyRef{velocity}, $f$ number of degrees of freedom, $\lambda$ velocity scaling parameter, \ConstRef{boltzmann}}
% \desc[german]{}{}{}
\eq{
\Delta T(t) &= T_0 - T(t) \\
&= \sum_I^N \frac{M_I\,(\lambda \vecv_I(t))^2}{f\kB} - \sum_I^N \frac{M_I\,\vecv_I(t)^2}{f\kB} \\
&= (\lambda^2 - 1) T(t)
}
\eq{\lambda = \sqrt{\frac{T_0}{T(t)}}}
\end{formula}
\begin{formula}{berendsen}
\desc{Berendsen thermostat}{Does not obey \absRef{c_ensemble} but efficiently brings system to target temperature}{}
% \desc[german]{}{}{}
\eq{\odv{T}{t} = \frac{T_0-T}{\tau}}
\end{formula}
\begin{formula}{nose-hoover}
\desc{Nosé-Hoover thermostat}{Control the temperature with by time stretching with an associated mass.\\Compliant with \absRef{c_ensemble}}{$s$ scaling factor, $Q$ associated "mass", $\mathcal{L}$ \absRef{lagrangian}, $g$ degrees of freedom}
\desc[german]{Nosé-Hoover Thermostat}{}{}
\begin{gather}
\d\tilde{t} = \tilde{s}\d t \\
\mathcal{L} = \sum_{I=1}^N \frac{1}{2} M_I \tilde{s}^2 v_i^2 - V(\tilde{\vecR}_1, \ldots, \tilde{\vecR}_I, \ldots, \tilde{\vecR}_N) + \frac{1}{2} Q \dot{\tilde{s}}^2 - g \kB T_0 \ln \tilde{s}
\end{gather}
\end{formula}
\Subsubsection[
\eng{Calculating observables}
\ger{Berechnung von Observablen}
]{obs}
\begin{formula}{spectral_density}
\desc{Spectral density}{Wiener-Khinchin theorem\\\absRef{fourier_transform} of \absRef{autocorrelation}}{$C$ \absRef{autocorrelation}}
\desc[german]{Spektraldichte}{Wiener-Khinchin Theorem\\\absRef{fourier_transform} of \absRef{autocorrelation}}{}
\eq{S(\omega) = \int_{-\infty}^\infty \d\tau C(\tau) \e^{-\I\omega t} }
\end{formula}
\begin{formula}{vdos} \abbrLabel{VDOS}
\desc{Vibrational density of states (VDOS)}{}{$S_{v_i}$ velocity \secEqRef{spectral_density} of particle $I$}
\desc[german]{Vibrationszustandsdicht (VDOS)}{}{}
\eq{g(\omega) \sim \sum_{I=1}^N M_I S_{v_I}(\omega)}
\end{formula}

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

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

289
src/comp/est.tex Normal file
View File

@ -0,0 +1,289 @@
\Section[
\eng{Electronic structure theory}
% \ger{}
]{est}
\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:est:kinetic_energy}, $\hat{V}$ \fqEqRef{comp:est: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 Coulomb interaction between many electrons}
\desc[german]{Molekularfeldnäherung}{Ersetzt 2-Teilchen Operator durch 1-Teilchen Operator}{Beispiel für Coulomb 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}
\abbrLink{dft}{DFT}
\Subsubsection[
\eng{Hartree-Fock}
\ger{Hartree-Fock}
]{hf}
\begin{formula}{description}
\desc{Description}{}{}
\desc[german]{Beschreibung}{}{}
\begin{ttext}
\eng{
\begin{itemize}
\item Assumes wave functions are \fqEqRef{qm:other:slater_det} \Rightarrow Approximation
\item \fqEqRef{comp:est: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}
\begin{formula}{density}
\desc{Ground state electron density}{}{}
\desc[german]{Grundzustandselektronendichte}{}{}
\eq{n(\vecr) = \Braket{\psi_0|\sum_{i=1}^N \delta(\vecr-\vecr_i)|\psi_0}}
\end{formula}
\Subsubsection[
\eng{Kohn-Sham DFT}
\ger{Kohn-Sham DFT}
]{ks}
\abbrLink{ksdft}{KS-DFT}
\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:est:dft:hf:potential]{Hartree term}, $E_\text{XC}$ \fqEqRef{comp:est:dft:xc:xc}}
\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}{Exact single particle \abbrRef{schroedinger_equation} (though often exact $E_\text{XC}$ is not known)\\ Solving it uses up a large portion of supercomputer resources}{$\phi_i^\text{KS}$ KS orbitals, $\int\d^3r v_\text{ext}(\vecr)n(\vecr)=V_\text{ext}[n(\vecr)]$}
\desc[german]{Kohn-Sham Gleichung}{Exakte Einteilchen-\abbrRef{schroedinger_equation} (allerdings ist das exakte $E_\text{XC}$ oft nicht bekannt)\\ 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:est:dft:ks:equation}
\item Calculate density $n(\vecr)$
\item Repeat 2-4 until self consistent
\end{enumerate}
}
}
\end{formula}
\Subsubsection[
\eng{Exchange-Correlation functionals}
\ger{Exchange-Correlation Funktionale}
]{xc}
\begin{formula}{xc}
\desc{Exchange-Correlation functional}{}{}
\desc[german]{Exchange-Correlation Funktional}{}{}
\eq{ E_\text{XC}[n(\vecr)] = \Braket{\hat{T}} - T_\text{KS}[n(\vecr)] + \Braket{\hat{V}_\text{int}} - E_\txH[n(\vecr)] }
\ttxt{\eng{
Accounts for:
\begin{itemize}
\item Kinetic energy difference between interaction and non-interacting system
\item Exchange energy due to Pauli principle
\item Correlation energy due to many-body Coulomb interaction (not accounted for in mean field Hartree term $E_\txH$)
\end{itemize}
}}
\end{formula}
\begin{formula}{lda}
\desc{Local density approximation (LDA)}{Simplest DFT functionals}{$\epsilon_\txX$ calculated exchange energy from \hyperref[f:comp:qmb:models:heg]{HEG model}, $\epsilon_\txC$ correlation energy calculated with \fqSecRef{comp:qmb:methods:qmonte-carlo}}
\desc[german]{}{}{}
\abbrLabel{LDA}
\eq{E_\text{XC}^\text{LDA}[n(\vecr)] = \int \d^3r\,n(r) \Big[\epsilon_\txX[n(\vecr)] + \epsilon_\txC[n(\vecr)]\Big]}
\end{formula}
\begin{formula}{gga}
\desc{Generalized gradient approximation (GGA)}{}{$\epsilon_\txX$ calculated exchange energy from \hyperref[f:comp:qmb:models:heg]{HEG model}, $F_\text{XC}$ function containing exchange-correlation energy dependency on $n$ and $\Grad n$}
\desc[german]{}{}{}
\abbrLabel{GGA}
\eq{E_\text{XC}^\text{GGA}[n(\vecr)] = \int \d^3r\,n(r) \epsilon_\txX[n(\vecr)]\,F_\text{XC}[n(\vecr), \Grad n(\vecr)]}
\end{formula}
\TODO{PBE}
\begin{formula}{hybrid}
\desc{Hybrid functionals}{}{}
\desc[german]{Hybride Funktionale}{}{$\alpha$ mixing paramter, $E_\txX$ exchange energy, $E_\txC$ correlation energy}
\eq{\alpha E_\txX^\text{HF} + (1-\alpha) E_\txX^\text{GGA} + E_\txC^\text{GGA}}
\ttxt{\eng{
Include \hyperref[f:comp:dft:hf:potential]{Fock term} (exact exchange) in other functional, like \abbrRef{gga}. Computationally expensive
}}
\end{formula}
\begin{formula}{range-separated-hybrid}
\desc{Range separated hyrid functionals (RSH)}{Here HSE as example}{$\alpha$ mixing paramter, $E_\txX$ exchange energy, $E_\txC$ correlation energy}
% \desc[german]{}{}{}
\begin{gather}
\frac{1}{r} = \frac{\erf(\omega r)}{r} + \frac{\erfc{\omega r}}{r} \\
E_\text{XC}^\text{HSE} = \alpha E_\text{X,SR}^\text{HF}(\omega) + (1-\alpha)E_\text{X,SR}^\text{GGA}(\omega) + E_\text{X,LR}^\text{GGA}(\omega) + E_\txC^\text{GGA}
\end{gather}
\separateEntries
\ttxt{\eng{
Use \abbrRef{gga} and \hyperref[comp:est:dft:hf:potential]{Fock} exchange for short ranges (SR) and only \abbrRef{GGA} for long ranges (LR).
\abbrRef{GGA} correlation is always used. Useful when dielectric screening reduces long range interactions, saves computational cost.
}}
\end{formula}
\begin{formula}{comparison}
\desc{Comparison of DFT functionals}{}{}
\desc[german]{Vergleich von DFT Funktionalen}{}{}
\begin{tabular}{l|c}
\hyperref[f:comp:est:dft:hf:potential]{Hartree-Fock} & only exchange, no correlation \Rightarrow upper bound of GS energy \\
\abbrRef{lda} & understimates e repulsion \Rightarrow Overbinding \\
\abbrRef{gga} & underestimate band gap \\
hybrid & underestimate band gap
\end{tabular}
\end{formula}
\Subsubsection[
\eng{Basis sets}
\ger{Basis-Sets}
]{basis}
\begin{formula}{plane_wave}
\desc{Plane wave basis}{Plane wave ansatz in \fqEqRef{comp:est:dft:ks:equation}\\Good for periodic structures, allows computation parallelization over a sample points in the \abbrRef{brillouin_zone}}{}
\desc[german]{Ebene Wellen als Basis}{}{}
\eq{\sum_{\vecG^\prime} \left[\frac{\hbar^2 \abs{\vecG+\veck}^2}{2m} \delta_{\vecG,\vecG^\prime} + V_\text{eff}(\vecG-\vecG^\prime)\right] c_{i,\veck,\vecG^\prime} = \epsilon_{i,\veck} c_{i,\veck,\vecG}}
\end{formula}
\begin{formula}{plane_wave_cutoff}
\desc{Plane wave cutoff}{Number of plane waves included in the calculation must be finite}{}
% \desc[german]{}{}{}
\eq{E_\text{cutoff} = \frac{\hbar^2 \abs{\veck+\vecG}^2}{2m}}
\end{formula}
\Subsubsection[
\eng{Pseudo-Potential method}
\ger{Pseudopotentialmethode}
]{pseudo}
\begin{formula}{ansatz}
\desc{Ansatz}{}{}
\desc[german]{Ansatz}{}{}
\ttxt{\eng{
Core electrons are absorbed into the potential since they do not contribute much to interesting properties.
}}
\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{in lecture 30 CMP}

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

@ -0,0 +1,39 @@
\Section[
\eng{Quantum many-body physics}
\ger{Quanten-Vielteilchenphysik}
]{qmb}
\Subsection[
\eng{Quantum many-body models}
\ger{Quanten-Vielteilchenmodelle}
]{models}
\begin{formula}{heg}
\desc{Homogeneous electron gas (HEG)}{Also "Jellium"}{}
% \desc[german]{}{}{}
\ttxt{
\eng{Both positive (nucleus) and negative (electron) charges are distributed uniformly.}
}
\end{formula}
\Subsection[
\eng{Methods}
\ger{Methoden}
]{methods}
\Subsubsection[
\eng{Quantum Monte-Carlo}
\ger{Quantum Monte-Carlo}
]{qmonte-carlo}
\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,397 +0,0 @@
\Part[
\eng{Condensed matter physics}
\ger{Festkörperphysik}
]{cm}
\Section[
\eng{Bravais lattice}
\ger{Bravais-Gitter}
]{bravais}
% \begin{ttext}
% \eng{
% }
% \ger{
% }
% \end{ttext}
\eng[bravais_table2]{In 2D, there are 5 different Bravais lattices}
\ger[bravais_table2]{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[lattice_system]{Lattice system}
\Ger[lattice_system]{Gittersystem}
\Eng[crystal_family]{Crystal system}
\Ger[crystal_family]{Kristall-system}
\Eng[point_group]{Point group}
\Ger[point_group]{Punktgruppe}
\eng[bravais_lattices]{Bravais lattices}
\ger[bravais_lattices]{Bravais Gitter}
\newcommand\bvimg[1]{\begin{center}\includegraphics[width=0.1\textwidth]{img/bravais/#1.pdf}\end{center}}
\renewcommand\tabularxcolumn[1]{m{#1}}
\newcolumntype{Z}{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}X}
\begin{table}[H]
\centering
\caption{\gt{bravais_table2}}
\label{tab:bravais2}
\begin{adjustbox}{width=\textwidth}
\begin{tabularx}{\textwidth}{||Z|c|Z|Z||}
\hline
\multirow{2}{*}{\GT{lattice_system}} & \multirow{2}{*}{\GT{point_group}} & \multicolumn{2}{c||}{5 \gt{bravais_lattices}} \\ \cline{3-4}
& & \GT{primitive} (p) & \GT{centered} (c) \\ \hline
\GT{monoclinic} (m) & $\text{C}_\text{2}$ & \bvimg{mp} & \\ \hline
\GT{orthorhombic} (o) & $\text{D}_\text{2}$ & \bvimg{op} & \bvimg{oc} \\ \hline
\GT{tetragonal} (t) & $\text{D}_\text{4}$ & \bvimg{tp} & \\ \hline
\GT{hexagonal} (h) & $\text{D}_\text{6}$ & \bvimg{hp} & \\ \hline
\end{tabularx}
\end{adjustbox}
\end{table}
\begin{table}[H]
\centering
\caption{\gt{bravais_table3}}
\label{tab:bravais3}
% \newcolumntype{g}{>{\columncolor[]{0.8}}}
\begin{adjustbox}{width=\textwidth}
% \begin{tabularx}{\textwidth}{|c|}
% asdfasdfadslfasdfaasdofiuapsdoifuapodisufpaoidsufpaoidsufpaoisdfaoisdfpaosidfupaoidsufpaoidsufpaoidsufpaoisdufpaoidsufpoaiudsfpioaspdoifuaposidufpaoisudpfoiaupsdoifupasodf \\
% asdfasdfadslfasdfaasdofiuapsdoifuapodisufpaoidsufpaoidsufpaoisdfaoisdfpaosidfupaoidsufpaoidsufpaoidsufpaoisdufpaoidsufpoaiudsfpioaspdoifuaposidufpaoisudpfoiaupsdoifupasodf \\
% \end{tabularx}
% \begin{tabular}{|c|}
% asdfasdfadslfasdfaasdofiuapsdoifuapodisufpaoidsufpaoidsufpaoisdfaoisdfpaosidfupaoidsufpaoidsufpaoidsufpaoisdufpaoidsufpoaiudsfpioaspdoifuaposidufpaoisudpfoiaupsdoifupasodf \\
% asdfasdfadslfasdfaasdofiuapsdoifuapodisufpaoidsufpaoidsufpaoisdfaoisdfpaosidfupaoidsufpaoidsufpaoidsufpaoisdufpaoidsufpoaiudsfpioaspdoifuaposidufpaoisudpfoiaupsdoifupasodf \\
% \end{tabular}
% \\
\begin{tabularx}{\textwidth}{||Z|Z|c|Z|Z|Z|Z||}
\hline
\multirow{2}{*}{\GT{crystal_family}} & \multirow{2}{*}{\GT{lattice_system}} & \multirow{2}{*}{\GT{point_group}} & \multicolumn{4}{c||}{14 \gt{bravais_lattices}} \\ \cline{4-7}
& & & \GT{primitive} (P) & \GT{base_centered} (S) & \GT{body_centered} (I) & \GT{face_centered} (F) \\ \hline
\multicolumn{2}{||c|}{\GT{triclinic} (a)} & $\text{C}_\text{i}$ & \bvimg{tP} & & & \\ \hline
\multicolumn{2}{||c|}{\GT{monoclinic} (m)} & $\text{C}_\text{2h}$ & \bvimg{mP} & \bvimg{mS} & & \\ \hline
\multicolumn{2}{||c|}{\GT{orthorhombic} (o)} & $\text{D}_\text{2h}$ & \bvimg{oP} & \bvimg{oS} & \bvimg{oI} & \bvimg{oF} \\ \hline
\multicolumn{2}{||c|}{\GT{tetragonal} (t)} & $\text{D}_\text{4h}$ & \bvimg{tP} & & \bvimg{tI} & \\ \hline
\multirow{2}{*}{\GT{hexagonal} (h)} & \GT{rhombohedral} & $\text{D}_\text{3d}$ & \bvimg{hR} & & & \\ \cline{2-7}
& \GT{hexagonal} & $\text{D}_\text{6h}$ & \bvimg{hP} & & & \\ \hline
\multicolumn{2}{||c|}{\GT{cubic} (c)} & $\text{O}_\text{h}$ & \bvimg{cP} & & \bvimg{cI} & \bvimg{cF} \\ \hline
\end{tabularx}
\end{adjustbox}
\end{table}
\Section[
\eng{Reciprocal lattice}
\ger{Reziprokes Gitter}
]{reci}
\begin{ttext}
\eng{The reciprokal lattice is made up of all the wave vectors $\vec{k}$ that ressemble standing waves with the periodicity of the Bravais lattice.}
\ger{Das rezioproke Gitter besteht aus dem dem Satz aller Wellenvektoren $\vec{k}$, die ebene Wellen mit der Periodizität des Bravais-Gitters ergeben.}
\end{ttext}
\begin{formula}{vectors}
\desc{Reciprocal lattice vectors}{}{$a_i$ real-space lattice vectors, $V_c$ volume of the primitive lattice cell}
\desc[german]{Reziproke Gittervektoren}{}{$a_i$ Bravais-Gitter Vektoren, $V_c$ Volumen der primitiven Gitterzelle}
\eq{
\vec{b_1} &= \frac{2\pi}{V_c} \vec{a_2} \times \vec{a_3} \\
\vec{b_2} &= \frac{2\pi}{V_c} \vec{a_3} \times \vec{a_1} \\
\vec{b_3} &= \frac{2\pi}{V_c} \vec{a_1} \times \vec{a_2}
}
\end{formula}
\Subsection[
\eng{Scattering processes}
\ger{Streuprozesse}
]{scatter}
\begin{formula}{matthiessen}
\desc{Matthiessen's rule}{Approximation, only holds if the processes are independent of each other}{$\mu$ mobility, $\tau$ scattering time}
\desc[german]{Matthiessensche Regel}{Näherung, nur gültig wenn die einzelnen Streuprozesse von einander unabhängig sind}{$\mu$ Moblitiät, $\tau$ Streuzeit}
\eq{
\frac{1}{\mu} &= \sum_{i = \textrm{\GT{\fqname}}} \frac{1}{\mu_i} \\
\frac{1}{\tau} &= \sum_{i = \textrm{\GT{\fqname}}} \frac{1}{\tau_i}
}
\end{formula}
\Section[
\eng{Free electron gas}
\ger{Freies Elektronengase}
]{free_e_gas}
\begin{ttext}
\eng{Assumptions: electrons can move freely and independent of each other.}
\ger{Annahmen: Elektronen bewegen sich frei und unabhänig voneinander.}
\end{ttext}
\begin{formula}{drift_velocity}
\desc{Drift velocity}{Velocity component induced by an external force (eg. electric field)}{$v_\text{th}$ thermal velocity}
\desc[german]{Driftgeschwindgkeit}{Geschwindigkeitskomponente durch eine externe Kraft (z.B. ein elektrisches Feld)}{$v_\text{th}$ thermische Geschwindigkeit}
\eq{\vec{v}_\text{D} = \vec{v} - \vec{v}_\text{th}}
\end{formula}
\begin{formula}{mean_free_time}
\desc{Mean free time}{}{}
\desc[german]{Streuzeit}{}{}
\eq{\tau}
\end{formula}
\begin{formula}{mean_free_path}
\desc{Mean free path}{}{}
\desc[german]{Mittlere freie Weglänge}{}{}
\eq{\ell = \braket{v} \tau}
\end{formula}
\begin{formula}{mobility}
\desc{Electrical mobility}{}{$q$ charge, $m$ mass}
\desc[german]{Beweglichkeit}{}{$q$ Ladung, $m$ Masse}
\eq{\mu = \frac{q \tau}{m}}
\end{formula}
\Subsection[
\eng{Drude model}
\ger{Drude-Modell}
]{drude}
\begin{ttext}
\eng{Classical model describing the transport properties of electrons in materials (metals):
The material is assumed to be an ion lattice and with freely moving electrons (electron gas). The electrons are
accelerated by an electric field and decelerated through collisions with the lattice ions.
The model disregards the Fermi-Dirac partition of the conducting electrons.
}
\ger{Ein klassisches Model zur Beschreibung der Transporteigenschaften von Elektronen in (v.a.) Metallen:
Der Festkörper wird als Ionenkristall mit frei beweglichen Elektronen (Elektronengas).
Die Elektronen werden durch ein Elektrisches Feld $E$ beschleunigt und durch Stöße mit den Gitterionen gebremst.
Das Modell vernachlässigt die Fermi-Dirac Verteilung der Leitungselektronen.
}
\end{ttext}
\begin{formula}{motion}
\desc{Equation of motion}{}{$v$ electron speed, $\vec{v}_\text{D}$ drift velocity, $\tau$ mean free time between collisions}
\desc[german]{Bewegungsgleichung}{}{$v$ Elektronengeschwindigkeit, $\vec{v}_\text{D}$ Driftgeschwindigkeit, $\tau$ Stoßzeit}
\eq{\masse \odv{\vec{v}}{t} + \frac{\masse}{\tau} \vec{v}_\text{D} = -e \vec{E}}
\end{formula}
\begin{formula}{current_density}
\desc{Current density}{Ohm's law}{$n$ charge particle density}
\desc[german]{Stromdichte}{Ohmsches Gesetz}{$n$ Ladungsträgerdichte}
\eq{\vec{j} = -ne\vec{v}_\text{D} = ne\mu \vec{E}}
\end{formula}
\begin{formula}{conductivity}
\desc{Drude-conductivity}{}{}
\desc[german]{Drude-Leitfähigkeit}{}{}
\eq{\sigma = \frac{\vec{j}}{\vec{E}} = \frac{e^2 \tau n}{\masse} = n e \mu}
\end{formula}
\Subsection[
\eng{Sommerfeld model}
\ger{Sommerfeld-Modell}
]{sommerfeld}
\begin{ttext}
\eng{Assumes a gas of free fermions underlying the pauli-exclusion principle. Only electrons in an energy range of $\kB T$ around the Fermi energy $\EFermi$ participate in scattering processes.}
\ger{Annahme eines freien Fermionengases, welches dem Pauli-Prinzip unterliegt. Nur Elektronen in einem Energiebereich von $\kB T$ um die Fermi Energe $\EFermi$ nehmen an Streuprozessen teil.}
\end{ttext}
\begin{formula}{current_density}
\desc{Current density}{}{}
\desc[german]{Stromdichte}{}{}
\eq{\vec{j} = -en\braket{v} = -e n \frac{\hbar}{\masse}\braket{\vec{k}} = -e \frac{1}{V} \sum_{\vec{k},\sigma} \frac{\hbar \vec{k}}{\masse}}
\end{formula}
\TODO{The formula for the conductivity is the same as in the drude model?}
\Subsection[
\eng{2D electron gas}
\ger{2D Elektronengas}
]{2deg}
\begin{ttext}
\eng{Lower dimension gases can be obtained by restricting a 3D gas with infinetly high potential walls on a narrow area with the width $L$.}
\ger{
Niederdimensionale Elektronengase erhält man, wenn ein 3D Gas durch unendlich hohe Potentialwände auf einem schmalen Bereich mit Breite $L$ eingeschränkt wird.
}
\end{ttext}
\begin{formula}{confinement_energy}
\desc{Confinement energy}{Raises ground state energy}{}
\desc[german]{Confinement Energie}{Erhöht die Grundzustandsenergie}{}
\eq{\Delta E = \frac{\hbar^2 \pi^2}{2\masse L^2}}
\end{formula}
\Eng[plain_wave]{plain wave}
\Ger[plain_wave]{ebene Welle}
\begin{formula}{energy}
\desc{Energy}{}{}
\desc[german]{Energie}{}{}
\eq{E_n = \underbrace{\frac{\hbar^2 k_\parallel^2}{2\masse}}_\text{$x$-$y$: \GT{plain_wave}} + \underbrace{\frac{\hbar^2 \pi^2}{2\masse L^2} n^2}_\text{$z$}}
\end{formula}
\Subsection[
\eng{1D electron gas / quantum wire}
\ger{1D Eleltronengas / Quantendraht}
]{1deg}
\begin{formula}{energy}
\desc{Energy}{}{}
\desc[german]{Energie}{}{}
\eq{E_n = \frac{\hbar^2 k_x^2}{2\masse} + \frac{\hbar^2 \pi^2}{2\masse L_z^2} n_1^2 + \frac{\hbar^2 \pi^2}{2\masse L_y^2} n_2^2}
\end{formula}
\Subsection[
\eng{0D electron gas / quantum dot}
\ger{0D Elektronengase / Quantenpunkt}
]{0deg}
\TODO{TODO}
\Section[
\eng{Measurement techniques}
\ger{Messtechniken}
]{meas}
\Subsection[
\eng{ARPES}
\ger{ARPES}
]{arpes}
what?
in?
how?
plot
\Subsection[
\eng{Scanning probe microscopy SPM}
\ger{Rastersondenmikroskopie (SPM)}
]{spm}
\begin{ttext}
\eng{Images of surfaces are taken by scanning the specimen with a physical probe.}
\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}{
\eng{Atomic force microscopy (AMF)}
\ger{Atomare Rasterkraftmikroskopie (AMF)}
}
\entry{application}{
\eng{Surface stuff}
\ger{Oberflächenzeug}
}
\entry{how}{
\eng{With needle}
\ger{Mit Nadel}
}
\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}
\begin{minipagetable}{stm}
\entry{name}{
\eng{Scanning tunneling microscopy (STM)}
\ger{Rastertunnelmikroskop (STM)}
}
\entry{application}{
\eng{Surface stuff}
\ger{Oberflächenzeug}
}
\entry{how}{
\eng{With TUnnel}
\ger{Mit TUnnel}
}
\end{minipagetable}
\begin{minipage}{0.5\textwidth}
\begin{figure}[H]
\centering
\includegraphics[width=0.8\textwidth]{img/cm_stm.pdf}
\caption{\cite{Bian2021}}
\end{figure}
\end{minipage}
\Section[
\eng{Fabrication techniques}
\ger{Herstellungsmethoden}
]{fab}
\begin{minipagetable}{cvd}
\entry{name}{
\eng{Chemical vapor deposition (CVD)}
\ger{Chemische Gasphasenabscheidung (CVD)}
}
\entry{how}{
\eng{
A substrate is exposed to volatile precursors, which react and/or decompose on the heated substrate surface to produce the desired deposit.
By-products are removed by gas flow through the chamber.
}
\ger{
An der erhitzten Oberfläche eines Substrates wird aufgrund einer chemischen Reaktion mit einem Gas eine Feststoffkomponente abgeschieden.
Nebenprodukte werden durch den Gasfluss durch die Kammer entfernt.
}
}
\entry{application}{
\eng{
\begin{itemize}
\item Polysilicon \ce{Si}
\item Silicon dioxide \ce{SiO_2}
\item Graphene
\item Diamond
\end{itemize}
}
\ger{
\begin{itemize}
\item Poly-silicon \ce{Si}
\item Siliziumdioxid \ce{SiO_2}
\item Graphen
\item Diamant
\end{itemize}
}
}
\end{minipagetable}
\begin{minipage}{0.5\textwidth}
\centering
\includegraphics[width=\textwidth]{img/cm_cvd_english.pdf}
\end{minipage}
\Subsection[
\eng{Epitaxy}
\ger{Epitaxie}
]{epitaxy}
\begin{ttext}
\eng{A type of crystal groth in which new layers are formed with well-defined orientations with respect to the crystalline seed layer.}
\ger{Eine Art des Kristallwachstums, bei der mindestens eine kristallographische Ordnung der wachsenden Schicht der des Substrates entspricht.}
\end{ttext}
\begin{minipagetable}{mbe}
\entry{name}{
\eng{Molecular Beam Epitaxy (MBE)}
\ger{Molekularstrahlepitaxie (MBE)}
}
\entry{how}{
\eng{In a ultra-high vacuum, the elements are heated until they slowly sublime. The gases then condensate on the substrate surface}
\ger{Die Elemente werden in einem Ultrahochvakuum erhitzt, bis sie langsam sublimieren. Die entstandenen Gase kondensieren dann auf der Oberfläche des Substrats}
}
\entry{application}{
\eng{
\begin{itemize}
\item Gallium arsenide \ce{GaAs}
\end{itemize}
\TODO{Link to GaAs}
}
\ger{
\begin{itemize}
\item Galliumarsenid \ce{GaAs}
\end{itemize}
}
}
\end{minipagetable}
\begin{minipage}{0.5\textwidth}
\centering
\includegraphics[width=\textwidth]{img/cm_mbe_english.pdf}
\end{minipage}

54
src/constants.tex Normal file
View File

@ -0,0 +1,54 @@
\Section[
\eng{Constants}
\ger{Konstanten}
]{constants}
\begin{formula}{planck}
\desc{Planck Constant}{}{}
\desc[german]{Plancksches Wirkumsquantum}{}{}
\constant{h}{def}{
\val{6.62607015\cdot 10^{-34}}{\joule\s}
\val{4.135667969\dots\xE{-15}}{\eV\s}
}
\end{formula}
\begin{formula}{universal_gas}
\desc{Universal gas constant}{Proportionality factor for ideal gases}{\ConstRef{avogadro}, \ConstRef{boltzmann}}
\desc[german]{Universelle Gaskonstante}{Proportionalitätskonstante für ideale Gase}{}
\constant{R}{def}{
\val{8.31446261815324}{\joule\per\mol\kelvin}
\val{\NA \cdot \kB}{}
}
\end{formula}
\begin{formula}{avogadro}
\desc{Avogadro constant}{Number of molecules per mole}{}
\desc[german]{Avogadro-Konstante}{Anzahl der Moleküle pro mol}{}
\constant{\NA}{def}{
\val{6.02214076 \xE{23}}{1\per\mole}
}
\end{formula}
\begin{formula}{boltzmann}
\desc{Boltzmann constant}{Temperature-Energy conversion factor}{}
\desc[german]{Boltzmann-Konstante}{Temperatur-Energie Umrechnungsfaktor}{}
\constant{\kB}{def}{
\val{1.380649 \xE{-23}}{\joule\per\kelvin}
}
\end{formula}
\begin{formula}{faraday}
\desc{Faraday constant}{Electric charge of one mol of single-charged ions}{\ConstRef{avogadro}, \ConstRef{boltzmann}}
\desc[german]{Faraday-Konstante}{Elektrische Ladungs von einem Mol einfach geladener Ionen}{}
\constant{F}{def}{
\val{9.64853321233100184\xE{4}}{\coulomb\per\mol}
\val{\NA\,e}{}
}
\end{formula}
\begin{formula}{charge}
\desc{Unit charge}{}{}
\desc[german]{Elementarladung}{}{}
\constant{e}{def}{
\val{1.602176634\xE{-19}}{\coulomb}
}
\end{formula}

8
src/ed/ed.tex Normal file
View File

@ -0,0 +1,8 @@
\Part[
\eng{Electrodynamics}
\ger{Elektrodynamik}
]{ed}
% pure electronic stuff in el
% pure magnetic stuff in mag
% electromagnetic stuff in em

81
src/ed/el.tex Normal file
View File

@ -0,0 +1,81 @@
\Section[
\eng{Electric field}
\ger{Elektrisches Feld}
]{el}
\begin{formula}{electric_field}
\desc{Electric field}{Surrounds charged particles}{}
\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}
\eq{\PhiE = \iint_S \vec{\E}\cdot\d\vec{S} = \frac{Q}{\varepsilon_0}}
\end{formula}
\begin{formula}{permittivity}
\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}
\desc{Relative permittivity / Dielectric constant}{}{\QtyRef{permittivity}, \ConstRef{vacuum_permittivity}}
\desc[german]{Relative Permittivität / Dielectric constant}{}{}
\eq{
\epsilon(\omega)_\txr = \frac{\epsilon(\omega)}{\epsilon_0}
}
\end{formula}
\begin{formula}{vacuum_permittivity}
\desc{Vacuum permittivity}{Electric constant}{}
\desc[german]{Vakuum Permittivität}{Elektrische Feldkonstante}{}
\constant{\epsilon_0}{exp}{
\val{8.8541878188(14)\xE{-1}}{\ampere\s\per\volt\m}
}
\end{formula}
\begin{formula}{electric_susceptibility}
\desc{Electric susceptibility}{Describes how polarized a dielectric material becomes when an electric field is applied}{$\epsilon_\txr$ \fqEqRef{ed:el:relative_permittivity}}
\desc[german]{Elektrische Suszeptibilität}{Beschreibt wie stark ein dielektrisches Material polarisiert wird, wenn ein elektrisches Feld angelegt wird}{}
\quantity{\chi_\txe}{}{s}
\eq{
\epsilon_\txr = 1 + \chi_\txe
}
\end{formula}
\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}

111
src/ed/em.tex Normal file
View File

@ -0,0 +1,111 @@
\Section[
\eng{Electromagnetism}
\ger{Elektromagnetismus}
]{em}
\begin{formula}{speed_of_light}
\desc{Speed of light}{in the vacuum}{}
\desc[german]{Lightgeschwindigkeit}{in the vacuum}{}
\constant{c}{exp}{
\val{299792458}{\m\per\s}
}
\end{formula}
\begin{formula}{vacuum_relations}
\desc{Vacuum permittivity - permeability relation}{\TODO{Does this have a name?}}{\ConstRef{vacuum_permittivity}, \ConstRef{magnetic_vacuum_permeability}, \ConstRef{speed_of_light}}
\desc[german]{Vakuum Permittivität - Permeabilität Beziehung}{}{}
\eq{
\epsilon_0 \mu_0 = \frac{1}{c^2}
}
\end{formula}
\begin{formula}{poisson_equation}
\desc{Poisson equation for electrostatics}{}{\QtyRef{charge_density}, \QtyRef{permittivity}, $\Phi$ Potential}
\desc[german]{Poisson Gleichung in der Elektrostatik}{}{}
\eq{\laplace \Phi(\vecr) = -\frac{\rho(\vecr)}{\epsilon}}
\TODO{double check $\Phi$}
\end{formula}
\begin{formula}{poynting}
\desc{Poynting vector}{Directional energy flux or power flow of an electromagnetic field [$\si{\W\per\m^2}$]}{}
\desc[german]{Poynting-Vektor}{Gerichteter Energiefluss oder Leistungsfluss eines elektromgnetischen Feldes [$\si{\W\per\m^2}$]}{}
\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}
]{Maxwell}
\begin{formula}{vacuum}
\desc{Vacuum}{microscopic formulation}{}
\desc[german]{Vakuum}{Mikroskopische Formulierung}{}
\eq{
\Div \vec{\E} &= \frac{\rho_\text{el}}{\epsilon_0} \\
\Div \vec{B} &= 0 \\
\Rot \vec{\E} &= - \odv{\vec{B}}{t} \\
\Rot \vec{B} &= \mu_0 \vec{j} + \frac{1}{c^2} \odv{\vec{\E}}{t}
}
\end{formula}
\begin{formula}{material}
\desc{Matter}{Macroscopic formulation}{}
\desc[german]{Materie}{Makroskopische Formulierung}{}
\eq{
\Div \vec{D} &= \rho_\text{el} \\
\Div \vec{B} &= 0 \\
\Rot \vec{\E} &= - \odv{\vec{B}}{t} \\
\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[
\eng{Induction}
\ger{Induktion}
]{induction}
\begin{formula}{farady_law}
\desc{Faraday's law of induction}{}{}
\desc[german]{Faradaysche Induktionsgesetz}{}{}
\eq{U_\text{ind} = -\odv{}{t} \PhiB = - \odv{}{t} \iint_A\vec{B} \cdot \d\vec{A}}
\end{formula}
\begin{formula}{lenz}
\desc{Lenz's law}{}{}
\desc[german]{Lenzsche Regel}{}{}
\ttxt{
\eng{
Change of magnetic flux through a conductor induces a current that counters that change of magnetic flux.
}
\ger{
Die Änderung des magnetischen Flußes durch einen Leiter induziert einen Strom der der Änderung entgegenwirkt.
}
}
\end{formula}

122
src/ed/mag.tex Normal file
View File

@ -0,0 +1,122 @@
\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_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}{}{}
\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}

141
src/ed/misc.tex Normal file
View File

@ -0,0 +1,141 @@
% TODO move
\Section[
\eng{Hall-Effect}
\ger{Hall-Effekt}
]{hall}
\begin{formula}{cyclotron}
\desc{Cyclontron frequency}{}{}
\desc[german]{Zyklotronfrequenz}{}{}
\eq{\omega_\text{c} = \frac{e B}{\masse}}
\end{formula}
\TODO{Move}
\Subsection[
\eng{Classical Hall-Effect}
\ger{Klassischer Hall-Effekt}
]{classic}
\begin{ttext}
\eng{Current flowing in $x$ direction in a conductor ($l \times b \times d$) with a magnetic field $B$ in $z$ direction leads to a hall voltage $U_\text{H}$ in $y$ direction.}
\ger{Fließt in einem Leiter ($l \times b \times d$) ein Strom in $x$ Richtung, während der Leiter von einem Magnetfeld $B$ in $z$-Richtung durchdrungen, wird eine Hallspannung $U_\text{H}$ in $y$-Richtung induziert.}
\end{ttext}
\begin{formula}{voltage}
\desc{Hall voltage}{}{$n$ charge carrier density}
\desc[german]{Hallspannung}{}{$n$ Ladungsträgerdichte}
\eq{U_\text{H} = \frac{I B}{ne d}}
\end{formula}
\begin{formula}{coefficient}
\desc{Hall coefficient}{Sometimes $R_\txH$}{}
\desc[german]{Hall-Koeffizient}{Manchmal $R_\txH$}{}
\eq{A_\text{H} := -\frac{E_y}{j_x B_z} \explOverEq{\GT{metals}} \frac{1}{ne} = \frac{\rho_{xy}}{B_z}}
\end{formula}
\begin{formula}{resistivity}
\desc{Resistivity}{}{}
\desc[german]{Spezifischer Widerstand}{}{}
\eq{\rho_{xx} &= \frac{\masse}{ne^2\tau} \\ \rho_{xy} &= \frac{B}{ne}}
\end{formula}
\Subsection[
\eng{Integer quantum hall effect}
\ger{Ganzahliger Quantenhalleffekt}
]{quantum}
\begin{formula}{conductivity}
\desc{Conductivity tensor}{}{}
\desc[german]{Leitfähigkeitstensor}{}{}
\eq{\sigma = \begin{pmatrix} \sigma_{xy} & \sigma_{xy} \\ \sigma_{yx} & \sigma_{yy} \end{pmatrix} }
\end{formula}
\begin{formula}{resistivity_tensor}
\desc{Resistivity tensor}{}{}
\desc[german]{Spezifischer Widerstands-tensor}{}{}
\eq{
\rho = \sigma^{-1}
% \sigma = \begin{pmatrix} \sigma_{xy} & \sigma_{xy} \\ \sigma_{yx} & \sigma_{yy} \end{pmatrix} }
}
\end{formula}
\begin{formula}{resistivity}
\desc{Resistivity}{}{$\nu \in \mathbb{Z}$ filing factor}
\desc[german]{Spezifischer Hallwiderstand}{}{$\nu \in \mathbb{Z}$ Füllfaktor}
\eq{\rho_{xy} = \frac{2\pi\hbar}{e^2} \frac{1}{\nu}}
\end{formula}
% \begin{formula}{qhe}
% \desc{Integer quantum hall effect}{}{}
% \desc[german]{Ganzahliger Quanten-Hall-Effekt}{}{}
% \fig{img/qhe-klitzing.jpeg}
% \end{formula}
\begin{formula}{fqhe}
\desc{Fractional quantum hall effect}{}{$\nu$ fraction of two numbers without shared divisors}
\desc[german]{Fraktionaler Quantum-Hall-Effekt}{}{$\nu$ Bruch aus Zahlen ohne gemeinsamen Teiler}
\eq{\nu = \frac{1}{3},\frac{2}{5},\frac{3}{7},\frac{2}{3}...}
\end{formula}
\begin{ttext}
\eng{
\begin{itemize}
\item \textbf{Integer} (QHE): filling factor $\nu$ is an integer
\item \textbf{Fractional} (FQHE): filling factor $\nu$ is a fraction
\item \textbf{Spin} (QSHE): spin currents instead of charge currents
\item \textbf{Anomalous} (QAHE): symmetry breaking by internal effects instead of external magnetic fields
\end{itemize}
}
\ger{
\begin{itemize}
\item \textbf{Integer} (QHE): Füllfaktor $\nu$ ist ganzzahlig
\item \textbf{Fractional} (FQHE): Füllfaktor $\nu$ ist ein Bruch
\item \textbf{Spin} (QSHE): Spin Ströme anstatt Ladungsströme
\item \textbf{Anomalous} (QAHE): Symmetriebruch durch interne Effekte anstatt druch ein externes Magnetfeld
\end{itemize}
}
\end{ttext}
\TODO{sort}
\Section[
\eng{Dipole-stuff}
\ger{Dipol-zeug}
]{dipole}
\begin{formula}{poynting}
\desc{Dipole radiation Poynting vector}{}{}
\desc[german]{Dipolsrahlung Poynting-Vektor}{}{}
\eq{\vec{S} = \left(\frac{\mu_0 p_0^2 \omega^4}{32\pi^2 c}\right)\frac{\sin^2\theta}{r^2} \vec{r}}
\end{formula}
\begin{formula}{power}
\desc{Time-average power}{}{}
\desc[german]{Zeitlich mittlere Leistung}{}{}
\eq{P = \frac{\mu_0\omega^4 p_0^2}{12\pi c}}
\end{formula}
\Section[
\eng{misc}
\ger{misc}
]{misc}
\begin{formula}{impedance_r}
\desc{Impedance of an ohmic resistor}{}{\QtyRef{resistance}}
\desc[german]{Impedanz eines Ohmschen Widerstands}{}{}
\eq{Z_{R} = R}
\end{formula}
\begin{formula}{impedance_c}
\desc{Impedance of a capacitor}{}{\QtyRef{capacity}, \QtyRef{angular_velocity}}
\desc[german]{Impedanz eines Kondensators}{}{}
\eq{Z_{C} = \frac{1}{\I\omega C}}
\end{formula}
\begin{formula}{impedance_l}
\desc{Impedance of an inductor}{}{\QtyRef{inductance}, \QtyRef{angular_velocity}}
\desc[german]{Impedanz eines Induktors}{}{}
\eq{Z_{L} = \I\omega L}
\end{formula}
\TODO{impedance addition for parallel / linear}

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

@ -1,222 +0,0 @@
\def\PhiB{\Phi_\text{B}}
\def\PhiE{\Phi_\text{E}}
\Part[
\eng{Electrodynamics}
\ger{Elektrodynamik}
]{ed}
\Section[
\eng{Maxwell-Equations}
\ger{Maxwell-Gleichungen}
]{Maxwell}
\begin{formula}{vacuum}
\desc{Vacuum}{microscopic formulation}{}
\desc[german]{Vakuum}{Mikroskopische Formulierung}{}
\eq{
\Div \vec{E} &= \frac{\rho_\text{el}}{\epsilon_0} \\
\Div \vec{B} &= 0 \\
\Rot \vec{E} &= - \odv{\vec{B}}{t} \\
\Rot \vec{B} &= \mu_0 \vec{j} + \frac{1}{c^2} \odv{\vec{E}}{t}
}
\end{formula}
\begin{formula}{material}
\desc{Matter}{Macroscopic formulation}{}
\desc[german]{Materie}{Makroskopische Formulierung}{}
\eq{
\Div \vec{D} &= \rho_\text{el} \\
\Div \vec{B} &= 0 \\
\Rot \vec{E} &= - \odv{\vec{B}}{t} \\
\Rot \vec{H} &= \vec{j} + \odv{\vec{D}}{t}
}
\end{formula}
\Section[
\eng{Fields}
\ger{Felder}
]{fields}
\Subsection[
\eng{Electric field}
\ger{Elektrisches Feld}
]{mag}
\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}
\eq{\PhiE = \iint_S \vec{E}\cdot\d\vec{S} = \frac{Q}{\varepsilon_0}}
\end{formula}
\Subsection[
\eng{Magnetic field}
\ger{Magnetfeld}
]{mag}
\Eng[magnetic_flux]{Magnetix flux density}
\Ger[magnetic_flux]{Magnetische Flussdichte}
% \begin{quantity}{mag_flux}{\Phi}{\Wb}{\kg\m^2\per\s^2\A^1}{scalar}
% \sign{}
% \desc{Magnetic flux density}{}
% \desc[german]{Magnetische Feldstärke}{}
% \end{quantity}
\begin{formula}{magnetic_flux}
\desc{Magnetic flux}{}{}
\desc[german]{Magnetischer Fluss}{}{}
\eq{\PhiB = \iint_A \vec{B}\cdot\d\vec{A}}
\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}{name}
\desc{}{}{}
\desc[german]{}{}{}
\eq{}
\end{formula}
\begin{formula}{magnetization}
\desc{Magnetization}{}{$m$ mag. moment, $V$ volume}
\desc[german]{Magnetisierung}{}{$m$ mag. Moment, $V$ Volumen}
\eq{\vec{M} = \odv{\vec{m}}{V} = \chi_\text{m} \cdot \vec{H}}
\end{formula}
\begin{formula}{angular_torque}
\desc{Torque}{}{$m$ mag. moment}
\desc[german]{Drehmoment}{}{$m$ mag. Moment}
\eq{\vec{\tau} = \vec{m} \times \vec{B}}
\end{formula}
\begin{formula}{suceptibility}
\desc{Susceptibility}{}{}
\desc[german]{Suszeptibilität}{}{}
\eq{\chi_\text{m} = \pdv{M}{B} = \frac{\mu}{\mu_0} - 1 }
\end{formula}
\begin{formula}{poynting}
\desc{Poynting vector}{Directional energy flux or power flow of an electromagnetic field [$\si{\W\per\m^2}$]}{}
\desc[german]{Poynting-Vektor}{Gerichteter Energiefluss oder Leistungsfluss eines elektromgnetischen Feldes [$\si{\W\per\m^2}$]}{}
\eq{\vec{S} = \vec{E} \times \vec{H}}
\end{formula}
\Subsection[
\eng{Induction}
\ger{Unduktion}
]{induction}
\begin{formula}{farady_law}
\desc{Faraday's law of induction}{}{}
\desc[german]{Faradaysche Induktionsgesetz}{}{}
\eq{U_\text{ind} = -\odv{}{t} \PhiB = - \odv{}{t} \iint_A\vec{B} \cdot \d\vec{A}}
\end{formula}
\Section[
\eng{Hall-Effect}
\ger{Hall-Effekt}
]{hall}
\begin{formula}{cyclotron}
\desc{Cyclontron frequency}{}{}
\desc[german]{Zyklotronfrequenz}{}{}
\eq{\omega_\text{c} = \frac{e B}{\masse}}
\end{formula}
\TODO{Move}
\Subsection[
\eng{Classical Hall-Effect}
\ger{Klassischer Hall-Effekt}
]{classic}
\begin{ttext}
\eng{Current flowing in $x$ direction in a conductor ($l \times b \times d$) with a magnetic field $B$ in $z$ direction leads to a hall voltage $U_\text{H}$ in $y$ direction.}
\ger{Fließt in einem Leiter ($l \times b \times d$) ein Strom in $x$ Richtung, während der Leiter von einem Magnetfeld $B$ in $z$-Richtung durchdrungen, wird eine Hallspannung $U_\text{H}$ in $y$-Richtung induziert.}
\end{ttext}
\begin{formula}{voltage}
\desc{Hall voltage}{}{$n$ charge carrier density}
\desc[german]{Hallspannung}{}{$n$ Ladungsträgerdichte}
\eq{U_\text{H} = \frac{I B}{ne d}}
\end{formula}
\begin{formula}{coefficient}
\desc{Hall coefficient}{}{}
\desc[german]{Hall-Koeffizient}{}{}
\eq{R_\text{H} = -\frac{Eg}{j_x Bg} = \frac{1}{ne} = \frac{\rho_{xy}}{B_z}}
\end{formula}
\begin{formula}{resistivity}
\desc{Resistivity}{}{}
\desc[german]{Spezifischer Widerstand}{}{}
\eq{\rho_{xx} &= \frac{\masse}{ne^2\tau} \\ \rho_{xy} &= \frac{B}{ne}}
\end{formula}
\Subsection[
\eng{Integer quantum hall effect}
\ger{Ganzahliger Quantenhalleffekt}
]{quantum}
\begin{formula}{conductivity}
\desc{Conductivity tensor}{}{}
\desc[german]{Leitfähigkeitstensor}{}{}
\eq{\sigma = \begin{pmatrix} \sigma_{xy} & \sigma_{xy} \\ \sigma_{yx} & \sigma_{yy} \end{pmatrix} }
\end{formula}
\begin{formula}{resistivity}
\desc{Resistivity tensor}{}{}
\desc[german]{Spezifischer Widerstands-tensor}{}{}
\eq{
\rho = \sigma^{-1}
% \sigma = \begin{pmatrix} \sigma_{xy} & \sigma_{xy} \\ \sigma_{yx} & \sigma_{yy} \end{pmatrix} }
}
\end{formula}
\begin{formula}{resistivity}
\desc{Resistivity}{}{$\nu \in \mathbb{Z}$}
\desc[german]{Spezifischer Hallwiderstand}{}{$\nu \in \mathbb{Z}$}
\eq{\rho_{xy} = \frac{2\pi\hbar}{e^2} \frac{1}{\nu}}
\end{formula}
% \begin{formula}{qhe}
% \desc{Integer quantum hall effect}{}{}
% \desc[german]{Ganzahliger Quanten-Hall-Effekt}{}{}
% \fig{img/qhe-klitzing.jpeg}
% \end{formula}
\TODO{sort}
\begin{formula}{impedance_c}
\desc{Impedance of a capacitor}{}{}
\desc[german]{Impedanz eines Kondesnators}{}{}
\eq{Z_{C} = \frac{1}{i\omega C}}
\end{formula}
\begin{formula}{impedance_l}
\desc{Impedance of an inductor}{}{}
\desc[german]{Impedanz eines Induktors}{}{}
\eq{Z_{L} = i\omega L}
\end{formula}
\TODO{impedance addition for parallel / linear}
\Section[
\eng{Dipole-stuff}
\ger{Dipol-zeug}
]{dipole}
\begin{formula}{poynting}
\desc{Dipole radiation Poynting vector}{}{}
\desc[german]{Dipolsrahlung Poynting-Vektor}{}{}
\eq{\vec{S} = \left(\frac{\mu_0 p_0^2 \omega^4}{32\pi^2 c}\right)\frac{\sin^2\theta}{r^2} \vec{r}}
\end{formula}
\begin{formula}{power}
\desc{Time-average power}{}{}
\desc[german]{Zeitlich mittlere Leistung}{}{}
\eq{P = \frac{\mu_0\omega^4 p_0^2}{12\pi c}}
\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}{}

BIN
src/img/cm_wurtzite.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

BIN
src/img/cm_zincblende.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 KiB

View File

@ -1,142 +1,142 @@
%! TeX program = lualatex
% (for vimtex)
\documentclass[11pt, a4paper]{article} \documentclass[11pt, a4paper]{article}
% \usepackage[utf8]{inputenc} % SET LANGUAGE HERE
\usepackage[english]{babel} \usepackage[german]{babel}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
% ENVIRONMENTS etc % ENVIRONMENTS etc
\usepackage{adjustbox} \usepackage{adjustbox}
\usepackage{colortbl} % color table \usepackage{colortbl} % color table
\usepackage{tabularx} % bravais table \usepackage{tabularx} % bravais table
\usepackage{multirow} % for superconducting qubit table \usepackage{multirow} % for superconducting qubit table
\usepackage{hhline} % for superconducting qubit table \usepackage{hhline} % for superconducting qubit table
% TOOLING % TOOLING
\usepackage{graphicx} \usepackage{graphicx}
\usepackage{etoolbox} \usepackage{etoolbox}
\usepackage{luacode} % \usepackage{luacode}
\usepackage{expl3} % switch case and other stuff \usepackage{expl3} % switch case and other stuff
\usepackage{substr} \usepackage{substr}
\usepackage{xcolor} \usepackage{xcolor}
\usepackage{float} % FORMATING
\usepackage[hidelinks]{hyperref} \usepackage{float} % float barrier
\usepackage{subcaption} \usepackage{subcaption} % subfigures
\usepackage[hidelinks]{hyperref} % hyperrefs for \fqEqRef, \qtyRef, etc
\usepackage[shortlabels]{enumitem} % easily change enum symbols to i), a. etc \usepackage[shortlabels]{enumitem} % easily change enum symbols to i), a. etc
\hypersetup{colorlinks = true, % Colours links instead of ugly boxes \setlist{noitemsep} % no vertical space between items
urlcolor = blue, % Colour for external hyperlinks \setlist[1]{labelindent=\parindent} % < Usually a good idea
linkcolor = cyan, % Colour of internal links \setlist[itemize]{leftmargin=*}
citecolor = red % Colour of citations % \setlist[enumerate]{labelsep=*, leftmargin=1.5pc} % horizontal indent of items
}
\usepackage{translations}
\input{util/translation.tex}
\usepackage{sectsty}
\usepackage{titlesec}
\input{util/colorscheme.tex}
\usepackage{titlesec} % colored titles
\usepackage{array} % more array options
\newcolumntype{C}{>{$}c<{$}} % math-mode version of "c" column type
% \usepackage{sectsty}
% GRAPHICS % GRAPHICS
\usepackage{tikz} % drawings \usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usepackage{tikz} % drawings
\usetikzlibrary{decorations.pathmorphing} \usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.pathreplacing} % braces
\usetikzlibrary{calc} \usetikzlibrary{calc}
\usepackage{circuitikz} \usetikzlibrary{patterns}
\usetikzlibrary{patterns}
\input{util/tikz_macros}
% speed up compilation by externalizing figures
% \usetikzlibrary{external}
% \tikzexternalize[prefix=tikz_figures]
% \tikzexternalize
\usepackage{circuitikz} % electrical circuits with tikz
% SCIENCE PACKAGES % SCIENCE PACKAGES
\usepackage{mathtools} \usepackage{mathtools}
\usepackage{MnSymbol} % for >>> \ggg sign % set display math skips
\AtBeginDocument{
\abovedisplayskip=0pt
\abovedisplayshortskip=0pt
\belowdisplayskip=0pt
\belowdisplayshortskip=0pt
}
\usepackage{MnSymbol} % for >>> \ggg sign
\usepackage[version=4,arrows=pgf-filled]{mhchem}
\usepackage{upgreek} % upright greek letters for chemmacros
\usepackage{chemmacros} % for orbitals images
% \usepackage{esdiff} % derivatives % \usepackage{esdiff} % derivatives
% esdiff breaks when taking \dot{q} has argument % esdiff breaks when taking \dot{q} has argument
\usepackage{derivative} \usepackage{derivative} % \odv, \pdv
\usepackage[version=4,arrows=pgf-filled]{mhchem} \usepackage{bbold} % \mathbb font
\usepackage{bbold} % \mathbb font \usepackage{braket} % <bra|ket>
\usepackage{braket} \usepackage{siunitx} % \si \SI units
\usepackage{siunitx}
\sisetup{output-decimal-marker = {,}} \sisetup{output-decimal-marker = {,}}
\sisetup{separate-uncertainty} \sisetup{separate-uncertainty}
\sisetup{per-mode = power} \sisetup{per-mode = power}
\sisetup{exponent-product=\ensuremath{\cdot}} \sisetup{exponent-product=\ensuremath{\cdot}}
% DEBUG
% \usepackage{lua-visual-debug}
% DUMB STUFF
% \usepackage{emoji}
% \newcommand\temoji[1]{\text{\emoji{#1}}}
% \def\sigma{\temoji{shark}}
% \def\lambda{\temoji{sheep}}
% \def\psi{\temoji{pickup-truck}}
% \def\pi{\temoji{birthday-cake}}
% \def\Pi{\temoji{hospital}}
% \def\rho{\temoji{rhino}}
% \def\nu{\temoji{unicorn}}
% \def\mu{\temoji{mouse}}
\newcommand{\TODO}[1]{{\color{fg-red}TODO:#1}}
\newcommand{\TODO}[1]{{\color{bright_red}TODO:#1}}
\newcommand{\ts}{\textsuperscript} \newcommand{\ts}{\textsuperscript}
% put an explanation above an equal sign
% [1]: equality sign (or anything else)
% 2: text (not in math mode!)
\newcommand{\explUnderEq}[2][=]{%
\underset{\substack{\uparrow\\\mathrlap{\text{\hspace{-1em}#2}}}}{#1}}
\newcommand{\explOverEq}[2][=]{%
\overset{\substack{\mathrlap{\text{\hspace{-1em}#2}}\\\downarrow}}{#1}}
% "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 ':'
% [1]: code to run after setting \fqname, but before the \part, \section etc
% 2: key
\newcommand{\Part}[2][desc]{
\newpage
\def\partname{#2}
\def\sectionname{}
\def\subsectionname{}
\def\subsubsectionname{}
\edef\fqname{\partname}
#1
\part{\GT{\fqname}}
\label{sec:\fqname}
}
\newcommand{\Section}[2][]{
\def\sectionname{#2}
\def\subsectionname{}
\def\subsubsectionname{}
\edef\fqname{\partname:\sectionname}
#1
\section{\GT{\fqname}}
\label{sec:\fqname}
}
% \newcommand{\Subsection}[1]{\Subsection{#1}{}}
\newcommand{\Subsection}[2][]{
\def\subsectionname{#2}
\def\subsubsectionname{}
\edef\fqname{\partname:\sectionname:\subsectionname}
#1
\subsection{\GT{\fqname}}
\label{sec:\fqname}
}
\newcommand{\Subsubsection}[2][]{
\def\subsubsectionname{#2}
\edef\fqname{\partname:\sectionname:\subsectionname:\subsubsectionname}
#1
\subsubsection{\GT{\fqname}}
\label{sec:\fqname}
}
% Make the translation of #1 a reference to a equation
% 1: key
\newcommand{\fqEqRef}[1]{
\hyperref[eq:#1]{\GT{#1}}
}
% Make the translation of #1 a reference to a section
% 1: key
\newcommand{\fqSecRef}[1]{
\hyperref[sec:#1]{\GT{#1}}
}
% \usepackage{xstring} % \usepackage{xstring}
\input{circuit.tex} % 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}
% some translations \input{circuit.tex}
\input{util/macros.tex}
\input{util/environments.tex} % requires util/translation.tex to be loaded first
\usepackage{pkg/mqlua}
\usepackage{pkg/mqfqname}
% TRANSLATION
% \usepackage{translations}
\usepackage{pkg/mqtranslation}
\input{util/colorscheme.tex}
\input{util/colors.tex} % after colorscheme
\usepackage{pkg/mqconstant}
\usepackage{pkg/mqquantity}
\usepackage{pkg/mqformula}
\usepackage{pkg/mqperiodictable}
% INPUT
% 1: starting pattern of files to input using the Input command. All other files are ignored
\newcommand\InputOnly[1]{\edef\inputOnlyFile{#1}}
\edef\inputOnlyFile{all}
\newcommand\Input[1]{
% yes this could surely be done in tex
\directlua{
if '\luaescapestring{\inputOnlyFile}' == 'all' or string.startswith('\luaescapestring{#1}', '\luaescapestring{\inputOnlyFile}') then
tex.print("\\input{\luaescapestring{#1}}")
end
}
}
\title{Formelsammlung} \title{Formelsammlung}
\author{Matthias Quintern} \author{Matthias Quintern}
\date{\today} \date{\today}
\input{util/macros.tex}
\input{util/environments.tex}
\begin{document} \begin{document}
\IfFileExists{\jobname.translations.aux}{%
\input{\jobname.translations.aux}
}{}
\makeatletter\let\percentchar\@percentchar\makeatother
\maketitle \maketitle
\tableofcontents \tableofcontents
@ -145,32 +145,78 @@
\input{util/translations.tex} \input{util/translations.tex}
\input{linalg.tex} % \InputOnly{ch}
\input{geometry.tex} \Input{math/math}
\Input{math/linalg}
\Input{math/geometry}
\Input{math/calculus}
\Input{math/probability_theory}
\input{analysis.tex} \Input{mechanics}
\Input{statistical_mechanics}
\input{probability_theory.tex} \Input{ed/ed}
\Input{ed/el}
\Input{ed/mag}
\Input{ed/em}
\Input{ed/optics}
\Input{ed/misc}
\input{mechanics.tex} \Input{qm/qm}
\Input{qm/atom}
\input{statistical_mechanics.tex} \Input{cm/cm}
\Input{cm/crystal}
\Input{cm/egas}
\Input{cm/charge_transport}
\Input{cm/low_temp}
\Input{cm/semiconductors}
\Input{cm/misc}
\Input{cm/techniques}
\Input{cm/topo}
\Input{cm/mat}
\input{electrodynamics.tex} \Input{particle}
\input{quantum_mechanics.tex}
\input{atom.tex}
\input{condensed_matter.tex} \Input{quantum_computing}
% \input{topo.tex} \Input{comp/comp}
\Input{comp/qmb}
\Input{comp/est}
\Input{comp/ad}
\Input{comp/ml}
% \input{quantum_computing.tex} \Input{ch/periodic_table} % only definitions
\Input{ch/ch}
\Input{ch/el}
\Input{ch/misc}
% \input{many-body-simulations.tex} \newpage
\Part[
\eng{Appendix}
\ger{Anhang}
]{appendix}
\begin{formula}{world}
\desc{World formula}{}{}
\desc[german]{Weltformel}{}{}
\eq{E = mc^2 +\text{AI}}
\end{formula}
\Input{quantities}
\Input{constants}
% \listofquantities
\listoffigures
\listoftables
\Section[
\eng{List of elements}
\ger{Liste der Elemente}
]{elements}
\printAllElements
\newpage
% \Input{test}
%\newpage
% \bibliographystyle{plain} % \bibliographystyle{plain}
% \bibliography{ref} % \bibliography{ref}
\end{document} \end{document}

View File

@ -1,10 +0,0 @@
\Part[
\eng{Many-body simulations}
\ger{Vielteilchen Simulationen}
]{mbsim}
\Section[
\eng{Importance sampling}
\ger{Importance sampling / Stichprobenentnahme nach Wichtigkeit}
]{importance_sampling}

321
src/math/calculus.tex Normal file
View File

@ -0,0 +1,321 @@
\Section[
\eng{Calculus}
\ger{Analysis}
]{cal}
% \begin{formula}{shark}
% \desc{Shark-midnight formula}{\emoji{shark}-s}{}
% \desc[german]{Shark-Mitternachtformel}{}{}
% \eq{
% \temoji{seal}_{1,2} = \frac{-\temoji{shark}\pm \sqrt{\temoji{shark}^2-4\temoji{octopus}\temoji{tropical-fish}}}{2\temoji{octopus}}
% }
% \end{formula}
\Subsection[
\eng{Fourier analysis}
\ger{Fourieranalyse}
]{fourier}
\Subsubsection[
\eng{Fourier series}
\ger{Fourierreihe}
]{series}
\begin{formula}{series} \absLabel[fourier_series]
\desc{Fourier series}{Complex representation}{$f\in \Lebesgue^2(\R,\C)$ $T$-\GT{periodic}}
\desc[german]{Fourierreihe}{Komplexe Darstellung}{}
\eq{f(t) = \sum_{k=-\infty}^{\infty} c_k \Exp{\frac{2\pi \I kt}{T}}}
\end{formula}
\Eng[real]{real}
\Ger[real]{reellwertig}
\begin{formula}{coefficient-complex}
\desc{Fourier coefficients}{Complex representation}{}
\desc[german]{Fourierkoeffizienten}{Komplexe Darstellung}{}
\eq{
c_k &= \frac{1}{T} \int_{-\frac{T}{2}}^{\frac{T}{2}} f(t)\,\Exp{-\frac{2\pi \I}{T}kt}\d t \quad\text{\GT{for}}\,k\ge0\\
c_{-k} &= \overline{c_k} \quad \text{\GT{if} $f$ \GT{real}}
}
\end{formula}
\begin{formula}{series_sincos}
\desc{Fourier series}{Sine and cosine representation}{$f\in \Lebesgue^2(\R,\C)$ $T$-\GT{periodic}}
\desc[german]{Fourierreihe}{Sinus und Kosinus Darstellung}{}
\eq{f(t) = \frac{a_0}{2} + \sum_{k=1}^{\infty} \left(a_k \Cos{\frac{2\pi}{T}kt} + b_k\Sin{\frac{2\pi}{T}kt}\right)}
\end{formula}
\begin{formula}{coefficient}
\desc{Fourier coefficients}{Sine and cosine representation\\If $f$ has point symmetry: $a_{k>0}=0$, if $f$ has axial symmetry: $b_k=0$}{}
\desc[german]{Fourierkoeffizienten}{Sinus und Kosinus Darstellung\\Wenn $f$ punktsymmetrisch: $a_{k>0}=0$, wenn $f$ achsensymmetrisch: $b_k=0$}{}
\eq{
a_k &= \frac{2}{T} \int_{-\frac{T}{2}}^{\frac{T}{2}} f(t)\,\Cos{-\frac{2\pi}{T}kt}\d t \quad\text{\GT{for}}\,k\ge0\\
b_k &= \frac{2}{T} \int_{-\frac{T}{2}}^{\frac{T}{2}} f(t)\,\Sin{-\frac{2\pi}{T}kt}\d t \quad\text{\GT{for}}\,k\ge1\\
a_k &= c_k + c_{-k} \quad\text{\GT{for}}\,k\ge0\\
b_k &= \I(c_k - c_{-k}) \quad\text{\GT{for}}\,k\ge1
}
\end{formula}
\TODO{cleanup}
\Subsubsection[
\eng{Fourier transformation}
\ger{Fouriertransformation}
]{trafo}
\begin{formula}{transform} \absLabel[fourier_transform]
\desc{Fourier transform}{}{$\hat{f}:\R^n \mapsto \C$, $\forall f\in L^1(\R^n)$}
\desc[german]{Fouriertransformierte}{}{}
\eq{\hat{f}(k) \coloneq \frac{1}{\sqrt{2\pi}^n} \int_{\R^n} \e^{-\I kx}f(x)\d x}
\end{formula}
\Eng[linear_in]{linear in}
\Ger[linear_in]{linear in}
\GT{for} $f\in L^1(\R^n)$:
\begin{enumerate}[i)]
\item $f \mapsto \hat{f}$ \GT{linear_in} $f$
\item $g(x) = f(x-h) \qRarrow \hat{g}(k) = \e^{-\I kn}\hat{f}(k)$
\item $g(x) = \e^{ih\cdot x}f(x) \qRarrow \hat{g}(k) = \hat{f}(k-h)$
\item $g(\lambda) = f\left(\frac{x}{\lambda}\right) \qRarrow \hat{g}(k)\lambda^n \hat{f}(\lambda k)$
\end{enumerate}
\Subsubsection[
\eng{Convolution}
\ger{Faltung / Konvolution}
]{conv}
\begin{ttext}
\eng{Convolution is \textbf{commutative}, \textbf{associative} and \textbf{distributive}.}
\ger{Die Faltung ist \textbf{kommutativ}, \textbf{assoziativ} und \textbf{distributiv}}
\end{ttext}
\begin{formula}{def}
\desc{Definition}{}{}
\desc[german]{Definition}{}{}
\eq{(f*g)(t) = f(t) * g(t) = \int_{-\infty}^\infty f(\tau) g(t-\tau) \d \tau}
\end{formula}
\begin{formula}{notation}
\desc{Notation}{}{}
\desc[german]{Notation}{}{}
\eq{
f(t) * g(t-t_0) &= (f*g)(t-t_0) \\
f(t-t_0) * g(t-t_0) &= (f*g)(t-2t_0)
}
\end{formula}
\begin{formula}{commutativity}
\desc{Commutativity}{}{}
\desc[german]{Kommutativität}{}{}
\eq{f * g = g * f}
\end{formula}
\begin{formula}{associativity}
\desc{Associativity}{}{}
\desc[german]{Assoziativität]}{}{}
\eq{(f*g)*h = f*(g*h)}
\end{formula}
\begin{formula}{distributivity}
\desc{Distributivity}{}{}
\desc[german]{Distributivität}{}{}
\eq{f * (g + h) = f*g + f*h}
\end{formula}
\begin{formula}{complex_conjugate}
\desc{Complex conjugate}{}{}
\desc[german]{Komplexe konjugation}{}{}
\eq{(f*g)^* = f^* * g^*}
\end{formula}
\Subsection[
\eng{Misc}
\ger{Verschiedenes}
]{misc}
\begin{formula}{stirling-approx}
\desc{Stirling approximation}{}{}
\desc[german]{Stirlingformel}{}{}
\eq{\ln (N!) \approx N \ln(N) - N + \Order(\ln(N))}
\end{formula}
\begin{formula}{error-function}
\desc{Error function}{$\erf: \C \to \C$ and complementary error function $\erfc$}{}
\desc[german]{Fehlerfunktion}{$\erf: \C \to \C$ und komplementäre Fehlerfunktion $\erfc$}{}
\eq{
\erf(x) &= \frac{2}{\sqrt{\pi}} \int_0^x e^{-t^2} \d t \\
\erfc(x) &= 1 - \erf(x)\\
&= \frac{2}{\sqrt{\pi}} \int_x^\infty e^{-t^2} \d t
}
\end{formula}
\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^\prime(x_0)}}}
\end{formula}
\begin{formula}{geometric_series}
\desc{Geometric series}{}{$\abs{q}<1$}
\desc[german]{Geometrische Reihe}{}{}
\eq{\sum_{k=0}^{\infty}q^k = \frac{1}{1-q}}
\end{formula}
\Subsection[
\eng{Logarithm}
\ger{Logarithmus}
]{log}
\begin{formula}{identities}
\desc{Logarithm identities}{}{}
\desc[german]{Logarithmus Identitäten}{Logarithmus Rechenregeln}{}
\eq{
\log(xy) &= \log(x) + \log(y) \\
\log \left(\frac{x}{y}\right) &= \log(x) - \log(y) \\
\log \left(x^d\right) &= d\log(x) \\
\log \left(\sqrt[y]{x}\right) &= \frac{\log(x)}{y} \\
x^{\log(y)} &= y^{\log(x)}
}
\end{formula}
\begin{formula}{intergral}
\desc{Integral of natural logarithm}{}{}
\desc[german]{Integral des natürluchen Logarithmus}{}{}
\eq{
\int \ln(x) \d x &= x \left(\ln(x) -1\right) \\
\int \ln(ax + b) \d x &= \frac{ax+b}{a} \left(\ln(ax + b) -1\right)
}
\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}
]{integral}
\begin{formula}{partial}
\desc{Partial integration}{}{}
\desc[german]{Partielle integration}{}{}
\eq{
\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}
\begin{formula}{substitution}
\desc{Integration by substitution}{}{}
\desc[german]{Integration durch Substitution}{}{}
\eq{
\int_a^b f(g(x))\,g^\prime(x) \d x = \int_{g(a)}^{g(b)} f(z) \d z
}
\end{formula}
\begin{formula}{gauss}
\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}
}
\end{formula}
\begin{formula}{stokes}
\desc{Stokes's theorem}{}{$S = \partial A$}
\desc[german]{Klassischer Satz von Stokes}{}{}
\eq{\int_A (\Rot{\vec{F}}) \cdot \d\vec{S} = \oint_{S} \vec{F} \cdot \d \vec{r}}
\end{formula}
\Subsubsection[
\eng{List of common integrals}
\ger{Liste nützlicher Integrale}
]{list}
% Put links to other integrals here
\fqEqRef{cal:log:integral}
\begin{formula}{arcfunctions}
\desc{Arcsine, arccosine, arctangent}{}{}
\desc[german]{Arkussinus, Arkuskosinus, Arkustangens}{}{}
\eq{
\int \frac{1}{\sqrt{1-x^2}} \d x = \arcsin x \\
\int -\frac{1}{\sqrt{1-x^2}} \d x = \arccos x \\
\int \frac{1}{x^2+1} \d x = \arctan x
}
\end{formula}
\begin{formula}{archyperbolicfunctions}
\desc{Arcsinh, arccosh, arctanh}{}{}
% \desc[german]{Arkussinus, Arkuskosinus, Arkustangens}{}{}
\eq{
\int \frac{1}{\sqrt{x^2+1}} \d x &= \arsinh x \\
\int \frac{1}{\sqrt{x^2-1}} \d x &= \arcosh x \quad\eqnote{\GT{for} $(x > 1)$}\\
\int \frac{1}{1-x^2} \d x &= \artanh x \quad\eqnote{\GT{for} $(\abs{x} < 1)$}\\
\int \frac{1}{1-x^2} \d x &= \arcoth x \quad\eqnote{\GT{for} $(\abs{x} > 1)$}
}
\end{formula}
\begin{formula}{spheical-coordinates-int}
\desc{Integration in spherical coordinates}{}{}
\desc[german]{Integration in Kugelkoordinaten}{}{}
\eq{\iiint\d x \d y \d z= \int_0^{\infty} \!\! \int_0^{2\pi} \!\! \int_0^\pi \d r \d\phi\d\theta \, r^2\sin\theta}
\end{formula}
\begin{formula}{riemann_zeta}
\desc{Riemann Zeta Function}{}{}
\desc[german]{Riemannsche Zeta-Funktion}{}{}
\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

@ -1,53 +1,53 @@
\Part[ \Section[
\eng{Geometry} \eng{Geometry}
\ger{Geometrie} \ger{Geometrie}
]{geo} ]{geo}
\Section[ \Subsection[
\eng{Trigonometry} \eng{Trigonometry}
\ger{Trigonometrie} \ger{Trigonometrie}
]{trig} ]{trig}
\begin{formula}{exponential_function} \begin{formula}{exponential_function}
\desc{Exponential function}{}{} \desc{Exponential function}{}{}
\desc[german]{Exponentialfunktion}{}{} \desc[german]{Exponentialfunktion}{}{}
\eq{\exp(x) = \sum_{n=0}^{\infty} \frac{x^n}{n!}} \eq{\exp(x) = \sum_{n=0}^{\infty} \frac{x^n}{n!}}
\end{formula} \end{formula}
\begin{formula}{sine} \begin{formula}{sine}
\desc{Sine}{}{} \desc{Sine}{}{}
\desc[german]{Sinus}{}{} \desc[german]{Sinus}{}{}
\eq{\sin(x) &= \sum_{n=0}^{\infty} (-1)^{n} \frac{x^{(2n+1)}}{(2n+1)!} \\ \eq{\sin(x) &= \sum_{n=0}^{\infty} (-1)^{n} \frac{x^{(2n+1)}}{(2n+1)!} \\
&= \frac{e^{ix}-e^{-ix}}{2i}} &= \frac{e^{ix}-e^{-ix}}{2i}}
\end{formula} \end{formula}
\begin{formula}{cosine} \begin{formula}{cosine}
\desc{Cosine}{}{} \desc{Cosine}{}{}
\desc[german]{Kosinus}{}{} \desc[german]{Kosinus}{}{}
\eq{\cos(x) &= \sum_{n=0}^{\infty} (-1)^{n} \frac{x^{(2n)}}{(2n)!} \\ \eq{\cos(x) &= \sum_{n=0}^{\infty} (-1)^{n} \frac{x^{(2n)}}{(2n)!} \\
&= \frac{e^{ix}+e^{-ix}}{2}} &= \frac{e^{ix}+e^{-ix}}{2}}
\end{formula} \end{formula}
\begin{formula}{hyperbolic_sine} \begin{formula}{hyperbolic_sine}
\desc{Hyperbolic sine}{}{} \desc{Hyperbolic sine}{}{}
\desc[german]{Sinus hyperbolicus}{}{} \desc[german]{Sinus hyperbolicus}{}{}
\eq{\sinh(x) &= -i\sin{ix} \\ &= \frac{e^{x}-e^{-x}}{2}} \eq{\sinh(x) &= -i\sin{ix} \\ &= \frac{e^{x}-e^{-x}}{2}}
\end{formula} \end{formula}
\begin{formula}{hyperbolic_cosine} \begin{formula}{hyperbolic_cosine}
\desc{Hyperbolic cosine}{}{} \desc{Hyperbolic cosine}{}{}
\desc[german]{Kosinus hyperbolicus}{}{} \desc[german]{Kosinus hyperbolicus}{}{}
\eq{\cosh(x) &= \cos{ix} \\ &= \frac{e^{x}+e^{-x}}{2}} \eq{\cosh(x) &= \cos{ix} \\ &= \frac{e^{x}+e^{-x}}{2}}
\end{formula} \end{formula}
\Subsection[ \Subsection[
\eng{Various theorems} \eng{Various theorems}
\ger{Verschiedene Theoreme} \ger{Verschiedene Theoreme}
]{theorems} ]{theorems}
\begin{formula}{sum} \begin{formula}{sum}
\desc{}{}{} \desc{Hypthenuse in the unit circle}{}{}
\desc[german]{}{}{} \desc[german]{Hypothenuse im Einheitskreis}{}{}
\eq{1 &= \sin^2 x + \cos^2 x} \eq{1 &= \sin^2 x + \cos^2 x}
\end{formula} \end{formula}
@ -71,17 +71,17 @@
} }
\end{formula} \end{formula}
\begin{formula}{name} \begin{formula}{other}
\desc{}{}{$\tan\theta = b$} \desc{Other}{}{$\tan\theta = b$}
\desc[german]{}{}{$\tan\theta = b$} \desc[german]{Sonstige}{}{$\tan\theta = b$}
\eq{\cos x + b\sin x = \sqrt{1 + b^2}\cos(x-\theta)} \eq{\cos x + b\sin x = \sqrt{1 + b^2}\cos(x-\theta)}
\end{formula} \end{formula}
\Subsection[ \Subsubsection[
\eng{Table of values} \eng{Table of values}
\ger{Wertetabelle} \ger{Wertetabelle}
]{value_table} ]{value_table}
\begingroup \begingroup
\setlength{\tabcolsep}{0.9em} % horizontal \setlength{\tabcolsep}{0.9em} % horizontal
\renewcommand{\arraystretch}{2} % vertical \renewcommand{\arraystretch}{2} % vertical

View File

@ -1,14 +1,66 @@
\def\id{\mathbb{1}} \Section[
\Part[
\eng{Linear algebra} \eng{Linear algebra}
\ger{Lineare Algebra} \ger{Lineare Algebra}
]{linalg} ]{linalg}
\Section[ \Subsection[
\eng{Matrix basics}
\ger{Matrizen Basics}
]{matrix}
\begin{formula}{matrix_matrix_product}
\desc{Matrix-matrix product as sum}{}{}
\desc[german]{Matrix-Matrix Produkt als Summe}{}{}
\eq{C_{ij} = \sum_{k} A_{ik} B_{kj}}
\end{formula}
\begin{formula}{matrix_vector_product}
\desc{Matrix-vector product as sum}{}{}
\desc[german]{Matrix-Vektor Produkt als Summe}{}{}
\eq{\vec{c}_{i} = \sum_{j} A_{ij} \vec{b}_{j}}
\end{formula}
\begin{formula}{symmetric}
\desc{Symmetric matrix}{}{$A$ $n\times n$ \GT{matrix}}
\desc[german]{Symmetrische matrix}{}{}
\eq{A^\T = A}
\end{formula}
\begin{formula}{unitary}
\desc{Unitary matrix}{}{}
\desc[german]{Unitäre Matrix}{}{}
\eq{U ^\dagger U = \id}
\end{formula}
\Subsubsection[
\eng{Transposed matrix}
\ger{Transponierte Matrix}
]{transposed}
\begin{formula}{sum}
\desc{Sum}{}{}
\desc[german]{Summe}{}{}
\eq{(A+B)^\T = A^\T + B^\T}
\end{formula}
\begin{formula}{product}
\desc{Product}{}{}
\desc[german]{Produkt}{}{}
\eq{(AB)^\T = B^\T A^\T}
\end{formula}
\begin{formula}{inverse}
\desc{Inverse}{}{}
\desc[german]{Inverse}{}{}
\eq{(A^{-1})^\T = (A^\T)^{-1}}
\end{formula}
\begin{formula}{exponential}
\desc{Exponential}{}{}
\desc[german]{Exponential}{}{}
\eq{\exp(A^\T) = (\exp A)^\T \\ \ln(A^\T)=(\ln A)^\T}
\end{formula}
\Subsection[
\eng{Determinant} \eng{Determinant}
\ger{Determinante} \ger{Determinante}
]{determinant} ]{determinant}
\begin{formula}{2x2} \begin{formula}{2x2}
\desc{2x2 matrix}{}{} \desc{2x2 matrix}{}{}
\desc[german]{2x2 Matrix}{}{} \desc[german]{2x2 Matrix}{}{}
@ -43,9 +95,19 @@
\end{formula} \end{formula}
\Section[ \Subsection[
\eng{Misc}
\ger{Misc}
]{misc}
\begin{formula}{normal_equation}
\desc{Normal equation}{Solves a linear regression problem}{\mat{\theta} hypothesis / weight matrix, \mat{X} design matrix, \vec{y} output vector}
% \desc[german]{}{}{}
\eq{
\mat{\theta} = (\mat{X}^\T \mat{X})^{-1} \mat{X}^\T \vec{y}
}
\end{formula}
]{zeug}
\begin{formula}{inverse_2x2} \begin{formula}{inverse_2x2}
\desc{Inverse $2\times 2$ matrix}{}{} \desc{Inverse $2\times 2$ matrix}{}{}
@ -56,12 +118,6 @@
} }
\end{formula} \end{formula}
\begin{formula}{unitary}
\desc{Unitary matrix}{}{}
\desc[german]{Unitäre Matrix}{}{}
\eq{U ^\dagger U = \id}
\end{formula}
\begin{formula}{svd} \begin{formula}{svd}
\desc{Singular value decomposition}{Factorization of complex matrices through rotating \rightarrow rescaling \rightarrow rotation.}{$A$: $m\times n$ matrix, $U$: $m\times m$ unitary matrix, $\Lambda$: $m\times n$ rectangular diagonal matrix with non-negative numbers on the diagonal, $V$: $n\times n$ unitary matrix} \desc{Singular value decomposition}{Factorization of complex matrices through rotating \rightarrow rescaling \rightarrow rotation.}{$A$: $m\times n$ matrix, $U$: $m\times m$ unitary matrix, $\Lambda$: $m\times n$ rectangular diagonal matrix with non-negative numbers on the diagonal, $V$: $n\times n$ unitary matrix}
\desc[german]{Singulärwertzerlegung}{Faktorisierung einer reellen oder komplexen Matrix durch Rotation \rightarrow Skalierung \rightarrow Rotation.}{} \desc[german]{Singulärwertzerlegung}{Faktorisierung einer reellen oder komplexen Matrix durch Rotation \rightarrow Skalierung \rightarrow Rotation.}{}
@ -95,7 +151,7 @@
\end{formula} \end{formula}
\Section[ \Subsection[
\eng{Eigenvalues} \eng{Eigenvalues}
\ger{Eigenwerte} \ger{Eigenwerte}
]{eigen} ]{eigen}

5
src/math/math.tex Normal file
View File

@ -0,0 +1,5 @@
\Part[
\eng{Mathematics}
\ger{Mathematik}
]{math}

View File

@ -0,0 +1,345 @@
\Section[
\eng{Probability theory}
\ger{Wahrscheinlichkeitstheorie}
]{pt}
\begin{formula}{mean}
\desc{Mean}{Expectation value}{}
\desc[german]{Mittelwert}{Erwartungswert}{}
\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}}{}
\eq{\sigma^2 = (\Delta \hat{x})^2 = \Braket{\hat{x}^2} - \braket{\hat{x}}^2 = \braket{(x - \braket{x})^2}}
\end{formula}
\begin{formula}{covariance}
\desc{Covariance}{}{}
\desc[german]{Kovarianz}{}{}
\eq{\cov(x,y) = \sigma(x,y) = \sigma_{XY} = \Braket{(x-\braket{x})\,(y-\braket{y})}}
\end{formula}
\begin{formula}{std-deviation}
\desc{Standard deviation}{}{}
\desc[german]{Standardabweichung}{}{}
\eq{\sigma = \sqrt{\sigma^2} = \sqrt{(\Delta x)^2}}
\end{formula}
\begin{formula}{median}
\desc{Median}{Value separating lower half from top half}{$x$ dataset with $n$ elements}
\desc[german]{Median}{Teilt die untere von der oberen Hälfte}{$x$ Reihe mit $n$ Elementen}
\eq{
\textrm{med}(x) = \left\{ \begin{array}{ll} x_{(n+1)/2} & \text{$n$ \GT{odd}} \\ \frac{x_{(n/2)}+x_{((n/2)+1)}}{2} & \text{$n$ \GT{even}} \end{array} \right.
}
\end{formula}
\begin{formula}{pdf}
\desc{Probability density function}{Random variable has density $f$. The integral gives the probability of $X$ taking a value $x\in[a,b]$.}{$f$ normalized: $\int_{-\infty}^\infty f(x) \d x= 1$}
\desc[german]{Wahrscheinlichkeitsdichtefunktion}{Zufallsvariable hat Dichte $f$. Das Integral gibt Wahrscheinlichkeit an, dass $X$ einen Wert $x\in[a,b]$ annimmt}{$f$ normalisiert $\int_{-\infty}^\infty f(x) \d x= 1$}
\eq{P([a,b]) := \int_a^b f(x) \d x}
\end{formula}
\begin{formula}{cdf}
\desc{Cumulative distribution function}{}{$f$ probability density function}
\desc[german]{Kumulative Verteilungsfunktion}{}{$f$ Wahrscheinlichkeitsdichtefunktion}
\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} \absLabel
\desc{Autocorrelation}{Correlation of $f$ to itself at an earlier point in time, $C$ is a covariance function}{$\tau$ lag-time}
\desc[german]{Autokorrelation}{Korrelation vonn $f$ zu sich selbst zu einem früheren Zeitpunkt. $C$ ist auch die Kovarianzfunktion}{$\tau$ Zeitverschiebung}
\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{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$}{}
\desc[german]{Dichtefunktion der Standard-Normalverteilung}{$\mu = 0$, $\sigma = 1$}{}
\eq{\varphi(x) = \frac{1}{\sqrt{2\pi}} \e^{-\frac{1}{2}x^2}}
\end{formula}
\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{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}
\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}{}
% \disteq{parameters}{}
% \disteq{pdf}{}
% \disteq{cdf}{}
% \disteq{mean}{}
% \disteq{median}{}
% \disteq{variance}{}
% \end{distribution}
\Subsection[
\eng{Central limit theorem}
\ger{Zentraler Grenzwertsatz}
]{cls}
\begin{ttext}
\eng{
Suppose $X_1, X_2, \dots$ is a sequence of independent and identically distributed random variables with $\braket{X_i} = \mu$ and $(\Delta X_i)^2 = \sigma^2 < \infty$.
As $N$ approaches infinity, the random variables $\sqrt{N}(\bar{X}_N - \mu)$ converge to a normal distribution $\mathcal{N}(0, \sigma^2)$.
\\ That means that the variance scales with $\frac{1}{\sqrt{N}}$ and statements become accurate for large $N$.
}
\ger{
Sei $X_1, X_2, \dots$ eine Reihe unabhängiger und gleichverteilter Zufallsvariablen mit $\braket{X_i} = \mu$ und $(\Delta X_i)^2 = \sigma^2 < \infty$.
Für $N$ gegen unendlich konvergieren die Zufallsvariablen $\sqrt{N}(\bar{X}_N - \mu)$ zu einer Normalverteilung $\mathcal{N}(0, \sigma^2)$.
\\ Das bedeutet, dass die Schwankung mit $\frac{1}{\sqrt{N}}$ wächst und Aussagen für große $N$ scharf werden.
}
\end{ttext}
\Subsection[
\eng{Propagation of uncertainty / error}
\ger{Fehlerfortpflanzung}
]{error}
\begin{formula}{generalised}
\desc{Generalized error propagation}{}{$V$ \fqEqRef{math:pt:covariance} matrix, $J$ \fqEqRef{math:cal:jacobi-matrix}}
\desc[german]{Generalisiertes Fehlerfortpflanzungsgesetz}{$V$ \fqEqRef{math:pt:covariance} Matrix, $J$ \fqEqRef{cal:jacobi-matrix}}{}
\eq{V_y = J(x) \cdot V_x \cdot J^{\T} (x)}
\end{formula}
\begin{formula}{uncorrelated}
\desc{Propagation of uncorrelated errors}{Linear approximation}{}
\desc[german]{Fortpflanzung unabhängiger fehlerbehaftete Größen}{Lineare Näherung}{}
\eq{u_y = \sqrt{ \sum_{i} \left(\pdv{y}{x_i}\cdot u_i\right)^2}}
\end{formula}
\begin{formula}{weight}
\desc{Weight}{Variance is a possible choice for a weight}{$\sigma$ \fqEqRef{math:pt:variance}}
\desc[german]{Gewicht}{Varianz ist eine mögliche Wahl für ein Gewicht}{}
\eq{w_i = \frac{1}{\sigma_i^2}}
\end{formula}
\begin{formula}{weighted-mean}
\desc{Weighted mean}{}{$w_i$ \fqEqRef{math:pt:error:weight}}
\desc[german]{Gewichteter Mittelwert}{}{}
\eq{\overline{x} = \frac{\sum_{i} (x_i w_i)}{\sum_i w_i}}
\end{formula}
\begin{formula}{weighted-mean-error}
\desc{Variance of weighted mean}{}{$w_i$ \fqEqRef{math:pt:error:weight}}
\desc[german]{Varianz des gewichteten Mittelwertes}{}{}
\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,46 @@
\ger{Mechanik} \ger{Mechanik}
]{mech} ]{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}
]{misc}
\begin{formula}{hook}
\desc{Hooke's law}{}{$F$ \qtyRef{force}, $D$ \qtyRef{spring_constant}, $\Delta l$ spring length}
\desc[german]{Hookesches Gesetz}{}{$F$ \qtyRef{force}, $D$ \qtyRef{spring_constant}, $\Delta l$ Federlänge}
\eq{
F = D\Delta l
}
\end{formula}
\def\lagrange{\mathcal{L}} \def\lagrange{\mathcal{L}}
\Section[ \Section[
\eng{Lagrange formalism} \eng{Lagrange formalism}
@ -26,7 +66,7 @@
Zum Beispiel findet man für ein 2D Pendel die generalisierte Koordinate $q=\varphi$, mit $\vec{x} = \begin{pmatrix} \cos\varphi \\ \sin\varphi \end{pmatrix}$. Zum Beispiel findet man für ein 2D Pendel die generalisierte Koordinate $q=\varphi$, mit $\vec{x} = \begin{pmatrix} \cos\varphi \\ \sin\varphi \end{pmatrix}$.
} }
\end{ttext} \end{ttext}
\begin{formula}{lagrangian} \begin{formula}{lagrangian} \absLabel
\desc{Lagrange function}{}{$T$ kinetic energy, $V$ potential energy } \desc{Lagrange function}{}{$T$ kinetic energy, $V$ potential energy }
\desc[german]{Lagrange-Funktion}{}{$T$ kinetische Energie, $V$ potentielle Energie} \desc[german]{Lagrange-Funktion}{}{$T$ kinetische Energie, $V$ potentielle Energie}
\eq{\lagrange = T - V} \eq{\lagrange = T - V}

114
src/particle.tex Normal file
View File

@ -0,0 +1,114 @@
\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}
\begin{formula}{spin}
\desc{Spin}{}{}
\desc[german]{Spin}{}{}
\quantity{\sigma}{}{v}
\end{formula}
\begin{bigformula}{standard_model}
\desc{Standard model}{}{}
\desc[german]{Standartmodell}{}{}
\centering
\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] {\GT{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}
\end{bigformula}

62
src/pkg/mqconstant.sty Normal file
View File

@ -0,0 +1,62 @@
\ProvidesPackage{mqconstant}
\RequirePackage{mqlua}
\RequirePackage{etoolbox}
\directLuaAux{
if constants == nil then
constants = {}
end
}
% [1]: label to point to
% 2: key
% 3: symbol
% 4: either exp or def; experimentally or defined constant
\newcommand{\constant@new}[4][\relax]{
\directLuaAux{
constants["#2"] = {}
constants["#2"]["symbol"] = [[\detokenize{#3}]]
constants["#2"]["exp_or_def"] = [[\detokenize{#4}]]
constants["#2"]["values"] = {} %-- array of {value, unit}
}
\ifstrempty{#1}{}{
\directLuaAuxExpand{
constants["#2"]["linkto"] = [[#1]] %-- fqname required for getting the translation key
}
}
}
% 1: key
% 2: value
% 3: units
\newcommand{\constant@addValue}[3]{
\directlua{
table.insert(constants["#1"]["values"], { value = [[\detokenize{#2}]], unit = [[\detokenize{#3}]] })
}
}
% 1: key
\newcommand\constant@print[1]{
\begingroup % for label
Symbol: $\luavar{constants["#1"]["symbol"]}$
% \\Unit: $\directlua{split_and_print_units(constants["#1"]["units"])}$
\directlua{
tex.print("\\\\\\GT{const:"..constants["#1"]["exp_or_def"].."}")
}
\directlua{
%--tex.sprint("Hier steht Luatext" .. ":", #constVals)
for i, pair in ipairs(constants["#1"]["values"]) do
tex.sprint("\\\\\\hspace*{1cm}${", pair["value"], "}\\,\\si{", pair["unit"], "}$")
%--tex.sprint("VALUE ", i, v)
end
}
% label it only once
\directlua{
if constants["#1"]["labeled"] == nil then
constants["#1"]["labeled"] = true
tex.print("\\label{const:#1}")
end
}
\endgroup
}
\newcounter{constant}

250
src/pkg/mqformula.sty Normal file
View File

@ -0,0 +1,250 @@
\ProvidesPackage{mqformula}
\RequirePackage{mqfqname}
\RequirePackage{mqconstant}
\RequirePackage{mqquantity}
%
% FORMULA ENVIRONMENT
% The following commands are meant to be used with the formula environment
%
% Name in black and below description in gray
% [1]: minipage width
% 2: fqname of name
% 3: fqname of a translation that holds the explanation
\newcommand{\NameWithDescription}[3][\descwidth]{
\begin{minipage}{#1}
\IfTranslationExists{#2}{
\raggedright
\GT{#2}
}{\detokenize{#2}}
\IfTranslationExists{#3}{
\\ {\color{fg1} \GT{#3}}
}{}
\end{minipage}
}
% TODO: rename
\newsavebox{\contentBoxBox}
% [1]: minipage width
% 2: fqname of a translation that holds the explanation
\newenvironment{ContentBoxWithExplanation}[2][\eqwidth]{
\def\ContentFqName{#2}
\begin{lrbox}{\contentBoxBox}
\begin{minipage}{#1}
}{
\IfTranslationExists{\ContentFqName}{%
\smartnewline
\noindent
\begingroup
\color{fg1}
\GT{\ContentFqName}
% \edef\temp{\GT{#1_defs}}
% \expandafter\StrSubstitute\expandafter{\temp}{:}{\\}
\endgroup
}{}
\end{minipage}
\end{lrbox}
\fbox{\usebox{\contentBoxBox}}
}
% Class defining commands shared by all formula environments
% 1: key
\newenvironment{formulainternal}[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}
% makes this formula referencable with \abbrRef{<name>}
% [1]: label to use
% 2: Abbreviation to use for references
\newcommand{\abbrLabel}[2][#1]{
\abbrLink[f:\fqname]{##1}{##2}
}
% makes this formula referencable with \absRef{<name>}
% [1]: label to use
\newcommand{\absLabel}[1][#1]{
\absLink[f:\fqname]{##1}
}
\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
\newcommand{\eq}[1]{
\newFormulaEntry
\begin{align}
% \label{eq:\fqname:#1}
##1
\end{align}
}
% 1: equation for alignat environment
\newcommand{\eqAlignedAt}[2]{
\newFormulaEntry
\begin{flalign}%
\TODO{\text{remove macro}}
% dont place label when one is provided
% \IfSubStringInString{label}\unexpanded{#3}{}{
% \label{eq:#1}
% }
##1%
\end{flalign}
}
% 1: equation for flalign environment
\newcommand{\eqFLAlign}[2]{
\newFormulaEntry
\begin{alignat}{##1}%
% dont place label when one is provided
% \IfSubStringInString{label}\unexpanded{#3}{}{
% \label{eq:#1}
% }
##2%
\end{alignat}
}
\newcommand{\fig}[2][1.0]{
\newFormulaEntry
\centering
\includegraphics[width=##1\textwidth]{##2}
}
% 1: content for the ttext environment
\newcommand{\ttxt}[2][#1:desc]{
\newFormulaEntry
\begin{ttext}[##1]
##2
\end{ttext}
}
% 1: symbol
% 2: units
% 3: comment key to translation
\newcommand{\quantity}[3]{%
\quantity@new[\fqname]{#1}{##1}{##2}{##3}
\newFormulaEntry
\quantity@print{#1}
}
% must be used only in third argument of "constant" command
% 1: value
% 2: unit
\newcommand{\val}[2]{
\constant@addValue{#1}{##1}{##2}
}
% 1: symbol
% 2: either exp or def; experimentally or defined constant
% 3: one or more \val{value}{unit} commands
\newcommand{\constant}[3]{
\constant@new[\fqname]{#1}{##1}{##2}
\begingroup
##3
\endgroup
\newFormulaEntry
\constant@print{#1}
}
}{}
\newenvironment{formula}[1]{
\begin{formulainternal}{#1}
\begingroup
\label{f:\fqname:#1}
\storeLabel{\fqname:#1}
\par\noindent\ignorespaces
% \textcolor{gray}{\hrule}
% \vspace{0.5\baselineskip}
\NameWithDescription[\descwidth]{\fqname:#1}{\fqname:#1_desc}
\hfill
\begin{ContentBoxWithExplanation}{\fqname:#1_defs}
}{
\end{ContentBoxWithExplanation}
\endgroup
\separateEntries
% \textcolor{fg3}{\hrule}
% \vspace{0.5\baselineskip}
\ignorespacesafterend
\end{formulainternal}
}
% BIG FORMULA
\newenvironment{bigformula}[1]{
\begin{formulainternal}{#1}
\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}
\textbf{
\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
\end{formulainternal}
}
\newenvironment{hiddenformula}[1]{
\begin{formulainternal}{#1}
\renewcommand{\eq}[1]{}
\renewcommand{\eqAlignedAt}[2]{}
\renewcommand{\eqFLAlign}[2]{}
\renewcommand{\fig}[2][1.0]{}
\renewcommand{\ttxt}[2][#1:desc]{}
% 1: symbol
% 2: units
% 3: comment key to translation
\renewcommand{\quantity}[3]{%
\quantity@new[\fqname]{#1}{##1}{##2}{##3}
}
% 1: symbol
% 2: either exp or def; experimentally or defined constant
% 3: one or more \val{value}{unit} commands
\renewcommand{\constant}[3]{
\constant@new[\fqname]{#1}{##1}{##2}
\begingroup
##3
\endgroup
}
}{
\end{formulainternal}
}

209
src/pkg/mqfqname.sty Normal file
View File

@ -0,0 +1,209 @@
\ProvidesPackage{mqfqname}
\RequirePackage{mqlua}
\RequirePackage{etoolbox}
\directlua{
sections = sections or {}
function fqnameEnter(name)
table.insert(sections, name)
% table.sort(sections)
end
function fqnameLeave()
if table.getn(sections) > 0 then
table.remove(sections)
end
end
function fqnameGet()
return table.concat(sections, ":")
end
function fqnameLeaveOnlyFirstN(n)
if n >= 0 then
while table.getn(sections) > n do
table.remove(sections)
end
end
end
}
\newcommand{\mqfqname@update}{%
\edef\fqname{\luavar{fqnameGet()}}
}
\newcommand{\mqfqname@enter}[1]{%
\directlua{fqnameEnter("\luaescapestring{#1}")}%
\mqfqname@update
}
\newcommand{\mqfqname@leave}{%
\directlua{fqnameLeave()}%
\mqfqname@update
}
\newcommand{\mqfqname@leaveOnlyFirstN}[1]{%
\directlua{fqnameLeaveOnlyFirstN(#1)}%
}
% SECTIONING
% start <section>, get heading from translation, set label
% secFqname is the fully qualified name of sections: the keys of all previous sections joined with a ':'
% fqname is secFqname:<key> where <key> is the key/id of some environment, like formula
% [1]: code to run after setting \fqname, but before the \part, \section etc
% 2: key
\newcommand{\Part}[2][desc]{
\newpage
\mqfqname@leaveOnlyFirstN{0}
\mqfqname@enter{#2}
\edef\secFqname{\fqname}
#1
% this is necessary so that \part/\section... takes the fully expanded string. Otherwise the pdf toc will have just the fqname
\edef\fqnameText{\GT{\fqname}}
\part{\fqnameText}
\label{sec:\fqname}
}
\newcommand{\Section}[2][]{
\mqfqname@leaveOnlyFirstN{1}
\mqfqname@enter{#2}
\edef\secFqname{\fqname}
#1
\edef\fqnameText{\GT{\fqname}}
\section{\fqnameText}
\label{sec:\fqname}
}
\newcommand{\Subsection}[2][]{
\mqfqname@leaveOnlyFirstN{2}
\mqfqname@enter{#2}
\edef\secFqname{\fqname}
#1
\edef\fqnameText{\GT{\fqname}}
\subsection{\fqnameText}
\label{sec:\fqname}
}
\newcommand{\Subsubsection}[2][]{
\mqfqname@leaveOnlyFirstN{3}
\mqfqname@enter{#2}
\edef\secFqname{\fqname}
#1
\edef\fqnameText{\GT{\fqname}}
\subsubsection{\fqnameText}
\label{sec:\fqname}
}
\edef\fqname{NULL}
\newcommand\printFqName{\expandafter\detokenize\expandafter{\fqname}}
\newcommand\luaDoubleFieldValue[3]{%
\directlua{
if #1 \string~= nil and #1[#2] \string~= nil and #1[#2][#3] \string~= nil then
tex.sprint(#1[#2][#3])
return
end
luatexbase.module_warning('luaDoubleFieldValue', 'Invalid indices to `#1`: `#2` and `#3`');
tex.sprint("???")
}%
}
% REFERENCES
% All xyzRef commands link to the key using the translated name
% Uppercase (XyzRef) commands have different link texts, but the same link target
% 1: key/fully qualified name (without qty/eq/sec/const/el... prefix)
% Equations/Formulas
% \newrobustcmd{\fqEqRef}[1]{%
\newrobustcmd{\fqEqRef}[1]{%
% \edef\fqeqrefname{\GT{#1}}
% \hyperref[eq:#1]{\fqeqrefname}
\hyperref[f:#1]{\GT{#1}}%
}
% Formula in the current section
\newrobustcmd{\secEqRef}[1]{%
% \edef\fqeqrefname{\GT{#1}}
% \hyperref[eq:#1]{\fqeqrefname}
\hyperref[f:\secFqname:#1]{\GT{\secFqname:#1}}%
}
% Section
% <name>
\newrobustcmd{\fqSecRef}[1]{%
\hyperref[sec:#1]{\GT{#1}}%
}
% Quantities
% <symbol>
\newrobustcmd{\qtyRef}[1]{%
\edef\tempname{\luaDoubleFieldValue{quantities}{"#1"}{"linkto"}}%
\hyperref[qty:#1]{\expandafter\GT\expandafter{\tempname:#1}}%
}
% <symbol> <name>
\newrobustcmd{\QtyRef}[1]{%
$\luaDoubleFieldValue{quantities}{"#1"}{"symbol"}$ \qtyRef{#1}%
}
% Constants
% <name>
\newrobustcmd{\constRef}[1]{%
\edef\tempname{\luaDoubleFieldValue{constants}{"#1"}{"linkto"}}%
\hyperref[const:#1]{\expandafter\GT\expandafter{\tempname:#1}}%
}
% <symbol> <name>
\newrobustcmd{\ConstRef}[1]{%
$\luaDoubleFieldValue{constants}{"#1"}{"symbol"}$ \constRef{#1}%
}
% Element from periodic table
% <symbol>
\newrobustcmd{\elRef}[1]{%
\hyperref[el:#1]{{\color{fg0}#1}}%
}
% <name>
\newrobustcmd{\ElRef}[1]{%
\hyperref[el:#1]{\GT{el:#1}}%
}
% "LABELS"
% These currently do not place a label,
% instead they provide an alternative way to reference an existing label
\directLuaAux{
absLabels = absLabels or {}
abbrLabels = abbrLabel or {}
}
% [1]: target (fqname to point to)
% 2: key
\newcommand{\absLink}[2][sec:\fqname]{
\directLuaAuxExpand{
absLabels["#2"] = [[#1]]
}
}
% [1]: target (fqname to point to)
% 2: key
% 3: label (abbreviation)
\newcommand{\abbrLink}[3][sec:\fqname]{
\directLuaAuxExpand{
abbrLabels["#2"] = {}
abbrLabels["#2"]["abbr"] = [[#3]]
abbrLabels["#2"]["fqname"] = [[#1]]
}
}
% [1]:
\newrobustcmd{\absRef}[2][\relax]{%
\directlua{
if absLabels["#2"] == nil then
tex.sprint("\\detokenize{#2}???")
else
if "#1" == "" then %-- if [#1] is not given, use translation of key as text, else us given text
tex.sprint("\\hyperref[" .. absLabels["#2"] .. "]{\\GT{" .. absLabels["#2"] .. "}}")
else
tex.sprint("\\hyperref[" .. absLabels["#2"] .. "]{\luaescapestring{#1}}")
end
end
}
}
\newrobustcmd{\abbrRef}[1]{%
\directlua{
if abbrLabels["#1"] == nil then
tex.sprint("\\detokenize{#1}???")
else
tex.sprint("\\hyperref[" .. abbrLabels["#1"]["fqname"] .. "]{" .. abbrLabels["#1"]["abbr"] .. "}")
end
}
}

88
src/pkg/mqlua.sty Normal file
View File

@ -0,0 +1,88 @@
\ProvidesPackage{mqlua}
\RequirePackage{luacode}
\LuaCodeDebugOn
\newcommand\luavar[1]{\directlua{tex.sprint(#1)}}
\begin{luacode*}
function warning(message)
-- Get the current file name and line number
-- local info = debug.getinfo(2, "Sl")
-- local file_name = info.source
-- local line_number = info.currentline
-- tex.error(string.format("Warning %s at %s:%d", message, file_name, line_number))
texio.write("\nWARNING: " .. message .. "\n")
end
OUTDIR = os.getenv("TEXMF_OUTPUT_DIRECTORY") or "."
function fileExists(file)
local f = io.open(file, "rb")
if f then f:close() end
return f ~= nil
end
warning("TEST")
\end{luacode*}
% units: siunitx units arguments, possibly chained by '='
% returns: 1\si{unit1} = 1\si{unit2} = ...
\directlua{
function split_and_print_units(units)
if units == nil then
tex.print("1")
return
end
local parts = {}
for part in string.gmatch(units, "[^=]+") do
table.insert(parts, part)
end
local result = ""
for i, unit in ipairs(parts) do
if i > 1 then result = result .. " = " end
result = result .. "\\SI{1}{" .. unit .. "}"
end
tex.print(result)
end
}
% STRING UTILITY
\luadirect{
function string.startswith(s, start)
return string.sub(s,1,string.len(start)) == start
end
function string.sanitize(s)
% -- Use gsub to replace the specified characters with an empty string
local result = s:gsub("[_^&]", "")
return result
end
}
% 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}}
\directlua{#1}
}
% This one does not:
\newcommand\directLuaAux[1]{
\immediate\write\luaAuxFile{\noexpand\directlua{\detokenize{#1}}}
\directlua{#1}
}
% read
\IfFileExists{\jobname.lua.aux}{%
\input{\jobname.lua.aux}%
}{%
% \@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}

170
src/pkg/mqperiodictable.sty Normal file
View File

@ -0,0 +1,170 @@
\ProvidesPackage{mqperiodictable}
\RequirePackage{mqtranslation}
\RequirePackage{mqlua}
% Store info about elements in a lua table
% Print as list or as periodic table
% The data is taken from https://pse-info.de/de/data as json and parsed by the scripts/periodic_table.py
% INFO
\directLuaAux{
if elements == nil then
elements = {} %-- Symbol: {symbol, atomic_number, properties, ... }
elementsOrder = {} %-- Number: Symbol
end
}
% 1: symbol
% 2: nr
% 3: period
% 4: column
\newenvironment{element}[4]{
% [1]: language
% 2: name
% 3: description
% 4: definitions/links
\newcommand{\desc}[4][english]{
% language, name, description, definitions
\ifblank{##2}{}{\DT[el:#1]{##1}{##2}}
\ifblank{##3}{}{\DT[el:#1_desc]{##1}{##3}}
\ifblank{##4}{}{\DT[el:#1_defs]{##1}{##4}}
}
\directLuaAux{
elementsOrder[#2] = "#1";
elements["#1"] = {};
elements["#1"]["symbol"] = [[\detokenize{#1}]];
elements["#1"]["atomic_number"] = [[\detokenize{#2}]];
elements["#1"]["period"] = [[\detokenize{#3}]];
elements["#1"]["column"] = [[\detokenize{#4}]];
elements["#1"]["properties"] = {};
}
% 1: key
% 2: value
\newcommand{\property}[2]{
\directlua{ %-- writing to aux is only needed for references for now
elements["#1"]["properties"]["##1"] = "\luaescapestring{\detokenize{##2}}" %-- cant use [[ ]] because electron_config ends with ]
}
}
\edef\lastElementName{#1}
}{
% \expandafter\printElement{\lastElementName}
\ignorespacesafterend
}
% LIST
\newcommand\printElement[1]{
\edef\elementName{el:#1}
\par\noindent\ignorespaces
\vspace{0.5\baselineskip}
\begingroup
% label it only once
% \detokenize{\label{el:#1}}
\directlua{
if elements["#1"]["labeled"] == nil then
elements["#1"]["labeled"] = true
tex.print("\\phantomsection\\label{el:#1}")
end
}
\NameWithDescription[\descwidth]{\elementName}{\elementName_desc}
\hfill
\begin{ContentBoxWithExplanation}{\elementName_defs}
\directlua{
tex.sprint("Symbol: \\ce{"..elements["#1"]["symbol"].."}")
tex.sprint("\\\\Number: "..elements["#1"]["atomic_number"])
}
\directlua{
%--tex.sprint("Hier steht Luatext" .. ":", #elementVals)
for key, value in pairs(elements["#1"]["properties"]) do
tex.sprint("\\\\\\hspace*{1cm}{\\GT{", key, "}: ", value, "}")
%--tex.sprint("VALUE ", i, v)
end
}
\end{ContentBoxWithExplanation}
\endgroup
\textcolor{fg3}{\hrule}
\vspace{0.5\baselineskip}
\ignorespacesafterend
}
\newcommand{\printAllElements}{
\directlua{
%-- tex.sprint("\\printElement{"..val.."}")
for key, val in ipairs(elementsOrder) do
%-- tex.sprint(key, val);
tex.print("\\printElement{"..val.."}")
end
}
}
% PERIODIC TABLE
\directlua{
category2color = {
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 "bg3"
else
return color
end
end
}
\newcommand{\drawPeriodicTable}{
\def\ptableUnit{0.90cm}
\begin{tikzpicture}[
element/.style={anchor=north west, draw, minimum width=\ptableUnit, minimum height=\ptableUnit, align=center},
element_annotation/.style={anchor=north west, font=\tiny, inner sep=1pt},
x=\ptableUnit,
y=\ptableUnit
]
\directlua{
for k, v in pairs(elements) do
local column = tonumber(v.column)
local period = tonumber(v.period)
if 5 < period and 4 <= column and column <= 17 then
period = period + 3
elseif column > 17 then
column = column - 14
end
tex.print("\\node[element,fill=".. getColor(v.properties.set) .."] at (".. column ..", -".. period ..") {\\elRef{".. v.symbol .."}};")
tex.print("\\node[element_annotation] at (".. column ..", -".. period ..") {".. v.atomic_number .."};")
if v.properties.atomic_mass \string~= nil then
tex.print("\\node[element_annotation,anchor=south west] at (".. column ..", -".. period+1 ..") {".. string.format("\percentchar .3f", v.properties.atomic_mass) .."};")
end
end
}
\draw[ultra thick,fg-purple] (4,-6) -- (4,-11);
% color legend for categories
\directlua{
local x0 = 4
local y0 = -1
local x = 0
local y = 0
local ystep = 0.4
for set, color in pairs(category2color) do
%-- tex.print("\\draw[fill=".. color .."] ("..x0+x..","..y0+y..") rectangle ("..x0+x..","..y0+y..")()")
tex.print("\\node[anchor=west, align=left] at ("..x0+x..","..y0-y..") {{\\color{".. color .."}\\blacksquare} \\GT{".. set .."}};")
y = y + 1*ystep
if y > 4*ystep then
y = 0
x = x+4
end
end
}
% period numbers
\directlua{
for i = 1, 7 do
tex.print("\\node[anchor=east,align=right] at (1,".. -i-0.5 ..") {".. i .."};")
end
}
\end{tikzpicture}
}

43
src/pkg/mqquantity.sty Normal file
View File

@ -0,0 +1,43 @@
\ProvidesPackage{mqquantity}
\RequirePackage{mqlua}
\RequirePackage{etoolbox}
\directLuaAux{
if quantities == nil then
quantities = {}
end
}
% [1]: label to point to
% 2: key - must expand to a valid lua string!
% 3: symbol
% 4: units
% 5: comment key to translation
\newcommand{\quantity@new}[5][\relax]{%
\directLuaAux{
quantities["#2"] = {}
quantities["#2"]["symbol"] = [[\detokenize{#3}]]
quantities["#2"]["units"] = [[\detokenize{#4}]]
quantities["#2"]["comment"] = [[\detokenize{#5}]]
}
\ifstrempty{#1}{}{
\directLuaAuxExpand{
quantities["#2"]["linkto"] = [[#1]] %-- fqname required for getting the translation key
}
}
}
% 1: key
\newcommand\quantity@print[1]{
\begingroup % for label
Symbol: $\luavar{quantities["#1"]["symbol"]}$
\\Unit: $\directlua{split_and_print_units(quantities["#1"]["units"])}$
% label it only once
\directlua{
if quantities["#1"]["labeled"] == nil then
quantities["#1"]["labeled"] = true
tex.print("\\label{qty:#1}")
end
}
\endgroup
}

177
src/pkg/mqtranslation.sty Normal file
View File

@ -0,0 +1,177 @@
\ProvidesPackage{mqtranslation}
\RequirePackage{mqfqname}
\RequirePackage{etoolbox}
\RequirePackage{amsmath}
\RequirePackage{mqlua}
% TODO resolve circular dependency with fqname
\begin{luacode}
translations = translations or {}
-- string to append to missing translations
-- unknownTranslation = "???"
unknownTranslation = ""
language = "\languagename"
fallbackLanguage = "english"
-- using additional .aux extension because vimtex wouldnt stop compiling otherwise
translationsFilepath = OUTDIR .. "/translations.lua.aux" or "/tmp/translations.lua"
function tlAdd(language, key, value)
if value == "" then
return
end
if translations[language] == nil then
translations[language] = {}
end
translations[language][key] = value
end
function tlExists(language, key)
return not (translations[language] == nil or translations[language][key] == nil)
end
function tlExistsFallback(language, key)
if tlExists(language, key) then
return true
end
return tlExists(fallbackLanguage, key)
end
function tlGet(language, key)
if tlExists(language, key) then
return translations[language][key]
end
return string.sanitize(key .. unknownTranslation)
end
function tlGetFallback(language, key)
if tlExists(language, key) then
return translations[language][key]
end
if language ~= fallbackLanguage then
if tlExists(fallbackLanguage, key) then
return translations[fallbackLanguage][key]
end
end
return string.sanitize(key .. unknownTranslation)
end
function tlGetCurrent(key)
return tlGet(language, key)
end
function tlGetFallbackCurrent(key)
return tlGetFallback(language, key)
end
\end{luacode}
% Write the translations table as lua code to an auxiliary file
% If the file exists, read it when loading the package.
% This way, translations may be used before they are defined, since it will exist in the second compilation.
\begin{luacode*}
function serialize(tbl)
local result = {}
for k, v in pairs(tbl) do
local key = type(k) == "string" and ("[\"%s\"]"):format(k) or "[" .. tostring(k) .. "]"
-- using level 2 multiline string to avoid problems when a string ends with ]
local value = type(v) == "table" and serialize(v) or "[==[" .. tostring(v) .. "]==]"
table.insert(result, key .. " = " .. value)
end
return "{" .. table.concat(result, ",\n" ) .. "}\n"
end
function dumpTranslations()
local file = io.open(translationsFilepath, "w")
file:write("return " .. serialize(translations) .. "\n")
file:close()
end
if fileExists(translationsFilepath) then
translations = dofile(translationsFilepath) or {}
end
\end{luacode*}
\AtEndDocument{\directlua{dumpTranslations()}}
%
% TRANSLATION COMMANDS
%
% The lower case commands use \fqname based keys, the upper case absolute keys.
% Example:
% \dt[example]{german}{Beispiel} % defines the key \fqname:example
% \ger[example]{Beispiel} % defines the key \fqname:example
% \DT[example]{german}{Beispiel} % defines the key example
% \Ger[example]{Beispiel} % defines the key example
%
% For ease of use in the ttext environment and the optional argument of the \Part, \Section, ... commands,
% all "define translation" commands use \fqname as default key
% Get a translation
% expandafter required because the translation commands dont expand anything
% shortcuts for translations
% 1: key
\newcommand{\gt}[1]{\luavar{tlGetFallbackCurrent(\luastring{\fqname:#1})}}
\newrobustcmd{\robustGT}[1]{\luavar{tlGetFallbackCurrent(\luastring{#1})}}
\newcommand{\GT}[1]{\luavar{tlGetFallbackCurrent(\luastring{#1})}}
% text variants for use in math mode
\newcommand{\tgt}[1]{\text{\gt{#1}}}
\newcommand{\tGT}[1]{\text{\GT{#1}}}
% Define a new translation
% [1]: key, 2: lang, 3: translation
\newcommand{\dt}[3][\fqname]{%
\directlua{
if \luastring{#1} == \luastring{\fqname} then
tlAdd(\luastring{#2}, \luastring{\fqname}, \luastringN{#3})
else
tlAdd(\luastring{#2}, \luastring{\fqname:#1}, \luastringN{#3})
end
}
}
% Define a new translation
% [1]: key, 2: lang, 3: translation
\newcommand{\DT}[3][\fqname]{%
\directlua{
if \luastring{#1} == \luastring{\fqname} then
tlAdd(\luastring{#2}, \luastring{\fqname}, \luastringN{#3})
else
tlAdd(\luastring{#2}, \luastring{#1}, \luastringN{#3})
end
}
}
% [1]: key, 2: translation
\newcommand{\ger}[2][\fqname]{\dt[#1]{german}{#2}}
\newcommand{\eng}[2][\fqname]{\dt[#1]{english}{#2}}
\newcommand{\Ger}[2][\fqname]{\DT[#1]{german}{#2}}
\newcommand{\Eng}[2][\fqname]{\DT[#1]{english}{#2}}
\newcommand{\IfTranslationExists}[3]{%
\directlua{
if tlExistsFallback(language, \luastring{#1}) then
tex.sprint(\luastringN{#2})
else
tex.sprint(\luastringN{#3})
end
}
}
% use this to define text in different languages for the key <env arg>
% the translation for <env arg> is printed when the environment ends.
% (temporarily change fqname to the \fqname:<env arg> to allow
% the use of \eng and \ger without the key parameter)
% [1]: key
\newenvironment{ttext}[1][desc]{%
\mqfqname@enter{#1}%
}{%
\GT{\fqname}%
\mqfqname@leave%
}

View File

@ -1,194 +0,0 @@
\Part[
\eng{Probability theory}
\ger{Wahrscheinlichkeitstheorie}
]{pt}
\begin{formula}{mean}
\desc{Mean}{}{}
\desc[german]{Mittelwert}{}{}
\eq{\braket{x} = \int w(x)\, x\, \d x}
\end{formula}
\begin{formula}{variance}
\desc{Variance}{}{}
\desc[german]{Varianz}{}{}
\eq{\sigma^2 = (\Delta \hat{x})^2 = \braket{\hat{x}^2} - \braket{\hat{x}}^2 = \braket{(x - \braket{x})^2}}
\end{formula}
\begin{formula}{std_deviation}
\desc{Standard deviation}{}{}
\desc[german]{Standardabweichung}{}{}
\eq{\sigma = \sqrt{(\Delta x)^2}}
\end{formula}
\begin{formula}{median}
\desc{Median}{Value separating lower half from top half}{$x$ dataset with $n$ elements}
\desc[german]{Median}{Teilt die untere von der oberen Hälfte}{$x$ Reihe mit $n$ Elementen}
\eq{
\textrm{med}(x) = \left\{ \begin{array}{ll} x_{(n+1)/2} & \text{$n$ \GT{odd}} \\ \frac{x_{(n/2)}+x_{((n/2)+1)}}{2} & \text{$n$ \GT{even}} \end{array} \right.
}
\end{formula}
\begin{formula}{pdf}
\desc{Probability density function}{Random variable has density $f$. The integral gives the probability of $X$ taking a value $x\in[a,b]$.}{$f$ normalized: $\int_{-\infty}^\infty f(x) \d x= 1$}
\desc[german]{Wahrscheinlichkeitsdichtefunktion}{Zufallsvariable hat Dichte $f$. Das Integral gibt Wahrscheinlichkeit an, dass $X$ einen Wert $x\in[a,b]$ annimmt}{$f$ normalisiert $\int_{-\infty}^\infty f(x) \d x= 1$}
\eq{P([a,b]) := \int_a^b f(x) \d x}
\end{formula}
\begin{formula}{cdf}
\desc{Cumulative distribution function}{}{$f$ probability density function}
\desc[german]{Kumulative Verteilungsfunktion}{}{$f$ Wahrscheinlichkeitsdichtefunktion}
\eq{F(x) = \int_{-\infty}^x f(t) \d t}
\end{formula}
\Section[
\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}
\begin{formula}{standard_normal_distribution}
\desc{Density function of the standard normal distribution}{$\mu = 0$, $\sigma = 1$}{}
\desc[german]{Dichtefunktion der Standard-Normalverteilung}{$\mu = 0$, $\sigma = 1$}{}
\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}
\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}
\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}
\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{distribution}{maxwell-boltzmann}
% \distdesc{Maxwell-Boltzmann distribution}{}
% \distdesc[german]{Maxwell-Boltzmann Verteilung}{}
% \disteq{parameters}{}
% \disteq{pdf}{}
% \disteq{cdf}{}
% \disteq{mean}{}
% \disteq{median}{}
% \disteq{variance}{}
% \end{distribution}
\Subsection[
\eng{Central limit theorem}
\ger{Zentraler Grenzwertsatz}
]{cls}
\begin{ttext}
\eng{
Suppose $X_1, X_2, \dots$ is a sequence of independent and identically distributed random variables with $\braket{X_i} = \mu$ and $(\Delta X_i)^2 = \sigma^2 < \infty$.
As $N$ approaches infinity, the random variables $\sqrt{N}(\bar{X}_N - \mu)$ converge to a normal distribution $\mathcal{N}(0, \sigma^2)$.
\\ That means that the variance scales with $\frac{1}{\sqrt{N}}$ and statements become accurate for large $N$.
}
\ger{
Sei $X_1, X_2, \dots$ eine Reihe unabhängiger und gleichverteilter Zufallsvariablen mit $\braket{X_i} = \mu$ und $(\Delta X_i)^2 = \sigma^2 < \infty$.
Für $N$ gegen unendlich konvergieren die Zufallsvariablen $\sqrt{N}(\bar{X}_N - \mu)$ zu einer Normalverteilung $\mathcal{N}(0, \sigma^2)$.
\\ Das bedeutet, dass die Schwankung mit $\frac{1}{\sqrt{N}}$ wächst und Aussagen für große $N$ scharf werden.
}
\end{ttext}

View File

@ -28,7 +28,7 @@
\end{formula} \end{formula}
\begin{formula}{wave_function} \begin{formula}{wave_function}
\desc{Wave function}{}{} \desc{Wave function}{}{$R_{nl}(r)$ \fqEqRef{qm:h:radial}, $Y_{lm}$ \fqEqRef{qm:spherical_harmonics}}
\desc[german]{Wellenfunktion}{}{} \desc[german]{Wellenfunktion}{}{}
\eq{\psi_{nlm}(r, \theta, \phi) = R_{nl}(r)Y_{lm}(\theta,\phi)} \eq{\psi_{nlm}(r, \theta, \phi) = R_{nl}(r)Y_{lm}(\theta,\phi)}
\end{formula} \end{formula}
@ -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}} \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} \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} \begin{formula}{rydberg_energy}
\desc{Rydberg energy}{}{} \desc{Rydberg energy}{Energy unit}{\ConstRef{rydberg_constant_heavy}, \ConstRef{planck}, \ConstRef{vacuum_speed_of_light}}
\desc[german]{Rydberg-Energy}{}{} \desc[german]{Rydberg-Energy}{Energie Einheit}{}
\eq{E_\textrm{H} = h\,c\,R_\textrm{H} = \frac{\mu e^4}{(4\pi\epsilon_0)^2 2\hbar^2}} \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} \end{formula}
@ -178,5 +204,18 @@
\ger{Effekte im Magnetfeld} \ger{Effekte im Magnetfeld}
]{mag_effects} ]{mag_effects}
\TODO{all} \TODO{all}
\\\TODO{Hunds rules} \\\TODO{Hunds rules}
\Subsection[
\eng{misc}
\ger{Sonstiges}
]{other}
\begin{formula}{auger_effect}
\desc{Auger-Meitner-Effekt}{Auger-Effect}{}
\desc[german]{Auger-Meitner-Effekt}{Auger-Effekt}{}
\ttxt{
\eng{An excited electron relaxes into a lower, unoccupied energy level. The released energy causes the emission of another electron in a higher energy level (Auger-Electron)}
\ger{Ein angeregtes Elektron fällt in ein unbesetztes, niedrigeres Energieniveau zurück. Durch die frei werdende Energie verlässt ein Elektron aus einer höheren Schale das Atom (Auger-Elektron).}
}
\end{formula}

View File

@ -53,6 +53,44 @@
\eq{\hat{A} = \hat{A}^\dagger} \eq{\hat{A} = \hat{A}^\dagger}
\end{formula} \end{formula}
\Subsubsection[
\eng{Measurement}
\ger{Messung}
]{measurement}
\begin{ttext}
\eng{An observable is a hermition operator acting on $\hat{H}$. The measurement randomly yields one of the eigenvalues of $\hat{O}$ (all real).}
\ger{Eine Observable ist ein hermitscher Operator, der auf $\hat{H}$ wirkt. Die Messung ergibt zufällig einen der Eigenwerte von $\hat{O}$, welche alle reell sind.}
\end{ttext}
\begin{formula}{name}
\desc{Measurement probability}{Probability to measure $\psi$ in state $\lambda$}{}
\desc[german]{Messwahrscheinlichkeit}{Wahrscheinlichkeit, $\psi$ im Zustand $\lambda$ zu messen}{}
\eq{p(\lambda) = \braket{\psi|\hat{P}_\lambda|\psi}}
\end{formula}
\begin{formula}{state_after}
\desc{State after measurement}{}{}
\desc[german]{Zustand nach der Messung}{}{}
\eq{\ket{\psi}_\text{post} = \frac{1}{\sqrt{p(\lambda)}}\hat{P}_\lambda \ket{\psi}}
\end{formula}
\Subsubsection[
\eng{Pauli matrices}
\ger{Pauli-Matrizen}
]{pauli_matrices}
\begin{formula}{pauli_matrices}
\desc{Pauli matrices}{}{}
\desc[german]{Pauli Matrizen}{}{}
\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
% $\sigma_z$ Sign
\Subsection[ \Subsection[
\ger{Wahrscheinlichkeitstheorie} \ger{Wahrscheinlichkeitstheorie}
\eng{Probability theory} \eng{Probability theory}
@ -84,23 +122,6 @@
\sigma_A \sigma_B &\ge \frac{1}{2} \abs{\braket{[\hat{A},\hat{B}]}} \sigma_A \sigma_B &\ge \frac{1}{2} \abs{\braket{[\hat{A},\hat{B}]}}
} }
\end{formula} \end{formula}
\Subsubsection[
\eng{Pauli matrices}
\ger{Pauli-Matrizen}
]{pauli_matrices}
\begin{formula}{pauli_matrices}
\desc{Pauli matrices}{}{}
\desc[german]{Pauli Matrizen}{}{}
\eqAlignedAt{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{formula}
% $\sigma_x$ NOT
% $\sigma_y$ PHASE
% $\sigma_z$ Sign
\Subsection[ \Subsection[
@ -157,7 +178,7 @@
\Section[ \Section[
\eng{Schrödinger equation} \eng{Schrödinger equation}
\ger{Schrödingergleichung} \ger{Schrödingergleichung}
]{schroedinger_equation} ]{se}
\begin{formula}{energy_operator} \begin{formula}{energy_operator}
\desc{Energy operator}{}{} \desc{Energy operator}{}{}
\desc[german]{Energieoperator}{}{} \desc[german]{Energieoperator}{}{}
@ -185,9 +206,18 @@
\begin{formula}{schroedinger_equation} \begin{formula}{schroedinger_equation}
\desc{Schrödinger equation}{}{} \desc{Schrödinger equation}{}{}
\desc[german]{Schrödingergleichung}{}{} \desc[german]{Schrödingergleichung}{}{}
\abbrLabel{SE}
\eq{i\hbar\frac{\partial}{\partial t}\psi(x, t) = (- \frac{\hbar^2}{2m} \vec{\nabla}^2 + \vec{V}(x)) \psi(x)} \eq{i\hbar\frac{\partial}{\partial t}\psi(x, t) = (- \frac{\hbar^2}{2m} \vec{\nabla}^2 + \vec{V}(x)) \psi(x)}
\end{formula} \end{formula}
\begin{formula}{hellmann_feynmann} \absLabel
\desc{Hellmann-Feynman-Theorem}{Derivative of the energy to a parameter}{}
\desc[german]{Hellmann-Feynman-Theorem}{Abletiung der Energie nach einem Parameter}{}
\eq{
\odv{E_\lambda}{\lambda} = \int \d^3r \psi^*_\lambda \odv{\hat{H}_\lambda}{\lambda} \psi_\lambda = \Braket{\psi(\lambda)|\odv{\hat{H}_{\lambda}}{\lambda}|\psi(\lambda)}
}
\end{formula}
\Subsection[ \Subsection[
\eng{Time evolution} \eng{Time evolution}
\ger{Zeitentwicklug} \ger{Zeitentwicklug}
@ -212,6 +242,7 @@
\end{formula} \end{formula}
\TODO{unitary transformation of time dependent H} \TODO{unitary transformation of time dependent H}
\Subsubsection[ \Subsubsection[
@ -250,27 +281,28 @@
]{ehrenfest_theorem} ]{ehrenfest_theorem}
\GT{see_also} \ref{sec:qm:basics:schroedinger_equation:correspondence_principle} \GT{see_also} \ref{sec:qm:basics:schroedinger_equation:correspondence_principle}
\begin{formula}{ehrenfest_theorem} \begin{formula}{ehrenfest_theorem}
\desc{Ehrenfesttheorem}{applies to both pictures}{} \desc{Ehrenfest theorem}{applies to both pictures}{}
\desc[german]{Ehrenfest-Theorem}{gilt für beide Bilder}{} \desc[german]{Ehrenfest-Theorem}{gilt für beide Bilder}{}
\eq{ \eq{
\odv{}{t} \braket{\hat{A}} = \frac{1}{i\hbar}\braket{[\hat{A},\hat{H}]} + \Braket{\pdv{\hat{A}}{t}} \odv{}{t} \braket{\hat{A}} = \frac{1}{i\hbar}\braket{[\hat{A},\hat{H}]} + \Braket{\pdv{\hat{A}}{t}}
} }
\end{formula} \end{formula}
\begin{formula}{ehrenfest_theorem_x} \begin{formula}{ehrenfest_theorem_x}
\desc{}{Example for $x$}{} \desc{Ehrenfest theorem example}{Example for $x$}{}
\desc[german]{}{Beispiel für $x$}{} \desc[german]{Ehrenfest-Theorem Beispiel}{Beispiel für $x$}{}
\eq{m\odv[2]{}{t}\braket{x} = -\braket{\nabla V(x)} = \braket{F(x)}} \eq{m\odv[2]{}{t}\braket{x} = -\braket{\nabla V(x)} = \braket{F(x)}}
\end{formula} \end{formula}
% \eq{Time evolution}{\hat{H}\ket{\psi} = E\ket{\psi}}{sg_time} % \eq{Time evolution}{\hat{H}\ket{\psi} = E\ket{\psi}}{sg_time}
\Subsection[ % TODO: wo gehört das hin?
\ger{Korrespondenzprinzip} \begin{formula}{correspondence_principle}
\eng{Correspondence principle} \desc{Correspondence principle}{}{}
]{correspondence_principle} \desc[german]{Korrespondenzprinzip}{}{}
\begin{ttext}[desc] \ttxt{
\ger{Die klassischen Bewegungsgleichungen lassen sich als Grenzfall (große Quantenzahlen) aus der Quantenmechanik ableiten.} \ger{Die klassischen Bewegungsgleichungen lassen sich als Grenzfall (große Quantenzahlen) aus der Quantenmechanik ableiten.}
\eng{The classical mechanics can be derived from quantum mechanics in the limit of large quantum numbers.} \eng{The classical mechanics can be derived from quantum mechanics in the limit of large quantum numbers.}
\end{ttext} }
\end{formula}
@ -279,8 +311,8 @@
\ger{Störungstheorie} \ger{Störungstheorie}
]{qm_pertubation} ]{qm_pertubation}
\begin{ttext} \begin{ttext}
\eng[desc]{The following holds true if the pertubation $\hat{H_1}$ is sufficently small and the $E^{(0)}_n$ levels are not degenerate.} \eng{The following holds true if the pertubation $\hat{H_1}$ is sufficently small and the $E^{(0)}_n$ levels are not degenerate.}
\ger[desc]{Die folgenden Gleichungen gelten wenn $\hat{H_1}$ ausreichend klein ist und die $E_n^{(0)}$ Niveaus nicht entartet sind.} \ger{Die folgenden Gleichungen gelten wenn $\hat{H_1}$ ausreichend klein ist und die $E_n^{(0)}$ Niveaus nicht entartet sind.}
\end{ttext} \end{ttext}
\begin{formula}{pertubation_hamiltonian} \begin{formula}{pertubation_hamiltonian}
\desc{Hamiltonian}{}{} \desc{Hamiltonian}{}{}
@ -310,7 +342,7 @@
\desc{2. order energy shift}{}{} \desc{2. order energy shift}{}{}
\desc[german]{Energieverschiebung 2. Ordnung}{}{} \desc[german]{Energieverschiebung 2. Ordnung}{}{}
% \eq{E_n^{(1)} = \Braket{\psi_n^{(0)}|\hat{H_1}|\psi_n^{(0)}}} % \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} \end{formula}
% \begin{formula}{qm:pertubation:} % \begin{formula}{qm:pertubation:}
% \desc{1. order states}{}{} % \desc{1. order states}{}{}
@ -319,16 +351,16 @@
% \end{formula} % \end{formula}
\begin{formula}{golden_rule} \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}$}{} \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} \end{formula}
\Section[ \Section[
\eng{Harmonic oscillator} \eng{Harmonic oscillator}
\ger{Harmonischer Oszillator} \ger{Harmonischer Oszillator}
]{qm_hosc} ]{hosc}
\begin{formula}{hamiltonian} \begin{formula}{hamiltonian}
\desc{Hamiltonian}{}{} \desc{Hamiltonian}{}{}
\desc[german]{Hamiltonian}{}{} \desc[german]{Hamiltonian}{}{}
@ -379,6 +411,31 @@
} }
\end{formula} \end{formula}
\begin{formula}{c_a_matrices}
\desc{Matrix forms}{}{}
\desc[german]{Matrix-Form}{}{}
\eq{
\hat{n} &= \begin{pmatrix}
0 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
0 & 0 & \ddots & 0 \\
0 & 0 & 0 & N
\end{pmatrix} \\
\hat{a} &= \begin{pmatrix}
0 & \sqrt{1} & 0 & 0 \\
0 & 0 & \ddots & 0 \\
0 & 0 & 0 & \sqrt{N} \\
0 & 0 & 0 & 0
\end{pmatrix} \\
\hat{a}^\dagger &= \begin{pmatrix}
0 & 0 & 0 & 0 \\
\sqrt{1} & 0 & 0 & 0 \\
0 & \ddots & 0 & 0 \\
0 & 0 & \sqrt{N} & 0
\end{pmatrix}
}
\end{formula}
\Subsubsection[ \Subsubsection[
\eng{Harmonischer Oszillator} \eng{Harmonischer Oszillator}
\ger{Harmonic Oscillator} \ger{Harmonic Oscillator}
@ -413,6 +470,21 @@
\eng{Angular momentum} \eng{Angular momentum}
\ger{Drehmoment} \ger{Drehmoment}
]{angular_momentum} ]{angular_momentum}
\Subsection[
\eng{Aharanov-Bohm effect}
\ger{Aharanov-Bohm Effekt}
]{aharanov_bohm}
\begin{formula}{phase}
\desc{Acquired phase}{Electron along a closed loop aquires a phase proportional to the enclosed magnetic flux}{}
\desc[german]{Erhaltene Phase}{Elektron entlang eines geschlossenes Phase erhält eine Phase die proportional zum eingeschlossenen magnetischem Fluss ist}{}
\eq{\delta = \frac{2 e}{\hbar} \oint \vec{A}\cdot \d\vec{s} = \frac{2 e}{\hbar} \Phi}
\end{formula}
\TODO{replace with loop intergral symbol and add more info}
\Section[
\eng{Periodic potentials}
\ger{Periodische Potentiale}
]{periodic}
\begin{formula}{bloch_waves} \begin{formula}{bloch_waves}
\desc{Bloch waves}{ \desc{Bloch waves}{
Solve the stat. SG in periodic potential with period Solve the stat. SG in periodic potential with period
@ -429,16 +501,14 @@
\eq{\psi_k(\vec{r}) = e^{i \vec{k}\cdot \vec{r}} \cdot u_{\vec{k}}(\vec{r})} \eq{\psi_k(\vec{r}) = e^{i \vec{k}\cdot \vec{r}} \cdot u_{\vec{k}}(\vec{r})}
\end{formula} \end{formula}
\Subsection[ \begin{formula}{periodicity}
\eng{Aharanov-Bohm effect} \desc{Periodicity}{}{\QtyRef{lattice_vector}, \QtyRef{reciprocal_lattice_vector}}
\ger{Aharanov-Bohm Effekt} \desc[german]{Periodizität}{}{}
]{aharanov_bohm} \eq{
\begin{formula}{phase} u_\vec{k}(\vec{r} + \vec{R}) = u_\vec{k}(\vec{r}) \\
\desc{Acquired phase}{Electron along a closed loop aquires a phase proportional to the enclosed magnetic flux}{} \psi_{\vec{k}+\vec{G}}(\vec{r}) = \psi_\vec{k}(\vec{r})
\desc[german]{Erhaltene Phase}{Elektron entlang eines geschlossenes Phase erhält eine Phase die proportional zum eingeschlossenen magnetischem Fluss ist}{} }
\eq{\delta = \frac{2 e}{\hbar} \oint \vec{A}\cdot \d\vec{s} = \frac{2 e}{\hbar} \Phi} \end{formula}
\end{formula}
\TODO{replace with loop intergral symbol and add more info}
\Section[ \Section[
@ -482,7 +552,7 @@
\eq{H &= \underbrace{\hbar\omega_c \hat{a}^\dagger \hat{a}}_\text{\GT{field}} \eq{H &= \underbrace{\hbar\omega_c \hat{a}^\dagger \hat{a}}_\text{\GT{field}}
+ \underbrace{\hbar\omega_\text{a} \frac{\hat{\sigma}_z}{2}}_\text{\GT{atom}} + \underbrace{\hbar\omega_\text{a} \frac{\hat{\sigma}_z}{2}}_\text{\GT{atom}}
+ \underbrace{\frac{\hbar\Omega}{2} \hat{E} \hat{S}}_\text{int} \\ + \underbrace{\frac{\hbar\Omega}{2} \hat{E} \hat{S}}_\text{int} \\
\shortintertext{\GT{after} \hyperref[eq:qm:other:RWS]{RWA}:} \\ \shortintertext{\GT{after} \hyperref[eq:qm:other:RWA]{RWA}:} \\
&= \hbar\omega_c \hat{a}^\dagger \hat{a} &= \hbar\omega_c \hat{a}^\dagger \hat{a}
+ \hbar\omega_\text{a} \hat{\sigma}^\dagger \hat{\sigma} + \hbar\omega_\text{a} \hat{\sigma}^\dagger \hat{\sigma}
+ \frac{\hbar\Omega}{2} (\hat{a}\hat{\sigma^\dagger} + \hat{a}^\dagger \hat{\sigma}) + \frac{\hbar\Omega}{2} (\hat{a}\hat{\sigma^\dagger} + \hat{a}^\dagger \hat{\sigma})
@ -493,10 +563,33 @@
\eng{Other} \eng{Other}
\ger{Sonstiges} \ger{Sonstiges}
]{other} ]{other}
\begin{formula}{RWS} \begin{formula}{RWA}
\desc{Rotating Wave Approximation (RWS)}{Rapidly oscilating terms are neglected}{$\omega_\text{L}$ light frequency, $\omega_0$ transition frequency} \desc{Rotating Wave Approximation (RWS)}{Rapidly oscilating terms are neglected}{$\omega_\text{L}$ light frequency, $\omega_0$ transition frequency}
\desc[german]{Rotating Wave Approximation / Drehwellennäherung (RWS)}{Schnell oscillierende Terme werden vernachlässigt}{$\omega_\text{L}$ Frequenz des Lichtes, $\omega_0$ Übergangsfrequenz} \desc[german]{Rotating Wave Approximation / Drehwellennäherung (RWS)}{Schnell oscillierende Terme werden vernachlässigt}{$\omega_\text{L}$ Frequenz des Lichtes, $\omega_0$ Übergangsfrequenz}
\eq{\Delta\omega \coloneq \abs{\omega_0 - \omega_\text{L}} \ll \abs{\omega_0 + \omega_\text{L}} \approx 2\omega_0} \eq{\Delta\omega \coloneq \abs{\omega_0 - \omega_\text{L}} \ll \abs{\omega_0 + \omega_\text{L}} \approx 2\omega_0}
\end{formula} \end{formula}
\begin{formula}{adiabatic_theorem} \absLabel
\desc{Adiabatic theorem}{}{}
\desc[german]{Adiabatentheorem}{}{}
\ttxt{
\eng{A physical system remains in its instantaneous eigenstate if a given perturbation is acting on it slowly enough and if there is a gap between the eigenvalue and the rest of the Hamiltonian's spectrum.}
\ger{Ein quantenmechanisches System bleibt in im derzeitigen Eigenzustand falls eine Störung langsam genug wirkt und der Eigenwert durch eine Lücke vom Rest des Spektrums getrennt ist.}
}
\end{formula}
\begin{formula}{slater_det}
\desc{Slater determinant}{Construction of a fermionic (antisymmetric) many-particle wave function from single-particle wave functions}{}
\desc[german]{Slater Determinante}{Konstruktion einer fermionischen (antisymmetrischen) Vielteilchen Wellenfunktion aus ein-Teilchen Wellenfunktionen}{}
\eq{
\Psi(q_1, \dots, q_N) = \frac{1}{\sqrt{N!}}
\begin{vmatrix}
\phi_a(q_1) & \phi_a(q_2) & \cdots & \phi_a(q_N) \\
\phi_b(q_1) & \phi_b(q_2) & \cdots & \phi_b(q_N) \\
\vdots & \vdots & \ddots & \vdots \\
\phi_z(q_1) & \phi_z(q_2) & \cdots & \phi_z(q_N)
\end{vmatrix}
}
\end{formula}

161
src/quantities.tex Normal file
View File

@ -0,0 +1,161 @@
% if this causes a compilation error, check that none of the units have been redefined
% Put quantites here that are referenced often, even if they are not exciting themselves.
% This could later allow making a list of all links to this quantity, creating a list of releveant formulas
\Section[
\eng{Physical quantities}
\ger{Physikalische Größen}
]{quantities}
\Subsection[
\eng{SI quantities}
\ger{SI-Basisgrößen}
]{si}
\begin{formula}{time}
\desc{Time}{}{}
\desc[german]{Zeit}{}{}
\quantity{t}{\second}{}
\end{formula}
\begin{formula}{length}
\desc{Length}{}{}
\desc[german]{Länge}{}{}
\quantity{l}{\m}{e}
\end{formula}
\begin{formula}{mass}
\desc{Mass}{}{}
\desc[german]{Masse}{}{}
\quantity{m}{\kg}{es}
\end{formula}
\begin{formula}{temperature}
\desc{Temperature}{}{}
\desc[german]{Temperatur}{}{}
\quantity{T}{\kelvin}{is}
\end{formula}
\begin{formula}{current}
\desc{Electric current}{}{}
\desc[german]{Elektrischer Strom}{}{}
\quantity{I}{\ampere}{es}
\end{formula}
\begin{formula}{amount}
\desc{Amount of substance}{}{}
\desc[german]{Stoffmenge}{}{}
\quantity{n}{\mol}{es}
\end{formula}
\begin{formula}{luminous_intensity}
\desc{Luminous intensity}{}{}
\desc[german]{Lichtstärke}{}{}
\quantity{I_\text{V}}{\candela}{s}
\end{formula}
\Subsection[
\eng{Mechanics}
\ger{Mechanik}
]{mech}
\begin{formula}{force}
\desc{Force}{}{}
\desc[german]{Kraft}{}{}
\quantity{\vec{F}}{\newton=\kg\m\per\second^2}{ev}
\end{formula}
\begin{formula}{spring_constant}
\desc{Spring constant}{}{}
\desc[german]{Federkonstante}{}{}
\quantity{k}{\newton\per\m=\kg\per\second^2}{s}
\end{formula}
\begin{formula}{velocity}
\desc{Velocity}{}{}
\desc[german]{Geschwindigkeit}{}{}
\quantity{\vec{v}}{\m\per\s}{v}
\end{formula}
\begin{formula}{torque}
\desc{Torque}{}{}
\desc[german]{Drehmoment}{}{}
\quantity{\tau}{\newton\m=\kg\m^2\per\s^2}{v}
\end{formula}
\begin{formula}{pressure}
\desc{Pressure}{}{}
\desc[german]{Druck}{}{}
\quantity{p}{\newtone\per\m^2}{}
\end{formula}
\Subsection[
\eng{Thermodynamics}
\ger{Thermodynamik}
]{td}
\begin{formula}{volume}
\desc{Volume}{$d$ dimensional Volume}{}
\desc[german]{Volumen}{$d$ dimensionales Volumen}{}
\quantity{V}{\m^d}{}
\end{formula}
\begin{formula}{heat_capacity}
\desc{Heat capacity}{}{}
\desc[german]{Wärmekapazität}{}{}
\quantity{C}{\joule\per\kelvin}{}
\end{formula}
\Subsection[
\eng{Electrodynamics}
\ger{Elektrodynamik}
]{el}
\begin{formula}{charge}
\desc{Charge}{}{}
\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]{Kreisfrequenz}{}{}
\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}
\begin{formula}{conductivity}
\desc{Conductivity}{}{}
\desc[german]{Leitfähigkeit}{}{}
\quantity{\sigma}{\per\ohm\m}{}
\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

@ -22,14 +22,18 @@
\ger{Gates} \ger{Gates}
]{gates} ]{gates}
\begin{formula}{gates} \begin{formula}{gates}
\desc{}{}{} \desc{Gates}{}{}
\desc[german]{}{}{} \desc[german]{Gates}{}{}
\eqAlignedAt{2}{ \eng[bitflip]{Bitflip}
\eng[bitphaseflip]{Bit-Phase flip}
\eng[phaseflip]{Phaseflip}
\eng[hadamard]{Hadamard}
\begin{alignat}{2}
& \text{\gt{bitflip}:} & \hat{X} &= \sigma_x = \sigmaxmatrix \\ & \text{\gt{bitflip}:} & \hat{X} &= \sigma_x = \sigmaxmatrix \\
& \text{\gt{bitphaseflip}:} & \hat{Y} &= \sigma_y = \sigmaymatrix \\ & \text{\gt{bitphaseflip}:} & \hat{Y} &= \sigma_y = \sigmaymatrix \\
& \text{\gt{phaseflip}:} & \hat{Z} &= \sigma_z = \sigmazmatrix \\ & \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} & \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} \end{formula}
% \begin{itemize} % \begin{itemize}
% \item \gt{bitflip}: $\hat{X} = \sigma_x = \sigmaxmatrix$ % \item \gt{bitflip}: $\hat{X} = \sigma_x = \sigmaxmatrix$
@ -92,12 +96,10 @@
\begin{formula}{circuit} \begin{formula}{circuit}
\desc{SQUID}{Superconducting quantum interference device, consists of parallel \hyperref{sec:qc:scq:josephson_junction}{josephson junctions}, can be used to measure extremely weak magnetic fields}{} \desc{SQUID}{Superconducting quantum interference device, consists of parallel \hyperref{sec:qc:scq:josephson_junction}{josephson junctions}, can be used to measure extremely weak magnetic fields}{}
\desc[german]{SQUID}{Superconducting quantum interference device, besteht aus parralelen \hyperref{sec:qc:scq:josephson_junction}{Josephson Junctions} und kann zur Messung extrem schwacher Magnetfelder genutzt werden}{} \desc[german]{SQUID}{Superconducting quantum interference device, besteht aus parralelen \hyperref{sec:qc:scq:josephson_junction}{Josephson Junctions} und kann zur Messung extrem schwacher Magnetfelder genutzt werden}{}
\content{ \centering
\centering \begin{tikzpicture}
\begin{circuitikz} \draw (0, 0) \squidloop{loop}{};
\draw (0, 0) \squidloop{loop}{}; \end{tikzpicture}
\end{circuitikz}
}
\end{formula} \end{formula}
\begin{formula}{hamiltonian} \begin{formula}{hamiltonian}
\desc{Hamiltonian}{}{$\hat{\phi}$ phase difference across the junction} \desc{Hamiltonian}{}{$\hat{\phi}$ phase difference across the junction}
@ -109,7 +111,7 @@
\eng{Josephson Qubit??} \eng{Josephson Qubit??}
\ger{TODO} \ger{TODO}
]{josephson_qubit} ]{josephson_qubit}
\begin{circuitikz} \begin{tikzpicture}
\draw (0,0) to[capacitor] (0,2); \draw (0,0) to[capacitor] (0,2);
\draw (0,0) to (2,0); \draw (0,0) to (2,0);
\draw (0,2) to (2,2); \draw (0,2) to (2,2);
@ -117,10 +119,10 @@
\draw[->] (3,1) -- (4,1); \draw[->] (3,1) -- (4,1);
\draw (5,0) to[josephsoncap=$C_\text{J}$] (5,2); \draw (5,0) to[josephsoncap=$C_\text{J}$] (5,2);
\end{circuitikz} \end{tikzpicture}
\TODO{Include schaltplan} \TODO{Include schaltplan}
\begin{circuitikz} \begin{tikzpicture}
\draw (0,0) to[sV=$V_\text{g}$] (0,2); \draw (0,0) to[sV=$V_\text{g}$] (0,2);
\draw (0,2) to[capacitor=$C_\text{g}$] (2,2); \draw (0,2) to[capacitor=$C_\text{g}$] (2,2);
\draw (2,2) to (4,2); \draw (2,2) to (4,2);
@ -128,7 +130,7 @@
\draw (4,0) to[capacitor=$C_C$] (4,2); \draw (4,0) to[capacitor=$C_C$] (4,2);
\draw (0,0) to (2,0); \draw (0,0) to (2,0);
\draw (2,0) to (4,0); \draw (2,0) to (4,0);
\end{circuitikz} \end{tikzpicture}
\begin{formula}{charging_energy} \begin{formula}{charging_energy}
\desc{Charging energy / electrostatic energy}{}{} \desc{Charging energy / electrostatic energy}{}{}
@ -217,16 +219,14 @@
\baditem Sensibel für charge noise \baditem Sensibel für charge noise
\end{itemize} \end{itemize}
}{} }{}
\content{ \centering
\centering \begin{tikzpicture}
\begin{circuitikz} \draw (0,0) to[sV=$V_\text{g}$] (0,2);
\draw (0,0) to[sV=$V_\text{g}$] (0,2); % \draw (0,0) to (2,0);
% \draw (0,0) to (2,0); \draw (0,2) to[capacitor=$C_\text{g}$] (2,2);
\draw (0,2) to[capacitor=$C_\text{g}$] (2,2); \draw (2,0) to[josephsoncap=$C_\text{J}$] (2,2);
\draw (2,0) to[josephsoncap=$C_\text{J}$] (2,2); \draw (0,0) to (2,0);
\draw (0,0) to (2,0); \end{tikzpicture}
\end{circuitikz}
}
\end{formula} \end{formula}
@ -256,15 +256,13 @@
\baditem Geringe Anharmonizität $\alpha$ \baditem Geringe Anharmonizität $\alpha$
\end{itemize} \end{itemize}
}{} }{}
\content{ \centering
\centering \begin{tikzpicture}
\begin{circuitikz} % \draw (0,0) to[sV=$V_\text{g}$] ++(0,3)
% \draw (0,0) to[sV=$V_\text{g}$] ++(0,3) % to[capacitor=$C_\text{g}$] ++(2,0)
% to[capacitor=$C_\text{g}$] ++(2,0) \draw (0,0) to ++(2,0) to ++(0,-0.5) to[josephsoncap=$C_\text{J}$] ++(-0,-2) to ++(0,-0.5) to ++(-2,0)
\draw (0,0) to ++(2,0) to ++(0,-0.5) to[josephsoncap=$C_\text{J}$] ++(-0,-2) to ++(0,-0.5) to ++(-2,0) to[capacitor=$C_C$] ++(0,3);
to[capacitor=$C_C$] ++(0,3); \end{tikzpicture}
\end{circuitikz}
}
\end{formula} \end{formula}
\begin{formula}{hamiltonian} \begin{formula}{hamiltonian}
@ -280,17 +278,14 @@
\begin{formula}{circuit} \begin{formula}{circuit}
\desc{Frequency tunable transmon}{By using a \fqSecRef{qc:scq:elements:squid} instead of a \fqSecRef{qc:scq:elements:josephson_junction}, the qubit is frequency tunable through an external field}{} \desc{Frequency tunable transmon}{By using a \fqSecRef{qc:scq:elements:squid} instead of a \fqSecRef{qc:scq:elements:josephson_junction}, the qubit is frequency tunable through an external field}{}
\desc[german]{}{Durch Nutzung eines \fqSecRef{qc:scq:elements:squid} anstatt eines \fqSecRef{qc:scq:elements:josephson_junction}s, ist die Frequenz des Qubits durch ein externes Magnetfeld einstellbar}{} \desc[german]{}{Durch Nutzung eines \fqSecRef{qc:scq:elements:squid} anstatt eines \fqSecRef{qc:scq:elements:josephson_junction}s, ist die Frequenz des Qubits durch ein externes Magnetfeld einstellbar}{}
\content{ \centering
\centering \begin{tikzpicture}
\begin{circuitikz} % \draw (0,0) to[sV=$V_\text{g}$] ++(0,3)
% \draw (0,0) to[sV=$V_\text{g}$] ++(0,3) % to[capacitor=$C_\text{g}$] ++(2,0)
% to[capacitor=$C_\text{g}$] ++(2,0) \draw (0,0) to ++(-2,0)
\draw (0,0) to ++(-2,0) to ++(3,0) to ++(0,-0.5) \squidloop{loop}{SQUID} to ++(0,-0.5) to ++(-3,0)
to ++(3,0) to ++(0,-0.5) \squidloop{loop}{SQUID} to ++(0,-0.5) to ++(-3,0) to[capacitor=$C_C$] ++(0,3);
to[capacitor=$C_C$] ++(0,3); \end{tikzpicture}
\end{circuitikz}
}
\end{formula} \end{formula}
\begin{formula}{energy} \begin{formula}{energy}
@ -319,25 +314,23 @@
\begin{formula}{circuit} \begin{formula}{circuit}
\desc{Phase qubit}{}{} \desc{Phase qubit}{}{}
\desc[german]{Phase Qubit}{}{} \desc[german]{Phase Qubit}{}{}
\content{ \centering
\centering \begin{tikzpicture}
\begin{circuitikz} % \draw (0,0) to[sV=$V_\text{g}$] ++(0,3)
% \draw (0,0) to[sV=$V_\text{g}$] ++(0,3) % to ++(2,0) coordinate(top1)
% to ++(2,0) coordinate(top1) % to ++(2,0) coordinate(top2)
% to ++(2,0) coordinate(top2) % to ++(2,0) coordinate(top3);
% to ++(2,0) coordinate(top3); % \draw (0,0)
% \draw (0,0) % to ++(2,0) coordinate(bot1)
% to ++(2,0) coordinate(bot1) % to ++(2,0) coordinate(bot2)
% to ++(2,0) coordinate(bot2) % to ++(2,0) coordinate(bot3);
% to ++(2,0) coordinate(bot3); \draw[color=gray] (0,0) to[capacitor=$C_C$] (0,-2);
\draw[color=gray] (0,0) to[capacitor=$C_C$] (0,-2); % \draw (top1) to ++(0,-0.5) to[josephsoncap=$C_\text{J}$] ++(-0,-2) to (bot2);
% \draw (top1) to ++(0,-0.5) to[josephsoncap=$C_\text{J}$] ++(-0,-2) to (bot2); \draw(0,0) to ++(2,0) to[josephsoncap=$C_\text{J}$] ++(0,-2) to ++(-2,0);
\draw(0,0) to ++(2,0) to[josephsoncap=$C_\text{J}$] ++(0,-2) to ++(-2,0); \draw (2,0) to ++(2,0) to[cute inductor=$E_L$] ++(0,-2) to ++(-2,0);
\draw (2,0) to ++(2,0) to[cute inductor=$E_L$] ++(0,-2) to ++(-2,0); \node at (3,-1.5) {$\Phi_\text{ext}$};
\node at (3,-1.5) {$\Phi_\text{ext}$}; \end{tikzpicture}
\end{circuitikz} \\\TODO{Ist beim Fluxonium noch die Voltage source dran?}
\\\TODO{Ist beim Fluxonium noch die Voltage source dran?}
}
\end{formula} \end{formula}
\begin{formula}{hamiltonian} \begin{formula}{hamiltonian}
\desc{Hamiltonian}{}{$\delta = \frac{\phi}{\phi_0}$} \desc{Hamiltonian}{}{$\delta = \frac{\phi}{\phi_0}$}
@ -359,17 +352,16 @@
\begin{formula}{circuit} \begin{formula}{circuit}
\desc{Flux qubit / Persistent current qubit}{}{} \desc{Flux qubit / Persistent current qubit}{}{}
\desc[german]{Flux Qubit / Persistent current qubit}{}{} \desc[german]{Flux Qubit / Persistent current qubit}{}{}
\content{ \centering
\centering \begin{tikzpicture}
\begin{circuitikz} \draw (0,0) to[josephsoncap=$\alpha E_\text{J}$, scale=0.8, transform shape] (0,-3);
\draw (0,0) to[josephsoncap=$\alpha E_\text{J}$, scale=0.8, transform shape] (0,-3); \draw (0,0) to ++(3,0)
\draw (0,0) to ++(3,0) to[josephsoncap=$E_\text{J}$] ++(0,-1.5)
to[josephsoncap=$E_\text{J}$] ++(0,-1.5) to[josephsoncap=$E_\text{J}$] ++(0,-1.5)
to[josephsoncap=$E_\text{J}$] ++(0,-1.5) to ++(-3,0);
to ++(-3,0); \node at (1.5,-1.5) {$\Phi_\text{ext}$};
\node at (1.5,-1.5) {$\Phi_\text{ext}$}; \end{tikzpicture}
\end{circuitikz} % \begin{tikzpicture}
% \begin{circuitikz}
% \draw (0,0) to[sV=$V_\text{g}$] ++(0,3) % \draw (0,0) to[sV=$V_\text{g}$] ++(0,3)
% to ++(2,0) coordinate(top1) % to ++(2,0) coordinate(top1)
% to ++(2,0) coordinate(top2) % to ++(2,0) coordinate(top2)
@ -385,8 +377,7 @@
% to[josephsoncap=$E_\text{J}$] ++(0,-1.5) % to[josephsoncap=$E_\text{J}$] ++(0,-1.5)
% to[josephsoncap=$E_\text{J}$] (bot3); % to[josephsoncap=$E_\text{J}$] (bot3);
% \node at (5,0.5) {$\Phi_\text{ext}$}; % \node at (5,0.5) {$\Phi_\text{ext}$};
% \end{circuitikz} % \end{tikzpicture}
}
\end{formula} \end{formula}
@ -404,18 +395,16 @@
Anstatt zu tunneln, können die Cooper-Paare über das induktive Element auf die Insel gelangen. Anstatt zu tunneln, können die Cooper-Paare über das induktive Element auf die Insel gelangen.
Das induktive Element besteht aus sehr vielen parallelen Josephson-Kontakten um parisitische Kapazitäten zu vermeiden. Das induktive Element besteht aus sehr vielen parallelen Josephson-Kontakten um parisitische Kapazitäten zu vermeiden.
}{} }{}
\content{ \centering
\centering \begin{tikzpicture}
\begin{circuitikz} % \draw (0,0) to[sV=$V_\text{g}$] ++(0,3)
% \draw (0,0) to[sV=$V_\text{g}$] ++(0,3) % to ++(2,0) coordinate(top1);
% to ++(2,0) coordinate(top1); \draw[color=gray] (0,0) to ++(-2,0) to[capacitor=$C_C$] ++(0,-3) to ++(2,0);
\draw[color=gray] (0,0) to ++(-2,0) to[capacitor=$C_C$] ++(0,-3) to ++(2,0); \draw (0,0) to[josephsoncap=$C_\text{J}$] ++(-0,-3);
\draw (0,0) to[josephsoncap=$C_\text{J}$] ++(-0,-3); \draw (0,0) to ++(2,0) to[cute inductor=$E_L$] ++(0,-3) to ++(-2,0);
\draw (0,0) to ++(2,0) to[cute inductor=$E_L$] ++(0,-3) to ++(-2,0); \node at (1,-0.5) {$\Phi_\text{ext}$};
\node at (1,-0.5) {$\Phi_\text{ext}$}; \end{tikzpicture}
\end{circuitikz} \\\TODO{Ist beim Fluxonium noch die Voltage source dran?}
\\\TODO{Ist beim Fluxonium noch die Voltage source dran?}
}
\end{formula} \end{formula}
\def\temp{$E_\text{C} = \frac{(2e)^2}{2C}, E_\text{L} = \frac{\varphi_0^2}{2L}, \delta_\text{s} = \frac{\varphi_\text{s}}{\varphi_0}$} \def\temp{$E_\text{C} = \frac{(2e)^2}{2C}, E_\text{L} = \frac{\varphi_0^2}{2L}, \delta_\text{s} = \frac{\varphi_\text{s}}{\varphi_0}$}
@ -448,7 +437,7 @@
\begin{formula}{rabi_oscillation} \begin{formula}{rabi_oscillation}
\desc{Rabi oscillations}{}{$\omega_{21}$ resonance frequency of the energy transition, $\Omega$ Rabi frequency} \desc{Rabi oscillations}{}{$\omega_{21}$ resonance frequency of the energy transition, $\Omega$ Rabi frequency}
\desc[german]{Rabi-Oszillationen}{}{$\omega_{21}$ Resonanzfrequenz des Energieübergangs, $\Omega$ Rabi-Frequenz} \desc[german]{Rabi-Oszillationen}{}{$\omega_{21}$ Resonanzfrequenz des Energieübergangs, $\Omega$ Rabi-Frequenz}
\eq{\Omega_ TODO} \eq{\Omega_ \text{\TODO{TODO}}}
\end{formula} \end{formula}
\Subsection[ \Subsection[
@ -471,7 +460,7 @@
\eq{\Gamma_1 = \frac{1}{T_1} = \Gamma_{1\uparrow} + \Gamma_{1\downarrow}} \eq{\Gamma_1 = \frac{1}{T_1} = \Gamma_{1\uparrow} + \Gamma_{1\downarrow}}
\end{formula} \end{formula}
\begin{ttext}[long] \begin{ttext}[longdesc]
\eng{$\Gamma_{1\uparrow}$ is supressed at low temperatures because of detailed balance} \eng{$\Gamma_{1\uparrow}$ is supressed at low temperatures because of detailed balance}
\ger{$\Gamma_{1\uparrow}$ ist bei niedrigen Temperaturen unterdrückt wegen detailed balance} \ger{$\Gamma_{1\uparrow}$ ist bei niedrigen Temperaturen unterdrückt wegen detailed balance}
\end{ttext} \end{ttext}

View File

@ -1,46 +0,0 @@
# Knowledge Collection
This is supposed to be a compact, searchable collection of the most important stuff I had to during my physics studides,
because it would be a shame if I forget it all!
# LaTeX Guideline
Here is some info to help myself remember why I did things the way I did.
In general, most content should be written with macros, so that the behaviour can be changed later.
## `fqname`
All translation keys and LaTeX labels should use a structured approach:
`<key type>:<partname>:<section name>:<subsection name>:<...>:<name>`
The `<partname>:...:<lowest section name>` will be defined as `fqname` (fully qualified name) macro when using the `\Part`, `\Section`, ... macros.
`<key type>` should be
- equation: `eq`
- table: `tab`
- figure: `fig`
- parts, (sub)sections: `sec`
## Multilanguage
All text should be defined as a translation (`translations` package, see `util/translation.tex`) and then used using the `gt` or `GT` macros.
The english translation of any key must be defined, because it will also be used as fallback.
Never make a macro that would have to be changed if a new language was added, eg dont do
```tex
% 1: key, 2: english version, 3: german version
\newcommand{\mycmd}[3]{
\dosomestuff{english}{#1}{#2}
\dosomestuff{german}{#1}{#3}
}
\mycmd{key}{this is english}{das ist deutsch}
```
Instead, do
```tex
% [1]: lang, 2: key, 2: text
\newcommand{\mycmd}[3][english]{
\dosomestuff{#1}{#2}{#3}
}
\mycmd{key}{this is english}
\mycmd[german]{key}{das ist deutsch}
```

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,36 +0,0 @@
import os
import matplotlib.pyplot as plt
import numpy as np
import math
import scipy as scp
outdir = "../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)

41
src/spv.tex Normal file
View File

@ -0,0 +1,41 @@
\Section[
\eng{Surface-Photovoltage}
\ger{Oberflächen-Photospannung}
]{spv}
Mechanisms:
\begin{formula}{scr}
\desc{Space-charge regions}{}{}
% \desc[german]{}{}{}
\ttxt{
\eng{Under illumination, the potential of a space charge region is reduced through the separation of photogenerated charge carriers}
}
\end{formula}
\begin{formula}{dember}
\desc{Dember-Photovoltage}{}{\QtyRef{diffusion_coefficient}}
% \desc[german]{}{}{}
\ttxt{
\eng{Usually electrons diffuse faster than holes ($D_\txe > D_\txh$) \Rightarrow charge carrier separation}
}
\end{formula}
\begin{formula}{asymmetric_charge_transfer}
\desc{Asymmetric charge transfer}{}{}
% \desc[german]{}{}{}
\ttxt{
\eng{Asymmetric transfer rates from bulk to surface states and vice versa leads to charge carrier separation}
}
\end{formula}
\begin{formula}{exciton_dissociation}
\desc{Exciton dissociation}{Important in organic semiconductors with conjugated molecules}{}
% \desc[german]{}{}{}
\ttxt{
\eng{Excitons dissociate at donor-acceptor heterojunctions and the electron is transferred to the acceptor}
}
\end{formula}
\begin{formula}{surface_dipoles}
\desc{Surface dipoles}{}{}
% \desc[german]{}{}{}
\ttxt{
\eng{Light can excite electrons, which are then attracted to one part of the molecule. This leads to an orientation of surface dipoles}
}
\end{formula}

View File

@ -1,84 +1,84 @@
\Part[ \Part[
\eng{Statistichal Mechanics} \eng{Statistichal Mechanics}
\ger{Statistische Mechanik} \ger{Statistische Mechanik}
]{stat} ]{stat}
\begin{ttext} \begin{ttext}
\eng{ \eng{
\textbf{Intensive quantities:} Additive for subsystems (system size dependent): $S(\lambda E, \lambda V, \lambda N) = \lambda S(E, V, N)$\\ \textbf{Extensive quantities:} Additive for subsystems (system size dependent): $S(\lambda E, \lambda V, \lambda N) = \lambda S(E, V, N)$\\
\textbf{Extensive quantities:} Independent of system size, ratio of two intensive quantities \textbf{Intensive quantities:} Independent of system size, ratio of two extensive quantities
} }
\ger{ \ger{
\textbf{Intensive Größen:} Additiv für Subsysteme (Systemgrößenabhänig): $S(\lambda E, \lambda V, \lambda N) = \lambda S(E, V, N)$\\ \textbf{Extensive Größen:} Additiv für Subsysteme (Systemgrößenabhänig): $S(\lambda E, \lambda V, \lambda N) = \lambda S(E, V, N)$\\
\textbf{Extensive Größen:} Unabhängig der Systemgröße, Verhältnis zweier intensiver Größen \textbf{Intensive Größen:} Unabhängig der Systemgröße, Verhältnis zweier extensiver Größen
} }
\end{ttext} \end{ttext}
\begin{formula}{liouville} \begin{formula}{liouville}
\desc{Liouville equation}{}{$\{\}$ poisson bracket} \desc{Liouville equation}{}{$\{\}$ poisson bracket}
\desc[german]{Liouville-Gleichung}{}{$\{\}$ Poisson-Klammer} \desc[german]{Liouville-Gleichung}{}{$\{\}$ Poisson-Klammer}
\eq{\pdv{\rho}{t} = - \sum_{i=1}^{N} \left(\pdv{\rho}{q_i} \pdv{H}{p_i} - \pdv{\rho}{p_i} \pdv{H}{q_i} \right) = \{H, \rho\}} \eq{\pdv{\rho}{t} = - \sum_{i=1}^{N} \left(\pdv{\rho}{q_i} \pdv{H}{p_i} - \pdv{\rho}{p_i} \pdv{H}{q_i} \right) = \{H, \rho\}}
\end{formula}
\Section[
\eng{Entropy}
\ger{Entropie}
]{entropy}
\begin{formula}{properties}
\desc{Positive-definite and additive}{}{}
\desc[german]{Positiv Definit und Additiv}{}{}
\eq{
S &\ge 0 \\
S(E_1, E_2) &= S_1 + S_2
}
\end{formula} \end{formula}
\Section[ \begin{formula}{von_neumann}
\eng{Entropy} \desc{Von-Neumann}{}{$\rho$ density matrix}
\ger{Entropie} \desc[german]{Von-Neumann}{}{$\rho$ Dichtematrix}
]{entropy} \eq{S = - \kB \braket{\log \rho} = - \kB \tr(\rho \log\rho)}
\end{formula}
\begin{formula}{properties} \begin{formula}{gibbs}
\desc{Positive-definite and additive}{}{} \desc{Gibbs}{}{$p_n$ probability for micro state $n$}
\desc[german]{Positiv Definit und Additiv}{}{} \desc[german]{Gibbs}{}{$p_n$ Wahrscheinlichkeit für Mikrozustand $n$}
\eq{ \eq{S = - \kB \sum_n p_n \log p_n}
S &\ge 0 \\ \end{formula}
S(E_1, E_2) &= S_1 + S_2
}
\end{formula}
\begin{formula}{von_neumann} \begin{formula}{boltzmann}
\desc{Von-Neumann}{}{$\rho$ density matrix} \desc{Boltzmann}{}{$\Omega$ \#micro states}
\desc[german]{Von-Neumann}{}{$\rho$ Dichtematrix} \desc[german]{Boltzmann}{}{$\Omega$ \#Mikrozustände}
\eq{S = - \kB \braket{\log \rho} = - \kB \tr(\rho \log\rho)} \eq{S = \kB \log\Omega}
\end{formula} \end{formula}
\begin{formula}{gibbs} \begin{formula}{temp}
\desc{Gibbs}{}{$p_n$ probability for micro state $n$} \desc{Temperature}{}{}
\desc[german]{Gibbs}{}{$p_n$ Wahrscheinlichkeit für Mikrozustand $n$} \desc[german]{Temperatur}{}{}
\eq{S = - \kB \sum_n p_n \log p_n} \eq{\frac{1}{T} \coloneq \pdv{S}{E}_V}
\end{formula} \end{formula}
\begin{formula}{boltzmann} \begin{formula}{pressure}
\desc{Boltzmann}{}{$\Omega$ \#micro states} \desc{Pressure}{}{}
\desc[german]{Boltzmann}{}{$\Omega$ \#Mikrozustände} \desc[german]{Druck}{}{}
\eq{S = \kB \log\Omega} \eq{p = T \pdv{S}{V}_E}
\end{formula} \end{formula}
\begin{formula}{temp}
\desc{Temperature}{}{}
\desc[german]{Temperatur}{}{}
\eq{\frac{1}{T} \coloneq \pdv{S}{E}_V}
\end{formula}
\begin{formula}{pressure}
\desc{Pressure}{}{}
\desc[german]{Druck}{}{}
\eq{p = T \pdv{S}{V}_E}
\end{formula}
\Part[ \Part[
\eng{Thermodynamics} \eng{Thermodynamics}
\ger{Thermodynamik} \ger{Thermodynamik}
]{td} ]{td}
\begin{formula}{therm_wavelength} \begin{formula}{therm_wavelength}
\desc{Thermal wavelength}{}{} \desc{Thermal wavelength}{}{}
\desc[german]{Thermische Wellenlänge}{}{} \desc[german]{Thermische Wellenlänge}{}{}
\eq{\lambda = \frac{\hbar}{\sqrt{2\pi m \kB T}}} \eq{\lambda = \frac{\hbar}{\sqrt{2\pi m \kB T}}}
\end{formula} \end{formula}
\Section[ \Section[
\eng{Processes} \eng{Processes}
\ger{Prozesse} \ger{Prozesse}
]{process} ]{process}
\begin{ttext} \begin{ttext}
\eng{ \eng{
\begin{itemize} \begin{itemize}
@ -111,27 +111,32 @@
\ger{Irreversible Gasexpansion (Gay-Lussac-Versuch)} \ger{Irreversible Gasexpansion (Gay-Lussac-Versuch)}
]{gay} ]{gay}
\begin{minipage}{0.6\textwidth} \begin{bigformula}{experiment}
\vfill \desc{Gay-Lussac experiment}{}{}
\begin{ttext} \desc[german]{Gay-Lussac-Versuch}{}{}
\eng{ \begin{minipage}{0.6\textwidth}
A classical gas in a system with volume $V_1$ is separated from another system with volume $V_2$. \vfill
In the Gay-Lussac experiment, the separation is removed and the gas flows into $V_2$. \begin{ttext}
} \eng{
\ger{ A classical gas in a system with volume $V_1$ is separated from another system with volume $V_2$.
Ein klassisches Gas in einem System mit Volumen $V_1$ ist getrennt von einem zweiten System mit Volumen $V_2$. In the Gay-Lussac experiment, the separation is removed and the gas flows into $V_2$.
Beim Gay-Lussac Versuch wird die Trennwand entfern und das Gas fließt in das Volumen $V_2$. }
} \ger{
\end{ttext} Ein klassisches Gas in einem System mit Volumen $V_1$ ist getrennt von einem zweiten System mit Volumen $V_2$.
\vfill Beim Gay-Lussac Versuch wird die Trennwand entfern und das Gas fließt in das Volumen $V_2$.
\end{minipage} }
\hfill \end{ttext}
\begin{minipage}{0.3\textwidth} \vfill
\begin{figure}[H] \end{minipage}
\centering \hfill
\includegraphics[width=\textwidth]{img/td_gay_lussac.pdf} \begin{minipage}{0.3\textwidth}
\end{figure} \begin{figure}[H]
\end{minipage} \centering
\includegraphics[width=\textwidth]{img/td_gay_lussac.pdf}
\end{figure}
\end{minipage}
\end{bigformula}
\begin{formula}{entropy} \begin{formula}{entropy}
\desc{Entropy change}{}{} \desc{Entropy change}{}{}
@ -149,7 +154,7 @@
\Section[ \Section[
\eng{Phase transitions} \eng{Phase transitions}
\ger{Phasenübergänge} \ger{Phasenübergänge}
]{phases} ]{phases}
\begin{ttext} \begin{ttext}
\eng{ \eng{
@ -187,7 +192,7 @@
\Subsubsection[ \Subsubsection[
\eng{Osmosis} \eng{Osmosis}
\ger{Osmose} \ger{Osmose}
]{osmosis} ]{osmosis}
\begin{ttext} \begin{ttext}
\eng{ \eng{
Osmosis is the spontaneous net movement or diffusion of solvent molecules Osmosis is the spontaneous net movement or diffusion of solvent molecules
@ -213,7 +218,7 @@
\Subsection[ \Subsection[
\eng{Material properties} \eng{Material properties}
\ger{Materialeigenschaften} \ger{Materialeigenschaften}
]{} ]{props}
\begin{formula}{heat_cap} \begin{formula}{heat_cap}
\desc{Heat capacity}{}{$Q$ heat} \desc{Heat capacity}{}{$Q$ heat}
\desc[german]{Wärmekapazität}{}{$Q$ Wärme} \desc[german]{Wärmekapazität}{}{$Q$ Wärme}
@ -266,12 +271,12 @@
\Section[ \Section[
\eng{Laws of thermodynamics} \eng{Laws of thermodynamics}
\ger{Hauptsätze der Thermodynamik} \ger{Hauptsätze der Thermodynamik}
]{laws} ]{laws}
\Subsection[ \Subsection[
\eng{Zeroeth law} \eng{Zeroeth law}
\ger{Nullter Hauptsatz} \ger{Nullter Hauptsatz}
]{law0} ]{law0}
\begin{ttext} \begin{ttext}
\eng{If two systems are each in thermal equilibrium with a third, they are also in thermal equilibrium with each other.} \eng{If two systems are each in thermal equilibrium with a third, they are also in thermal equilibrium with each other.}
\ger{Wenn sich zwei Siesteme jeweils im thermischen Gleichgewicht mit einem dritten befinden, befinden sie sich auch untereinander im thermischen Gleichgewicht.} \ger{Wenn sich zwei Siesteme jeweils im thermischen Gleichgewicht mit einem dritten befinden, befinden sie sich auch untereinander im thermischen Gleichgewicht.}
@ -307,7 +312,7 @@
\Subsection[ \Subsection[
\eng{Second law} \eng{Second law}
\ger{Zweiter Hauptsatz} \ger{Zweiter Hauptsatz}
]{law2} ]{law2}
\begin{ttext} \begin{ttext}
\eng{ \eng{
\textbf{Clausius}: Heat can never pass from a colder to a warmer body without some other change, connected therewith, occurring at the same time.\\ \textbf{Clausius}: Heat can never pass from a colder to a warmer body without some other change, connected therewith, occurring at the same time.\\
@ -321,7 +326,7 @@
\Subsection[ \Subsection[
\eng{Third law} \eng{Third law}
\ger{Dritter Hauptsatz} \ger{Dritter Hauptsatz}
]{law3} ]{law3}
\begin{ttext} \begin{ttext}
\eng{It is impussible to cool a system to absolute zero.} \eng{It is impussible to cool a system to absolute zero.}
\ger{Es ist unmöglich, ein System bis zum absoluten Nullpunkt abzukühlen.} \ger{Es ist unmöglich, ein System bis zum absoluten Nullpunkt abzukühlen.}
@ -332,7 +337,7 @@
\desc[german]{Entropiedichte}{}{$s = \frac{S}{N}$} \desc[german]{Entropiedichte}{}{$s = \frac{S}{N}$}
\eq{ \eq{
\lim_{T\to 0} s(T) &= 0 \\ \lim_{T\to 0} s(T) &= 0 \\
\shortintertext{\GT{and_therefore_also}} \\ \shortintertext{\GT{and_therefore_also}}
\lim_{T\to 0} c_V &= 0 \lim_{T\to 0} c_V &= 0
} }
\end{formula} \end{formula}
@ -340,25 +345,77 @@
\Section[ \Section[
\eng{Ensembles} \eng{Ensembles}
\ger{Ensembles} \ger{Ensembles}
]{ensembles} ]{ensembles}
\Eng[const_variables]{Constant variables}
\Ger[const_variables]{Konstante Variablen}
\begin{bigformula}{nve} \absLabel[mc_ensemble]
\desc{Microcanonical ensemble}{}{}
\desc[german]{Mikrokanonisches Ensemble}{}{}
\begin{minipagetable}{nve}
\entry{const_variables} {$E$, $V,$ $N$ }
\entry{partition_sum} {$\Omega = \sum_n 1$ }
\entry{probability} {$p_n = \frac{1}{\Omega}$}
\entry{td_pot} {$S = \kB\ln\Omega$ }
\entry{pressure} {$p = T \pdv{S}{V}_{E,N}$}
\entry{entropy} {$S = \kB = \ln\Omega$ }
\end{minipagetable}
\end{bigformula}
\begin{bigformula}{nvt} \absLabel[c_ensemble]
\desc{Canonical ensemble}{}{}
\desc[german]{Kanonisches Ensemble}{}{}
\begin{minipagetable}{nvt}
\entry{const_variables} {$T$, $V$, $N$ }
\entry{partition_sum} {$Z = \sum_n \e^{-\beta E_n}$ }
\entry{probability} {$p_n = \frac{\e^{-\beta E_n}}{Z}$}
\entry{td_pot} {$F = - \kB T \ln Z$ }
\entry{pressure} {$p = -\pdv{F}{V}_{T,N}$ }
\entry{entropy} {$S = -\pdv{F}{T}_{V,N}$ }
\end{minipagetable}
\end{bigformula}
\begin{bigformula}{mvt} \absLabel[gc_ensemble]
\desc{Grand canonical ensemble}{}{}
\desc[german]{Grosskanonisches Ensemble}{}{}
\begin{minipagetable}{mvt}
\entry{const_variables} {$T$, $V$, $\mu$ }
\entry{partition_sum} {$Z_\text{g} = \sum_{n} \e^{-\beta(E_n - \mu N_n)}$ }
\entry{probability} {$p_n = \frac{\e^{-\beta (E_n - \mu N_n}}{Z_\text{g}}$}
\entry{td_pot} {$ \Phi = - \kB T \ln Z$ }
\entry{pressure} {$p = -\pdv{\Phi}{V}_{T,\mu} = -\frac{\Phi}{V}$ }
\entry{entropy} {$S = -\pdv{\Phi}{T}_{V,\mu}$ }
\end{minipagetable}
\end{bigformula}
\begin{bigformula}{npt}
\desc{Isobaric-isothermal}{Gibbs ensemble}{}
% \desc[german]{Kanonisches Ensemble}{}{}
\begin{minipagetable}{npt}
\entry{const_variables} {$N$, $p$, $T$}
\entry{partition_sum} {}
\entry{probability} {$p_n ? \frac{\e^{-\beta(E_n + pV_n)}}{Z}$}
\entry{td_pot} {}
\entry{pressure} {}
\entry{entropy} {}
\end{minipagetable}
\end{bigformula}
\begin{bigformula}{nph}
\desc{Isonthalpic-isobaric ensemble}{Enthalpy ensemble}{}
% \desc[german]{Kanonisches Ensemble}{}{}
\begin{minipagetable}{nph}
\entry{const_variables} {}
\entry{partition_sum} {}
\entry{probability} {}
\entry{td_pot} {}
\entry{pressure} {}
\entry{entropy} {}
\end{minipagetable}
\end{bigformula}
\TODO{complete, link potentials}
\begin{table}[H]
\centering
\caption{caption}
\label{tab:\fqname}
\begin{tabular}{l|c|c|c}
& \gt{mk} & \gt{k} & \gt{gk} \\ \hline
\GT{variables} & $E$, $V,$ $N$ & $T$, $V$, $N$ & $T$, $V$, $\mu$ \\ \hline
\GT{partition_sum} & $\Omega = \sum_n 1$ & $Z = \sum_n \e^{-\beta E_n}$ & $Z_\text{g} = \sum_{n} \e^{-\beta(E_n - \mu N_n)}$ \\ \hline
\GT{probability} & $p_n = \frac{1}{\Omega}$ & $p_n = \frac{\e^{-\beta E_n}}{Z}$ & $p_n = \frac{\e^{-\beta (E_n - \mu N_n}}{Z_\text{g}}$ \\ \hline
\GT{td_pot} & $S = \kB\ln\Omega$ & $F = - \kB T \ln Z$ & $ \Phi = - \kB T \ln Z$ \\ \hline
\GT{pressure} & $p = T \pdv{S}{V}_{E,N}$ &$p = -\pdv{F}{V}_{T,N}$ & $p = -\pdv{\Phi}{V}_{T,\mu} = -\frac{\Phi}{V}$ \\ \hline
\GT{entropy} & $S = \kB = \ln\Omega$ & $S = -\pdv{F}{T}_{V,N}$ & $S = -\pdv{\Phi}{T}_{V,\mu}$ \\ \hline
\end{tabular}
\end{table}
\begin{formula}{ergodic_hypo} \begin{formula}{ergodic_hypo}
\desc{Ergodic hypothesis}{Over a long periode of time, all accessible microstates in the phase space are equiprobable}{$A$ Observable} \desc{Ergodic hypothesis}{Over a long periode of time, all accessible microstates in the phase space are equiprobable}{$A$ Observable}
@ -370,27 +427,27 @@
\Subsection[ \Subsection[
\eng{Potentials} \eng{Potentials}
\ger{Potentiale} \ger{Potentiale}
]{pots} ]{pots}
\begin{formula}{internal_energy} \begin{formula}{internal_energy}
\desc{Internal energy}{}{} \desc{Internal energy}{}{}
\desc[german]{Innere Energie}{}{} \desc[german]{Innere Energie}{}{}
\eq{\d U(S,V,N) = T\d S -p\d V + \mu\d N} \eq{\d U(S,V,N) = T\d S -p\d V + \mu\d N}
\end{formula} \end{formula}
\begin{formula}{free_energy}
\desc{Free energy / Helmholtz energy }{}{}
\desc[german]{Freie Energie / Helmholtz Energie}{}{}
\eq{\d F(T,V,N) = -S\d T -p\d V + \mu\d N}
\end{formula}
\begin{formula}{enthalpy} \begin{formula}{enthalpy}
\desc{Enthalpy}{}{} \desc{Enthalpy}{}{}
\desc[german]{Enthalpie}{}{} \desc[german]{Enthalpie}{}{}
\eq{\d H(S,p,N) = T\d S +V\d p + \mu\d N} \eq{\d H(S,p,N) = T\d S +V\d p + \mu\d N}
\end{formula} \end{formula}
\begin{formula}{gibbs_energy} \begin{formula}{gibbs_energy}
\desc{Gibbs energy}{}{} \desc{Free enthalpy / Gibbs energy}{}{}
\desc[german]{Gibbsche Energie}{}{} \desc[german]{Freie Entahlpie / Gibbs-Energie}{}{}
\eq{\d G(T,p,N) = -S\d T + V\d p + \mu\d N} \eq{\d G(T,p,N) = -S\d T + V\d p + \mu\d N}
\end{formula} \end{formula}
\begin{formula}{free_energy}
\desc{Free energy / Helmholtz energy }{}{}
\desc[german]{Freie Energie / Helmholtz Energie}{}{}
\eq{\d F(T,V,N) = -S\d T -p\d V + \mu\d N}
\end{formula}
\begin{formula}{grand_canon_pot} \begin{formula}{grand_canon_pot}
\desc{Grand canonical potential}{}{} \desc{Grand canonical potential}{}{}
\desc[german]{Großkanonisches Potential}{}{} \desc[german]{Großkanonisches Potential}{}{}
@ -398,11 +455,32 @@
\end{formula} \end{formula}
\TODO{Maxwell Relationen, TD Quadrat} \TODO{Maxwell Relationen, TD Quadrat}
\begin{formula}{td-square}
\desc{Thermodynamic squre}{}{}
\desc[german]{Themodynamisches Quadrat}{Guggenheim Quadrat}{}
\begin{minipage}{0.3\textwidth}
\begin{tikzpicture}
\draw[thick] (0,0) grid (3,3);
\node at (0.5, 2.5) {$-S$};
\node at (1.5, 2.5) {\color{blue}$U$};
\node at (2.5, 2.5) {$V$};
\node at (0.5, 1.5) {\color{blue}$H$};
\node at (2.5, 1.5) {\color{blue}$F$};
\node at (0.5, 0.5) {$-p$};
\node at (1.5, 0.5) {\color{blue}$G$};
\node at (2.5, 0.5) {$T$};
\end{tikzpicture}
\end{minipage}
\begin{ttext}
\eng{The corners opposite from the potential are the coefficients and each coefficients differential is opposite to it.}
\ger{Die Ecken gegenüber des Potentials sind die Koeffizienten, das Differential eines Koeffizienten ist in der Ecke gegenüber.}
\end{ttext}
\end{formula}
\Section[ \Section[
\eng{Ideal gas} \eng{Ideal gas}
\ger{Ideales Gas} \ger{Ideales Gas}
]{id_gas} ]{id_gas}
\begin{ttext} \begin{ttext}
\eng{The ideal gas consists of non-interacting, undifferentiable particles.} \eng{The ideal gas consists of non-interacting, undifferentiable particles.}
\ger{Das ideale Gas besteht aus nicht-wechselwirkenden, ununterscheidbaren Teilchen.} \ger{Das ideale Gas besteht aus nicht-wechselwirkenden, ununterscheidbaren Teilchen.}
@ -467,20 +545,18 @@
\begin{formula}{desc} \begin{formula}{desc}
\desc{Molecule gas}{2 particles of mass $M$ connected by a ``spring'' with distance $L$}{} \desc{Molecule gas}{2 particles of mass $M$ connected by a ``spring'' with distance $L$}{}
\desc[german]{Molekülgas}{2 Teilchen der Masse $M$ sind verbunden durch eine ``Feder'' mit Länge $L$}{} \desc[german]{Molekülgas}{2 Teilchen der Masse $M$ sind verbunden durch eine ``Feder'' mit Länge $L$}{}
\content{ % \begin{figure}[h]
% \begin{figure}[h] \centering
\centering \tikzstyle{spring}=[thick,decorate,decoration={coil,aspect=0.8,amplitude=5,pre length=0.1cm,post length=0.1cm,segment length=10}]
\tikzstyle{spring}=[thick,decorate,decoration={coil,aspect=0.8,amplitude=5,pre length=0.1cm,post length=0.1cm,segment length=10}] \begin{tikzpicture}
\begin{tikzpicture} \def\radius{0.5}
\def\radius{0.5} \coordinate (left) at (-3, 0);
\coordinate (left) at (-3, 0); \coordinate (right) at (3, 0);
\coordinate (right) at (3, 0); \draw (left) circle (\radius);
\draw (left) circle (\radius); \draw[spring] ($(left) + (\radius,0)$) -- ($(right) - (\radius,0)$);
\draw[spring] ($(left) + (\radius,0)$) -- ($(right) - (\radius,0)$); \draw (right) circle (\radius);
\draw (right) circle (\radius); \end{tikzpicture}
\end{tikzpicture}
% \end{figure} % \end{figure}
}
\end{formula} \end{formula}
\begin{formula}{translation} \begin{formula}{translation}
@ -506,7 +582,7 @@
\Section[ \Section[
\eng{Real gas} \eng{Real gas}
\ger{Reales Gas} \ger{Reales Gas}
]{real_gas} ]{real_gas}
\Subsection[ \Subsection[
\eng{Virial expansion} \eng{Virial expansion}
@ -536,10 +612,11 @@
% b - \frac{a}{\kB T}} % b - \frac{a}{\kB T}}
\end{formula} \end{formula}
\begin{formula}{lennard_jones} \begin{formula}{lennard_jones} \absLabel
\desc{Lennard-Jones potential}{Potential between two molecules. Attractive for $r > \sigma$, repulsive for $r < \sigma$}{} \desc{Lennard-Jones potential}{Potential between two molecules. Attractive for $r > \sigma$, repulsive for $r < \sigma$.\\ In condensed matter: Attraction due to Landau Dispersion \TODO{verify} and repulsion due to Pauli exclusion principle.}{}
\desc[german]{Lennard-Jones-Potential}{Potential zwischen zwei Molekülen. Attraktiv für $r > \sigma$, repulsiv für $r < \sigma$}{} \desc[german]{Lennard-Jones-Potential}{Potential zwischen zwei Molekülen. Attraktiv für $r > \sigma$, repulsiv für $r < \sigma$.\\ In Festkörpern: Anziehung durch Landau-Dispersion und Abstoßung durch Pauli-Prinzip.}{}
\figeq{img/potential_lennard_jones.pdf}{V(r) = 4\epsilon \left[\left(\frac{\sigma}{r}\right)^{12} - \left(\frac{\sigma}{r}\right)^{6}\right]} \fig[0.7]{img/potential_lennard_jones.pdf}
\eq{V(r) = 4\epsilon \left[\left(\frac{\sigma}{r}\right)^{12} - \left(\frac{\sigma}{r}\right)^{6}\right]}
\end{formula} \end{formula}
\Subsection[ \Subsection[
@ -566,7 +643,7 @@
\Section[ \Section[
\eng{Ideal quantum gas} \eng{Ideal quantum gas}
\ger{Ideales Quantengas} \ger{Ideales Quantengas}
]{id_qgas} ]{id_qgas}
\def\bosfer{$\pm$: {$\text{bos} \atop \text{fer}$}} \def\bosfer{$\pm$: {$\text{bos} \atop \text{fer}$}}
\begin{formula}{fugacity} \begin{formula}{fugacity}
@ -611,7 +688,8 @@
\begin{formula}{occupation_number} \begin{formula}{occupation_number}
\desc{Occupation number}{}{\bosfer} \desc{Occupation number}{}{\bosfer}
\desc[german]{Besetzungszahl}{}{\bosfer} \desc[german]{Besetzungszahl}{}{\bosfer}
\figeq{img/td_id_qgas_distributions.pdf}{% \fig[0.7]{img/td_id_qgas_distributions.pdf}
\eq{
\braket{n(\epsilon)} &= \frac{1}{\e^{\beta(\epsilon - \mu)} \mp 1} \\ \braket{n(\epsilon)} &= \frac{1}{\e^{\beta(\epsilon - \mu)} \mp 1} \\
\shortintertext{\GT{for} $\epsilon - \mu \gg \kB T$} \shortintertext{\GT{for} $\epsilon - \mu \gg \kB T$}
&= \frac{1}{\e^{\beta(\epsilon - \mu)}} &= \frac{1}{\e^{\beta(\epsilon - \mu)}}
@ -639,7 +717,7 @@
\eq{ \eq{
pV &= \kB T \ln Z_g \\ pV &= \kB T \ln Z_g \\
\shortintertext{\GT{after} \GT{td:real_gas:virial}} \shortintertext{\GT{after} \GT{td:real_gas:virial}}
&= N \kB T \left[1 \mp \frac{\lambda^3}{2^{5/2} g v} + \Order\left(\left(\frac{\lambda^3}{v}\right)^2\right)\right] &= N \kB T \left[1 \mp \frac{\lambda^3}{2^{5/2} g v} + \Order{\left(\frac{\lambda^3}{v}\right)^2}\right]
} }
\end{formula} \end{formula}
\begin{formula}{relevance} \begin{formula}{relevance}
@ -657,8 +735,8 @@
\Subsection[ \Subsection[
\eng{Bosons} \eng{Bosons}
\ger{Bosonen} \ger{Bosonen}
]{bos} ]{bos}
\begin{formula}{partition_sum} \begin{formula}{partition-sum}
\desc{Partition sum}{}{$p \in\N_0$} \desc{Partition sum}{}{$p \in\N_0$}
\desc[german]{Zustandssumme}{}{$p \in\N_0$} \desc[german]{Zustandssumme}{}{$p \in\N_0$}
\eq{Z_\text{g} = \prod_{p} \frac{1}{1-\e^{-\beta(\epsilon_p - \mu)}}} \eq{Z_\text{g} = \prod_{p} \frac{1}{1-\e^{-\beta(\epsilon_p - \mu)}}}
@ -673,7 +751,7 @@
\Subsection[ \Subsection[
\eng{Fermions} \eng{Fermions}
\ger{Fermionen} \ger{Fermionen}
]{fer} ]{fer}
\begin{formula}{partition_sum} \begin{formula}{partition_sum}
\desc{Partition sum}{}{$p = 0,\,1$} \desc{Partition sum}{}{$p = 0,\,1$}
\desc[german]{Zustandssumme}{}{$p = 0,\,1$} \desc[german]{Zustandssumme}{}{$p = 0,\,1$}
@ -682,7 +760,8 @@
\begin{formula}{occupation} \begin{formula}{occupation}
\desc{Occupation number}{Fermi-Dirac distribution. At $T=0$ \textit{Fermi edge} at $\epsilon=\mu$}{} \desc{Occupation number}{Fermi-Dirac distribution. At $T=0$ \textit{Fermi edge} at $\epsilon=\mu$}{}
\desc[german]{Besetzungszahl}{Fermi-Dirac Verteilung}{Bei $T=0$ \textit{Fermi-Kante} bei $\epsilon=\mu$} \desc[german]{Besetzungszahl}{Fermi-Dirac Verteilung}{Bei $T=0$ \textit{Fermi-Kante} bei $\epsilon=\mu$}
\figeq{img/td_fermi_occupation.pdf}{\braket{n_p} = \frac{1}{\e^{\beta(\epsilon-\mu)}+1}} \fig[0.7]{img/td_fermi_occupation.pdf}
\eq{\braket{n_p} = \frac{1}{\e^{\beta(\epsilon-\mu)}+1}}
\end{formula} \end{formula}
\begin{formula}{slater_determinant} \begin{formula}{slater_determinant}
@ -725,7 +804,7 @@
\Subsubsection[ \Subsubsection[
\eng{Strong degeneracy} \eng{Strong degeneracy}
\ger{Starke Entartung} \ger{Starke Entartung}
]{degenerate} ]{degenerate}
\eng[low_temps]{for low temperatures $T \ll T_\text{F}$} \eng[low_temps]{for low temperatures $T \ll T_\text{F}$}
\ger[low_temps]{für geringe Temperaturen $T\ll T_\text{F}$} \ger[low_temps]{für geringe Temperaturen $T\ll T_\text{F}$}
@ -748,7 +827,8 @@
\begin{formula}{heat_cap} \begin{formula}{heat_cap}
\desc{Heat capacity}{\gt{low_temps}}{differs from \fqEqRef{td:TODO:petit_dulong}} \desc{Heat capacity}{\gt{low_temps}}{differs from \fqEqRef{td:TODO:petit_dulong}}
\desc[german]{Wärmecapacity}{\gt{low_temps}}{weicht ab vom \fqEqRef{td:TODO:petit_dulong}} \desc[german]{Wärmecapacity}{\gt{low_temps}}{weicht ab vom \fqEqRef{td:TODO:petit_dulong}}
\figeq{img/td_fermi_heat_capacity.pdf}{C_V = \pdv{E}{T}_V = N\kB \frac{\pi}{2} \left(\frac{T}{T_\text{F}}\right)} \fig[0.7]{img/td_fermi_heat_capacity.pdf}
\eq{C_V = \pdv{E}{T}_V = N\kB \frac{\pi}{2} \left(\frac{T}{T_\text{F}}\right)}
\end{formula} \end{formula}

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

102
src/test.tex Normal file
View File

@ -0,0 +1,102 @@
\part{Testing}
% \directlua{tex.sprint("Compiled in directory: \\detokenize{" .. lfs.currentdir() .. "}")} \\
% \directlua{tex.sprint("Jobname: " .. tex.jobname)} \\
% \directlua{tex.sprint("Output directory \\detokenize{" .. os.getenv("TEXMF_OUTPUT_DIRECTORY") .. "}")} \\
% \directlua{tex.sprint("String sanitize \\detokenize{" .. string.sanitize("m_a^th?") .. "}")}
\languagename
\paragraph{File loading}
\noindent Lua Aux loaded? \luaAuxLoaded\\
% Translations Aux loaded? \translationsAuxLoaded\\
Input only: \inputOnlyFile
\paragraph{Testing GT, GetTranslation, IfTranslationExists, IfTranslation}
\addtranslation{english}{ttest}{This is the english translation of \texttt{ttest}}
\noindent
GT: ttest = \GT{ttest}\\
% GetTranslation: ttest = \GetTranslation{ttest}\\
% Is english? = \IfTranslation{english}{ttest}{yes}{no} \\
% Is german? = \IfTranslation{german}{ttest}{yes}{no} \\
Is defined = \IfTranslationExists{ttest}{yes}{no} \\
\paragraph{Testing translation keys containing macros}
\def\ttest{NAME}
% \addtranslation{english}{\ttest:name}{With variable}
% \addtranslation{german}{\ttest:name}{Mit Variable}
% \addtranslation{english}{NAME:name}{Without variable}
% \addtranslation{german}{NAME:name}{Without Variable}
\DT[\ttest:name]{english}{DT With variable}
\DT[\ttest:name]{german}{DT Mit Variable}
\noindent
GT: {\textbackslash}ttest:name = \GT{\ttest:name}\\
% GetTranslation: {\textbackslash}ttest:name = \GetTranslation{\ttest:name}\\
% Is english? = \IfTranslation{english}{\ttest:name}{yes}{no} \\
% 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}
\noindent{This text is labeled with "test" \label{test}}\\
\hyperref[test]{This should refer to the line above}\\
Link to quantity which is defined after the reference: \qtyRef{test}\\
\DT[eq:test]{english}{If you read this, then the translation for eq:test was expandend!}
Link to defined quantity: \qtyRef{mass}
\\ Link to element with name: \ElRef{H}
\begin{equation}
\label{eq:test}
E = mc^2
\end{equation}
\paragraph{Testing translation keys with token symbols like undescores}
\noindent
\GT{absolute_undefined_translation_with_underscors}\\
\gt{relative_undefined_translation_with_underscors}\\
\GT{absolute_undefined_translation_with_&ampersand}
\paragraph{Testing formula2}
\begin{formula}{test}
\desc{Test}{Test Description}{Defs}
\desc[german]{Test (DE)}{Beschreibung}{Defs (DE)}
\eq{
\text{equationwith}_{\alpha} \delta \E \left[yo\right]
}
\quantity{\tau}{\m\per\s}{iv}
\end{formula}
\begin{formula}{test2}
\desc{Test2}{Test Description}{Defs}
\desc[german]{Test2 (DE)}{Beschreibung}{Defs (DE)}
\ttxt{
\eng{This text is english}
\ger{Dieser Text ist deutsch}
}
\ttxt[moretext]{
\eng{This text is english, again}
\ger{Dieser Text ist wieder deutsch}
}
\begin{equation}
M\omega\rho\epsilon
\end{equation}
\end{formula}
\begin{formula}{test3}
\desc{Test2}{Test Description}{Defs}
\desc[german]{Test2 (DE)}{Beschreibung}{Defs (DE)}
Formula with just plain text.
\end{formula}

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,73 +1,38 @@
% Define Gruvbox colors % This file was generated by scripts/formulary.py
\definecolor{dark0_hard}{HTML}{1d2021} % Do not edit it directly, changes will be overwritten
\definecolor{dark0}{HTML}{282828} \definecolor{fg-blue}{HTML}{072140}
\definecolor{dark0_soft}{HTML}{32302f} \definecolor{bg-blue}{HTML}{5E94D4}
\definecolor{dark1}{HTML}{3c3836} \definecolor{alt-blue}{HTML}{3070B3}
\definecolor{dark2}{HTML}{504945} \definecolor{bg-yellow}{HTML}{FED702}
\definecolor{dark3}{HTML}{665c54} \definecolor{fg-yellow}{HTML}{CBAB01}
\definecolor{dark4}{HTML}{7c6f64} \definecolor{alt-yellow}{HTML}{FEDE34}
\definecolor{medium}{HTML}{928374} \definecolor{bg-orange}{HTML}{F7811E}
\definecolor{light0_hard}{HTML}{f9f5d7} \definecolor{fg-orange}{HTML}{D99208}
\definecolor{light0}{HTML}{fbf1c7} \definecolor{alt-orange}{HTML}{F9BF4E}
\definecolor{light0_soft}{HTML}{f2e5bc} \definecolor{bg-purple}{HTML}{B55CA5}
\definecolor{light1}{HTML}{ebdbb2} \definecolor{fg-purple}{HTML}{9B468D}
\definecolor{light2}{HTML}{d5c4a1} \definecolor{alt-purple}{HTML}{C680BB}
\definecolor{light3}{HTML}{bdae93} \definecolor{bg-red}{HTML}{EA7237}
\definecolor{light4}{HTML}{a89984} \definecolor{fg-red}{HTML}{D95117}
\definecolor{bright_red}{HTML}{fb4934} \definecolor{alt-red}{HTML}{EF9067}
\definecolor{bright_green}{HTML}{b8bb26} \definecolor{bg-green}{HTML}{9FBA36}
\definecolor{bright_yellow}{HTML}{fabd2f} \definecolor{fg-green}{HTML}{7D922A}
\definecolor{bright_blue}{HTML}{83a598} \definecolor{alt-green}{HTML}{B6CE55}
\definecolor{bright_purple}{HTML}{d3869b} \definecolor{bg-gray}{HTML}{475058}
\definecolor{bright_aqua}{HTML}{8ec07c} \definecolor{fg-gray}{HTML}{20252A}
\definecolor{bright_orange}{HTML}{fe8019} \definecolor{alt-gray}{HTML}{333A41}
\definecolor{neutral_red}{HTML}{cc241d} \definecolor{bg-aqua}{HTML}{689d6a}
\definecolor{neutral_green}{HTML}{98971a} \definecolor{fg-aqua}{HTML}{427b58}
\definecolor{neutral_yellow}{HTML}{d79921} \definecolor{fg0-hard}{HTML}{000000}
\definecolor{neutral_blue}{HTML}{458588} \definecolor{fg0}{HTML}{000000}
\definecolor{neutral_purple}{HTML}{b16286} \definecolor{fg0-soft}{HTML}{20252A}
\definecolor{neutral_aqua}{HTML}{689d6a} \definecolor{fg1}{HTML}{072140}
\definecolor{neutral_orange}{HTML}{d65d0e} \definecolor{fg2}{HTML}{333A41}
\definecolor{faded_red}{HTML}{9d0006} \definecolor{fg3}{HTML}{475058}
\definecolor{faded_green}{HTML}{79740e} \definecolor{fg4}{HTML}{6A757E}
\definecolor{faded_yellow}{HTML}{b57614} \definecolor{bg0-hard}{HTML}{FFFFFF}
\definecolor{faded_blue}{HTML}{076678} \definecolor{bg0}{HTML}{FBF9FA}
\definecolor{faded_purple}{HTML}{8f3f71} \definecolor{bg0-soft}{HTML}{EBECEF}
\definecolor{faded_aqua}{HTML}{427b58} \definecolor{bg1}{HTML}{DDE2E6}
\definecolor{faded_orange}{HTML}{af3a03} \definecolor{bg2}{HTML}{E3EEFA}
\definecolor{bg3}{HTML}{F0F5FA}
% Use Gruvbox colors for various elements
% \pagecolor{light0_hard}
% \color{dark0_hard}
% \pagecolor{dark0_hard}
% \color{light0_hard}
% Section headings in bright colors
\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}{}
% Links in neutral colors
\hypersetup{
colorlinks=true,
linkcolor=neutral_red,
citecolor=neutral_green,
filecolor=neutral_blue,
urlcolor=neutral_orange
}

View File

@ -1,195 +1,36 @@
% use this to define text in different languages for the key <env arg>
% the translation for <env arg> when the environment ends.
% (temporarily change fqname to the \fqname:<env arg> to allow
% the use of \eng and \ger without the key parameter)
% [1]: key
\newenvironment{ttext}[1][desc]{
\edef\realfqname{\fqname}
\edef\fqname{\fqname:#1}
}{
\expandafter\GT\expandafter{\fqname} \\
\edef\fqname{\realfqname}
}
\def\descwidth{0.3\textwidth} \def\descwidth{0.3\textwidth}
\def\eqwidth{0.6\textwidth} \def\eqwidth{0.6\textwidth}
% [1]: minipage width \newcommand\separateEntries{
% 2: fqname of name
% 3: fqname of a translation that holds the explanation
\newcommand{\NameWithExplanation}[3][\descwidth]{
\begin{minipage}{#1}
\iftranslation{#2}{
\raggedright
\gt{#2}
}{}
\iftranslation{#3}{
\\ {\color{dark1} \gt{#3}}
}{}
\end{minipage}
}
% [1]: minipage width
% 2: content
% 3: fqname of a translation that holds the explanation
\newcommand{\ContentBoxWithExplanation}[3][\eqwidth]{
\fbox{
\begin{minipage}{#1}
% \vspace{-\baselineskip} % remove the space that comes from starting a new paragraph
#2
\noindent\iftranslation{#3}{
\begingroup
\color{dark1}
\gt{#3}
% \edef\temp{\GT{#1_defs}}
% \expandafter\StrSubstitute\expandafter{\temp}{:}{\\}
\endgroup
}{}
% \vspace{-\baselineskip} % remove the space that comes from starting a new paragraph
\end{minipage}
}
}
% 1: fqname, optional with #1_defs and #1_desc defined
% 2: content
\newcommand{\NameLeftContentRight}[2]{
\par\noindent\ignorespaces
% \textcolor{gray}{\hrule}
\vspace{0.5\baselineskip} \vspace{0.5\baselineskip}
\NameWithExplanation[\descwidth]{#1}{#1_desc} \textcolor{fg3}{\hrule}
\hfill
\ContentBoxWithExplanation[\eqwidth]{#2}{#1_defs}
\textcolor{dark3}{\hrule}
\vspace{0.5\baselineskip} \vspace{0.5\baselineskip}
% \par
% \hrule
}
\newcommand{\insertEquation}[2]{
\NameLeftContentRight{#1}{
\begin{align}
\label{eq:\fqname:#1}
#2
\end{align}
}
}
\newcommand{\insertFLAlign}[2]{ % eq name, #cols, eq
\NameLeftContentRight{#1}{%
\begin{flalign}%
% dont place label when one is provided
% \IfSubStringInString{label}\unexpanded{#3}{}{
% \label{eq:#1}
% }
#2%
\end{flalign}
}
}
\newcommand{\insertAlignedAt}[3]{ % eq name, #cols, eq
\NameLeftContentRight{#1}{%
\begin{alignat}{#2}%
% dont place label when one is provided
% \IfSubStringInString{label}\unexpanded{#3}{}{
% \label{eq:#1}
% }
#3%
\end{alignat}
}
}
\newcommand\luaexpr[1]{\directlua{tex.sprint(#1)}}
% 1: fqname
% 2: file path
% 3: equation
\newcommand{\insertEquationWithFigure}[4][0.55]{
\par\noindent\ignorespaces
% \textcolor{gray}{\hrule}
\vspace{0.5\baselineskip}
\begin{minipage}{#1\textwidth}
\NameWithExplanation[\textwidth]{#2}{#2_desc}
% TODO: why is this ignored
\vspace{1.0cm}
% TODO: fix box is too large without 0.9
\ContentBoxWithExplanation[0.90\textwidth]{
\begin{align}
\label{eq:\fqname:#2}
#4
\end{align}
}{#2_defs}
\end{minipage}
\hfill
\begin{minipage}{\luaexpr{1.0-#1}\textwidth}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{#3}
\label{fig:\fqname:#2}
\end{figure}
\end{minipage}
\textcolor{dark3}{\hrule}
\vspace{0.5\baselineskip}
}
\newenvironment{formula}[1]{
% key
\newcommand{\desc}[4][english]{
% language, name, description, definitions
\dt[#1]{##1}{##2}
\ifblank{##3}{}{\dt[#1_desc]{##1}{##3}}
\ifblank{##4}{}{\dt[#1_defs]{##1}{##4}}
}
\newcommand{\eq}[1]{
\insertEquation{#1}{##1}
}
\newcommand{\eqAlignedAt}[2]{
\insertAlignedAt{#1}{##1}{##2}
}
\newcommand{\eqFLAlign}[1]{
\insertFLAlign{#1}{##1}
}
\newcommand{\figeq}[2]{
\insertEquationWithFigure{#1}{##1}{##2}
}
\newcommand{\content}[1]{
\NameLeftContentRight{#1}{##1}
}
}{\ignorespacesafterend}
\newenvironment{quantity}[5]{
% key, symbol, si unit, si base units, comment (key to translation)
\newcommand{\desc}[3][english]{
% language, name, description
\DT[qty:#1]{}{##1}{##2}
\ifblank{##3}{}{\DT[qty:#1_desc]{##1}{##3}}
}
\newcommand{\eq}[1]{
\insertEquation{#1}{##1}
}
\newcommand{\eqAlignedAt}[2]{
\insertAlignedAt{#1}{##1}{##2}
}
\newcommand{\eqFLAlign}[1]{
\insertFLAlign{#1}{##1}
}
\edef\qtyname{#1}
\edef\qtysign{#2}
\edef\qtyunit{#3}
\edef\qtybaseunits{#4}
\edef\qtycomment{#5}
}
{
Quantity: \expandafter\GT\expandafter{qty:\qtyname}: \GT{qty:\qtyname_desc} \\
$\qtysign$ $[\SI{\qtyunit}] = [\SI{\qtybaseunits}]$ - \qtycomment \\
\ignorespacesafterend
} }
% Custon environment with table of contents, requires etoolbox?
% Define a custom list
\newcommand{\listofmyenv}{%
\section*{List of My Environments}%
\addcontentsline{toc}{section}{List of My Environments}%
\par\noindent\hrule\par\vspace{0.5\baselineskip}\@starttoc{myenv}%
}
\newcommand{\addmyenv}[1]{\addcontentsline{myenv}{subsection}{\protect\numberline{\themyenv}#1}}
% Define the custom environment
\newcounter{myenv}
\newenvironment{myenv}[1]{%
\refstepcounter{myenv}%
\addmyenv{#1}%
\noindent\textbf{My Environment \themyenv: #1}\par%
}{\par\vspace{0.5\baselineskip}}
%
% DISTRIBUTION
%
\def\distrightwidth{0.45\textwidth} \def\distrightwidth{0.45\textwidth}
\def\distleftwidth{0.45\textwidth} \def\distleftwidth{0.45\textwidth}
@ -202,11 +43,12 @@
% add links to some names % add links to some names
\directlua{ \directlua{
local cases = { local cases = {
pdf = "eq:pt:distributions:pdf", pdf = "f:math:pt:pdf",
pmf = "eq:pt:distributions:pdf", pmf = "f:math:pt:pmf",
cdf = "eq:pt:distributions:cdf", cdf = "f:math:pt:cdf",
mean = "eq:pt:mean", mean = "f:math:pt:mean",
variance = "eq:pt:variance" variance = "f:math:pt:variance",
median = "f:math:pt:median",
} }
if cases["\luaescapestring{##1}"] \string~= nil then if cases["\luaescapestring{##1}"] \string~= nil then
tex.sprint("\\hyperref["..cases["\luaescapestring{##1}"].."]{\\GT{##1}}") tex.sprint("\\hyperref["..cases["\luaescapestring{##1}"].."]{\\GT{##1}}")
@ -239,22 +81,34 @@
\edef\tmpMinipagetableWidth{#1} \edef\tmpMinipagetableWidth{#1}
\edef\tmpMinipagetableName{#2} \edef\tmpMinipagetableName{#2}
\directlua{ \directlua{
table_name = "\luaescapestring{#2}"
entries = {} entries = {}
} }
% Normal entry
% 1: field name (translation key)
% 2: entry text
\newcommand{\entry}[2]{
\directlua{
table.insert(entries, {key = "\luaescapestring{##1}", value = [[\detokenize{##2}]]})
}
}
% Translation entry
% 1: field name (translation key) % 1: field name (translation key)
% 2: translation define statements (field content) % 2: translation define statements (field content)
\newcommand{\entry}[2]{ \newcommand{\tentry}[2]{
% temporarily set fqname so that the translation commands dont need an explicit key % temporarily set fqname so that the translation commands dont need an explicit key
\edef\fqname{\tmpFqname:#2:##1} \edef\fqname{\tmpFqname:#2:##1}
##2 ##2
\edef\fqname{\tmpFqname} \edef\fqname{\tmpFqname}
\directlua{ \directlua{
table.insert(entries, "\luaescapestring{##1}") table.insert(entries, {key = "\luaescapestring{##1}", value = "\\gt{" .. table_name .. ":\luaescapestring{##1}}"})
} }
} }
}{ }{
% \hfill % \hfill
% reset the fqname
\edef\fqname{\tmpFqname}
\begin{minipage}{\tmpMinipagetableWidth} \begin{minipage}{\tmpMinipagetableWidth}
\begingroup \begingroup
\setlength{\tabcolsep}{0.9em} % horizontal \setlength{\tabcolsep}{0.9em} % horizontal
@ -262,13 +116,12 @@
\begin{tabularx}{\textwidth}{|l|X|} \begin{tabularx}{\textwidth}{|l|X|}
\hline \hline
\directlua{ \directlua{
for _, k in ipairs(entries) do for _, kv in ipairs(entries) do
tex.print("\\GT{" .. k .. "} & \\gt{\tmpMinipagetableName:" .. k .. "}\\\\") tex.print("\\GT{" .. kv.key .. "} & " .. kv.value .. "\\\\")
end end
} }
\hline \hline
\end{tabularx} \end{tabularx}
\endgroup \endgroup
\end{minipage} \end{minipage}
% reset the fqname
} }

180
src/util/fqname.tex Normal file
View File

@ -0,0 +1,180 @@
% Everything related to referencing stuff
\newcommand\printFqName{\expandafter\detokenize\expandafter{\fqname}}
% SECTIONING
% start <section>, get heading from translation, set label
% secFqname is the fully qualified name of sections: the keys of all previous sections joined with a ':'
% fqname is secFqname:<key> where <key> is the key/id of some environment, like formula
% [1]: code to run after setting \fqname, but before the \part, \section etc
% 2: key
\newcommand{\Part}[2][desc]{
\newpage
\def\partName{#2}
\def\sectionName{}
\def\subsectionName{}
\def\subsubsectionName{}
\edef\fqname{\partName}
\edef\secFqname{\fqname}
#1
\edef\fqnameText{\expandafter\GetTranslation\expandafter{\fqname}}
\part{\fqnameText}
\label{sec:\fqname}
}
\newcommand{\Section}[2][]{
\def\sectionName{#2}
\def\subsectionName{}
\def\subsubsectionName{}
\edef\fqname{\partName:\sectionName}
\edef\secFqname{\fqname}
#1
% this is necessary so that \section takes the fully expanded string. Otherwise the pdf toc will have just the fqname
\edef\fqnameText{\expandafter\GetTranslation\expandafter{\fqname}}
\section{\fqnameText}
\label{sec:\fqname}
}
% \newcommand{\Subsection}[1]{\Subsection{#1}{}}
\newcommand{\Subsection}[2][]{
\def\subsectionName{#2}
\def\subsubsectionName{}
\edef\fqname{\partName:\sectionName:\subsectionName}
\edef\secFqname{\fqname}
#1
\edef\fqnameText{\expandafter\GetTranslation\expandafter{\fqname}}
\subsection{\fqnameText}
\label{sec:\fqname}
}
\newcommand{\Subsubsection}[2][]{
\def\subsubsectionName{#2}
\edef\fqname{\partName:\sectionName:\subsectionName:\subsubsectionName}
\edef\secFqname{\fqname}
#1
\edef\fqnameText{\expandafter\GetTranslation\expandafter{\fqname}}
\subsubsection{\fqnameText}
\label{sec:\fqname}
}
\edef\fqname{NULL}
\newcommand\luaDoubleFieldValue[3]{%
\directlua{
if #1 \string~= nil and #1[#2] \string~= nil and #1[#2][#3] \string~= nil then
tex.sprint(#1[#2][#3])
return
end
luatexbase.module_warning('luaDoubleFieldValue', 'Invalid indices to `#1`: `#2` and `#3`');
tex.sprint("???")
}%
}
% REFERENCES
% All xyzRef commands link to the key using the translated name
% Uppercase (XyzRef) commands have different link texts, but the same link target
% 1: key/fully qualified name (without qty/eq/sec/const/el... prefix)
% Equations/Formulas
% \newrobustcmd{\fqEqRef}[1]{%
\newrobustcmd{\fqEqRef}[1]{%
% \edef\fqeqrefname{\GT{#1}}
% \hyperref[eq:#1]{\fqeqrefname}
\hyperref[f:#1]{\GT{#1}}%
}
% Formula in the current section
\newrobustcmd{\secEqRef}[1]{%
% \edef\fqeqrefname{\GT{#1}}
% \hyperref[eq:#1]{\fqeqrefname}
\hyperref[f:\secFqname:#1]{\GT{\secFqname:#1}}%
}
% Section
% <name>
\newrobustcmd{\fqSecRef}[1]{%
\hyperref[sec:#1]{\GT{#1}}%
}
% Quantities
% <symbol>
\newrobustcmd{\qtyRef}[1]{%
\edef\tempname{\luaDoubleFieldValue{quantities}{"#1"}{"fqname"}}%
\hyperref[qty:#1]{\expandafter\GT\expandafter{\tempname:#1}}%
}
% <symbol> <name>
\newrobustcmd{\QtyRef}[1]{%
$\luaDoubleFieldValue{quantities}{"#1"}{"symbol"}$ \qtyRef{#1}%
}
% Constants
% <name>
\newrobustcmd{\constRef}[1]{%
\edef\tempname{\luaDoubleFieldValue{constants}{"#1"}{"fqname"}}%
\hyperref[const:#1]{\expandafter\GT\expandafter{\tempname:#1}}%
}
% <symbol> <name>
\newrobustcmd{\ConstRef}[1]{%
$\luaDoubleFieldValue{constants}{"#1"}{"symbol"}$ \constRef{#1}%
}
% Element from periodic table
% <symbol>
\newrobustcmd{\elRef}[1]{%
\hyperref[el:#1]{{\color{fg0}#1}}%
}
% <name>
\newrobustcmd{\ElRef}[1]{%
\hyperref[el:#1]{\GT{el:#1}}%
}
% "LABELS"
% These currently do not place a label,
% instead they provide an alternative way to reference an existing label
\directLuaAux{
if absLabels == nil then
absLabels = {}
end
}
% [1]: target (fqname to point to)
% 2: key
\newcommand{\absLink}[2][sec:\fqname]{
\directLuaAuxExpand{
absLabels["#2"] = [[#1]]
}
}
\directLuaAux{
if abbrLabels == nil then
abbrLabels = {}
end
}
% [1]: target (fqname to point to)
% 2: key
% 3: label (abbreviation)
\newcommand{\abbrLink}[3][sec:\fqname]{
\directLuaAuxExpand{
abbrLabels["#2"] = {}
abbrLabels["#2"]["abbr"] = [[#3]]
abbrLabels["#2"]["fqname"] = [[#1]]
}
}
% [1]:
\newrobustcmd{\absRef}[2][\relax]{%
\directlua{
if absLabels["#2"] == nil then
tex.sprint("\\detokenize{#2}???")
else
if "#1" == "" then %-- if [#1] is not given, use translation of key as text, else us given text
tex.sprint("\\hyperref[" .. absLabels["#2"] .. "]{\\GT{" .. absLabels["#2"] .. "}}")
else
tex.sprint("\\hyperref[" .. absLabels["#2"] .. "]{\luaescapestring{#1}}")
end
end
}
}
\newrobustcmd{\abbrRef}[1]{%
\directlua{
if abbrLabels["#1"] == nil then
tex.sprint("\\detokenize{#1}???")
else
tex.sprint("\\hyperref[" .. abbrLabels["#1"]["fqname"] .. "]{" .. abbrLabels["#1"]["abbr"] .. "}")
end
}
}

View File

@ -1,50 +1,198 @@
\def\gooditem{\item[{$\color{neutral_red}\bullet$}]} % use \newcommand instead of \def because we want to throw an error if a command gets redefined
\def\baditem{\item[{$\color{neutral_green}\bullet$}]} \newcommand\smartnewline[1]{\ifhmode\\\fi} % newline only if there in horizontal mode
\newcommand\gooditem{\item[{$\color{fg-green}\bullet$}]}
\newcommand\baditem{\item[{$\color{fg-red}\bullet$}]}
\def\Grad{\vec{\nabla}} % Functions with (optional) paranthesis
\def\Div{\vec{\nabla} \cdot} % 1: The function (like \exp, \sin etc.)
\def\Rot{\vec{\nabla} \times} % 2: The argument (optional)
\def\vecr{\vec{r}} % 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)
}
}
\def\kB{k_\text{B}}
\def\EFermi{E_\text{F}}
\def\masse{m_\textrm{e}} % COMMON SYMBOLS WITH SUPER/SUBSCRIPTS, VECTOR ARROWS ETC.
% \def\laplace{\Delta} % Laplace operator
\newcommand\laplace{\bigtriangleup} % Laplace operator
% symbols
\newcommand\Grad{\vec{\nabla}}
\newcommand\Div {\vec{\nabla} \cdot}
\newcommand\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}}
\newcommand\kB{k_\text{B}} % boltzmann
\newcommand\NA{N_\text{A}} % avogadro
\newcommand\EFermi{E_\text{F}} % fermi energy
\newcommand\Efermi{E_\text{F}} % fermi energy
\newcommand\Evalence{E_\text{v}} % val vand energy
\newcommand\Econd{E_\text{c}} % cond. band nergy
\newcommand\Egap{E_\text{gap}} % band gap energy
\newcommand\Evac{E_\text{vac}} % vacuum energy
\newcommand\masse{m_\text{e}} % electron mass
\newcommand\Four{\mathcal{F}} % Fourier transform
\newcommand\Lebesgue{\mathcal{L}} % Lebesgue
% \newcommand\O{\mathcal{O}} % order
\newcommand\PhiB{\Phi_\text{B}} % mag. flux
\newcommand\PhiE{\Phi_\text{E}} % electric flux
\newcommand\nreal{n^{\prime}} % refraction real part
\newcommand\ncomplex{n^{\prime\prime}} % refraction index complex part
\newcommand\I{i} % complex/imaginary unit
\newcommand\crit{\text{crit}} % crit (for subscripts)
\newcommand\muecp{\overline{\mu}} % electrochemical potential
% \newcommand\pH{\text{pH}} % pH, already defined by one of the chem packages
\newcommand\rfactor{\text{rf}} % rf roughness_factor
\def\R{\mathbb{R}}
\def\C{\mathbb{C}}
\def\Z{\mathbb{Z}}
\def\N{\mathbb{N}}
\def\Four{\mathcal{F}} % Fourier transform % SYMBOLS
\def\Lebesgue{\mathcal{L}} % Lebesgue \newcommand\R{\mathbb{R}}
\def\Order{\mathcal{O}} \newcommand\C{\mathbb{C}}
\newcommand\Z{\mathbb{Z}}
\newcommand\N{\mathbb{N}}
\newcommand\id{\mathbb{1}}
% caligraphic
\newcommand\E{\mathcal{E}} % electric field
% upright, vector
\newcommand\txA{\text{A}} \newcommand\vecA{\vec{A}}
\newcommand\txB{\text{B}} \newcommand\vecB{\vec{B}}
\newcommand\txC{\text{C}} \newcommand\vecC{\vec{C}}
\newcommand\txD{\text{D}} \newcommand\vecD{\vec{D}}
\newcommand\txE{\text{E}} \newcommand\vecE{\vec{E}}
\newcommand\txF{\text{F}} \newcommand\vecF{\vec{F}}
\newcommand\txG{\text{G}} \newcommand\vecG{\vec{G}}
\newcommand\txH{\text{H}} \newcommand\vecH{\vec{H}}
\newcommand\txI{\text{I}} \newcommand\vecI{\vec{I}}
\newcommand\txJ{\text{J}} \newcommand\vecJ{\vec{J}}
\newcommand\txK{\text{K}} \newcommand\vecK{\vec{K}}
\newcommand\txL{\text{L}} \newcommand\vecL{\vec{L}}
\newcommand\txM{\text{M}} \newcommand\vecM{\vec{M}}
\newcommand\txN{\text{N}} \newcommand\vecN{\vec{N}}
\newcommand\txO{\text{O}} \newcommand\vecO{\vec{O}}
\newcommand\txP{\text{P}} \newcommand\vecP{\vec{P}}
\newcommand\txQ{\text{Q}} \newcommand\vecQ{\vec{Q}}
\newcommand\txR{\text{R}} \newcommand\vecR{\vec{R}}
\newcommand\txS{\text{S}} \newcommand\vecS{\vec{S}}
\newcommand\txT{\text{T}} \newcommand\vecT{\vec{T}}
\newcommand\txU{\text{U}} \newcommand\vecU{\vec{U}}
\newcommand\txV{\text{V}} \newcommand\vecV{\vec{V}}
\newcommand\txW{\text{W}} \newcommand\vecW{\vec{W}}
\newcommand\txX{\text{X}} \newcommand\vecX{\vec{X}}
\newcommand\txY{\text{Y}} \newcommand\vecY{\vec{Y}}
\newcommand\txZ{\text{Z}} \newcommand\vecZ{\vec{Z}}
\newcommand\txa{\text{a}} \newcommand\veca{\vec{a}}
\newcommand\txb{\text{b}} \newcommand\vecb{\vec{b}}
\newcommand\txc{\text{c}} \newcommand\vecc{\vec{c}}
\newcommand\txd{\text{d}} \newcommand\vecd{\vec{d}}
\newcommand\txe{\text{e}} \newcommand\vece{\vec{e}}
\newcommand\txf{\text{f}} \newcommand\vecf{\vec{f}}
\newcommand\txg{\text{g}} \newcommand\vecg{\vec{g}}
\newcommand\txh{\text{h}} \newcommand\vech{\vec{h}}
\newcommand\txi{\text{i}} \newcommand\veci{\vec{i}}
\newcommand\txj{\text{j}} \newcommand\vecj{\vec{j}}
\newcommand\txk{\text{k}} \newcommand\veck{\vec{k}}
\newcommand\txl{\text{l}} \newcommand\vecl{\vec{l}}
\newcommand\txm{\text{m}} \newcommand\vecm{\vec{m}}
\newcommand\txn{\text{n}} \newcommand\vecn{\vec{n}}
\newcommand\txo{\text{o}} \newcommand\veco{\vec{o}}
\newcommand\txp{\text{p}} \newcommand\vecp{\vec{p}}
\newcommand\txq{\text{q}} \newcommand\vecq{\vec{q}}
\newcommand\txr{\text{r}} \newcommand\vecr{\vec{r}}
\newcommand\txs{\text{s}} \newcommand\vecs{\vec{s}}
\newcommand\txt{\text{t}} \newcommand\vect{\vec{t}}
\newcommand\txu{\text{u}} \newcommand\vecu{\vec{u}}
\newcommand\txv{\text{v}} \newcommand\vecv{\vec{v}}
\newcommand\txw{\text{w}} \newcommand\vecw{\vec{w}}
\newcommand\txx{\text{x}} \newcommand\vecx{\vec{x}}
\newcommand\txy{\text{y}} \newcommand\vecy{\vec{y}}
\newcommand\txz{\text{z}} \newcommand\vecz{\vec{z}}
% complex, may be changed later to idot or upright... % SPACES
\def\I{i} \newcommand\sdots{\,\dots\,}
\newcommand\qdots{\quad\dots\quad}
\newcommand\qRarrow{\quad\Rightarrow\quad}
\def\sdots{\,\dots\,} % ANNOTATIONS
\def\qdots{\quad\dots\quad} % put an explanation above an equal sign
\def\qRarrow{\quad\Rightarrow\quad} % [1]: equality sign (or anything else)
% 2: text (not in math mode!)
\newcommand{\explUnderEq}[2][=]{%
\underset{\substack{\uparrow\\\mathrlap{\text{\hspace{-1em}#2}}}}{#1}}
\newcommand{\explOverEq}[2][=]{%
\overset{\substack{\mathrlap{\text{\hspace{-1em}#2}}\\\downarrow}}{#1}}
\newcommand{\eqnote}[1]{
\text{\color{fg2}#1}
}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
% DELIMITERS
% 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} \DeclareMathOperator{\e}{e}
\DeclareMathOperator{\T}{T} % transposed \def\T{\text{T}} % transposed
\DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\sgn}{sgn}
\DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\const}{const} \DeclareMathOperator{\const}{const}
\DeclareMathOperator{\erf}{erf} \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}
\DeclareMathOperator{\arccot}{arccot}
\DeclareMathOperator{\arsinh}{arsinh}
\DeclareMathOperator{\arcosh}{arcosh}
\DeclareMathOperator{\artanh}{artanh}
\DeclareMathOperator{\arcoth}{arcoth}
% diff, for integrals and stuff % diff, for integrals and stuff
% \DeclareMathOperator{\dd}{d} % \DeclareMathOperator{\dd}{d}
\renewcommand*\d{\mathop{}\!\mathrm{d}} \renewcommand*\d{\mathop{}\!\mathrm{d}}
% times 10^{x}
% functions with paranthesis \newcommand\xE[1]{\cdot 10^{#1}}
\newcommand\CmdWithParenthesis[2]{
#1\left(#2\right)
}
\newcommand\Exp[1]{\CmdWithParenthesis{\exp}{#1}} \newcommand\Exp[1]{\CmdWithParenthesis{\exp}{#1}}
\newcommand\Sin[1]{\CmdWithParenthesis{\sin}{#1}} \newcommand\Sin[1]{\CmdWithParenthesis{\sin}{#1}}
\newcommand\Cos[1]{\CmdWithParenthesis{\cos}{#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, MATRIX and TENSOR
% use vecAr to force an arrow
\NewCommandCopy{\vecAr}{\vec}
% extra {} assure they can b directly used after _
%% arrow/underline
\newcommand\mat[1]{{\ensuremath{\underline{#1}}}}
\renewcommand\vec[1]{{\ensuremath{\vecAr{#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}}}}

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

@ -0,0 +1,114 @@
\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$};
}
\newcommand\tkXTick[2]{
\pgfmathsetmacro{\tickwidth}{0.1}
\draw (#1, -\tickwidth/2) -- (#1, \tickwidth/2) node[anchor=north] {#2};
}
\newcommand\tkYTick[2]{
\pgfmathsetmacro{\tickwidth}{0.1}
\draw (-\tickwidth/2, #1) -- (\tickwidth/2,#1) node[anchor=east] {#2};
}

View File

@ -1,66 +0,0 @@
%
% TRANSLATION COMMANDS
%
% The lower case commands use \fqname based keys, the upper case absolute keys.
% Example:
% \dt[example]{german}{Beispiel} % defines the key \fqname:example
% \ger[example]{Beispiel} % defines the key \fqname:example
% \DT[example]{german}{Beispiel} % defines the key example
% \Ger[example]{Beispiel} % defines the key example
%
% For ease of use in the ttext environment and the optional argument of the \Part, \Section, ... commands,
% all "define translation" commands use \fqname as default key
% Get a translation
% expandafter required because the translation commands dont expand anything
% shortcuts for translations
% 1: key
\newcommand{\gt}[1]{\expandafter\GetTranslation\expandafter{\fqname:#1}}
\newcommand{\GT}[1]{\expandafter\GetTranslation\expandafter{#1}}
\newcommand{\IfTranslationExists}{
% \IfTranslation{\languagename}
\IfTranslation{english} % only check english. All translations must be defined for english
}
\newcommand{\iftranslation}[1]{\expandafter\IfTranslationExists\expandafter{\fqname:#1}}
% Define a translation and also make the fallback if it is the english translation
% 1: lang, 2: key, 3: translation
\newcommand{\addtranslationcustom}[3]{
\ifstrequal{#1}{english}{
\addtranslationfallback{#2}{#3}
}{}
\addtranslation{#1}{#2}{#3}
}
% Define a new translation
% [1]: key, 2: lang, 3: translation
\newcommand{\dt}[3][\fqname]{
\ifstrempty{#3}{}{ % dont add empty translations so that the fallback will be used instead
% hack because using expandafter on the second arg didnt work
\def\tempaddtranslation{\addtranslationcustom{#2}}
\ifstrequal{#1}{\fqname}{
\expandafter\tempaddtranslation\expandafter{\fqname}{#3}
}{
\expandafter\tempaddtranslation\expandafter{\fqname:#1}{#3}
}
}
}
\newcommand{\DT}[3][\fqname]{
\ifstrempty{#3}{}{ % dont add empty translations so that the fallback will be used instead
% hack because using expandafter on the second arg didnt work
\def\tempaddtranslation{\addtranslationcustom{#2}}
\ifstrequal{#1}{\fqname}{
\expandafter\tempaddtranslation\expandafter{\fqname}{#3}
}{
\expandafter\tempaddtranslation\expandafter{#1}{#3}
}
}
}
% [1]: key, 2: translation
\newcommand{\ger}[2][\fqname]{\dt[#1]{german}{#2}}
\newcommand{\eng}[2][\fqname]{\dt[#1]{english}{#2}}
\newcommand{\Ger}[2][\fqname]{\DT[#1]{german}{#2}}
\newcommand{\Eng}[2][\fqname]{\DT[#1]{english}{#2}}

View File

@ -1,27 +1,78 @@
% WORDS
\Eng[even]{even}
\Ger[even]{gerade}
\Eng[odd]{odd}
\Ger[odd]{ungerade}
% SCIENTIFIC
\Eng[angle_deg]{Degree} \Eng[angle_deg]{Degree}
\Ger[angle_deg]{Grad} \Ger[angle_deg]{Grad}
\Eng[angle_rad]{Radian} \Eng[angle_rad]{Radian}
\Ger[angle_rad]{Rad} \Ger[angle_rad]{Rad}
\Eng[see_also]{See also}
\Ger[see_also]{Siehe auch}
\Eng[and_therefore]{and therefore}
\Ger[and_therefore]{und damit}
\Eng[and_therefore_also]{and therefore also}
\Ger[and_therefore_also]{und damit auch}
\Eng[time]{Time} \Eng[time]{Time}
\Ger[time]{Zeit} \Ger[time]{Zeit}
\Eng[ensemble]{Ensemble} \Eng[ensemble]{Ensemble}
\Ger[ensemble]{Ensemble} \Ger[ensemble]{Ensemble}
\Eng[even]{even} \Eng[area]{area}
\Ger[even]{gerade} \Ger[area]{Fläche}
% SPECIFIC
\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}
\Eng[other]{Others}
\Ger[other]{Sonstige}
\Eng[sometimes]{sometimes}
\Ger[sometimes]{manchmal}
\Eng[see_also]{See also}
\Ger[see_also]{Siehe auch}
\Eng[for]{for}
\Ger[for]{für}
\Eng[and_therefore]{and therefore}
\Ger[and_therefore]{und damit}
\Eng[and_therefore_also]{and therefore also}
\Ger[and_therefore_also]{und damit auch}
\Eng[const:exp]{Experimental value}
\Ger[const:exp]{Experimenteller Wert}
\Eng[const:def]{Defined value}
\Ger[const:def]{Definierter Wert}
% PERIODIC TABLE
\Eng[symbol]{Symbol}
\Ger[symbol]{Symbol}
\Eng[atomic_number]{Number}
\Ger[atomic_number]{Ordnungszahl}
\Eng[electron_config]{Electronic configuration}
\Ger[electron_config]{Elektronenkonfiguration}
\Eng[crystal_structure]{Crystal structure}
\Ger[crystal_structure]{Kristallstruktur}
\Eng[odd]{odd}
\Ger[odd]{ungerade}