530 | | |
531 | | === Time Discretization === |
532 | | |
533 | | Now all the terms on the right hand side that are linear in E or e have been written as E^*^ or e^*^ because there are different ways to approximate E^*^ (e^*^). For Backward Euler we have |
534 | | [[latex(E^*_i = E^{n+1}_i)]] |
535 | | and for Crank Nicholson we have |
536 | | [[latex(E^*_i = \frac{1}{2} \left ( E^{n+1}_i + E^n_i \right ) )]] |
537 | | or we can parameterize the solution |
538 | | [[latex(E^*_i = \psi E^{n+1}_i + \bar{\psi}E^n_i)]] |
539 | | where [[latex(\bar{\psi} = 1-\psi)]] |
540 | | |
541 | | Backward Euler has [[latex(\psi=1)]] and Crank Nicholson has [[latex(\psi=1/2)]] |
542 | | |
543 | | Forward Euler has [[latex(\psi=0)]] |
544 | | |
545 | | In any event in 1D we have the following matrix coefficients |
| 530 | Which we can arrange into the following form |
| 531 | |
| 532 | |
| 533 | \left( 1 + \psi \left ( \alpha^n_{i+1/2} + \alpha^n_{i-1/2} - \zeta^n_{i+1/2} v^n_{x,i+1/2} + zeta^n_{i-1/2} v^n_{x,i-1/2} \right ) E^{n+1}_i - E^{n}_i & = & \left [ \alpha^n_{i+1/2} \left ( \psi E^{n+1}_{i+1} + \bar{\psi} E^{n}_{i+1} - \bar{\psi} E^n_{i} \right ) - \alpha^n_{i-1/2} \left ( \bar{\psi} E^{n}_i - \psi E^{n+1}_{i-1} - \bar{\psi}E^{n}_{i-1} \right ) \right ] \\ |
| 534 | & + & \left [ \zeta^n_{i+1/2} v^n_{x,i+1/2} \left ( \psi E^{n+1}_{i+1} + \bar{\psi} E^{n}_{i+1} + \bar{\psi} E^n_{i} \right ) - \zeta^n_{i-1/2} v^n_{x,i-1/2}\left ( \bar{\psi} E^n_i + \psi E^{n+1}_{i-1} + \bar{\psi}E^{n}_{i-1} \right ) \right ] \\ |
| 535 | & - & \frac{1}{1-\psi \phi} \left [ \theta + \epsilon \left ( \psi E^{n+1}_i + \bar{\psi} E^n_i \right ) + \omega v^n_x \left ( \psi E^{n+1}_{i+1} + \bar{\psi} E^n_{i+1} - \psi E^{n+1}_{i-1} - \bar{\psi} E^n_{i-1} \right ) - \xi \left ( \psi E^{n+1}_i + \bar{\psi} E^{n}_i \right ) \right ] \\ |
| 536 | \end{eqnarray} |
| 537 | |
| 538 | |