Changes between Version 3 and Version 4 of u/adebrech/Matlab
- Timestamp:
- 09/08/17 10:49:07 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
u/adebrech/Matlab
v3 v4 1 = Parker Wind =2 3 == Differential Equation ==4 5 The Parker solution to the solar wind assumes a spherically symmetric radial outflow (with velocity u(r)). Then by conservation of momentum,6 7 {{{8 #!latex9 $\rho u \frac{d u}{d r} = -\frac{d p}{d r} -\rho \frac{G M}{r^2}$10 }}}11 12 Continuity (conservation of particle #) gives13 14 {{{15 #!latex16 $\frac{1}{r^2} \frac{d (r^2 \rho u)}{d r} = 0$17 }}}18 19 If we assume an isothermal corona, the ideal gas law is20 21 {{{22 #!latex23 $p = \frac{2 \rho T}{m}$24 }}}25 26 Continuity shows that $r^2 \rho u = C$, where C is a constant. If we substitute for p and rho into the momentum equation, we get a differential equation in u and r:27 28 {{{29 #!latex30 $\frac{1}{u} \frac{d u}{d r}(u^2 - \frac{2 T}{m_p}) = \frac{4 T}{m_p r} - \frac{G M}{r^2}$31 }}}32 33 Define $r_c = \frac{G M m_p}{4 T}$ so that $u_c^2 = \frac{2 T}{m_p}$ (i.e., sonic radius); substitute and rearrange to find34 35 {{{36 #!latex37 $\frac{d u^2}{u_c^2} - \frac{d u^2}{u^2} = \frac{4 d r}{r} - \frac{4 r_c d r}{r^2}$38 }}}39 40 Integrate both sides to find the Parker wind equation,41 42 {{{43 #!latex44 $\psi - \log(\psi) = 4 \log(\xi) + \frac{4}{\xi} + C$, where $\psi = (\frac{u}{u_c})^2$ and $\xi = \frac{r}{r_c}$45 }}}46 47 == Plotting ==48 Solving the Parker wind equation:49 50 {{{51 #!latex52 $\psi - \log(\psi) = 4 \log(\xi) + \frac{4}{\xi} - 3$53 }}}54 55 There are 4 types of solutions - combinations of sub/supersonic at the surface and v -> 0/v,,f,, as xi -> infinity. The only physical solution is subsonic at the surface and has a nonzero velocity infinitely far away, and passes through xi = 1, psi = 1.56 57 First attempted to solve equation in Mathematica - solution appears correct up to the sonic radius, but the incorrect solution (v -> 0) appears for r > r,,s,,. Next attempted to plot approximations for r << r,,s,, and r >> r,,s,, in Matlab, but as would be expected, the approximations fail near r = r,,s,,. Numerically solving the equation in Matlab gives the opposite case of Mathematica - correct solution for r > r,,s,,, but not for r < r,,s,,.58 59 [[Image(ParkerApprox.jpg)]]60 61 [[Image(ParkerWrong.jpg)]]62 63 Looking at Jonathan's code for calculating the Parker wind to find the correct approximation, try to implement it in a different way to test understanding. Works for r > r,,s,,, but not r < r,,s,,.64 65 Pertinent line is:66 yy(i)=vpasolve(y - log(y) == -3 + 4*log(xx(i))+4/xx(i),y,(xx(i) > 1) * xx(i) + (xx(i) <= 1)*exp(3-4*log(xx(i))-4/xx(i)))67 68 Interpreted as:69 70 if xx(i) >= 171 yy(i)=vpasolve(y - log(y) == -3 + 4*log(xx(i))+4/xx(i));72 else73 yy(i)=vpasolve(y - log(y) == exp(3-4*log(xx(i))-4/xx(i)));74 end75 76 Correct & incorrect plots:77 78 [[Image(parkerwind.jpg)]]79 80 [[Image(ParkerWrongApprox.jpg)]]81 82 == Numerical Integration of DE ==83 84 Write the differential equation for $\frac{d u}{d r}$ as a parameterized system:85 86 {{{87 #!latex88 $\frac{d u}{d s} = -2uc^2(r-\frac{GM}{2c^2})$89 90 $\frac{d r}{d s} = -r^2(u^2-c^2)$91 }}}92 93 Calculate the Jacobian and evaluate at the critical point to linearize the system, then move a small distance along the stable eigenvector (i.e. tangent to the stable manifold, the transonic solution of interest). Integrate from these points out.94 95 $Jacobian = \begin{bmatrix} 0 & 2c^3 \\ \frac{GM}{2c^3} & 0 \end{bmatrix}$96 97 1 = Change in Bow Shock with Magnetic Field = 98 2 If sigma,,*,, and sigma,,p,, are equal, the bow shock radius is unchanged with or without magnetic field - ratio of radius to orbital separation, chi,,bow,, = 0.240468. With sigma,,*,, = 1, sigma,,p,, = 0.1, chi,,bow,, = 0.148204; sigma,,*,, = 0.5, sigma,,p,, = 0.1, chi,,bow,, = 0.187300; sigma,,*,, = 0.1, sigma,,p,, = 0.5, chi,,bow,, = 0.302483; sigma,,*,, = 0.1, sigma,,p,, = 1, chi,,bow,, = 0.363674; and with sigma,,*,, = 0.5 and sigma,,p,, = 1, chi,,bow,, = 0.297793 ≈ chi,,Coriolis,,.