{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "f4419154",
   "metadata": {},
   "source": [
    "# Rotational motion\n",
    "- Börge Göbel"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "ce2064a4",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ef2d44f8",
   "metadata": {},
   "source": [
    "## Rotation of a point mass around a point in space"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "e223f4db",
   "metadata": {},
   "outputs": [],
   "source": [
    " ### Mass - SI unit: [m] = kg"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "08e44d61",
   "metadata": {},
   "outputs": [],
   "source": [
    " ### Radius - [r] = m"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "c6951e3b",
   "metadata": {},
   "outputs": [],
   "source": [
    " ### Angular velocity - [omega] = 1/s"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0c13a2e3",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "6b33634f",
   "metadata": {},
   "source": [
    "### Calculate energy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "94518316",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "f9a23427",
   "metadata": {},
   "source": [
    "Rotation energy = kinetic energy "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "11d4a8a0",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "947ba853",
   "metadata": {},
   "source": [
    "## Rotation energy of multiple point masses"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9c6da35a",
   "metadata": {},
   "source": [
    "If we assume that all point masses belong to the same object, they have the same angular velocity omega.\n",
    "Only the radius differs."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5a25e849",
   "metadata": {},
   "source": [
    "\\\\( E_\\mathrm{rot} = \\frac{I}{2}\\omega^2 \\\\) with \\\\( I = m \\sum_i r_i^2\\\\): Moment of inertia"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "04f32220",
   "metadata": {},
   "source": [
    "### Rotating a stick around one end ( \\\\( I = \\frac{1}{3}ms^2 \\\\) )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "7de36a3e",
   "metadata": {},
   "outputs": [],
   "source": [
    " ### Length - Unit [s] = m"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "37468c3f",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "975e8642",
   "metadata": {},
   "source": [
    "- analytical result:\n",
    "\n",
    " \\\\( E_\\mathrm{rot} = \\frac{I}{2}\\omega^2 = \\frac{1}{2}\\omega^2\\int\\mathrm{d}m\\, r^2\\\\)\n",
    "\n",
    " \\\\( I = \\int\\mathrm{d}m\\, r^2 \\quad\\quad\\quad \\text{with}\\quad \\mathrm{d}m = \\sigma\\,\\mathrm{d}r \\quad\\quad\\quad \\text{and}\\quad \\sigma = \\frac{m}{s}\\quad\\text{length density}\\\\)\n",
    " \n",
    " \\\\( I = \\frac{m}{s}\\int_0^s\\mathrm{d}r\\, r^2 \\\\)\n",
    " \n",
    " \\\\( I = \\frac{m}{s} \\frac{1}{3}[r^3]_{r=0}^{r=s}\\\\)\n",
    " \n",
    " \\\\( I = \\frac{1}{3}ms^2\\\\)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "de73d1ed",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "6c8c02bb",
   "metadata": {},
   "source": [
    "- numerical result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3fcbcb9d",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "feb7d062",
   "metadata": {},
   "source": [
    "### Rotating a stick around the middle ( \\\\( I = \\frac{1}{12}ms^2 \\\\) )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c971aa55",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "3db03ed4",
   "metadata": {},
   "source": [
    "- analytical result:\n",
    "\n",
    " \\\\( E_\\mathrm{rot} = \\frac{I}{2}\\omega^2 = \\frac{1}{2}\\omega^2\\int\\mathrm{d}m\\, r^2\\\\)\n",
    "\n",
    " \\\\( I = \\int\\mathrm{d}m\\, r^2 \\quad\\quad\\quad \\text{with}\\quad \\mathrm{d}m = \\sigma\\,\\mathrm{d}r \\quad\\quad\\quad \\text{and}\\quad \\sigma = \\frac{m}{s}\\quad\\text{length density}\\\\)\n",
    " \n",
    " \\\\( I = \\frac{m}{s}\\int_{-s/2}^{s/2}\\mathrm{d}r\\, r^2 \\\\)\n",
    " \n",
    " \\\\( I = \\frac{m}{s} \\frac{1}{3}[r^3]_{r=-s/2}^{r=s/2}\\\\)\n",
    " \n",
    " \\\\( I = \\frac{m}{s} \\frac{1}{3}\\left[\\frac{s^3}{8}-\\left(-\\frac{s^3}{8}\\right)\\right]\\\\)\n",
    " \n",
    " \\\\( I = \\frac{1}{12}ms^2\\\\)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8a1d70b3",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "0069627f",
   "metadata": {},
   "source": [
    "- numerical result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5070df44",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "d4511634",
   "metadata": {},
   "source": [
    "### Rotating a sphere around the z axis ( \\\\( I = \\frac{2}{5}mR^2 \\\\) )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f0757861",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "e39a9a8e",
   "metadata": {},
   "source": [
    "- analytical result\n",
    "\n",
    " \\\\( E_\\mathrm{rot} = \\frac{I}{2}\\omega^2 = \\frac{1}{2}\\omega^2\\int\\mathrm{d}m\\, r^2\\\\)\n",
    "\n",
    " \\\\( I = \\int\\mathrm{d}m\\, r^2 \\quad\\quad\\quad \\text{with}\\quad \\mathrm{d}m = \\rho\\,\\mathrm{d}V \\quad\\quad\\quad \\text{and}\\quad \\rho=\\frac{m}{V} \\quad\\text{(volume) density}\\\\)\n",
    " \n",
    " \\\\( I = \\frac{m}{V}\\int_V\\mathrm{d}V\\, r^2 \\\\)\n",
    " \n",
    " use cylindrical coordinates\n",
    " \n",
    " \\\\( I = \\frac{m}{V}\\int_{z=-R}^{R}\\int_{r=0}^{\\tilde{R}(z)}\\int_{\\varphi=0}^{2\\pi}\\,r\\,\\mathrm{d}r\\mathrm{d}z\\mathrm{d}\\varphi\\, r^2 \\\\)\n",
    " \n",
    " Calculate polar-angle integral and use \\\\( \\tilde{R}(z) = \\sqrt{R^2-z^2} \\\\)\n",
    " \n",
    "  \\\\( I = \\frac{m}{V} \\left(\\int_{\\varphi=0}^{2\\pi}\\,\\mathrm{d}\\varphi\\right)\\, \\int_{z=-R}^{R}\\int_{r=0}^{\\tilde{R}(z)} r^3 \\,\\mathrm{d}r\\mathrm{d}z\\\\)\n",
    "  \n",
    "  \\\\( I = \\frac{m}{V} 2\\pi\\,\\int_{z=-R}^{R} \\left[\\frac{1}{4}r^4\\right]_{r=0}^{\\sqrt{R^2-z^2}} \\,\\mathrm{d}z \\\\)\n",
    "  \n",
    "  \\\\( I = \\frac{m}{V} 2\\pi\\,\\int_{z=-R}^{R} \\frac{1}{4}\\left(R^2-z^2\\right)^2 \\,\\mathrm{d}z \\\\)\n",
    "  \n",
    "  \\\\( I = \\frac{m}{V} \\frac{\\pi}{2}\\,\\int_{z=-R}^{R} \\left(R^4-2R^2z^2+z^4\\right) \\,\\mathrm{d}z \\\\)\n",
    "  \n",
    "  \\\\( I = \\frac{m}{V} \\frac{\\pi}{2}\\,\\left[R^4z-\\frac{2}{3}R^2z^3+\\frac{1}{5}z^5\\right]_{z=-R}^{R} \\\\)\n",
    "  \n",
    "  \\\\( I = \\frac{m}{V} \\frac{\\pi}{2}\\,2\\left(R^5-\\frac{2}{3}R^5+\\frac{1}{5}R^5\\right) \\\\)\n",
    "  \n",
    "  \\\\( I = \\frac{m}{V} \\pi\\,\\frac{8}{15}R^5 \\\\)\n",
    "  \n",
    " use volume of the sphere \\\\( V = \\frac{4}{3}\\pi R^3 \\\\)\n",
    " \n",
    " \\\\( I = m \\frac{\\frac{8}{15}\\pi R^5}{\\frac{4}{3}\\pi R^3} \\\\)\n",
    " \n",
    " \\\\( I = \\frac{2}{5}mR^2\\\\)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5d7be02b",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "e966ed1b",
   "metadata": {},
   "source": [
    "- numerical result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1028b632",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "d5213af6",
   "metadata": {},
   "source": [
    "### Rotating a spherical shell around the z axis ( \\\\( I = \\frac{2}{5}m\\frac{r_1^5-r_2^5}{r_1^3-r_2^3} \\\\) )"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "484b9ed6",
   "metadata": {},
   "source": [
    "- analytical result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "baae180b",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "0a702874",
   "metadata": {},
   "source": [
    "- numerical result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ca6e3028",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "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.9.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
