Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow for a 2 temperature formulation for hydro #2679

Open
zingale opened this issue Dec 12, 2023 · 5 comments
Open

allow for a 2 temperature formulation for hydro #2679

zingale opened this issue Dec 12, 2023 · 5 comments

Comments

@zingale
Copy link
Member

zingale commented Dec 12, 2023

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$$

@zingale
Copy link
Member Author

zingale commented Dec 12, 2023

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.

@zingale
Copy link
Member Author

zingale commented Dec 12, 2023

Todo items:

  • allow passives to optionally have sources (allow for optional passive sources to the conserved state #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?

@zingale
Copy link
Member Author

zingale commented Jan 10, 2024

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

@zingale
Copy link
Member Author

zingale commented Jan 11, 2024

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

@zingale
Copy link
Member Author

zingale commented Jan 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant