generated from jupyterlite/demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f50f43
commit e4c16ab
Showing
26 changed files
with
368 additions
and
5,166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,3 @@ | ||
# JupyterLite Demo | ||
# Zentrifugalkräfte durch Einsteins Linse | ||
|
||
[![lite-badge](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://jupyterlite.github.io/demo) | ||
|
||
JupyterLite deployed as a static site to GitHub Pages, for demo purposes. | ||
|
||
## ✨ Try it in your browser ✨ | ||
|
||
➡️ **https://jupyterlite.github.io/demo** | ||
|
||
![github-pages](https://user-images.githubusercontent.com/591645/120649478-18258400-c47d-11eb-80e5-185e52ff2702.gif) | ||
|
||
## Requirements | ||
|
||
JupyterLite is being tested against modern web browsers: | ||
|
||
- Firefox 90+ | ||
- Chromium 89+ | ||
|
||
## Deploy your JupyterLite website on GitHub Pages | ||
|
||
Check out the guide on the JupyterLite documentation: https://jupyterlite.readthedocs.io/en/latest/quickstart/deploy.html | ||
|
||
## Further Information and Updates | ||
|
||
For more info, keep an eye on the JupyterLite documentation: | ||
|
||
- How-to Guides: https://jupyterlite.readthedocs.io/en/latest/howto/index.html | ||
- Reference: https://jupyterlite.readthedocs.io/en/latest/reference/index.html | ||
In diesem Jupyter Notebook werden die Rechnungen aus dem Phoebe-Artikel "Zentrifugalkräfte durch Einsteins Linse" mithilfe der Bibliothek `EinsteinPy` (https://einsteinpy.org) nachgestellt. Die Rechnung gliedert sich in zwei Teile: Zu Beginn betrachten wir eine flache Raumzeit, die wir in Polarkoordinaten $(r,\\theta)$ ausdrücken $$\\mathrm{d}s^2 = -\\mathrm{d}t^2 + \\mathrm{d}r^2 + r^2\\mathrm{d}\\theta^2.$$ Im zweiten Teil schauen wir uns genauer an welche Form die Christoffel-Symbole in einem rotierenden Bezugssystem annehmen werden. Wie sich zeigen wird, lassen sich daraus Zentrifugal-, Coriolis- und Eulerkraft ableiten. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,366 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"id": "78f323e5-01a6-451f-a0da-76844f34c463", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import sympy\n", | ||
"from einsteinpy.symbolic import MetricTensor, ChristoffelSymbols" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "2481b42d-c582-4bde-a058-8d5199812a78", | ||
"metadata": {}, | ||
"source": [ | ||
"# Zentrifugalkräfte aus Sicht der Relativitätstheorie" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "a68ba0f0-e68c-43a1-b939-ec136d8acb57", | ||
"metadata": {}, | ||
"source": [ | ||
"In diesem Jupyter Notebook werden die Rechnungen aus dem Artikel mithilfe der Bibliothek `EinsteinPy` (https://einsteinpy.org) nachgestellt. Die Rechnung gliedert sich in zwei Teile: Zu Beginn betrachten wir eine flache Raumzeit, die wir in Polarkoordinaten $(r,\\theta)$ ausdrücken $$\\mathrm{d}s^2 = -\\mathrm{d}t^2 + \\mathrm{d}r^2 + r^2\\mathrm{d}\\theta^2.$$ Im zweiten Teil schauen wir uns genauer an welche Form die Christoffel-Symbole in einem rotierenden Bezugssystem annehmen werden. Wie sich zeigen wird, lassen sich daraus Zentrifugal-, Coriolis- und Eulerkraft ableiten." | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "8a8a1001-3706-4a90-878b-a1d356789be2", | ||
"metadata": {}, | ||
"source": [ | ||
"## Flache Raumzeitmetrik in Polarkoordinaten" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "78ff30e0-9b27-4933-b7a4-63c0765cbcee", | ||
"metadata": {}, | ||
"source": [ | ||
"Wir beginnen zunächst damit die Koordinaten $(t,r,\\theta)$ zu definieren" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"id": "174d89f1-d27d-4b0c-911b-5ffdf12a1f74", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"syms = sympy.symbols('t r theta')\n", | ||
"t, r, theta = syms" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "1b454087-9f62-4511-81f3-0ce589c2cded", | ||
"metadata": {}, | ||
"source": [ | ||
"und bauen daraus die Metrik zusammen" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 3, | ||
"id": "97afbb27-10b8-497e-b403-2fc3780a3267", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/latex": [ | ||
"$\\displaystyle \\left[\\begin{matrix}-1 & 0 & 0\\\\0 & 1 & 0\\\\0 & 0 & r^{2}\\end{matrix}\\right]$" | ||
], | ||
"text/plain": [ | ||
"[[-1, 0, 0], [0, 1, 0], [0, 0, r**2]]" | ||
] | ||
}, | ||
"execution_count": 3, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"m = [[0 for i in range(3)] for i in range(3)]\n", | ||
"m[0][0] = - 1\n", | ||
"m[1][1] = 1\n", | ||
"m[2][2] = r**2\n", | ||
"metric = MetricTensor(m, syms)\n", | ||
"metric.tensor()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "88b49809-c7a1-4d7f-897d-d143e515ce68", | ||
"metadata": {}, | ||
"source": [ | ||
"Die Christoffel-Symbole lassen sich schnell berechnen:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 4, | ||
"id": "fc8ac94e-542f-41b4-8c40-7dbd1c60b7ca", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/latex": [ | ||
"$\\displaystyle \\left[\\begin{matrix}\\left[\\begin{matrix}0 & 0 & 0\\\\0 & 0 & 0\\\\0 & 0 & 0\\end{matrix}\\right] & \\left[\\begin{matrix}0 & 0 & 0\\\\0 & 0 & 0\\\\0 & 0 & - r\\end{matrix}\\right] & \\left[\\begin{matrix}0 & 0 & 0\\\\0 & 0 & \\frac{1}{r}\\\\0 & \\frac{1}{r} & 0\\end{matrix}\\right]\\end{matrix}\\right]$" | ||
], | ||
"text/plain": [ | ||
"[[[0, 0, 0], [0, 0, 0], [0, 0, 0]], [[0, 0, 0], [0, 0, 0], [0, 0, -r]], [[0, 0, 0], [0, 0, 1/r], [0, 1/r, 0]]]" | ||
] | ||
}, | ||
"execution_count": 4, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"ch = ChristoffelSymbols.from_metric(metric)\n", | ||
"sympy.simplify(ch.tensor())" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "83a91eb2-fd9f-4b7b-9e65-3297815ac966", | ||
"metadata": {}, | ||
"source": [ | ||
"Wie man sieht, sind die Christoffel-Symbole in den unteren beiden Indizes symmetrisch:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 5, | ||
"id": "3b919d1d-ed7b-4ca4-a2f7-ec8687562bfd", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/latex": [ | ||
"$\\displaystyle \\frac{1}{r}$" | ||
], | ||
"text/plain": [ | ||
"1/r" | ||
] | ||
}, | ||
"execution_count": 5, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"ch[2][1][2]" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 6, | ||
"id": "35ca5834-2f08-45ec-beaf-efe5853a2ec8", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/latex": [ | ||
"$\\displaystyle \\frac{1}{r}$" | ||
], | ||
"text/plain": [ | ||
"1/r" | ||
] | ||
}, | ||
"execution_count": 6, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"ch[2][2][1]" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "0e34cc44-e7da-41f5-a36f-25bbd8e1c70e", | ||
"metadata": {}, | ||
"source": [ | ||
"Es ergeben sich also nur zwei nicht-verschwindende Christoffel-Symbole: $$\\Gamma^r_{\\theta\\theta} = -r,\\quad \\Gamma^\\theta_{r\\theta} = \\Gamma^\\theta_{\\theta r} = \\frac{1}{r}$$" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "968ef45f-6464-4f03-9c65-05fc9f4c8c5c", | ||
"metadata": {}, | ||
"source": [ | ||
"## Rotierendes Bezugssystem" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "7a68578b-5199-4151-b5b9-448c4bc832f9", | ||
"metadata": {}, | ||
"source": [ | ||
"Wie oben beschrieben, schauen wir uns nun genauer an, was passiert, wenn das Koordinatensystem gegenüber dem ersten zu rotieren anfängt. Diese Koordinatentransformation $\\theta \\longrightarrow \\theta + \\omega(t)\\cdot t$ beeinflusst Form die Metrik, es taucht eine zeitabhängige Winkelgeschwindigkeit $\\omega(t)$ auf:\n", | ||
"$$\\mathrm{d}s^2 = - (1 -\\omega^2r^2)\\mathrm{d}t^2 + \\mathrm{d}r^2 + r^2\\mathrm{d}\\theta^2 + 2\\omega r^2 \\mathrm{d}t\\mathrm{d}\\theta$$" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "00d45632-9ae0-4bef-8ebd-ee675a8f8f3a", | ||
"metadata": {}, | ||
"source": [ | ||
"Wir definieren zunächst wieder die Koordinaten:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 7, | ||
"id": "990dab4d-5ac5-4c1f-9a0a-356717cfa234", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"syms_ = sympy.symbols('t r theta')\n", | ||
"t, r, theta = syms_" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "ba8d4795-f417-4b52-a9fb-3dddbf43da0a", | ||
"metadata": {}, | ||
"source": [ | ||
"Die Winkelgeschwindigkeit wird als Funktion erklärt:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 8, | ||
"id": "bdcf53f7-4b9c-4141-955c-4845aed1eaca", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"omega_t = sympy.Function('omega')(t)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "46c5e30b-b2cb-4d36-98f4-36a0d73e48fe", | ||
"metadata": {}, | ||
"source": [ | ||
"Definiere nun die Metrik, die diesmal zeitabhängig sein wird:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "1567a3d2-1f9b-4679-bf52-8f4ae9a03bee", | ||
"metadata": {}, | ||
"source": [ | ||
"Daraus bauen wir die Metrik zusammen:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 9, | ||
"id": "8e3649f5-ded8-4f20-ab13-ddcd9e8aae92", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/latex": [ | ||
"$\\displaystyle \\left[\\begin{matrix}r^{2} \\omega^{2}{\\left(t \\right)} - 1 & 0 & r^{2} \\omega{\\left(t \\right)}\\\\0 & 1 & 0\\\\r^{2} \\omega{\\left(t \\right)} & 0 & r^{2}\\end{matrix}\\right]$" | ||
], | ||
"text/plain": [ | ||
"[[r**2*omega(t)**2 - 1, 0, r**2*omega(t)], [0, 1, 0], [r**2*omega(t), 0, r**2]]" | ||
] | ||
}, | ||
"execution_count": 9, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"m_t = [[0 for i in range(3)] for i in range(3)]\n", | ||
"m_t[0][0] = - (1 - omega_t**2 * r**2)\n", | ||
"m_t[1][1] = 1\n", | ||
"m_t[0][2] = omega_t * r**2\n", | ||
"m_t[2][0] = omega_t * r**2\n", | ||
"m_t[2][2] = r**2\n", | ||
"metric_t = MetricTensor(m_t, syms_)\n", | ||
"metric_t.tensor()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "bbc56c63-ec62-4198-98a5-011a75838fcb", | ||
"metadata": {}, | ||
"source": [ | ||
"Wie oben lassen sich die Christoffel-Symbole bestimmen:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 10, | ||
"id": "1b1f317b-5976-4419-a305-38197ae48d2a", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/latex": [ | ||
"$\\displaystyle \\left[\\begin{matrix}\\left[\\begin{matrix}0 & 0 & 0\\\\0 & 0 & 0\\\\0 & 0 & 0\\end{matrix}\\right] & \\left[\\begin{matrix}- r \\omega^{2}{\\left(t \\right)} & 0 & - r \\omega{\\left(t \\right)}\\\\0 & 0 & 0\\\\- r \\omega{\\left(t \\right)} & 0 & - r\\end{matrix}\\right] & \\left[\\begin{matrix}\\frac{d}{d t} \\omega{\\left(t \\right)} & \\frac{\\omega{\\left(t \\right)}}{r} & 0\\\\\\frac{\\omega{\\left(t \\right)}}{r} & 0 & \\frac{1}{r}\\\\0 & \\frac{1}{r} & 0\\end{matrix}\\right]\\end{matrix}\\right]$" | ||
], | ||
"text/plain": [ | ||
"[[[0, 0, 0], [0, 0, 0], [0, 0, 0]], [[-r*omega(t)**2, 0, -r*omega(t)], [0, 0, 0], [-r*omega(t), 0, -r]], [[Derivative(omega(t), t), omega(t)/r, 0], [omega(t)/r, 0, 1/r], [0, 1/r, 0]]]" | ||
] | ||
}, | ||
"execution_count": 10, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"ch_t = ChristoffelSymbols.from_metric(metric_t)\n", | ||
"sympy.simplify(ch_t.tensor())" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "316b9de5-6e62-4dcf-b740-98de405684cf", | ||
"metadata": {}, | ||
"source": [ | ||
"Wie man sieht, kommen nun vier weitere Christoffel-Symbole hinzu:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "971c5c63-58b3-47e2-a3b3-c6f4c3145bce", | ||
"metadata": {}, | ||
"source": [ | ||
"$$\\begin{align*}\n", | ||
"\\Gamma^r_{tt} &= -\\omega^2r, & \\Gamma^r_{t\\theta} &= -\\omega r, & \\Gamma^r_{\\theta\\theta} &= -r \\\\\n", | ||
"\\Gamma^\\theta_{tt} &= \\dot{\\omega}, & \\Gamma^\\theta_{tr} &=\\frac{\\omega}{r}, & \\Gamma^\\theta_{r\\theta} &= \\frac{1}{r}.\n", | ||
"\\end{align*}$$" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"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.0" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.