Changes between Version 15 and Version 16 of u/erica/PoissonPlusHydro
- Timestamp:
- 09/16/13 12:33:09 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
u/erica/PoissonPlusHydro
v15 v16 80 80 81 81 To solve the 2nd source term ODE, 82 83 [[latex($\frac{d}{dt}(E) = -\rho u \cdot \triangledown \phi $)]] 84 85 replace with discrete derivatives, 86 87 [[latex($\frac{E_i^{n+1} - E_i^{n+1/2}}{dt} = -\frac{\rho_i^{n+1/2}u_i^{n+1/2}(\phi_{i+1}^{n+1/2} - \phi_i^{n+1/2})}{dx}$)]] 88 89 I am not exactly sure which time level to use for u (n+1 or n+1/2). 90 91 Rearranging for the updated version of the energy, we have, 92 93 [[latex($E_i^{n+1} = -\frac{dt}{dx}[\rho_i^{ n+1/2} u_i^{n+1/2}(\phi_{i+1}^{n+1/2}-\phi_i^{n+1/2})] + E_i^{n+1/2}$)]]