AMReX-Astro/Castro

allow for a 2 temperature formulation for hydro

zingale opened this issue ยท 5 comments

The WarpX folks want to have a separate temperature for electrons and ions (heavies), and a source term that represents the equilibriation via collisions. It seems like we can do this by tapping into the aux passives.

We will define the total energy always as:

$$\rho E = \rho e_e + \rho e_h + \frac{1}{2} |U|^2$$

and that is the conserved energy the is needed to get shocks correct. We still still have the Castro internal energy / dual energy formulation that will keep track of

$$\rho e = \rho e_e + \rho e_h$$

but now we will have an aux state of $\rho e_h$. This will satisfy via Castro

$$\frac{\partial (\rho e_h)}{\partial t} + \nabla \cdot (\rho U e_h) = S$$

where the $$S$$ part will rely on PR #2678 . I think there is additional work needed there to use the source in the interface state prediction.

But the energy should follow:

$$\frac{\partial (\rho e_h)}{\partial t} + \nabla \cdot (\rho U e_h) + p_h \nabla \cdot U = S$$

We want to do this by using the Godunov state to construct $p_h \nabla \cdot U$ -- that way we will be consistent with $\rho E$ and $\rho e$. To enable that we need to add a hook in consup_hydro that allows a problem to add additional term to the conserved update.

Todo items:

  • allow passives to optionally have sources (#2678)
  • add a hook in consup_hydro to take on additional sources for the passives
  • add a prediction of the primitive variable passive sources to the interface states -- we should do this without having to store them globally, similar to how we do the sdc sources to the species
  • when we reset e from E, do we need to reset e_e and e_h too so they still sum to e?

working on the EOS here:
AMReX-Astro/Microphysics#1446

There are a few more issues to think about:

  • We want to always use E as the energy, since it is conserved, and we derive e from it by subtracting off the kinetic energy. But if we have 2 internal energies, how do we get each? I think that what we do is that we consider e_h and e_e to be the fractions of the internal energy that are in heavies and electrons and then when we go to reset e, we reinitialize e_h and e_e to the same fractions that sum to e.
  • In the transverse update, we will need to include the p div{U} term in each of the energies. We want to do this in a general fashion somehow to hook into the current transverse update logic

There is a better way to do this that doesn't require any changes to the conservative update, transverse terms, or synchronozation of e and E: we can advect the fraction, f = e_e / e. This takes the form:

$$\frac{\partial (\rho f)}{\partial t} + \nabla \cdot (\rho U f) = \frac{(1 - 2f)}{\tau}$$

So we only need the source term here, which is straightforward.