Changes between Version 187 and Version 188 of FluxLimitedDiffusion


Ignore:
Timestamp:
04/05/13 12:36:07 (12 years ago)
Author:
Jonathan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • FluxLimitedDiffusion

    v187 v188  
    262262   [[latex(\frac{\partial e}{\partial t} = - \kappa_{0P} \left [ 4 \pi B_0 \left ( 1 + 4\Gamma \frac{e-e_0}{T_0} \right )-cE \right ] )]]   
    263263
    264 which will be accurate as long as \(4\Gamma \frac{e-e_0}{T_0} < \xi << 1\) or \(\Delta e = e-e_0 < \xi \frac{T_0}{4 \Gamma}\)
     264which will be accurate as long as \(\left | 4\Gamma \frac{e-e_0}{T_0} \right | < \xi << 1\) or \(\Delta e = \left | e-e_0 \right | < \xi \frac{T_0}{4 \Gamma}\)
    265265
    266266We can calculate the time scale for this to be true using the evolution equation for the energy density
    267267
    268 [[latex(\Delta e = -\Delta t \kappa_{0P} \left [ 4 \pi B_0 -cE \right ] < \xi \frac{T_0}{4 \Gamma})]]
    269 
    270 which gives [[latex(\Delta t < \xi \frac{T_0}{4 \Gamma \kappa_{0P} \left ( 4 \pi B_0 - cE \right ) })]]
     268[[latex(\Delta e = \Delta t \kappa_{0P} \left | 4 \pi B_0 -cE \right | < \xi \frac{T_0}{4 \Gamma})]]
     269
     270which gives [[latex(\Delta t < \xi \frac{T_0}{4 \Gamma \kappa_{0P} \left | 4 \pi B_0 - cE \right | })]]
    271271
    272272
     
    275275We can now discretize the equations
    276276
    277    [[latex(E^{n+1}_i-E^{n}_i = \left [ \alpha_{i+1/2} \left ( E^{*}_{i+1}-E^{*}_{i} \right ) - \alpha_{i-1/2} \left ( E^{*}_{i}-E^{*}_{i-1} \right ) \right ] - \epsilon E^{*}_i  + \phi e^{*}_i  + \theta_i - \phi_i) )]]   
    278    [[latex(e^{n+1}_i-e^{n}_i = \epsilon_i E^{*}_i  - \phi_i e^{*}_i  - \left(\theta_i-\phi_i \right ) )]]   
     277   [[latex(E^{n+1}_i-E^{n}_i = \left [ \alpha_{i+1/2} \left ( E^{*}_{i+1}-E^{*}_{i} \right ) - \alpha_{i-1/2} \left ( E^{*}_{i}-E^{*}_{i-1} \right ) \right ] - \epsilon E^{*}_i  + \phi e^{*}_i  + \theta_i - \phi_i e^n_i) )]]   
     278   [[latex(e^{n+1}_i-e^{n}_i = \epsilon_i E^{*}_i  - \phi_i e^{*}_i  - \left(\theta_i-\phi_i e^n_i \right ) )]]   
    279279
    280280where the diffusion coefficient is given by
     
    319319In any event in 1D we have the following matrix coefficients
    320320
    321    [[latex(\left [ 1 + \psi \left( \alpha_{i+1/2} + \alpha_{i-1/2} + \epsilon_i \right ) \right ] E^{n+1}_i - \left ( \psi \alpha_{i+1/2} \right ) E^{n+1}_{i+1} - \left ( \psi \alpha_{i-1/2} \right ) E^{n+1}_{i-1} - \left ( \psi \phi_i \right ) e^{n+1}_i=\left [ 1 - \bar{\psi} \left( \alpha_{i+1/2} + \alpha_{i-1/2} + \epsilon_i \right ) \right ] E^n_i + \left ( \bar{\psi} \alpha_{i+1/2} \right ) E^{n}_{i+1} + \left ( \bar{\psi} \alpha_{i-1/2} \right ) E^{n}_{i-1} +\bar{\psi}\phi_i e^n_i + \theta_i)]]   
    322    [[latex(\left ( 1 +\psi \phi_i \right ) e^{n+1}_i - \left ( \psi \epsilon_i \right )E^{n+1}_i =\left ( 1 - \bar{\psi}\phi_i \right ) e^n_i + \left ( \bar{\psi} \epsilon_i \right ) E^n_i-\theta_i )]]   
     321   [[latex(\left [ 1 + \psi \left( \alpha_{i+1/2} + \alpha_{i-1/2} + \epsilon_i \right ) \right ] E^{n+1}_i - \left ( \psi \alpha_{i+1/2} \right ) E^{n+1}_{i+1} - \left ( \psi \alpha_{i-1/2} \right ) E^{n+1}_{i-1} - \left ( \psi \phi_i \right ) e^{n+1}_i=\left [ 1 - \bar{\psi} \left( \alpha_{i+1/2} + \alpha_{i-1/2} + \epsilon_i \right ) \right ] E^n_i + \left ( \bar{\psi} \alpha_{i+1/2} \right ) E^{n}_{i+1} + \left ( \bar{\psi} \alpha_{i-1/2} \right ) E^{n}_{i-1} - \psi\phi_i e^n_i + \theta_i)]]   
     322
     323   [[latex(\left ( 1 +\psi \phi_i \right ) e^{n+1}_i - \left ( \psi \epsilon_i \right )E^{n+1}_i =\left ( 1 +\psi\phi_i \right ) e^n_i + \left ( \bar{\psi} \epsilon_i \right ) E^n_i-\theta_i )]]   
    323324
    324325
    325326Now since the second equation has no spatial dependence, we can solve it for
    326    [[latex(\color{purple}{e^{n+1}_i = \frac{1}{ 1 +\psi \phi_i}\left \{ \left ( \psi \epsilon_i \right )E^{n+1}_i + \left ( 1 - \bar{\psi}\phi_i \right ) e^n_i + \left ( \bar{\psi} \epsilon_i \right ) E^n_i-\theta_i \right \}} )]]   
     327   [[latex(\color{purple}{e^{n+1}_i = e^n_i + \frac{1}{ 1 +\psi \phi_i}\left \{ \left ( \psi \epsilon_i \right )E^{n+1}_i + \left ( \bar{\psi} \epsilon_i \right ) E^n_i-\theta_i \right \}} )]]   
    327328
    328329and plug the result into the first equation to get a matrix equation involving only one variable.
    329330
    330    [[latex(\color{purple}{\left [ 1 + \psi \left( \alpha_{i+1/2} + \alpha_{i-1/2} + \frac{\epsilon_i}{ 1 +\psi \phi_i}\right ) \right ] E^{n+1}_i - \left ( \psi \alpha_{i+1/2} \right ) E^{n+1}_{i+1} - \left ( \psi \alpha_{i-1/2} \right ) E^{n+1}_{i-1} =\left [ 1 - \bar{\psi} \left( \alpha_{i+1/2} + \alpha_{i-1/2}  +\frac{\epsilon_i }{ 1 +\psi \phi_i} \right ) \right ] E^n_i + \left ( \bar{\psi} \alpha_{i+1/2} \right ) E^{n}_{i+1} + \left ( \bar{\psi} \alpha_{i-1/2} \right ) E^{n}_{i-1} + \frac{ \phi_i}{ 1 +\psi \phi_i}  e^n_i+ \frac{1}{ 1 +\psi \phi_i}\theta_i})]]   
    331 
    332 
    333 
    334 If we ignore the change in the Planck function due to heating during the implicit solve, it is equivalent to setting \(\psi \phi = 0\)  This gives the following equations:
    335 
    336    [[latex(\left [ 1 + \psi \left( \alpha_{i+1/2} + \alpha_{i-1/2} + \epsilon_i \right ) \right ] E^{n+1}_i - \left ( \psi \alpha_{i+1/2} \right ) E^{n+1}_{i+1} - \left ( \psi \alpha_{i-1/2} \right ) E^{n+1}_{i-1} =\left [ 1 - \bar{\psi} \left( \alpha_{i+1/2} + \alpha_{i-1/2} + \epsilon_i \right ) \right ] E^n_i+ \left ( \bar{\psi} \alpha_{i+1/2} \right ) E^{n}_{i+1} + \left ( \bar{\psi} \alpha_{i-1/2} \right ) E^{n}_{i-1} +\phi_i e^n_i + \theta_i)]]   
    337    [[latex(e^{n+1}_i = e^n_i + \epsilon_i  \left [ \left ( \psi E^{n+1}_i + \bar{\psi} E^{n}_i \right ) - \frac{4 \pi}{c} B \left ( T^n_i \right )  \right ] )]]   
    338 
    339 In this case the first equation decouples and can be solved on it's own, and then the solution plugged back into the second equation to solve for the new energy. 
     331   [[latex(\color{purple}{\left [ 1 + \psi \left( \alpha_{i+1/2} + \alpha_{i-1/2} + \frac{\epsilon_i}{ 1 +\psi \phi_i}\right ) \right ] E^{n+1}_i - \left ( \psi \alpha_{i+1/2} \right ) E^{n+1}_{i+1} - \left ( \psi \alpha_{i-1/2} \right ) E^{n+1}_{i-1} =\left [ 1 - \bar{\psi} \left( \alpha_{i+1/2} + \alpha_{i-1/2}  +\frac{\epsilon_i }{ 1 +\psi \phi_i} \right ) \right ] E^n_i + \left ( \bar{\psi} \alpha_{i+1/2} \right ) E^{n}_{i+1} + \left ( \bar{\psi} \alpha_{i-1/2} \right ) E^{n}_{i-1} + \frac{\theta_i}{ 1 +\psi \phi_i}})]]   
     332
     333
     334This equation decouples and can be solved on it's own, and then the solution plugged back into the second equation to solve for the new energy. 
    340335
    341336
     
    348343For the initial solution vector, we can just use Edot from the parent update (or last time step if we are on the coarse grid) to guess E, and then we can solve for the new e given our guess at the new E using the same time stepping (Backward Euler, Crank Nicholson, etc...).
    349344
    350 [[latex(E^{n+1}_i = E^{n}_i+\dot{E}^{n}_i \Delta t)]]
    351 [[latex(e^{n+1}_i = \frac{1}{1+\psi \phi^n_i} \left \{ \left ( \psi \epsilon^n_i \right )E^{n+1}_i + \left ( 1 - \bar{\psi}\phi^n_i \right ) e^n_i + \left ( \bar{\psi} \epsilon^n_i \right ) E^n_i-\theta^i_n \right \} )]]
     345[[latex(E^{n+1}_i = E^{n}_i+\dot{E}^{I}_i \Delta t)]]
     346[[latex(e^{n+1}_i = e^n_i + \frac{1}{1+\psi \phi^n_i} \left \{ \left ( \psi \epsilon^n_i \right )E^{n+1}_i + \left ( \bar{\psi} \epsilon^n_i \right ) E^n_i-\theta^i_n \right \} )]]
    352347
    353348== Coarse-Fine Boundaries ==