Changes between Version 24 and Version 25 of u/johannjc/scratchpad


Ignore:
Timestamp:
04/22/14 11:30:24 (11 years ago)
Author:
Jonathan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • u/johannjc/scratchpad

    v24 v25  
    2424[[latex($\left(1+\frac{\rho c_v}{4 E}\left(\frac{E}{a_R}\right )^{1/4}\right) \frac{\partial E}{\partial t}= \nabla \cdot \frac{c\lambda}{\kappa_{0R}} \nabla E$)]]
    2525
     26or
     27
     28[[latex($\left(1+\frac{e}{4E}\right) \frac{\partial E}{\partial t}= \nabla \cdot \frac{c\lambda}{\kappa_{0R}} \nabla E$)]]
     29
    2630
    2731The second term in parenthesis represents the extra 'inertia' the radiation field has due to its coupling with the gas.  It is non-linear and this limits the time step that can be taken.
    2832
    29 [[latex($\Delta t \approx \frac{E}{\frac{\partial E}{\partial t}} = \frac{\left(E+\frac{\rho c_v}{4}\left(\frac{E}{a_R}\right )^{1/4}\right)}{\nabla \cdot \frac{c\lambda}{\kappa_{0R}} \nabla E}$)]]
     33[[latex($\Delta t \approx \frac{E}{\frac{\partial E}{\partial t}} = \frac{E+\frac{e}{4}}{\nabla \cdot \frac{c\lambda}{\kappa_{0R}} \nabla E}$)]]
    3034
    3135== Changes to the discretization ==
    3236
     37For the coupled system of equations we had the following:
    3338
     39 [[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}}$)]]   
     40
     41If the gas and radiation are in thermal equilibrium, then we have [[latex($\theta_i = \epsilon_i E_i$)]] and we also have that in the limit that [[latex($\kappa_P \rightarrow \infty$)]], we have [[latex($\epsilon \rightarrow \infty$)]] and [[latex($\phi \rightarrow \infty $)]]
     42
     43This simplifies the above equation to
     44
     45  [[latex($\color{purple}{\left [ \left(1 + \frac{\epsilon_i}{\phi_i} \right) +  \psi \left( \alpha_{i+1/2} + \alpha_{i-1/2} \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 [ \left(1 + \frac{\epsilon_i}{\phi_i}\right) - \bar{\psi} \left( \alpha_{i+1/2} + \alpha_{i-1/2}  \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} }$)]]   
     46
     47And [[latex($\frac{\epsilon_i}{\phi_i} = \frac{\frac{T_i}{4\Gamma}}{E_i} = \frac{\frac{T_i}{4\frac{\partial T}{\partial e}}}{E_i} $)]] which if we use our equation of state where [[latex($e \propto T$)]] gives  [[latex($\frac{\epsilon_i}{\phi_i} = \frac{e_i}{4E_i}$)]]
     48
     49Now if we go back and calculate [[latex($\frac{\partial e}{\partial E} = \frac{\partial e}{\partial T}\frac{\partial T}{\partial E} = \frac{\frac{1}{\Gamma}}{\frac{4 E}{T}}$)]] we arrive at [[latex($\frac{\epsilon_i}{\phi_i}$)]] instead of [[latex($\frac{e_i}{4E_i}$)]] which is consistent with our derivation above.
     50
     51Also our time equation should be
     52
     53[[latex($\Delta t \approx \frac{E}{\frac{\partial E}{\partial t}} = \frac{E+\frac{T_i}{4\Gamma}}{\nabla \cdot \frac{c\lambda}{\kappa_{0R}} \nabla E}$)]]
     54
     55
     56So in principle combining the gas and energy equations in the limit that of high planck opacity, does not change the matrix or rhs vector, however it does limit the ability for there to be strong source terms on the right in regions where the gas and radiation have gotten out of equilibrium.  It is not clear how this effects the ability of the elliptic solver to converge to given tolerances.
     57
     58== Modifications to time steps ==
     59
     60More importantly is the recognition of the time scales over which the internal energy can change.
     61
     62Previously we looked at the decoupled equation for the gas energy density
     63
     64[[latex($\frac{\partial e}{\partial t}=-\kappa_{0P}(4 \pi B-cE)$)]]
     65
     66[[latex($\Delta e = \Delta t \kappa_{0P} \left | 4 \pi B_0 -cE \right | < \xi \frac{T_0}{4 \Gamma}$)]]
     67
     68which gives [[latex($\Delta t < \xi \frac{T_0}{4 \Gamma \kappa_{0P} \left | 4 \pi B_0 - cE \right | }$)]]
     69
     70however, if the gas is in equilibrium with the radiation, this does not limit the time step at all - even though diffusion may quickly move the gas out of equilibrium with the radiation.
     71
     72We can account for this by expanding our equation
     73
     74 [[latex($\Delta t < \xi \frac{T_0}{4 \Gamma \kappa_{0P} \left | 4 \pi B_0 - c\left(E_0+\partial_tE\Delta t\right ) \right | }$)]] which gives us a quadratic for [[latex($\Delta t$)]]
     75
     76
     77 [[latex($-4 \Gamma \kappa_{0P} c \partial_tE \Delta t^2 +  \left(4 \Gamma \kappa_{0P} \left ( 4 \pi B_0 - cE_0 \right ) \right ) \Delta t - \xi T_0 < 0$)]]
     78
     79 [[latex($4 \Gamma \kappa_{0P} c \partial_tE \Delta t^2 -  \left(4 \Gamma \kappa_{0P} \left ( 4 \pi B_0 - cE_0 \right ) \right ) \Delta t - \xi T_0 < 0$)]]
     80
     81yucky...
     82
     83How about we assume that the gas is close to equilibrium?  Then we get
     84
     85[[latex($\Delta t < \xi \frac{T_0}{4 \Gamma \kappa_{0P} \left | \partial_tE\Delta t \right | }$)]]
     86
     87[[latex($\Delta t < \sqrt{\xi \frac{T_0}{4 \Gamma \kappa_{0P} c \left | \nabla \cdot \frac{c\lambda}{\kappa_{0R}} \nabla E \right |} }$)]] which is just the geometric average of the coupling time and the diffusion time