Changes between Version 28 and Version 29 of u/johannjc/scratchpad


Ignore:
Timestamp:
07/05/16 06:08:13 (9 years ago)
Author:
Jonathan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • u/johannjc/scratchpad

    v28 v29  
    44The basic problem is to apply the following outflow function, but in a discrete way that is numerically symmetric and exact. 
    55
    6 The change in rho has the following functional form
    7 [[latex($d \rho=\rho_0 \mathcal{R}(r) \Theta(\theta)$)]]
    86
    9 as does the change in momentum
    10 [[latex($d\mathbf{p}=d \rho \mathbf{\mathcal{V}}(\theta)$)]]
     7Let's assume that the density and velocity have the following form
    118
    12 Since we want the total mass to equal some fraction of the accreted mass, as well as the top and bottom mass injection to be symmetric, we must have
     9$\rho_{\pm} = \alpha_{\pm} \rho(x)$
    1310
    14 [[latex($\displaystyle{\sum_{top}{d \rho_i}}=\displaystyle{\sum_{bottom}{d \rho_ i}} = \frac{f \dot{M}}{2}$)]]
     11$p_{\pm} =\alpha_{\pm} \left ( a_\pm v_r(x) + dv_{\perp,\pm} + b_\pm R_\pm v_\Omega \right)$
    1512
     13$\alpha$, $a$, and $b$ are scalar adjustment factors, $R$ is a rotation matrix to align the spin, and $dp$ is a vector normal to the spin axis used to control the total momentum.
    1614
    17 And since we also must have the total momentum be balanced, we need to have a magnitude constraint
     15We begin by transforming the coordinates of the cell centers into the coordinate system of the star using a rotation matrix.
    1816
    19 [[latex($\displaystyle{\sum_{top}{|dp^j_i|}}+\displaystyle{\sum_{bottom}{|dp^j_i|}} = f \dot{M}\mathcal{V}_0$)]]
     17We then calculate the mass correction factors $\alpha_\pm$ trivially by summing up the predicted mass injection into each hemisphere and then calculating the normalization factors.
    2018
    21 as well as the symmetry constraint
     19We then estimate the velocity of each cell using
    2220
    23 [[latex($\displaystyle{\sum_{top}{dp^j_i}}+\displaystyle{\sum_{bottom}{dp^j_i}} = \mathbf{0}$)]]
     21$a_\pm v_r(x) + dv_{\perp,\pm} + b_\pm R_\pm v_\Omega$
    2422
    25 and directional constraint
     23with the scalars set to 1, the rotation matrix set to the identity, and dp=0.
    2624
    27 [[latex($\displaystyle{\sum_{top}{\mathbf{dp}_i}} \times \mathbf{S} = \mathbf{0}$)]]
     25We then calculate the spin and momentum in the top and bottom hemispheres.  We then adjust $b_\pm$ to adjust the magnitude of the spin, and we calculate the rotation matrix $R$ necessary to rotate the spin to the jet axis which we apply directly to the $v_\Omega$.  We also calculate the total momentum in the top and bottom hemispheres and update the magnitude of the z component using $a_\pm$, and zero out the transverse components using the shift $dv_{\perp,\pm}$.
    2826
    29 It is easier to solve the system if the magnitude constraint takes the form of
     27This process is iterated a few times and then a final velocity scaling and shift is applied to make the momentum injection correct to machine precision
    3028
    31 [[latex($\displaystyle{\left | \sum_{top}{\mathbf{dp_i}}\right | }+\displaystyle{\left | \sum_{bottom}{\mathbf{dp}_i} \right | } = \gamma f \dot{M}\mathcal{V}_0$)]]
     29$v_\pm = a_{\pm,f} \left [ \left (a_\pm v_r(x) + dv_{\perp,\pm} + b_\pm R_\pm v_\Omega \right)  + dv_{\perp,\pm,f} \right ]$
    3230
    33 where [[latex($\gamma$)]] is the analytic solution for the fraction of the scalar momentum in the z direction.
    34 
    35 
    36 
    37 If we introduce scaling parameters for the density and momentum for the top and bottom...
    38 
    39 [[latex($d \rho_\pm=\alpha_{\pm} d \rho$)]]
    40 
    41 
    42 [[latex($d p^j_\pm=\beta^j_\pm d p^j $)]]
    43 
    44 and plug these into the above equations, we can solve for [[latex($\alpha_\pm$)]] and [[latex($\beta_\pm$)]]
    45 
    46 
    47 [[latex($\alpha_\pm =  \frac{f \dot{M}}{2\displaystyle{\sum_\pm{d \rho}}}$)]]
    48 
    49 
    50 The momentum equations give us 4 constraints for two variables. 
    51 
    52 For reference on another way astrobear has implemented sinks in the past, see SinkParticle