Institute for Physics and Astronomy, University of Potsdam
November 7, 2024
Finishing from previous lecture
Curves in the space of independent variables of a PDE, along which the PDE has only total differentials.
By integrating along those curves one can find the solutions of such a PDE.
Example: \[ a\frac{\partial u}{\partial t} + b\frac{\partial u}{\partial x} = c \] with solutions \(u=u(x(t),t)\).
Total derivative of \(u\): \[ \frac{du}{dt}=\frac{\partial u}{\partial x}\frac{dx}{dt} + \frac{\partial u}{\partial t} \]
The characteristics are the solutions of: \[ \frac{dx}{dt}=\frac{b}{a},\;\; \frac{du}{dt}=\frac{c}{a} \] which means, for \(u(x_0,0)=u_0\), \[ x = x_0 + \frac{b}{a}t\\ u = u_0 + \frac{c}{a}t\\ \]
The characteristics are the solutions of: \[ \frac{dy}{dx} = \frac{B}{2A}\pm \frac{1}{2A}\sqrt{B^2 - 4AC} \]
This equation is:
It is possible to write such a system of \(n\) PDEs in two dependent variables \(x\) and \(y\) as: \[ \left(\bar{A}^T\frac{dy}{dx} - \bar{B}^T \right)\cdot \vec{L} = 0 \] where \(\vec{L}\) is a vector of dimension \(n\), \(\bar{A}^T\), \(\bar{B}^T\), are \(n\times n\) matrices.
The determinant leads to a \(n\)th order equation for \(dy/dx\), which can be classified as:
The most general form of a linear second order PDE with independent variables \(x,y\) and dependent variable \(f(x,y)\) is: \[ A\frac{\partial^2 f}{\partial x^2} + B\frac{\partial^2 f}{\partial x \partial y} + C\frac{\partial^2 f}{\partial y^2} + D\frac{\partial f}{\partial x} + E\frac{\partial f}{\partial y} + G = 0 \]
\(A,\dots, G\) are constants.
This equation is:
elliptic if \(B^2 - 4AC < 0\)
parabolic if \(B^2 - 4AC = 0\)
hyperbolic if \(B^2 - 4AC > 0\)
\[ A\frac{\partial^2 f}{\partial x^2} + B\frac{\partial^2 f}{\partial x \partial y} + C\frac{\partial^2 f}{\partial y^2} + D\frac{\partial f}{\partial x} + E\frac{\partial f}{\partial y} + G = 0 \]
Characteristics of a hyperbolic wave equation. Left: Domain of dependence. Right: Domain of influence (Jardin (2010)).
Let us define a domain, its boundary \(\partial R\), the coordinates \(n\) (outward normal to the boundary) and \(s\) (along the boundary), and the functions \(f\) and \(g\) on the boundary. The three types of BCs are:
(a) Initial (Cauchy) vs (b) Boundary value problems (Press et al. (2007)). In (a) the arrows indicate time.
Courant-Friedrichs-Lewy
Courant-Friedrichs-Lewy stability condition (CFL, Courant condition): \[ \frac{v\Delta t}{\Delta x}\leq 1 \] Example: 2nd order hyperbolic wave equation (derived from the determinant of a matrix).
CFL condition (Jardin (2010)).
Diffusion equation in 1D \[ \frac{\partial u}{\partial t}= D \frac{\partial^2 u }{\partial x^2} \qquad(7)\] where \(D\) is the diffuction parameter.
This can also be written as a flux-conservative equation, with F=-\(D \frac{\partial u}{\partial x}\).
\(D\geq 1\) in order for Eq. Equation 7 to be stable.
Applying a FTCS scheme we get: \[ \frac{u_j^{n+1} - u_j^{n}}{\Delta t} = D \left(\frac{u_{j+1}^{n} -2u_j^n + u_{j-1}^{n}}{(\Delta x)^2} \right) \qquad(8)\]
The 2nd order finite difference equation for \(j,k\)-element (derived by the Taylor expansion) is: \[ u_{j+1,k} + u_{j-1,k} + u_{j,k+1} + u_{j,k-1} - 4u_{j,k} = \Delta x^2 R_{j,k}. \qquad(12)\] Let the \((N+1)^2\) vector of unknowns be denoted by \(\vec{x}\), which contains \(u_{j,k}\) elements.
The matrix form of Equation 12 is \(\hat{A}\cdot\vec{X}=\vec{b}\)
Sparse matrix \(\hat{A}\):
Schematics of multigrid method
Kinetic description
Microscopic properties, it uses the velocity distribution function \(f\).
Fluid description
Uses a few macroscopic quantities, averages of the distribution function (mean velocity, pressure/temperature). Valid for or near thermodynamic equilibrium.
Hierarchy of plasma physics models
Particles released during solar flare
Particle motion around black holes
Particles hitting space probes (Voyager)
Particles hitting space probes (Voyager)
Asteroid motion in space system - potential threat on the Earth
Magnetron coating
Full equations of motion
\[ \nabla\cdot\vec{E}(\vec{x},t)=\frac{\rho(\vec{x},t)}{\epsilon_0}\\ \nabla\cdot\vec{B}(\vec{x},t)=0\\ \nabla\times\vec{E}(\vec{x},t)=-\frac{\partial \vec{B}(\vec{x},t)}{\partial t}\\ \nabla\times\vec{B}(\vec{x},t)=\mu_0\vec{J}(\vec{x},t)+\mu_0\epsilon_0\frac{\partial \vec{E}(\vec{x},t)}{\partial t} \]
\[ \frac{dv_i}{dt}=\frac{q}{m}\left[\vec{E}(\vec{x}_i,t) + \vec{v}\times\vec{B}(\vec{x}_i,t) \right] \]
\[ \rho(\vec{x},t)=\sum\limits_{\alpha} q_{\alpha}\int\limits dv^3\,\sum_i\delta(\vec{x}-\vec{x_i})\delta(\vec{v}-\vec{v_i})\\ \vec{J}(\vec{x},t)=\sum\limits_{\alpha} q_{\alpha}\int dv^3\,\vec{v}\sum_i\delta(\vec{x}-\vec{x_i})\delta(\vec{v}-\vec{v_i}) \]
But this approach is unpractical…
Title text: If you need some help with the math, let me know, but that should be enough to get you started! Huh? No, I don’t need to read your thesis, I can imagine roughly what it says. https://xkcd.com/793/
Simplified set
\[ \frac{dv_i}{dt}=\frac{q}{m}\left[\vec{E}(\vec{x}_i,t) + \vec{v}\times\vec{B}(\vec{x}_i,t) \right] \]
Warning
This approach is not self-consistent, the particles do not have any effect on the fields or other particles (no feedback or correction).
2nd-order Runge-Kutta (RK2)
\[ k_1=\Delta t \cdot f(t_i,y_i)\\ k_2=\Delta t \cdot f \left( t_i+\frac{\Delta t}{2},y_i+\frac{k_1}{2} \right) \\ y_{i+1}=y_i+k_2\\ \]
4th-order Runge Kutta (classic RK, RK4)
\[ y_{i+1}=y_i+\frac{1}{6}(k_1 + 2k_2 + 2k_3 + k_4)\\ k_1=\Delta t \cdot f(t_i,y_i)\\ k_2=\Delta t \cdot f(t_i+\frac{\Delta t}{2},y_i+\frac{k_1}{2})\\ k_3=\Delta t \cdot f(t_i+\frac{\Delta t}{2},y_i+\frac{k_2}{2})\\ k_4=\Delta t \cdot f(t_i+\Delta t,y_i+k_3) \]
Slopes used for the Runge-Kutta method; \(h = \Delta t\)
Comparison of Runge-Kutta with other methods for the solution of the ODE: \(y'=sin^2(t)*y\)
Verlet’s (Störmer) algorithm
\[ \vec{x}_{i+1}=2\vec{x}_i-\vec{x}_{i-1}+(\Delta t)^2\vec{a}_i+\mathcal{O}(\Delta t)^4\\ \vec{v}_i=\frac{\vec{x}_{i+1}-\vec{x}_{i-1}}{2\Delta t}+\mathcal{O}(\Delta t)^2 \]
Comparison of energies of a charged particle moving in a given B-field, with its trajectory calculated using the RK4 and Boris algorithms (Qin et al. (2013))