Changes between Version 36 and Version 37 of u/bliu/pnfldiff


Ignore:
Timestamp:
08/17/18 14:56:00 (6 years ago)
Author:
Baowei Liu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • u/bliu/pnfldiff

    v36 v37  
    6666}}}
    6767
    68 == Discretization ==
     68== Discretization with Flux Limiter ==
     69$ \frac{\partial n_{e}}{\partial t} + \nabla\cdot(\lambda n_{e} \bold{u}) = I-r $[[BR]]
     70where $\lambda$ is the flux limiter.
    6971Discretize the equation of $n_{e}$ in the same way as [https://astrobear.pas.rochester.edu/trac/wiki/ThermalConduction Thermal Conduction]
    7072
    71 $\partial_{t}n_{e} +\partial_{i}(n_{e}u_{i})=\partial_{i}J_{i}-r$
     73$\partial_{t}n_{e} +\partial_{i}(\lambda n_{e}u_{i})=\partial_{i}J_{i}-r$
    7274
    7375Replace $n_{e}$ with $n_{e}^{*}$ where[[BR]]
     
    7678$\Phi=1$ for backward Euler, $\Phi=1/2$ for Crank Nicholson
    7779
    78 $\partial_{t}n_{e} +u_{i}\partial_{i}n_{e}^{*}+n_{e}^{*}\partial_{i}u_{i}=\partial_{i}J_{i}-r$
     80$\partial_{t}n_{e} +\lambda u_{i}\partial_{i}n_{e}^{*}+\lambda n_{e}^{*}\partial_{i}u_{i}=\partial_{i}J_{i}-r$
    7981
    8082$\partial_{t}n_{e}=\frac{n_{e}^{0\prime}-n_{e}^{0}}{\Delta t} $
    8183
    82 $-(1-\Phi)u_{i}\partial_{i}n_{e}=-(1-\Phi)u_{\hat{i}}\frac{n^{\hat{i}+1}_{e}-n^{\hat{i}-1}_{e}}{2\Delta x}$
     84$-\lambda (1-\Phi)u_{i}\partial_{i}n_{e}=-\lambda(1-\Phi)u_{\hat{i}}\frac{n^{\hat{i}+1}_{e}-n^{\hat{i}-1}_{e}}{2\Delta x}$
    8385
    84 $-\Phi u_{i}\partial_{i}n^{'}_{e}=-\Phi u_{\hat{i}}\frac{n^{'\hat{i}+1}_{e}-n^{'\hat{i}-1}_{e}}{2\Delta x}$
     86$-\lambda \Phi u_{i}\partial_{i}n^{'}_{e}=-\lambda\Phi u_{\hat{i}}\frac{n^{'\hat{i}+1}_{e}-n^{'\hat{i}-1}_{e}}{2\Delta x}$
    8587
    86 $-(1-\Phi)n_{e}\partial_{i}u_{i}=-(1-\Phi)n_{e}^{0}\Sigma\frac{u_{\hat{i}+1}-u_{\hat{i}-1}}{2\Delta x}$
     88$-\lambda (1-\Phi)n_{e}\partial_{i}u_{i}=-\lambda(1-\Phi)n_{e}^{0}\Sigma\frac{u_{\hat{i}+1}-u_{\hat{i}-1}}{2\Delta x}$
    8789
    88 $-\Phi n_{e}^{'0}\partial_{i}u_{i}=-\Phi n_{e}^{'0}\Sigma\frac{u_{\hat{i}+1}-u_{\hat{i}-1}}{2\Delta x}$
     90$-\lambda\Phi n_{e}^{'0}\partial_{i}u_{i}=-\lambda\Phi n_{e}^{'0}\Sigma\frac{u_{\hat{i}+1}-u_{\hat{i}-1}}{2\Delta x}$
    8991
    90 $n_{e}^{0}-(1-\Phi)\frac{\Delta t}{2\Delta x}\Sigma[n_{e}^{0}(u_{i+1}-u_{i-1})+u_{i}(n_{e}^{i+1}-n_{e}^{i-1})]=\\n_{e}^{'0}+\Phi\frac{\Delta t}{2\Delta x}\Sigma [n_{e}^{'0}(u_{i+1}-u_{i-1})+u_{i}(n_{e}^{'i+1}-n_{e}^{'i-1})]$
    91 
    92 == Flux limiting ==
     92$n_{e}^{0}-\lambda(1-\Phi)\frac{\Delta t}{2\Delta x}\Sigma[n_{e}^{0}(u_{i+1}-u_{i-1})+u_{i}(n_{e}^{i+1}-n_{e}^{i-1})]=\\n_{e}^{'0}+\lambda\Phi\frac{\Delta t}{2\Delta x}\Sigma [n_{e}^{'0}(u_{i+1}-u_{i-1})+u_{i}(n_{e}^{'i+1}-n_{e}^{'i-1})]$
    9393
    9494
     
    117117
    118118
    119 == related code ==
     119== Line transfer code/interface to AstroBEAR ==
    120120
    121121|| tau || optical depth  tau=sigmaH*nH + sigmad*nHII || ||