Changes between Version 176 and Version 177 of FluxLimitedDiffusion
- Timestamp:
- 04/03/13 16:05:27 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
FluxLimitedDiffusion
v176 v177 479 479 and then discretized as 480 480 481 [[latex(e^{n+1}_i-e^{n}_i = \Delta t \left ( f \left ( e^n_i \right ) + g \left (E^*,\nabla E^* \right ) \right ) - \left ( \left ( \bar{\psi} - 1 \right ) \phi \right )e^n_i - \psi \phi e^{n+1}_i )]]481 [[latex(e^{n+1}_i-e^{n}_i = \Delta t \left ( f \left ( e^n_i \right ) + g \left (E^*,\nabla E^* \right ) \right ) + \psi \phi e^n_i - \psi \phi e^{n+1}_i )]] 482 482 483 483 where … … 490 490 Then if we take the semi-discretized equation for E 491 491 492 [[latex(\frac{\partial E}{\partial t} = \nabla \cdot \frac{c \lambda}{\kappa_{0R}} \nabla E - \nabla \cdot \left ( \frac{3-R_2}{2} \mathbf{v} E \right ) - f \left ( e^n_i \right ) - g \left ( E, \nabla E \right ) - \frac{1}{\Delta t} \left ( \ left ( \left ( \bar{\psi} - 1 \right ) \phi \right ) e^n_i +\psi \phi e^{n+1}_i \right ) )]]492 [[latex(\frac{\partial E}{\partial t} = \nabla \cdot \frac{c \lambda}{\kappa_{0R}} \nabla E - \nabla \cdot \left ( \frac{3-R_2}{2} \mathbf{v} E \right ) - f \left ( e^n_i \right ) - g \left ( E, \nabla E \right ) - \frac{1}{\Delta t} \left ( \psi \phi e^n_i - \psi \phi e^{n+1}_i \right ) )]] 493 493 494 494 and then plugin the solution for e^n+1^,,i,, we get 495 495 496 [[latex(\frac{\partial E}{\partial t} = \nabla \cdot \frac{c\lambda}{\kappa_{0R}} \nabla E -\nabla \cdot \left ( \frac{3-R_2}{2}\mathbf{v}E \right ) - f \left (e^n_i \right ) - g \left (E, \nabla E \right ) - \frac{1}{\Delta t} \left ( \ left ( \left ( \bar{\psi} - 1 \right ) \phi \right ) e^n_i + \psi \phi e^n_i \right ) - \frac{\psi \phi }{1-\psi \phi} \left ( f \left ( e^n_i \right ) + g \left (E,\nabla E\right ) \right ) )]]496 [[latex(\frac{\partial E}{\partial t} = \nabla \cdot \frac{c\lambda}{\kappa_{0R}} \nabla E -\nabla \cdot \left ( \frac{3-R_2}{2}\mathbf{v}E \right ) - f \left (e^n_i \right ) - g \left (E, \nabla E \right ) - \frac{1}{\Delta t} \left ( \psi \phi e^n_i - \psi \phi e^n_i - \frac{\psi \phi }{1+\psi \phi} \left ( f \left ( e^n_i \right ) + g \left (E,\nabla E \right ) \right ) \right ) )]] 497 497 498 498 which simplifies to 499 499 500 [[latex(\frac{\partial E}{\partial t} = \nabla \cdot \frac{c\lambda}{\kappa_{0R}} \nabla E -\nabla \cdot \left ( \frac{3-R_2}{2}\mathbf{v}E \right ) - \frac{1}{1 -\psi \phi} \left ( f \left ( e^n_i \right ) + g \left ( E,\nabla E \right ) \right ) )]]501 502 Now we have 1 equation with 1 variable that we can solve implicitly using hypre, and then we can use E^n+1^ and E^n^ to construct E^*^ which we can plug into the equation for e^n+1^500 [[latex(\frac{\partial E}{\partial t} = \nabla \cdot \frac{c\lambda}{\kappa_{0R}} \nabla E -\nabla \cdot \left ( \frac{3-R_2}{2}\mathbf{v}E \right ) - \frac{1}{1+\psi \phi} \left ( f \left ( e^n_i \right ) + g \left ( E,\nabla E \right ) \right ) )]] 501 502 Now we have 1 equation with 1 variable that we can solve implicitly using hypre, and then we can use \(E^{n+1}\) and \(E^\) to construct \(E^*\) which we can plug into the equation for \(e^{n+1}\) 503 503 504 504