Labels

Saturday, September 22, 2018

Cosmic rays propagation equation

the particles number through energy boundary in $dt$ is $dN$
(E+dE)-------->|(E)-------->(E-dE)
boundary

\[ dN = \int_E^{E+dE} dN/dE(E) dE = dN/dE(E_0)dE \approx dN(E)/dEdE  = \frac{dN(E)}{dE}\frac{dE}{dt} dt\]

the number of particles that pass through the energy boundary per unit of time,
\[ J_E = \frac{dN}{dt} = \frac{dN}{dE}\frac{dE}{dt} \]


----------------->[(E+dE)------------------](E)--------------->

the change of particle number due to energy variation within energy interval $[E,E+dE]$ per unit time if $dE/dt<0$.

\begin{equation}
\begin{split}
 \frac{dN}{dt} & =  dN/dE(E+dE)d(E+dE)/dt  - dN/dE(E)dE/dt \\
& = [dN/dE(E)+\frac{d^2N}{dE^2}(E) dE] \cdot [dE/dt + \frac{d^2E}{dEdt}(E)dE ] - dN/dE(E)dE/dt \\
& =  \frac{d}{dE}(\frac{dN}{dE}(E)\frac{dE}{dt}) \cdot dE
\end{split}
\end{equation}

thus,  \[ \frac{dN}{dEdt} = \frac{d}{dE}(\frac{dN}{dE}(E)\frac{dE}{dt}) = \frac{dJ_E}{dE} \]



the change of particle number due to motion

Some operation about vector and tensor

derivative of a vector

\[ Y = (y_1(x_1,x_2,x_3) ,y_2(x_1,x_2,x_3),y_3(x_1,x_2,x_3)) \]
\[ dy_1 = dy_1/dx_1 \cdot dx_1+ \ldots = \sum_i^3 \frac{dy_1}{dx_i} \cdot dx_i\]
\[ dy_i =  \sum_i^3 \frac{dy_1}{dx_i} dx_i \]

\begin{align}
dy_i = \begin{pmatrix}
dy_i/dx_1 &dy_i/dx_2 &dy_i/dx_3
\end{pmatrix} \,
\begin{pmatrix}
dx_1 \\
dx_2 \\
dx_3 \\
\end{pmatrix}
\end{align}

\begin{align}
\begin{pmatrix}
dy_1 \\
dy_2 \\
dy_3 \\
\end{pmatrix} =
\begin{pmatrix}
dy_1/dx_1 &dy_1/dx_2 &dy_1/dx_3 \\
dy_2/dx_1 &dy_2/dx_2 &dy_2/dx_3 \\
dy_3/dx_1 &dy_3/dx_2 &dy_3/dx_3 \\
\end{pmatrix} \,
\begin{pmatrix}
dx_1 \\
dx_2 \\
dx_3 \\
\end{pmatrix}
\end{align}

\begin{equation}
\frac{d\vec{y}}{d\vec{x}} =
\begin{bmatrix}
dy_1/dx_1 &dy_1/dx_2 &dy_1/dx_3 \\
dy_2/dx_1 &dy_2/dx_2 &dy_2/dx_3 \\
dy_3/dx_1 &dy_3/dx_2 &dy_3/dx_3 \\
\end{bmatrix}
\end{equation}

2 double dot product of two tensor
\[\vec{T}:\vec{U} = \sum_i\sum_j T_{ij}U_{ji}\]

3 the dot product of a tensor with a vector
\[ \vec{T}\cdot \vec{v} = \sum_i \vec{\delta}_i  (\sum_j T_{ij}v_j)  \]

4 the dot product of a vector with a tensor
\[\vec{v}\cdot{T} = \sum_i \vec{\delta}_i  (\sum_j T_{ji}) v_j \]

5. unit tensor 
\[ \nabla \cdot \vec{I} = 0 \]
\[ \vec{v} \cdot \vec{I} = \vec{v} \]

6. vector dot gradient of tensor
\[ \vec{A} \cdot \nabla \cdot \vec{T} = \nabla \cdot( \vec{A} cdot \vec{T}) - \vec{T}:\nabla \vec{A} \]

Tuesday, September 18, 2018

First order partial different equation

\[\frac{\partial u}{\partial t} + c(x,t)\frac{\partial u}{\partial x} = 0\]
find a curve that the u is constant along it.

\[ du = \frac{\partial u}{\partial t}dt + \frac{ \partial u}{\partial x}dx \]
\[ t = t(r),\qquad x=x(r) \]
\[ dt = \frac{dt}{dr} dr,\qquad dx = \frac{dx}{dr} dr\]

\[\frac{du}{dr} = \frac{\partial u}{\partial t}\frac{dt}{dr} + \frac{ \partial u}{\partial x}\frac{dx}{dr} \]

