Labels

Friday, February 14, 2020

MHD plasma wave

sound wave in air
\[ \nabla p = (\frac{\gamma p}{\rho}) \nabla \rho = v_s^2 \nabla \rho \]
where $v_s$ is the adiabatic sound speed:
\[ v_s = dp/d\rho = (\frac{\gamma p}{\rho})^{1/2} = (\frac{\gamma k_B T}{m})^{1/2} \]

Alfven wave
\[ v_A = \frac{tension}{density} = (\frac{B^2/\mu_0}{\rho})^{1/2} \]


(Figure 1.1 is from Analysis and gyrokinetic simulation of MHD Alfvén wave interactions )

Ion acoustic and magnetoacoustic wave
For motion of the particles and propagation of the wave along the field, there will be no field perturbation since the particles are free to move in this direction. These wave will therefore be compressional waves, called ion acoustic wave propagation at velocity
\[ v_S = (\frac{\gamma_e k_B T_e + \gamma_i k_B T_i}{m_i})^{1/2} \]
along the field line.



In the direction perpendicular to $\vec{B}$, a new type of longitudinal oscillation is made possible by the magnetic restoring force (magnetic pressure). This is the magnetosonic wave that involves the compression and rarefaction of the magnetic field line of force as well as the plasma.
\[ v_M = \frac{\nabla(p+B^2/2/\mu_0)}{\nabla \rho} = v_s^2 + \frac{d(p+B^2/2/\mu_0)}{d\rho}  \]
Since the particles are tied to file lines, $B/\rho = B_0/\rho_0$ and we have
\[ v_M^2 = v_s^2 + v_A^2 \]



Reference:
chapter 7 MHD PLASMA WAVES
http://people.physics.anu.edu.au/~jnh112/AIIM/c17/chap07.pdf

Saturday, February 8, 2020

Integration factor method to solve linear differential equation

solve first order linear differential equation with Integration factor method

\[ \frac{dy}{dx} + p(x)y(x) = q(x) \]
let $v(x) = \int p(x) dx$
The integration factor is $I=e^{v(x)}$.
\[ \frac{d[e^{v(x)} y(x)]}{dx} = e^{v(x)}[\frac{dy}{dx} + p(x)y(x)] = e^{v(x)}q(x) \]
The solution of the differential equation is
\[ y(x) = e^{-v(x)}[ \int e^{v(x)} q(x) dx +C ]\]

\[ [I(x)y]' = I(x)q(x) \]
\[ \int_{x_0}^x [I(x)y]' dx = I(x)y(x) - I(x_0)y(x_0) = \int_{x_0}^{x} I(x)q(x) dx \]
\[ y(x) = I(x)^{-1}[I(x_0)y(x_0)+\int_{x_0}^{x} I(x)q(x) dx] \]
Reference:
http://mathworld.wolfram.com/IntegratingFactor.html
https://www.stewartcalculus.com/data/CALCULUS%20Concepts%20and%20Contexts/upfiles/3c3-LinearDiffEqns_Stu.pdf

Monday, January 27, 2020

The stress tensor



For each surface on a unit cube, the stress on that surface can point in each of the three directions.

$F_x=\sum_i \partial \sigma_{i1} / \partial x$

The second moment of the particle distribution function, describing the flow of momentum in
the laboratory frame, is called the stress tensor,
\[ \boldsymbol{P} = \int m \vec{v}\vec{v} f(\vec{r},\vec{v},t) d^3\vec{v} .\]
The third order moment of the particle distribution function measuring the energy flux density is denoted by 
\[ \boldsymbol{Q(\vec{r},t)} = \int \frac{1}{2} m v^2 \vec{v} f(\vec{r},\vec{v},t) d^3\vec{v} .\]

The stress tensor measured in the rest-frame is called the pressure tensor, $\boldsymbol{P}$, whereas the energy flux density becomes the heat flux density, $\boldsymbol{q}$. We introduce the relative velocity,
\[ \vec{w} = \vec{v} - \vec{V} .
Then, we get
\[ \boldsymbol{p(\vec{r},t)}= \int m \vec{w}\vec{w} f(\vec{r},\vec{v},t) d^3\vec{v} .\]
\[ \boldsymbol{q(\vec{r},t)}= \int \frac{1}{2}m w^2 \vec{w} f(\vec{r},\vec{v},t) d^3\vec{v} .\]
The trace of the pressure tensor measures the ordinary (scalar) pressure,
\[ p = \frac{1}{3}Tr(\boldsymbol{p}) =\frac{1}{3}(p_{xx}+p_{yy}+p_{zz}).\]
Note that the kinetic energy density is $3/2p$,
\[ \frac{3}{2}p = \int \frac{1}{2} m w^2 f(\vec{r},\vec{v},t) d^3\vec{v} .\]

The moments measures in the two different frames are related.
\[ \boldsymbol{P} = \boldsymbol{p} + mn\vec{V}\vec{V} \]
\[ \boldsymbol{Q} = \boldsymbol{q}+\boldsymbol{p}\cdot \vec{V}+ \frac{3}{2}p\vec{V}+\frac{1}{2}mnV^2\vec{V}.\]

Sunday, January 26, 2020

Tuesday, January 7, 2020

Byobu

Byobu is a GPLv3 open source text-based window manager and terminal multiplexer. It allows for the execution of multiple shells in one terminal.



to load bash_profile
in /usr/local/bin/byobu-shell  or /usr/bin/byobu-shell
there is one lile
[ -n "$SHELL" -a -x "$SHELL" ] && exec "$SHELL" || exec /bin/bash

changed it to
[ -n "$SHELL" -a -x "$SHELL" ] && exec "$SHELL" --login || exec /bin/bash --login

Reference:
https://byobu.org/index.html
https://help.ubuntu.com/lts/serverguide/byobu.html
http://manpages.ubuntu.com/manpages/eoan/en/man1/byobu.1.html