Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug relating to drift-time for gas-deposition in EnzoMethodPmDe…
…posit Previously the drift time for the gas density was set to the value of `alpha` (taken from `Method:pm_deposit:alpha`). As @stefanarridge pointed out in PR #89 this didn't make a lot of sense. I also ran into issues with introducing a Stable Jeans Wave regression test in PR #186 that required me to set `Method:pm_deposit:alpha` to 0. For comparison, the drift time for the gravitating mass particles is set to `alpha * dt / cosmo_a`, in which: - `alpha` again comes from `Method:pm_deposit:alpha` - `dt` is the time-step during the current cycle - `cosmo_a` is the scale factor computed at `time + alpha * dt` (where `time` is the time at the start of the current cycle) To investigate this issue I checked the original code from enzo-dev in `Grid_DepositBaryons.C`. I concluded that enzo-dev sets the gas density's drift-timestep should get set in exactly the same way as the Particle's drift timestep. However, when using the PPM and Zeus Hydro-solvers, the drift timestep is set to 0 (this is consistent with a comment @johnwise made during his review of PR #189). Since our 2 primary hydro-solvers in Enzo-E (Ppm and VL+CT) currently handle these source terms with the same temporal order as these solvers, we now force the gas-deposition drift timestep to be 0 in `EnzoMethodPmDeposit`. We will need to revisit this exact behavior when we eventually modify the VL+CT solver to handle self-gravity in a higher temporal-order manner.
- Loading branch information