we hope $du=0$,then along the curve, the u is constant.
$\frac{du}{dr} = 0 = \frac{\partial u}{\partial t} + c(x,t)\frac{\partial u}{\partial x}$
we get \[\frac{dt}{dr}=1\],and \[\frac{dx}{dr}=c(x,t)\].
they determine the characteristic curve.
\[u(t(r1),x(r1) = u(t(r2),x(r2))\]



Guide to chromebook

screen ctrl + switch window -> full screenshot
ctrl shift switch -> select area

shortcuts of chromebook
https://support.google.com/chromebook/answer/183101?hl=en

latex on chromebook
https://github.com/macbuse/Chromebook/blob/master/LaTeX.md

chrome as text editor
data:text/html, <body contenteditable style="font: 1.5rem/1.5 monospace;max-width:60rem;margin:0 auto;padding:4rem;">

rotate screen
ctrl shift refresh

Friday, September 14, 2018

Force-field solution to solar modulation


propagation equation


\begin{equation}
\frac{\partial f}{\partial t} + \nabla \cdot (C \vec{V}_{sw} f - K \cdot \nabla f) - \frac{1}{3p^2} \frac{\partial (p^3V_{sw}\cdot \nabla f)}{\partial p} =0 \label{eq1}
\end{equation}

$C = -1/3\frac{\partial lnf}{\partial lnp}$

stream current density
\begin{equation}
J = C V_{sw} f - K \cdot \nabla f \label{eq:stream}
\end{equation}

\begin{equation}
K = \begin{bmatrix}
k_{rr} &k_{r\theta} &k_{r\phi} \\
k_{\theta r} &k_{\theta\theta} &k_{\theta\phi} \\
k_{\phi r} &k_{\phi\theta} &k_{\phi\phi}
\end{bmatrix} \nonumber
\end{equation}

$k_{rr} = k_{\parallel}\cos^2(\psi) + k_{\perp,r}\sin^2(\psi)$
$\tan\psi = r*\Omega/V_{sw}$

$\nabla = \hat r \frac{\partial}{\partial r} + \frac{\hat \theta}{r} \frac{\partial}{\partial \theta} + \frac{\hat \phi}{r \sin(\theta)} \frac{\partial}{\partial \phi}$
The dot product of a tensor with a vector is:
$A\cdot B = i(A_{11} B_1 + A_{12}B_2 + A_{13}B_3) + j(A_{21}B_1 + A_{22}B_2 + A_{23}B_3) + k(A_{31}B_1 + A_{32}B_2 + A_{33}B_3)$



Tuesday, September 11, 2018

One example for syntax hightlight in blogspot

Follow the guide https://eric0806.blogspot.com/2014/04/blogger-google-code-prettify.html .

#include&ltstdio.h&gt
int main (void)
{
    print("Hello World");
    return 0;
}
$E=mC^2$


xxx

Some online proxy to access blocked website

Many website are blocked in a few country.
So, if we want to use google search or watch video in youtube, you need to use some tricks. The online web proxy is a convenient method. But I am not sure that whether it is safe or not. You should not sign you account on these proxy.



1)https://www.freeproxyserver.co/
2)https://proxysite.io/
3)https://www.proxysite.com/
4)https://www.vpnbook.com/webproxy

If these proxy are invalid, you should go to www.searx.me to search online proxy, you will find a useful one.



Monday, September 10, 2018

Find similar astronomy papers on arxiv.org

There are too many paper everyday emerge on arxiv.org. It's not simple to find most useful paper. But if you already have some clues, such as having some paper on hands, you can base on these paper find out other related paper.

There are one power tool which can be used to complete this task. It's called deepthought. For the detail, the reader can refer to Knowledge discovery through text-based similarity searches for astronomy literature (arXiv:1705.05840).
                                       http://opensupernova.org/deepthought/
It deserves having a try.

Sunday, September 9, 2018

My write plan in Blogger

This blog will be used to record some usages about linux, c++ and python. I am also going to write some posts about my research work.
Please visit my blog often.
See you later.


Insert formula in google blogger

how to insert formula in google blogger ?

when I search in google, I get one answer. I think it's also very helpful for you.
https://productforums.google.com/forum/#!topic/blogger/_LzlfFT7I



$E = mC^2$

Other reference
https://support.google.com/blogger/forum/AAAAY7oIW-wJB67ApTH4zw/?hl=en&gpf=%23!msg%2Fblogger%2FJB67ApTH4zw%2FEyLkBJxEAgAJ&msgid=EyLkBJxEAgAJ
https://www.airinaa.com/2018/04/add-mathjax-beautiful-mathematic.html?m=1