mirror of
https://github.com/TeachBooks/template.git
synced 2026-11-13 06:35:52 +00:00
started stripping down risk-and-reliability to create template
This commit is contained in:
parent
6697c0f5f8
commit
75ff95fa67
127 changed files with 54699 additions and 0 deletions
153
book/notebooks/Untitled.ipynb
Normal file
153
book/notebooks/Untitled.ipynb
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "9d7ffe9f-441f-4119-b5e4-0e872922a78d",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from sympy import *"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
"id": "406dc83e-b114-46be-baf8-073a72b47a36",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"t, a = symbols('t a')\n",
|
||||
"theta = Function('theta')(t)\n",
|
||||
"r = Function('r')(t)\n",
|
||||
"U_c = Function('U_c')(t)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
"id": "df8fe246-6986-4ffd-9c39-6bd259176e42",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/latex": [
|
||||
"$\\displaystyle - \\frac{a^{2} \\operatorname{U_{c}}{\\left(t \\right)} \\cos{\\left(\\theta{\\left(t \\right)} \\right)}}{r{\\left(t \\right)}}$"
|
||||
],
|
||||
"text/plain": [
|
||||
"-a**2*U_c(t)*cos(theta(t))/r(t)"
|
||||
]
|
||||
},
|
||||
"execution_count": 13,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"phi = - (a**2*U_c)/r * cos(theta)\n",
|
||||
"phi"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"id": "a6e55454-52c6-493b-a753-f901cee357bc",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/latex": [
|
||||
"$\\displaystyle \\frac{a^{2} \\operatorname{U_{c}}{\\left(t \\right)} \\sin{\\left(\\theta{\\left(t \\right)} \\right)} \\frac{d}{d t} \\theta{\\left(t \\right)}}{r{\\left(t \\right)}} + \\frac{a^{2} \\operatorname{U_{c}}{\\left(t \\right)} \\cos{\\left(\\theta{\\left(t \\right)} \\right)} \\frac{d}{d t} r{\\left(t \\right)}}{r^{2}{\\left(t \\right)}} - \\frac{a^{2} \\cos{\\left(\\theta{\\left(t \\right)} \\right)} \\frac{d}{d t} \\operatorname{U_{c}}{\\left(t \\right)}}{r{\\left(t \\right)}}$"
|
||||
],
|
||||
"text/plain": [
|
||||
"a**2*U_c(t)*sin(theta(t))*Derivative(theta(t), t)/r(t) + a**2*U_c(t)*cos(theta(t))*Derivative(r(t), t)/r(t)**2 - a**2*cos(theta(t))*Derivative(U_c(t), t)/r(t)"
|
||||
]
|
||||
},
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"phi.diff(t)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 15,
|
||||
"id": "52970004-5d18-4905-a61c-01c5d9a7f81c",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/latex": [
|
||||
"$\\displaystyle \\frac{a^{2} \\operatorname{U_{c}}{\\left(t \\right)} \\cos{\\left(\\theta{\\left(t \\right)} \\right)}}{r^{2}{\\left(t \\right)}}$"
|
||||
],
|
||||
"text/plain": [
|
||||
"a**2*U_c(t)*cos(theta(t))/r(t)**2"
|
||||
]
|
||||
},
|
||||
"execution_count": 15,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"phi.diff(r)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 16,
|
||||
"id": "3bc6b6e8-cdba-4eb9-b754-e07cc74c6063",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/latex": [
|
||||
"$\\displaystyle \\frac{a^{2} \\operatorname{U_{c}}{\\left(t \\right)} \\sin{\\left(\\theta{\\left(t \\right)} \\right)}}{r^{2}{\\left(t \\right)}}$"
|
||||
],
|
||||
"text/plain": [
|
||||
"a**2*U_c(t)*sin(theta(t))/r(t)**2"
|
||||
]
|
||||
},
|
||||
"execution_count": 16,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"phi.diff(theta)/r"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "bcae9e54-d38d-4128-b872-e4bcb11d19c5",
|
||||
"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.13"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue