Skip to content

Commit 76a420d

Browse files
committed
Working on pdes
1 parent e536707 commit 76a420d

2 files changed

+89
-2
lines changed

Physics101AsteroSeismologyAndSphericalHarmonics.ipynb

Lines changed: 88 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"\n",
3333
"* [Wikipedia article about asteroseismology](https://en.wikipedia.org/wiki/Asteroseismology)\n",
3434
"* [Wikipedia article about spherical harmonics](https://en.wikipedia.org/wiki/Spherical_harmonics)\n",
35+
"* [Wikipedia article about bessel functions](https://en.wikipedia.org/wiki/Bessel_function)\n",
3536
"* [scipy manual for spherical harmonics](https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.sph_harm.html)\n",
3637
"* [scipython blog for spherical harmonics vizualization](https://scipython.com/blog/visualizing-the-real-forms-of-the-spherical-harmonics/)"
3738
]
@@ -61,7 +62,93 @@
6162
"source": [
6263
"## Spherical harmonics\n",
6364
"\n",
64-
"### Introduction, Fourier series and why they matter for PDEs"
65+
"### Fourier series and the laplacian operator\n",
66+
"\n",
67+
"Fourier series properties can be analyzed within various mathenatical framework. One of them is related to the Laplacian operator:\n",
68+
"\n",
69+
"We recall that the Laplacian operator, sometimes written $\\nabla \\cdot \\nabla$, $\\nabla^2$ or $\\Delta$, where $\\nabla$ can be written $\\left( \\frac{\\partial}{\\partial x_0}, \\frac{\\partial}{\\partial x_1}, \\dots \\frac{\\partial}{\\partial x_{n-1}} \\right)$ and the laplacian operator applied to a function $f$ reads $\\Delta f = \\sum_{i=0}^{n-1} \\frac{\\partial f}{\\partial x_i^2}$.\n",
70+
"\n",
71+
"Laplacian operator is the core operator of many different PDEs, and in particular to solve the heat equation, for which Joseph Fourier was famous for:\n",
72+
"\n",
73+
"\\begin{align}\n",
74+
"\\end{align}\n",
75+
"\n",
76+
"\n",
77+
"It is interesting to notice that the trigonometric polynomial that defines the (separable) Fourier series basis elements are eigenfunctions for the laplacian operators over euclidean spaces:\n",
78+
"\n",
79+
"lets define $\\delta_{nF}(x) = e^{2 \\pi j nFx}$\n",
80+
"\n",
81+
"And\n",
82+
"\\begin{align}\n",
83+
" \\frac{\\partial \\delta_{nF}}{\\partial x} (x) &= \\frac{\\partial e^{2 \\pi j nFx}}{\\partial x} \\\\\n",
84+
" &= 2 \\pi j nF e^{2 \\pi j nFx} \\\\\n",
85+
"\\end{align}\n",
86+
"\n",
87+
"And\n",
88+
"\\begin{align}\n",
89+
" \\frac{\\partial \\delta_{nF}}{\\partial x^2} (x) &= -(2\\pi nF)^2 e^{2 \\pi j nFx} \\\\\n",
90+
" &= -(2\\pi nF)^2 \\delta_{nF}\\\\\n",
91+
" &= \\lambda \\delta_{nF}\n",
92+
"\\end{align}\n",
93+
"\n",
94+
"Moreover, eigenfunctions of the laplacian can also be defined for functions on finite domains ([Bessel functions](https://en.wikipedia.org/wiki/Bessel_function) for radially symmetric domain like disks/cylinders and sphere), or [spherical harmonics](https://en.wikipedia.org/wiki/Spherical_harmonics) also for spherical domains."
95+
]
96+
},
97+
{
98+
"cell_type": "markdown",
99+
"metadata": {},
100+
"source": [
101+
"### A basic introduction to Laplace and Poisson partial differential equations\n",
102+
"This short paragraph is based on [Poisson equation wikipedia page](https://en.wikipedia.org/wiki/Poisson%27s_equation) and [this youtube video](https://www.youtube.com/watch?v=lsY7zYaezto)\n",
103+
"\n",
104+
"At the core, a Poisson equation, sought after a scalar valued fonction, and the equation gives you an expression for the Laplacian of this function, which is also a scalar field, example\n",
105+
"\n",
106+
"\\begin{align*}\n",
107+
" \\Delta f = \\phi\n",
108+
"\\end{align*}\n",
109+
"\n",
110+
"#### Laplace equation / Elliptic PDE\n",
111+
"\\begin{align*}\n",
112+
" \\Delta f = 0 \\\\\n",
113+
" \\Delta_{xy} f = 0 \\\\\n",
114+
"\\end{align*}\n",
115+
"\n",
116+
"If the scalar field $\\phi$ is zero everywhere on your (spatial) domain, then when have a Laplace equation. Solutions to Laplace equation are called harmonic. It is pretty interesting to take a quick look at where the harmonic terms comes from: fourier series are expressed in terms of sum of complex harmonic functions (the $e^{2\\pi jnFt}$). It appears that the laplacian (in one dimension) of this family of function is $-(2\\pi nF)^2 e^{2\\pi jnFt}$ hence, one can say that those are eigenfunctions for the laplacian operator. This will be one of the core reason why Fourier series are useful for Laplace equations.\n",
117+
"\n",
118+
"Thanks to the linearity property of Laplace operator, one can also see that, the set of solutions of laplace equation (without bounday conditions) is equivalent to the nullspace of $\\Delta_{xy}$.\n",
119+
"\n",
120+
"#### Poisson equation / Elliptic PDE\n",
121+
"\\begin{align*}\n",
122+
" \\Delta f = \\phi \\\\\n",
123+
" \\Delta_{xy} f = \\phi \\\\\n",
124+
"\\end{align*}\n",
125+
"\n",
126+
"If the scalar field $\\phi$ is not zero everywhere on your (spatial) domain, then when have a Poisson equation. Interestingly, thanks to the linearity property of the Laplacian, one can see that (if we abstract boundary conditions) a set of solution for the Poisson equation can be obtained by finding a particular solution to $\\Delta f = \\phi$ and adding any element from the nullspace of the Laplacian operator. Which is why the two equation are strongly related.\n",
127+
"\n",
128+
"#### Heat equation / parabolic PDE\n",
129+
"\\begin{align*}\n",
130+
" \\Delta f = \\phi \\\\\n",
131+
" \\Delta_{xy} f = \\frac{\\partial f}{\\partial t} \\\\\n",
132+
"\\end{align*}\n",
133+
"\n",
134+
"In case there's another variable and gradient operator involved in $\\phi$, we are given with heat equation, for which a very famous solution was found by Joseph Fourier, we'll talk about that shortly after. Basically, the evolution of your scalar function $f$ defined over some (spatial) domain $x,y$ with respect to some variable $t$, is given by the laplacian of that very same scalar function itself. This allows so simulate the system by small time steps.\n",
135+
"\n",
136+
"#### Wave equation / hyperbolic PDE\n",
137+
"\\begin{align*}\n",
138+
" \\Delta f = \\phi \\\\\n",
139+
" \\Delta f = \\frac{\\partial^2 f}{\\partial t^2} f \\\\\n",
140+
"\\end{align*}\n",
141+
"Wave equation is a bit like heat equation, but this time, it is the acceleration of the system (the scalar field) that is described by its own laplacian.\n",
142+
"\n",
143+
"#### A bit of math\n",
144+
"One can see, that, whatever solution you find for your Laplace equation, it will need to be expressed in terms of the given solution, that satisfies your boundary conditions plus the nullspace of the laplacian operator."
145+
]
146+
},
147+
{
148+
"cell_type": "markdown",
149+
"metadata": {},
150+
"source": [
151+
"### Laplacian operator defined on various domains"
65152
]
66153
},
67154
{

RoddierWaveFrontReconstruction.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@
248248
" \\Delta_{xy} f = 0 \\\\\n",
249249
"\\end{align*}\n",
250250
"\n",
251-
"If the scalar field $\\phi$ is zero everywhere on your (spatial) domain, then when have a Laplace equation. Solutions to Laplace equation are called harmonic. It is pretty interesting to take a quick look at where the harmonic terms comes from: fourier series are expressed in terms of sum of complex harmonic functions (the $e^{2\\pi jnFt}$). It appears that the laplacian (in one dimension) of this family of function is $-(2\\pi nFt)^2 e^{2\\pi jnFt}$ hence, one can say that those are eigenfunctions for the laplacian operator. This will be one of the core reason why Fourier series are useful for Laplace equations.\n",
251+
"If the scalar field $\\phi$ is zero everywhere on your (spatial) domain, then when have a Laplace equation. Solutions to Laplace equation are called harmonic. It is pretty interesting to take a quick look at where the harmonic terms comes from: fourier series are expressed in terms of sum of complex harmonic functions (the $e^{2\\pi jnFt}$). It appears that the laplacian (in one dimension) of this family of function is $-(2\\pi nF)^2 e^{2\\pi jnFt}$ hence, one can say that those are eigenfunctions for the laplacian operator. This will be one of the core reason why Fourier series are useful for Laplace equations.\n",
252252
"\n",
253253
"Thanks to the linearity property of Laplace operator, one can also see that, the set of solutions of laplace equation (without bounday conditions) is equivalent to the nullspace of $\\Delta_{xy}$.\n",
254254
"\n",

0 commit comments

Comments
 (0)